Interface SceneModelParams

Parameters for a SceneModel.

See @xeokit/sdk/scene for usage.

interface SceneModelParams {
    geometries?: SceneGeometryParams[];
    geometriesCompressed?: SceneGeometryCompressedParams[];
    globalizedIds?: boolean;
    id: string;
    layerId?: string;
    matrix?: FloatArrayParam;
    meshes?: SceneMeshParams[];
    objects?: SceneObjectParams[];
    position?: FloatArrayParam;
    quaternion?: FloatArrayParam;
    retained?: boolean;
    rotation?: FloatArrayParam;
    scale?: FloatArrayParam;
    streamParams?: SceneModelStreamParams;
    textures?: SceneTextureParams[];
    textureSets?: SceneTextureSetParams[];
}

Properties

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.

4x4 transform matrix.

meshes?: SceneMeshParams[]

Parameters for SceneMeshes in the SceneModel.

objects?: SceneObjectParams[]

Parameters for SceneObjects in the SceneModel.

position?: FloatArrayParam

World-space position of the SceneModel.

quaternion?: FloatArrayParam

Quaternion defining the orientation of the SceneModel.

retained?: boolean

Whether this SceneModel retains its SceneObjects, SceneMeshes, SceneGeometries etc. after we call SceneModel.build.

Default value is true.

rotation?: FloatArrayParam

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

Scale of the SceneModel.

Default is [1,1,1].

streamParams?: SceneModelStreamParams

Indicates what renderer resources will need to be allocated in a Viewer's Renderer to support progressive loading for a SceneModel.

textures?: SceneTextureParams[]

Parameters for SceneTextures in the SceneModel.

textureSets?: SceneTextureSetParams[]

Parameters for SceneTextureSets in the SceneModel.