textureRect

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

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

Return

the newly created TextureRect

Parameters

callback

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


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

Adds a TextureRect to the SceneGraph.root as a child and then triggers the callback

Return

the newly created TextureRect

Parameters

callback

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