Example 15 — wave: [a, b] + mix

Morph Wave

Pass wave: ['nameA', 'nameB'] with a mix value (0–1) to crossfade between any two formulas. Animate mix to smoothly morph the shape over time.

Core snippet
// 50 rows — each row's mix depends on distance from a sweeping centre
var centre = (sin(t * 0.3) + 1) * 0.5;
var morphMix = constrain(1 - abs(rowFrac - centre) * 3, 0, 1);

var waveY = Waves.wave(x, {
  wave:      ['wobble sine', 'meta sine'],
  mix:       morphMix,        // 0 = pure A, 1 = pure B
  t:         t + row * 0.06,
  frequency: 0.08,
  amplitude: rowH * 1.8
});