API

Interface SceneOptions

Interface defining initialization parameters for Scene class

interface SceneOptions {
    defaultCameraLayerMask?: number;
    defaultRenderableLayerMask?: number;
    useClonedMeshMap?: boolean;
    useFloatingOrigin?: boolean;
    useGeometryUniqueIdsMap?: boolean;
    useMaterialMeshMap?: boolean;
    virtual?: boolean;
}
Index
defaultCameraLayerMask?: number

Defines the default layerMask used when creating cameras in the scene (default: 0x0fffffff)

defaultRenderableLayerMask?: number

Defines the default layerMask used when creating renderable objects in the scene (default: 0x0fffffff)

useClonedMeshMap?: boolean

Defines that each mesh of the scene should keep up-to-date a map of referencing cloned meshes for fast disposing It will improve performance when the number of mesh becomes important, but might consume a bit more memory

useFloatingOrigin?: boolean

When enabled, the scene can handle large world coordinate rendering without jittering caused by floating point imprecision on the GPU. This mode offsets matrices and position-related attribute values before passing to shaders, centering camera at origin and offsetting other scene objects by camera active position.

IMPORTANT: Only use this scene-level option if you intend to enable floating origin on a per-scene basis. Must use in conjunction with engine creation option 'useHighPrecisionMatrix' to fix CPU-side floating point imprecision. HOWEVER if you want largeWorldRendering on ALL scenes, set the useLargeWorldRendering flag on the engine instead of this scene-level flag. Doing so will automatically set useHighPrecisionMatrix on the engine as well.

useGeometryUniqueIdsMap?: boolean

Defines that scene should keep up-to-date a map of geometry to enable fast look-up by uniqueId It will improve performance when the number of geometries becomes important.

useMaterialMeshMap?: boolean

Defines that each material of the scene should keep up-to-date a map of referencing meshes for fast disposing It will improve performance when the number of mesh becomes important, but might consume a bit more memory

virtual?: boolean

Defines if the creation of the scene should impact the engine (Eg. UtilityLayer's scene)