SDK JS
    Preparing search index...

    The contract a Bitruvius 3D layer implements to be lit by the sun — the structural interface RendererSunController (and setTimeOfDay's layers option) targets. The mesh / point-cloud / splat layers in @bitruvius/sdk-maplibre satisfy it; you can also implement it on your own renderer wrapper.

    interface SunLightable {
        clearSun?(): void;
        setShadows?(on: boolean): void;
        setSunState(sun: SunState): void;
    }
    Index

    Methods

    • Optional: revert to the layer's default (no-sun) lighting — used when the geo-sun system is DISABLED so the scene returns to its baseline look (vs keeping the last sun frozen on the mesh).

      Returns void

    • Optional: toggle the layer's cast-shadow pass (Phase 2).

      Parameters

      • on: boolean

      Returns void

    • Apply the current SunState to the layer's renderer (direct light + ambient).

      Parameters

      Returns void