node

inline fun Node.node(callback: Node.() -> Unit = {}): Node

Adds a Node to the current Node as a child and then triggers the callback

Return

the newly created Node

Parameters

callback

the callback that is invoked with a Node context in order to initialize any values


inline fun <T : Node> Node.node(node: T, callback: T.() -> Unit = {}): T

Adds the specified Node to the current Node as a child and then triggers the callback. This can be used for classes that extend node that perhaps they don't have a DSL method to initialize it.

Return

the newly created Node

Parameters

node

the node to add

callback

the callback that is invoked with a Node context in order to initialize any values


inline fun SceneGraph<*>.node(callback: Node.() -> Unit = {}): Node

Adds a Node to the current SceneGraph.root as a child and then triggers the Node

Return

the newly created Node

Parameters

callback

the callback that is invoked with a Node context in order to initialize any values


inline fun <T : Node> SceneGraph<*>.node(node: T, callback: T.() -> Unit = {}): T

Adds a Node to the current SceneGraph.root as a child and then triggers the Node. This can be used for classes that extend node that perhaps they don't have a DSL method to initialize it.

Return

the newly created Node

Parameters

node

the node to add

callback

the callback that is invoked with a Node context in order to initialize any values