AdvancedSceneConfig

constructor(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, engine: SceneProjector = IsometricEngine(), enablePathCaching: Boolean = false, enableSpatialIndex: Boolean = true, spatialIndexCellSize: Double = IsometricRenderer.DEFAULT_SPATIAL_INDEX_CELL_SIZE, forceRebuild: Boolean = false, frameVersion: Long = 0, onHitTestReady: (hitTest: (x: Double, y: Double) -> IsometricNode?) -> Unit? = null, onFlagsReady: (RuntimeFlagSnapshot) -> Unit? = null, onRenderError: (commandId: String, error: Throwable) -> Unit? = null, onEngineReady: (SceneProjector) -> Unit? = null, onRendererReady: (IsometricRenderer) -> Unit? = null, onBeforeDraw: DrawScope.() -> Unit? = null, onAfterDraw: DrawScope.() -> Unit? = null, onPreparedSceneReady: (PreparedScene) -> Unit? = null)

Parameters

renderOptions

Controls rendering behaviour such as sorting and face culling.

lightDirection

Normalized direction vector for the scene's light source.

defaultColor

Fallback IsoColor for shapes without an explicit color.

colorPalette

Named semantic colors for consistent theming.

strokeStyle

Determines how shape outlines are drawn.

gestures

Tap and drag interaction configuration.

useNativeCanvas

When true, renders to the platform's native canvas.

cameraState

Optional pan/zoom camera state.

engine

The SceneProjector implementation used for world-to-screen projection. Defaults to IsometricEngine.

enablePathCaching

When true, caches computed paths between frames to reduce allocation pressure. Useful for static or slowly-changing scenes.

enableSpatialIndex

When true, builds a spatial index for efficient hit testing.

spatialIndexCellSize

Cell size (in world units) of the spatial-index grid. Must be positive and finite.

forceRebuild

When true, forces a full scene rebuild on the next frame, bypassing incremental diffing.

frameVersion

Monotonically increasing version counter used to detect changes that require a re-render.

onHitTestReady

Called once the hit-test function is available. The provided lambda maps screen coordinates to the IsometricNode at that position, or null if nothing was hit.

onFlagsReady

Called with a RuntimeFlagSnapshot once runtime flags have been resolved.

onRenderError

Called when a render command fails. Receives the command ID and the thrown Throwable.

onEngineReady

Called with the SceneProjector instance after the engine has been initialised for the current frame.

onRendererReady

Called with the IsometricRenderer instance after the renderer has been initialised for the current frame.

onBeforeDraw

Invoked inside the DrawScope immediately before the scene is drawn. Useful for drawing background layers or debug overlays.

onAfterDraw

Invoked inside the DrawScope immediately after the scene is drawn. Useful for drawing foreground overlays or debug information.

onPreparedSceneReady

Called with the fully-built PreparedScene before it is rendered, allowing inspection or serialisation of the scene graph.