the parent container that contains the object associated with this container.
the object that is built with the instances of this container.
Add an object to the instances living in the container.
The object to be added.
Convert a point from the canvas coordinates (for example, the mouse position) to the container coordinates.
The x position, in container coordinates.
The y position, in container coordinates.
The point instance that is used to return the result.
Convert a point from the container coordinates (for example, an object position) to the canvas coordinates.
The x position, in container coordinates.
The y position, in container coordinates.
The point instance that is used to return the result.
Create a new object from its name. The object is also added to the instances living in the container (No need to call gdjs.RuntimeScene.addObject)
The name of the object to be created
The created object
Create objects from initial instances data (for example, the initial instances of the scene or the instances of an external layout).
The instances data
The offset on X axis
The offset on Y axis
The offset on Z axis
If true, objects are tracked by setting their persistentUuid
to the same as the associated instance. Useful for hot-reloading when instances are changed.
Get a list of all gdjs.RuntimeObject living in the container. You should not, normally, need this method at all. It's only to be used in exceptional use cases where you need to loop through all objects, and it won't be performant.
The list of all runtime objects in the container
Get the renderer for visual debugging associated to the container.
Get the gdjs.RuntimeGame associated to this.
the right bound of:
the bottom bound of:
the left bound of:
the top bound of:
The name of the object
the instances of a given object in the container.
Get the layer with the given name
The name of the layer
The layer, or the base layer if not found
Get all the instances of the object called name.
Name of the object for which the instances must be returned.
The list of objects with the given name
Get the renderer associated to the RuntimeScene.
Get the gdjs.RuntimeScene associated to this.
the right bound of:
the bottom bound of:
the left bound of:
the top bound of:
the height of:
the center X of:
the center Y of:
the width of:
Load the container from the given initial configuration.
An object containing the container data.
gdjs.RuntimeGame#getSceneAndExtensionsData
Must be called whenever an object must be removed from the container.
The object to be removed.
Called when the associated object is destroyed (because it is removed from its parent container or the scene is being unloaded).
The container owning the object.
Register a gdjs.RuntimeObject so that instances of it can be used in the container.
The data for the object to register.
Remove a layer. All gdjs.RuntimeObject on this layer will be moved back to the base layer.
The name of the layer to remove
Unregister a gdjs.RuntimeObject. Instances will be destroyed.
The name of the object to unregister.
Update the data of a gdjs.RuntimeObject so that instances use this when constructed.
The data for the object to register.
The instance container of a custom object, containing instances of objects rendered on screen.
See
gdjs.CustomRuntimeObject