field.glsl() + transform feedbackThe advection loop never touches JavaScript: a WebGL2 transform-feedback vertex shader
steps every particle through the field emitted by field.glsl() — the same
divergence-free velocities as the CPU API, evaluated on the GPU — and writes the new positions
straight into the next frame's vertex buffer. Zero CPU field calls, zero uploads per
frame. The field is tileable: true, so particles wrap seamlessly through the
2π-periodic box. Colour = local relative helicity (teal
right-handed / amber left-handed); the field itself
churns via the time-aware hx(p, t) overload. Drag to orbit, scroll to zoom.