threejs-worldgen
    Preparing search index...

    Variable treeUniformsConst

    treeUniforms: {
        burn: UniformNode<"float", number>;
        damage: UniformNode<"float", number>;
        snow: UniformNode<"float", number>;
        sunColor: UniformNode<"color", Color>;
        sunDirection: UniformNode<"vec3", Vector3>;
        wetness: UniformNode<"float", number>;
        windDirection: UniformNode<"vec2", Vector2>;
        windSpeed: UniformNode<"float", number>;
        windStrength: UniformNode<"float", number>;
    } = ...

    Uniforms shared by every vegetation and rock material: one wind, one sun and one global weather state. Change them through setTreeEnvironment (or .value directly). A material given its own WeatherInputs ignores the global weather values it overrides.

    Type Declaration

    • burn: UniformNode<"float", number>

      Global burn 0..1: charred bark, scorched and missing leaves.

    • damage: UniformNode<"float", number>

      Global damage 0..1: broken branches, missing leaf mass.

    • snow: UniformNode<"float", number>

      Global snow cover 0..1 on upward-facing surfaces.

    • sunColor: UniformNode<"color", Color>

      Sun colour × intensity.

    • sunDirection: UniformNode<"vec3", Vector3>

      Direction towards the sun (drives leaf back-lighting).

    • wetness: UniformNode<"float", number>

      Global wetness 0..1: darker albedo, lower roughness.

    • windDirection: UniformNode<"vec2", Vector2>

      Normalised XZ direction the wind blows towards.

    • windSpeed: UniformNode<"float", number>

      How fast gusts move.

    • windStrength: UniformNode<"float", number>

      How far trees sway, 0 = still, 1 = strong wind.