SceneSourceOptions
Defined in: scene/create-source.ts:13
What createSceneSource builds a scene source from. Only load is required.
Type Parameters
Section titled “Type Parameters”F
D = unknown
Methods
Section titled “Methods”keyOf()?
Section titled “keyOf()?”
optionalkeyOf(focus):string
Defined in: scene/create-source.ts:21
A stable string per focus. Without it: "root" for null, the value itself for a string,
String() for a number, and JSON.stringify for anything else (so give objects their own
keyOf if their key order can vary).
Parameters
Section titled “Parameters”F | null
Returns
Section titled “Returns”string
load()
Section titled “load()”load(
focus):ExplorerScene<F,D> |Promise<ExplorerScene<F,D>>
Defined in: scene/create-source.ts:15
The scene for a focus (null is the top). Called once per focus until it is invalidated.
Parameters
Section titled “Parameters”F | null
Returns
Section titled “Returns”ExplorerScene<F, D> | Promise<ExplorerScene<F, D>>
loadStreaming()?
Section titled “loadStreaming()?”
optionalloadStreaming(focus,onUpdate):Promise<ExplorerScene<F,D>>
Defined in: scene/create-source.ts:24
Resolve with a first part of a scene at once, then call onUpdate with fuller ones. Without
it, the explorer waits for load. The cache holds the fullest scene seen so far.
Parameters
Section titled “Parameters”F
onUpdate
Section titled “onUpdate”(scene) => void
Returns
Section titled “Returns”Promise<ExplorerScene<F, D>>
parentOf()?
Section titled “parentOf()?”
optionalparentOf(focus,current):ParentLink<F> |Promise<ParentLink<F>>
Defined in: scene/create-source.ts:17
Where zooming out of focus leads (see ParentLink). Without it, nothing is above.
Parameters
Section titled “Parameters”F
current
Section titled “current”ExplorerScene<F, D>
Returns
Section titled “Returns”ParentLink<F> | Promise<ParentLink<F>>