canvasLayer

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

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

Return

the newly created CanvasLayer

Parameters

callback

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


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

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

Return

the newly created CanvasLayer

Parameters

callback

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