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;
    loadingMode?: SceneModelLoadingMode;
    materials?: SceneMaterialParams[];
    matrix?: Mat4;
    meshes?: SceneMeshParams[];
    objects?: SceneObjectParams[];
    position?: Vec3;
    quaternion?: Quat;
    repSets?: SceneRepSetParams[];
    rotation?: Vec3;
    scale?: Vec3;
    sealed?: boolean;
    textures?: SceneTextureParams[];
    transforms?: SceneTransformParams[];
    updateMode?: SceneModelUpdateMode;
}

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.

loadingMode?: SceneModelLoadingMode

Describes the model's topology loading mode.

  • "open": components can be added until the model is destroyed or sealed. Batches are allowed, but future commits are not assumed to be the normal loading pattern.
  • "streaming": components can continue to arrive over time. Each commitBatch() can publish another chunk, tile or loading phase, and renderers should keep append-friendly behavior available until seal().

Default is "open".

materials?: SceneMaterialParams[]

Parameters for SceneMaterials in the SceneModel.

matrix?: Mat4

4x4 transform matrix.

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.

repSets?: SceneRepSetParams[]

Parameters for representation sets in the SceneModel.

A representation set declares alternative representations of the same logical content by referencing SceneObjects.

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].

sealed?: boolean

Whether the model should be closed to new topology after params are loaded.

loadingMode remains the construction intent that was requested ("open" or "streaming"). sealed is the mutable runtime state reached by calling seal. SceneModel.toParams() serializes this flag separately so replaying params can reconstruct a sealed model without losing the original loading mode.

Default is false.

textures?: SceneTextureParams[]

Parameters for SceneTextures in the SceneModel.

transforms?: SceneTransformParams[]

Parameters for SceneTransforms in the SceneModel.

Renderer-neutral update mode for this SceneModel.

Use this when the application can describe the model at a higher level than individual renderer allocation configurations.

Renderer-facing data is the data that renderers cache, upload or reorganize for drawing after the model has been created. Typical examples are mesh transforms, object visibility and selection state, colors, opacity, and other per-object or per-mesh values that can affect rendered output without adding new geometry.

  • "auto": let renderers choose their safe default.
  • "static": renderer-facing data is stable after creation.
  • "dynamic": renderer-facing data changes frequently after creation.

For WebGPU, this value selects a renderer-owned update-mode policy. For example, updateMode: "static" can map to compact storage after seal(), while updateMode: "dynamic" can map to append-friendly stream storage. Configure those mappings with WebGPURendererParams.updateModePolicies instead of adding renderer-specific settings to SceneModel params.

Use loadingMode to describe whether topology is ordinary open authoring or explicit incremental streaming. Renderers combine update mode, loading mode, sealed state and observed model size to choose backend-specific storage and rendering policies.

Default is "auto".