viewport

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

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

Return

the newly created ViewportCanvasLayer

Parameters

callback

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


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

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

Return

the newly created ViewportCanvasLayer

Parameters

callback

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