Documentation
    Preparing search index...

    Function windField

    • §27's wind: a drag toward a moving air mass rather than toward rest.

      a = coefficient · (wind − v)
      

      The fixed point is v = wind — a particle released into it accelerates until it drifts with the air and then stops accelerating, which is what distinguishes wind from "a constant sideways push" (that is uniformGravityField with a horizontal vector). Under the emitter's step the approach is exactly geometric:

      vₙ = wind + (v₀ − wind) · (1 − coefficient · dt)ⁿ
      

      so 1 / coefficient is the e-folding time in seconds, and the same coefficient · dt < 1 stability note as dragField applies. windField(w, c) and dragField(c) differ by exactly the constant c · w; both are shipped because authoring "the air moves at 4 m/s east" is not the same act as authoring "damp everything".

      Parameters

      • wind: Vector3

        Air velocity in units/s, copied.

      • coefficient: number

        Coupling to the air, in s⁻¹. 0 is a no-op field.

      Returns ParticleForceField

      RangeError if any component of wind, or coefficient, is not finite.