Package-level declarations

Types

Link copied to clipboard
class AdvancedSceneConfig(renderOptions: RenderOptions = RenderOptions.Default, lightDirection: Vector = SceneProjector.DEFAULT_LIGHT_DIRECTION.normalize(), defaultColor: IsoColor = IsoColor(33.0, 150.0, 243.0), colorPalette: ColorPalette = ColorPalette(), strokeStyle: StrokeStyle = StrokeStyle.FillAndStroke(), gestures: GestureConfig = GestureConfig.Disabled, useNativeCanvas: Boolean = false, cameraState: CameraState? = null, val engine: SceneProjector = IsometricEngine(), val enablePathCaching: Boolean = false, val enableSpatialIndex: Boolean = true, val spatialIndexCellSize: Double = IsometricRenderer.DEFAULT_SPATIAL_INDEX_CELL_SIZE, val forceRebuild: Boolean = false, val frameVersion: Long = 0, val onHitTestReady: (hitTest: (x: Double, y: Double) -> IsometricNode?) -> Unit? = null, val onFlagsReady: (RuntimeFlagSnapshot) -> Unit? = null, val onRenderError: (commandId: String, error: Throwable) -> Unit? = null, val onEngineReady: (SceneProjector) -> Unit? = null, val onRendererReady: (IsometricRenderer) -> Unit? = null, val onBeforeDraw: DrawScope.() -> Unit? = null, val onAfterDraw: DrawScope.() -> Unit? = null, val onPreparedSceneReady: (PreparedScene) -> Unit? = null) : SceneConfig

Extended scene configuration that adds engine-level tuning and lifecycle hook callbacks on top of SceneConfig.

Link copied to clipboard
class BatchNode(var shapes: List<Shape>, var color: IsoColor) : IsometricNode

Node for batch rendering multiple shapes with the same color Useful for performance optimization

Link copied to clipboard
class CameraState(panX: Double = 0.0, panY: Double = 0.0, zoom: Double = 1.0)

Mutable camera state for programmatic viewport control.

Link copied to clipboard
class ColorPalette(val primary: IsoColor = IsoColor(33.0, 150.0, 243.0), val secondary: IsoColor = IsoColor(255.0, 100.0, 0.0), val accent: IsoColor = IsoColor(0.0, 200.0, 100.0), val background: IsoColor = IsoColor(245.0, 245.0, 245.0), val surface: IsoColor = IsoColor(255.0, 255.0, 255.0), val error: IsoColor = IsoColor(244.0, 67.0, 54.0))

A palette of named semantic colors for theming an isometric scene.

Link copied to clipboard
class CustomRenderNode(var renderFunction: (context: RenderContext, nodeId: String) -> List<RenderCommand>) : IsometricNode

Node that delegates rendering to a user-provided function.

Link copied to clipboard
data class DragEvent(val x: Double, val y: Double)

Describes a drag interaction within an isometric scene.

Link copied to clipboard
class GestureConfig(val onTap: (TapEvent) -> Unit? = null, val onDrag: (DragEvent) -> Unit? = null, val onDragStart: (DragEvent) -> Unit? = null, val onDragEnd: () -> Unit? = null, val dragThreshold: Float = 8.0f)

Configuration for gesture handling within an isometric scene.

Link copied to clipboard

Container node that groups other nodes and applies transforms

Link copied to clipboard

Custom Applier that teaches the Compose runtime how to build and update the isometric node tree.

Link copied to clipboard
annotation class IsometricComposable

Composable annotation for isometric nodes

Link copied to clipboard
abstract class IsometricNode

Base node for the isometric scene graph. This is the fundamental building block that Compose Runtime manages. Open for extension to support custom node types via low-level ComposeNode primitives.

Link copied to clipboard
class IsometricRenderer(engine: SceneProjector, enablePathCaching: Boolean = false, enableSpatialIndex: Boolean = true, spatialIndexCellSize: Double = DEFAULT_SPATIAL_INDEX_CELL_SIZE) : Closeable

Renderer that converts the isometric node tree to visual output using a SceneProjector for projection and depth sorting.

Link copied to clipboard

Scope for building isometric scenes with a DSL-like syntax

Link copied to clipboard
class PathNode(var path: Path, var color: IsoColor) : IsometricNode

Node representing a raw 2D path

Link copied to clipboard

Hooks for benchmark instrumentation of the rendering pipeline.

Link copied to clipboard
class RenderContext(val width: Int, val height: Int, val renderOptions: RenderOptions, val lightDirection: Vector = SceneProjector.DEFAULT_LIGHT_DIRECTION.normalize(), accumulatedPosition: Point = Point(0.0, 0.0, 0.0), accumulatedRotation: Double = 0.0, accumulatedScale: Double = 1.0, rotationOrigin: Point? = null, scaleOrigin: Point? = null)

Context for rendering that accumulates transforms through the tree hierarchy

Link copied to clipboard
data class RuntimeFlagSnapshot(val enablePathCaching: Boolean, val enableSpatialIndex: Boolean, val enableBroadPhaseSort: Boolean, val forceRebuild: Boolean, val useNativeCanvas: Boolean, val canvasWidth: Int, val canvasHeight: Int)

Snapshot of the actual runtime flag configuration applied to the renderer. Used by benchmarks to validate that flags took effect.

Link copied to clipboard
open class SceneConfig(val renderOptions: RenderOptions = RenderOptions.Default, val lightDirection: Vector = DEFAULT_LIGHT_DIRECTION.normalize(), val defaultColor: IsoColor = IsoColor(33.0, 150.0, 243.0), val colorPalette: ColorPalette = ColorPalette(), val strokeStyle: StrokeStyle = StrokeStyle.FillAndStroke(), val gestures: GestureConfig = GestureConfig.Disabled, val useNativeCanvas: Boolean = false, val cameraState: CameraState? = null)

Core configuration for an isometric scene.

Link copied to clipboard
class ShapeNode(var shape: Shape, var color: IsoColor) : IsometricNode

Node representing a 3D shape

Link copied to clipboard
sealed class StrokeStyle

Describes how shape faces are painted in an isometric scene.

Link copied to clipboard
data class TapEvent(val x: Double, val y: Double, val node: IsometricNode? = null)

Describes a tap interaction within an isometric scene.

Properties

Link copied to clipboard

CompositionLocal for providing benchmark hooks to the renderer.

Link copied to clipboard

CompositionLocal for providing a ColorPalette of named semantic colors.

Link copied to clipboard

CompositionLocal for providing the default IsoColor applied to shapes that do not specify an explicit color.

Link copied to clipboard

CompositionLocal for providing the IsometricEngine to child composables.

Link copied to clipboard

CompositionLocal for providing the directional-light vector used to shade faces.

Link copied to clipboard

CompositionLocal for providing RenderOptions that control depth sorting, back-face culling, bounds checking, and broad-phase sort behaviour.

Link copied to clipboard

CompositionLocal for providing the current StrokeStyle to shapes in the scene.

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 IsometricScene(modifier: Modifier = Modifier, config: AdvancedSceneConfig, content: @Composable IsometricScope.() -> Unit)

Advanced entry point exposing the full renderer and benchmark configuration.

fun IsometricScene(modifier: Modifier = Modifier, config: SceneConfig = SceneConfig(), content: @Composable IsometricScope.() -> Unit)

High-level entry point for standard scene usage.

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.