threejs-worldgen
    Preparing search index...

    Function applyFishSpecies

    • Copies a species' pattern and swim style (and the face positions from its mesh) into the uniforms.

      Parameters

      • u: {
            back: UniformNode<"color", Color>;
            belly: UniformNode<"color", Color>;
            eye: UniformNode<"vec3", Vector3>;
            eyeColor: UniformNode<"color", Color>;
            fin: UniformNode<"color", Color>;
            mouth: UniformNode<"vec3", Vector3>;
            shade: UniformNode<"vec2", Vector2>;
            spotColor: UniformNode<"color", Color>;
            spots: UniformNode<"vec4", Vector4>;
            states: UniformNode<"vec4", Vector4>;
            stripeColor: UniformNode<"color", Color>;
            stripeRegion: UniformNode<"vec3", Vector3>;
            stripes: UniformNode<"vec4", Vector4>;
            surface: UniformNode<"vec3", Vector3>;
            swim: UniformNode<"vec3", Vector3>;
        }
        • back: UniformNode<"color", Color>

          Back colour.

        • belly: UniformNode<"color", Color>

          Belly colour.

        • eye: UniformNode<"vec3", Vector3>

          x = eye z, y = eye y, z = radius (mesh units).

        • eyeColor: UniformNode<"color", Color>

          Iris colour.

        • fin: UniformNode<"color", Color>

          Fin colour.

        • mouth: UniformNode<"vec3", Vector3>

          x = mouth line y, y = mouth length (in s), z = body depth.

        • shade: UniformNode<"vec2", Vector2>

          x = countershade, y = shade line.

        • spotColor: UniformNode<"color", Color>

          Spot colour.

        • spots: UniformNode<"vec4", Vector4>

          x = density, y = size, z = region min, w = region max.

        • states: UniformNode<"vec4", Vector4>

          x = wetness, y = snow, z = burn, w = damage.

        • stripeColor: UniformNode<"color", Color>

          Stripe colour.

        • stripeRegion: UniformNode<"vec3", Vector3>

          x = region min, y = region max, z = edge darkness.

        • stripes: UniformNode<"vec4", Vector4>

          x = count, y = width, z = direction, w = wobble.

        • surface: UniformNode<"vec3", Vector3>

          x = iridescence, y = metalness, z = roughness.

        • swim: UniformNode<"vec3", Vector3>

          x = amplitude, y = wave number (rad per body length), z = fin flutter.

      • species: FishSpecies
      • mesh: FishMeshData

      Returns void