threejs-worldgen
    Preparing search index...

    Class ParticleLighting

    Sun and sky light for lit particles, shared by any number of systems. Fill it from your scene with ParticleLighting.fromScene.

    Index
    uniforms: {
        ambient: UniformNode<"color", Color>;
        sunColor: UniformNode<"color", Color>;
        sunDirection: UniformNode<"vec3", Vector3>;
    } = ...

    Uniforms read by the smoke shading.

    Type Declaration

    • ambient: UniformNode<"color", Color>

      Ambient sky light colour × intensity (linear).

    • sunColor: UniformNode<"color", Color>

      Sun colour × intensity (linear).

    • sunDirection: UniformNode<"vec3", Vector3>

      Unit vector towards the sun (world).

    • Copies the first directional light (sun) and the hemisphere/ambient lights under root. The lights are looked up once per root.

      Parameters

      • root: Object3D

      Returns this

    • Sets the light directly: direction towards the sun, sun colour × intensity, ambient colour × intensity.

      Parameters

      • sunDirection: readonly number[]
      • sunColor: Color
      • ambient: Color

      Returns this