API

Interface ISceneSerializableComponent

This represents a SERIALIZABLE scene component.

This extends Scene Component to add Serialization methods on top.

interface ISceneSerializableComponent {
    name: string;
    scene: Scene;
    addFromContainer(container: IAssetContainer): void;
    dispose(): void;
    rebuild(): void;
    register(): void;
    removeFromContainer(container: IAssetContainer, dispose?: boolean): void;
    serialize(serializationObject: any): void;
}

Hierarchy (View Summary)

Implemented by

Index
name: string

The name of the component. Each component must have a unique name.

scene: Scene

The scene the component belongs to.

  • Adds all the elements from the container to the scene

    Parameters

    • container: IAssetContainer

      the container holding the elements

    Returns void

  • Removes all the elements in the container from the scene

    Parameters

    • container: IAssetContainer

      contains the elements to remove

    • Optionaldispose: boolean

      if the removed element should be disposed (default: false)

    Returns void

  • Serializes the component data to the specified json object

    Parameters

    • serializationObject: any

      The object to serialize to

    Returns void