mwg API
    Preparing search index...

    Function hazeField

    • A deterministic wisp field in 0..1: two octaves of value noise over an integer lattice, smoothstep-interpolated so neighbouring samples always blend rather than step. Pure and seed-stable within a run: the same (x, y, time, seed) paints the same wisp, which is what makes haze testable as arithmetic instead of eyeballed as weather. Time wanders the lookup along a slow breeze, so a still coordinate still breathes.

      Parameters

      • x: number
      • y: number
      • time: number
      • seed: number

      Returns number

      import { hazeField } from '@datamoc/mwg/two-d/render';

      console.log(hazeField(3, 5, 1.5, 7) === hazeField(3, 5, 1.5, 7)); // true - same sky twice
      console.log(hazeField(3, 5, 1.5, 7) >= 0 && hazeField(3, 5, 1.5, 7) <= 1); // true - always a density