threejs-worldgen
    Preparing search index...

    Function createBirdMaterial

    • The bird material. Wings flap in the vertex shader: each wing vertex rotates about the body axis by sin(phase)·amplitude, more toward the tip, so the wing bends as it beats. Per-instance attributes as for fish: faunaMotion = (wing phase, flap scale, 0, 0), faunaLook = (hue, brightness, ·, ·).

      Parameters

      • u: {
            back: UniformNode<"color", Color>;
            belly: UniformNode<"color", Color>;
            states: UniformNode<"vec4", Vector4>;
            tip: UniformNode<"color", Color>;
            wing: UniformNode<"vec2", Vector2>;
        }
        • back: UniformNode<"color", Color>

          Back and upper-wing colour.

        • belly: UniformNode<"color", Color>

          Belly and under-wing colour.

        • states: UniformNode<"vec4", Vector4>

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

        • tip: UniformNode<"color", Color>

          Wing-tip colour.

        • wing: UniformNode<"vec2", Vector2>

          x = tip length (share of the span), y = flap amplitude, radians.

      Returns MeshStandardNodeMaterial