Interface ISceneSerializableComponent
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;
}
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)
- ISceneComponent
- ISceneSerializableComponent
Implemented by
Properties
name
name: string
The name of the component. Each component must have a unique name.
scene
The scene the component belongs to.
Methods
add From Container
-
Adds all the elements from the container to the scene
Parameters
- container: IAssetContainer
the container holding the elements
Returns void
- container: IAssetContainer
dispose
-
Disposes the component and the associated resources.
Returns void
rebuild
-
Rebuilds the elements related to this component in case of context lost for instance.
Returns void
register
-
Register the component to one instance of a scene.
Returns void
remove From Container
-
Removes all the elements in the container from the scene
Parameters
- container: IAssetContainer
contains the elements to remove
Optionaldispose: booleanif the removed element should be disposed (default: false)
Returns void
- container: IAssetContainer
serialize
-
Serializes the component data to the specified json object
Parameters
- serializationObject: any
The object to serialize to
Returns void
- serializationObject: any
This represents a SERIALIZABLE scene component.
This extends Scene Component to add Serialization methods on top.