camera2d

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

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

Return

the newly created Camera2D

Parameters

callback

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


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

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

Return

the newly created Camera2D

Parameters

callback

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