Skip to content

SceneSourceOptions

Defined in: scene/create-source.ts:13

What createSceneSource builds a scene source from. Only load is required.

F

D = unknown

optional keyOf(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).

F | null

string


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.

F | null

ExplorerScene<F, D> | Promise<ExplorerScene<F, D>>


optional loadStreaming(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.

F

(scene) => void

Promise<ExplorerScene<F, D>>


optional parentOf(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.

F

ExplorerScene<F, D>

ParentLink<F> | Promise<ParentLink<F>>