Interface SceneModelParams

Parameters for a SceneModel.

See @xeokit/sdk/model/scene for usage.

interface SceneModelParams {
    coordinateSystem?: CoordinateSystemParams;
    geometries?: SceneGeometryParams[];
    geometriesCompressed?: SceneGeometryCompressedParams[];
    globalizedIds?: boolean;
    id?: string;
    layerId?: string;
    lifecycle?: SceneModelLifecycle;
    materials?: SceneMaterialParams[];
    matrix?: Mat4;
    memoryPolicy?: SceneModelMemoryPolicy;
    meshes?: SceneMeshParams[];
    objects?: SceneObjectParams[];
    position?: Vec3;
    quaternion?: Quat;
    rotation?: Vec3;
    scale?: Vec3;
    textures?: SceneTextureParams[];
    transforms?: SceneTransformParams[];
    updateHint?: SceneModelUpdateHint;
}

Properties

coordinateSystem?: CoordinateSystemParams

Configures the SceneModel's local coordinate system.

By default, itis a right-handed Z-up coordinate system.

geometries?: SceneGeometryParams[]

Parameters for SceneGeometries in the SceneModel.

geometriesCompressed?: SceneGeometryCompressedParams[]

Compressed parameters for SceneGeometries in the SceneModel.

globalizedIds?: boolean

Whether IDs of the SceneObjects are globalized.

When globalized, the IDs are prefixed with the value of SceneModel.id

Default is false.

id?: string

Unique ID for the SceneModel.

The SceneModel is stored with this ID in Scene.models

layerId?: string

If we want to view the SceneModel with a Viewer, an optional ID of the ViewLayer to view the SceneModel in.

Will be "default" by default.

Overrides SceneObjectParams.layerId.

Describes the model's construction lifecycle.

  • "open": components can be added until the model is destroyed or sealed.
  • "streaming": components can continue to arrive over time; committed batches may be treated as immutable allocation units by renderers.
  • "sealed": the model is closed to new topology after initial creation.

Default is "open".

materials?: SceneMaterialParams[]

Parameters for SceneMaterials in the SceneModel.

matrix?: Mat4

4x4 transform matrix.

memoryPolicy?: SceneModelMemoryPolicy

Renderer allocation policy for this SceneModel.

This controls whether renderers should prefer reusable backing stores or tightly sized storage for internal resources such as VBOs, data textures and renderer-side batch tables. It does not change the SceneModel's public data, and it is not a strict heap budget.

  • "stream": default. Use for models that can keep receiving components, batches or edits. Renderers may use their normal growable/reusable allocation strategy.
  • "compact": use for finalized models or committed streaming batches where memory footprint matters more than cheap future growth. Renderers should avoid avoidable slack when allocating storage for sealed models or committed batches.

Default is "stream".

meshes?: SceneMeshParams[]

Parameters for SceneMeshes in the SceneModel.

objects?: SceneObjectParams[]

Parameters for SceneObjects in the SceneModel.

position?: Vec3

World-space position of the SceneModel.

quaternion?: Quat

Quaternion defining the orientation of the SceneModel.

rotation?: Vec3

Orientation of the SceneModel, given as Euler angles in degrees for X, Y and Z axis.

scale?: Vec3

Scale of the SceneModel.

Default is [1,1,1].

textures?: SceneTextureParams[]

Parameters for SceneTextures in the SceneModel.

transforms?: SceneTransformParams[]

Parameters for SceneTransforms in the SceneModel.

Hint describing how often this SceneModel's renderer-facing values are expected to be uploaded.

  • "auto": let the renderer choose its safe default.
  • "static": low runtime value upload rate, drawn many times; renderers may favor draw-time optimized storage such as VBO-backed batches.
  • "dynamic": frequent runtime uploads of matrices, transforms, colors or object state; renderers may favor update-friendly storage.

Default is "auto".