hex-world
    Preparing search index...

    Function setMaterialWind

    • Push a Wind onto a whole material list — the per-frame call that makes one wind reach everything at once.

      Writes whichever of the two uniform families a material carries and skips the rest, so a mixed list of scatter materials, liquid materials and anything else can be fanned out in one pass:

      • sway (uWindDir, uWindStrength, uWindPhase, uWindWave) — on stock materials given attachWindSway.
      • water (uWindDrift, uWindChop) — declared inline by every liquid material, and both zero until this is called, so a scene with no wind looks exactly as it always did.

      Pass null to still the wind: everything goes to zero, which leaves plants standing upright and water back on its own clock rather than freezing the animation mid-lean.

      Parameters

      • materials: Iterable<Material<MaterialEventMap> | null | undefined>
      • wind: Wind | null

      Returns void