Skip to content

Scene Configuration

ParamTypeDefaultDescription
renderOptionsRenderOptionsRenderOptions.DefaultDepth sorting, culling, bounds checking
lightDirectionVectorVector(2,-1,3).normalize()Directional light for face shading
defaultColorIsoColorIsoColor(33,150,243)Default shape color when none specified
colorPaletteColorPaletteColorPalette()Theme color palette
strokeStyleStrokeStyleFillAndStroke()Edge rendering style
gesturesGestureConfigGestureConfig.DisabledGesture handlers
useNativeCanvasBooleanfalseUse Android native Canvas (faster on Android)
cameraStateCameraState?nullCamera pan/zoom state
ParamTypeDefaultDescription
enableDepthSortingBooleantrueSort shapes by depth for correct overlap
enableBackfaceCullingBooleantrueSkip rendering faces pointing away
enableBoundsCheckingBooleantrueSkip shapes entirely outside viewport
enableBroadPhaseSortBooleantrueUse spatial grid for faster sorting
broadPhaseCellSizeDouble100.0Grid cell size for broad-phase sorting

Presets: RenderOptions.Default, RenderOptions.NoDepthSorting, RenderOptions.NoCulling

Extends SceneConfig with additional fields:

ParamTypeDefaultDescription
engineSceneProjectorIsometricEngine()Custom projection engine
enablePathCachingBooleanfalseCache path projections
enableSpatialIndexBooleantrueSpatial index for hit testing
spatialIndexCellSizeDoubledefaultGrid cell size
forceRebuildBooleanfalseForce scene rebuild every frame
frameVersionLong0LManual frame versioning
onFlagsReady((RuntimeFlagSnapshot) -> Unit)?nullReceives active runtime flags after config is applied
onRenderError((String, Throwable) -> Unit)?nullCalled when a render command fails (commandId + exception)
onHitTestReady((hitTest: (x: Double, y: Double) -> IsometricNode?) -> Unit)?nullReceive hit-test function
onEngineReadycallback?nullReceive engine reference
onRendererReadycallback?nullReceive renderer reference
onBeforeDrawDrawScope callback?nullCustom drawing before scene
onAfterDrawDrawScope callback?nullCustom drawing after scene
onPreparedSceneReadycallback?nullReceive projected scene

Sealed class with three variants:

  • FillOnly — shapes rendered without edges
  • Stroke(width: Float = 1f, color: IsoColor) — edges only, no fill
  • FillAndStroke(width: Float = 1f, color: IsoColor) — filled shapes with edges (default)

DefaultStrokeColor: near-transparent black IsoColor(0, 0, 0, 25)

For guidance on when to use AdvancedSceneConfig vs SceneConfig, see the Advanced Config guide.