Package-level declarations

Types

Link copied to clipboard
abstract class CanvasItem : Node

A Node with 2D transformations.

Link copied to clipboard
open class CanvasLayer : Node

A Node that uses a separate OrthographicCamera for rendering instead of the inherited camera from the SceneGraph. This is useful to render a list of nodes with a camera a certain way and another list of nodes another way.

Link copied to clipboard

A CanvasLayer that renders it children to a FrameBuffer of a specified size.

Link copied to clipboard
open class Node : Comparable<Node>

The base node class that all other node's inherit from.

Link copied to clipboard

A CanvasLayer that handles updating the viewport and uses the viewport to render its children.

Functions

Link copied to clipboard
fun <T : Node> T.addTo(scene: SceneGraph<*>): T
fun <T : Node> T.addTo(parent: Node): T
Link copied to clipboard
inline fun SceneGraph<*>.canvasLayer(callback: CanvasLayer.() -> Unit = {}): CanvasLayer

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

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

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

Link copied to clipboard
inline fun <T : Node> Node.findFirstNodeOfType(): T?
Link copied to clipboard
inline fun SceneGraph<*>.frameBuffer(callback: FrameBufferNode.() -> Unit = {}): FrameBufferNode
inline fun Node.frameBuffer(callback: FrameBufferNode.() -> Unit = {}): FrameBufferNode
Link copied to clipboard
inline fun SceneGraph<*>.node(callback: Node.() -> Unit = {}): Node

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

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

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

inline fun <T : Node> SceneGraph<*>.node(node: T, callback: T.() -> Unit = {}): T

Adds a Node to the current SceneGraph.root as a child and then triggers the Node. This can be used for classes that extend node that perhaps they don't have a DSL method to initialize it.

inline fun <T : Node> Node.node(node: T, callback: T.() -> Unit = {}): T

Adds the specified Node to the current Node as a child and then triggers the callback. This can be used for classes that extend node that perhaps they don't have a DSL method to initialize it.

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

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

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

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