AdvancedSceneConfig

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.

Use this when you need fine-grained control over the rendering pipeline, such as enabling path caching, configuring the spatial index, or receiving callbacks at specific points in the render lifecycle.

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.

Constructors

Link copied to clipboard
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)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val onHitTestReady: (hitTest: (x: Double, y: Double) -> IsometricNode?) -> Unit?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val onRenderError: (commandId: String, error: Throwable) -> Unit?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String