makeSceneCache()
The scene cache on any CacheStore: keys are prefixed with salt, maxBytes evicts by last use after each write. openSceneCache is this on IndexedDB.
function makeSceneCache(
store: CacheStore,
salt: string,
opts?: SceneCacheOptions,
now?: () => number
): SceneCache;Defined in: engine/src/worker/scene-cache.ts:214
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
store | CacheStore | undefined | - |
salt | string | undefined | - |
opts? | SceneCacheOptions | {} | - |
now? | () => number | Date.now | The clock for created / lastUsed (default Date.now); tests pass their own. |
Returns
~~makePlacementWorker()~~
Bake static placements on a worker, main-thread side: makeSceneWorker under its older name, typed as the bake-only PlacementWorker. Give it to makeInstanceLayer(target, { placement }), which bakes there as before; to encode models on it as well, use makeSceneWorker and the layer's worker option.
makeSceneCacheControls()
SceneCacheControls on any CacheStore. openSceneCacheControls is this on IndexedDB.