IsometricScope

Scope for building isometric scenes with a DSL-like syntax

Functions

Link copied to clipboard
fun IsometricScope.Batch(shapes: List<Shape>, color: IsoColor = LocalDefaultColor.current, position: Point = Point(0.0, 0.0, 0.0), rotation: Double = 0.0, scale: Double = 1.0, rotationOrigin: Point? = null, scaleOrigin: Point? = null, visible: Boolean = true)

Batch multiple shapes with the same color for performance.

Link copied to clipboard
fun IsometricScope.CustomNode(position: Point = Point(0.0, 0.0, 0.0), rotation: Double = 0.0, scale: Double = 1.0, rotationOrigin: Point? = null, scaleOrigin: Point? = null, visible: Boolean = true, renderOptions: RenderOptions? = null, render: (context: RenderContext, nodeId: String) -> List<RenderCommand>)

Add a custom-rendered node to the isometric scene.

Link copied to clipboard
fun <T> IsometricScope.ForEach(items: List<T>, key: (T) -> Any? = null, content: @Composable IsometricScope.(T) -> Unit)

Renders content once for each item in items.

Link copied to clipboard
fun IsometricScope.Group(position: Point = Point(0.0, 0.0, 0.0), rotation: Double = 0.0, scale: Double = 1.0, rotationOrigin: Point? = null, scaleOrigin: Point? = null, visible: Boolean = true, renderOptions: RenderOptions? = null, content: @Composable IsometricScope.() -> Unit)

Create a group that applies transforms to all its children.

Link copied to clipboard

Conditionally renders content based on condition.

Link copied to clipboard
fun IsometricScope.Path(path: Path, color: IsoColor = LocalDefaultColor.current, position: Point = Point(0.0, 0.0, 0.0), rotation: Double = 0.0, scale: Double = 1.0, rotationOrigin: Point? = null, scaleOrigin: Point? = null, visible: Boolean = true)

Add a raw 2D path to the isometric scene.

Link copied to clipboard
fun IsometricScope.Shape(geometry: Shape, color: IsoColor = LocalDefaultColor.current, position: Point = Point(0.0, 0.0, 0.0), rotation: Double = 0.0, scale: Double = 1.0, rotationOrigin: Point? = null, scaleOrigin: Point? = null, visible: Boolean = true)

Add a 3D shape to the isometric scene.

Link copied to clipboard
fun IsometricScope.Stack(count: Int, axis: StackAxis = StackAxis.Z, gap: Double = 1.0, content: @Composable IsometricScope.(index: Int) -> Unit)

Renders count children arranged along axis at equal gap spacing.

Link copied to clipboard
fun IsometricScope.TileGrid(width: Int, height: Int, config: TileGridConfig = TileGridConfig(), onTileClick: (TileCoordinate) -> Unit? = null, content: @Composable IsometricScope.(TileCoordinate) -> Unit)

Renders an isometric tile grid and routes tap events to tile coordinates.