Class InnerNode

An inner node is a node of the tree that has child nodes.

In most cases those nodes will be used as entity nodes and will be composed of component nodes. But those can be used for any other purpose (utility, scene orchestrating, etc.).

Hierarchy (view full)

Constructors

Properties

_children: TreeNode[]

Node's children nodes.

_engine: Engine

Engine instance of the node's graph.

_id: string

Node's ID, generate it with nanoid if applicable.

_isLoaded: boolean

Get wether the node is loaded.

_parent: Engine | TreeNode

Node's parent node, if root node, the parent node is replaced by the engine instance.

Accessors

Methods

  • Sealed

    Adds a child node to this node children and loads it.

    Parameters

    Returns number

    New children array length.

  • Sealed

    Called at parent nodes fixedStep or directly by the engine's step if this node is the rootNode.

    Calls the onFixedStep and children's fixedStep methods.

    Returns void

  • Sealed

    Called at parent nodes loading or directly by the engine's loading if this node is the rootNode.

    Calls the onLoad method and children's load methods.

    Returns void

  • Called by the parent node when loaded, this function is to be implemented when needed.

    If this node is the engine's root node, this function will be called by the engine instead.

    Returns void

  • Called by the parent node at each step of the loop, this function is to be implemented when needed.

    Parameters

    • delta: number

    Returns void

  • Called by the parent node at unload, this function is to be implemented when needed.

    If this node is the engine's root node, this function will be called by the engine instead.

    Returns void

  • Sealed

    Called at parent nodes step or directly by the engine's step if this node is the rootNode.

    Calls the onStep method and children's step methods.

    Parameters

    • delta: number

    Returns void

  • Sealed

    Called at parent nodes unload or directly by the engine's unload if this node is the rootNode.

    Calls the onUnload method and children's unload methods.

    Returns void