Container of model geometry and materials.

A Scene contains SceneModels, SceneObjects, SceneMeshes, SceneGeometries, SceneTextureSets and SceneTextures.

See @xeokit/scene for usage.

Hierarchy

  • Component
    • Scene

Constructors

Properties

destroyed: boolean

True once this Component has been destroyed.

Don't use this Component if this is true.

dirty: boolean
id: string

Unique ID of this Component.

models: {
    [key: string]: SceneModel;
}

The SceneModels belonging to this Scene, each keyed to its SceneModel.id.

Type declaration

objects: {
    [key: string]: SceneObject;
}

The SceneObjects in this Scene, mapped to SceneObject.id.

Type declaration

tiles: {
    [key: string]: SceneTile;
}

The @xeokit/scene!SceneTile | Tiles in this Scene

Type declaration

  • [key: string]: SceneTile

Accessors

Methods

  • Forces this component to action any deferred state updates.

    Returns void

  • Gives this component an opportunity to action any defered state updates.

    Returns void

  • Protected

    Logs an error for this component to the JavaScript console.

    The console message will have this format: [ERROR] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The error message to log

    Returns void

  • Protected

    Logs a message for this component.

    The message will have this format: [LOG] [<component type> <component id>: <message>

    Parameters

    • message: string

      The message to log

    Returns void

  • Flags this component as having a defered state updates it needs to perform.

    Returns void

  • Protected

    Logs a warning for this component to the JavaScript console.

    The console message will have this format: [WARN] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The warning message to log

    Returns void

Events

onDestroyed: EventEmitter<Component, null>

Emits an event when the Component has been destroyed.

onModelCreated: EventEmitter<Scene, SceneModel>

Emits an event each time a SceneModel is created in this Scene.

onModelDestroyed: EventEmitter<Scene, SceneModel>

Emits an event each time a SceneModel is destroyed in this Scene.

onTileCreated: EventEmitter<Scene, SceneTile>

Emits an event each time a @xeokit/scene!SceneTile is created in this Scene.

onTileDestroyed: EventEmitter<Scene, SceneTile>

Emits an event each time a @xeokit/scene!SceneTile | SceneTile is destroyed in this Scene.