Abstract
Abstract
addAdd an object to the instances living in the container.
The object to be added.
Abstract
convertConvert 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.
Optional
result: FloatPointThe point instance that is used to return the result.
Abstract
convertConvert 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
Abstract
getAbstract
getGet the renderer for visual debugging associated to the container.
Abstract
getAbstract
getGet the gdjs.RuntimeGame associated to this.
Abstract
getthe right bound of:
Abstract
getthe bottom bound of:
Abstract
getthe left bound of:
Abstract
getthe 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
Abstract
getGet the renderer associated to the container.
Abstract
getGet the gdjs.RuntimeScene associated to this.
Abstract
getthe right bound of:
Abstract
getthe bottom bound of:
Abstract
getthe left bound of:
Abstract
getthe top bound of:
Abstract
getthe height of:
Abstract
getthe center X of:
Abstract
getthe center Y of:
Abstract
getthe width of:
Must be called whenever an object must be removed from the container.
The object to be removed.
Abstract
onRegister 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.
A container of object instances rendered on screen.