hex-world
    Preparing search index...

    Interface DayNightTargets

    What applyTo pushes the evaluated state onto. Every field optional — supply what your scene has.

    interface DayNightTargets {
        sunRig?: SunShadowRig;
        sunLight?: DirectionalLight;
        ambientLight?: AmbientLight;
        terrainMaterial?: ShaderMaterial;
        roadMaterial?: ShaderMaterial;
        lightMaterials?: Iterable<ShaderMaterial | null | undefined, any, any>;
        liquidMaterials?: Iterable<LiquidMaterialSet, any, any>;
        scene?: Scene<Object3DEventMap>;
        sky?: SkyDome;
        godRays?: GodRays;
    }
    Index

    Properties

    sunRig?: SunShadowRig

    Shadow-casting sun: direction, color, and intensity follow the cycle.

    sunLight?: DirectionalLight

    Plain directional light alternative to the rig (position is set along lightDir).

    ambientLight?: AmbientLight
    terrainMaterial?: ShaderMaterial

    Terrain shader material — uLightDir / uLightColor / uAmbient follow the cycle.

    roadMaterial?: ShaderMaterial

    Road overlay material — takes the same light uniforms as the terrain, so roads darken with the ground they sit on instead of glowing after dark.

    lightMaterials?: Iterable<ShaderMaterial | null | undefined, any, any>

    Any other materials using the same hand-rolled light uniforms (uLightDir / uLightColor / uAmbient) — the map skirt, and your own shaders that borrowed the trio. Materials without them are skipped.

    liquidMaterials?: Iterable<LiquidMaterialSet, any, any>

    Liquid material sets to tint (water darkens at night; emissive is unaffected).

    scene?: Scene<Object3DEventMap>

    Scene whose background color tracks the sky.

    sky?: SkyDome

    Gradient sky dome — takes the horizon/zenith colors and the luminary glow.

    godRays?: GodRays

    Crepuscular rays — take the sun's direction and color, and fade out with the daylight, so the shafts fan from the same disc the dome draws.