RSX Code Reference
    Preparing search index...
    • rsx
    • SceneInstance

    Class SceneInstance

    Contains information about an instantiated scene.

    Index
    • Creates a brand new scene with an empty root object.

      Parameters

      • name: string
      • OptionalisInternalConstructor: boolean

      Returns SceneInstance

    • get activeTime(): number

      The active time of the scene, if the scene is in play mode.

      Returns number

    • get isDestroyed(): boolean

      Returns true if the scene has been destroyed.

      Returns boolean

    • get isSyncDirty(): boolean

      Returns true if the scene has changes that need to be persisted.

      Returns boolean

    • get name(): string

      Name of the scene.

      Returns string

    • set name(value: string): void

      Parameters

      • value: string

      Returns void

    • get objectManager(): SceneNodeManager

      Returns the manager that's responsible for tracking all the RSX objects and RSX object handles in this scene instance.

      Returns SceneNodeManager

    • get originScene(): Scene

      Determines the original scene resource this instance was created from.

      Returns Scene

    • get physics(): PhysicsScene

      Physical representation of the scene, as assigned by the physics sub-system. Exact implementation depends on the physics plugin used.

      Returns PhysicsScene

    • get runtimeID(): number

      Returns an ID that uniquely identifies a scene instance at runtime.

      Returns number

    • get uuid(): UUID

      Returns the UUID of the Scene resource this scene was instantated from.

      Returns UUID

    • Creates a new SceneObject with the specified name. Object will be placed in the top of the scene hierarchy.

      Parameters

      • name: string

        Name of the scene object.

      • Optionalflags: EnumValue<SceneObjectFlag>

        Optional flags that control object behavior. See SceneObjectFlags.

      Returns SceneObject

      Newly created scene object.

    • Virtual

      Destroys the scene instance and all objects within it.

      Returns void

    • Instantiates a template by creating an instance of the template's scene object hierarchy. The returned hierarchy will be parented to world root of the current scene.

      Parameters

      • templateHandle: Template

        Template resource to instantiate.

      Returns SceneObject

      Instantiated clone of the template's scene object hierarchy.

    • Notifies the scene instance that changes were persisted.

      Returns void

    • Notifies the scene instance that changes were made since last the scene instance was persisted.

      Returns void

    didAddSceneObject: Event<[sceneObject: SceneObject]>

    Called when a scene object was added to the scene instance.

    willRemoveSceneObject: Event<[sceneObject: SceneObject]>

    Called when a scene object is about to be removed from the scene instance.

    willParentChange: Event<[sceneObject: SceneObject]>

    Called before the object is about to be reparented to another object.

    didParentChange: Event<[sceneObject: SceneObject]>

    Called after the object has been reparent to another object.

    didActiveStateChange: Event<[sceneObject: SceneObject]>

    Called after the scene object's active state was changed.

    didSceneObjectFlagsChange: Event<[sceneObject: SceneObject]>

    Called after the scene object's flags were changed.

    didNameChange: Event<[sceneObject: SceneObject]>

    Called after the scene object's name was changed.

    didAddComponent: Event<[sceneObject: SceneObject, component: Component]>

    Called when a component was added to a scene object.

    willRemoveComponent: Event<[sceneObject: SceneObject, component: Component]>

    Called before a component is remvoed from a scene object.

    didRemoveComponent: Event<[sceneObject: SceneObject, uuid: UUID]>

    Called after a component is removed from a scene object.

    didTemplateLinkChange: Event<[sceneObject: SceneObject]>

    Called after the scene object's template link state was changed.

    willChangeSceneRoot: Event<[]>

    Called before the root scene object's will be changed.

    didChangeSceneRoot: Event<[]>

    Called after the root scene object's has changed.

    didSceneObjectNetworkFlagsChange: Event<[sceneObject: SceneObject]>

    Called after the scene object's flags were changed.

    didChangeSyncDirtyState: Event<[p0: boolean]>

    Called when the dirty state of the scene changed.

    onSceneDeltaApply: Event<[sceneObject: SceneObject]>

    Called after the scene has been updated from a scene delta (or template delta).

    onTemplateInstanceUpdateFailed: Event<[sceneObject: SceneObject]>

    Called after a template instance update for a template instance within the scene failed.

    onTemplateInstanceUpdated: Event<[p0: SceneObject]>

    Called after a template instance was successfully updated from its template.

    onMainCameraChanged: Event<[p0: Camera, p1: Camera]>

    Event that is triggered when the main camera of the world object changes.