sceneGraph

inline fun sceneGraph(context: Context, viewport: Viewport = ScreenViewport( context.graphics.width, context.graphics.height ), batch: Batch? = null, controller: InputMapController<String>? = null, whitePixel: TextureSlice = Textures.white, callback: SceneGraph<String>.() -> Unit = {}): SceneGraph<String>
inline fun <InputSignal> sceneGraph(context: Context, viewport: Viewport = ScreenViewport( context.graphics.width, context.graphics.height ), batch: Batch? = null, uiInputSignals: SceneGraph.UiInputSignals<InputSignal> = SceneGraph.UiInputSignals(), controller: InputMapController<InputSignal> = InputMapController(context.input), whitePixel: TextureSlice = Textures.white, callback: SceneGraph<InputSignal>.() -> Unit = {}): SceneGraph<InputSignal>

Create a new scene graph with a callback with the SceneGraph in context.

Return

the newly created SceneGraph

Parameters

context

the current context

viewport

the viewport that the camera of the scene graph will own

batch

an option sprite batch. If omitted, the scene graph will create and manage its own.

callback

the callback that is invoked with a SceneGraph context in order to initialize any values and create nodes