Node's ID, generate it with nanoid if applicable.
Node's parent node, if root node, the parent node is replaced by the engine instance.
Engine instance of the node's graph.
Get wether the node is loaded.
Get the node's ID.
Adds a child node to the node children.
This method needs to be implemented to throw an error if the node cannot have children (outer nodes).
Node to add as child.
New children array length.
Called at each fixed step of the loop by the parent
node load method or the engine's step
method directly.
It calls the node's onFixedStep
method.
In the case of an inner node, this method
will call the children's fixedStep
methods too.
Called at node loading in the scene graph.
It calls the node's onLoad
method.
In the case of an inner node, this method
will call the children's load
methods too.
To execute on instance creation (in the node's constructor).
This method is not called in the abstract TreeNode class constructor because it needs to be called after all members are initialized.
We do not need a create
method as this is an
internal behavior of nodes.
To execute at each fixed step of the loop.
To execute at node loading/initialization in the graph.
To execute at each step of the loop.
To execute at node unloading in the graph.
Called at each step of the loop by the parent
node load method or the engine's step
method directly.
It calls the node's onStep
method.
In the case of an inner node, this method
will call the children's step
methods too.
Called at node unloading in the scene graph.
It calls the node's onUnload
method.
In the case of an inner node, this method
will call the children's unload
methods too.
Generated using TypeDoc
Basic TreeNode interface for engine's graph.