organicWaves

A ready-made waves schedule from three knobs, for when you have no hand-tuned constants.

organicWaves(opts: {frequency: number; detail?: number; drift?: number; seed?: number}): WaveTerm[]

Import noise from shaders/std and use noise.organicWaves.

frequency sets the size of the largest waves. detail is how many finer layers stack on top (default 3, each about 1.8× finer and half as strong). drift is the animation speed (default 0.5). The same seed always gives the same schedule. Weights are normalized so the summed wave stays within about −1 to 1. Treat the result as a starting point to tune.

Parameters

NameTypeNotes
opts{frequency: number; detail?: number; drift?: number; seed?: number}

Example

const wobble = waves({x: delta.member('x'), y: delta.member('y'), t: time}, organicWaves({frequency: 3, detail: 3, drift: 0.4}))

Tip. The schedule uses x, y and t, so the axes you pass to waves must provide all three.

See also

  • waves — Overlapping traveling sine waves from a schedule written as data: the organic wobble behind blob edges, water lines and drifting fills.