Divergence-free by construction
The velocity always moves like a real, incompressible fluid β nothing piles up, nothing vanishes. Tracers never clump.
Give anything flowing, liquid-like motion β smoke, water, particles, wind. One function call, no FFT, no grid, no simulation.
npm install helix-noiseimport { create } from "helix-noise";
const field = create({ helicity: 0.8, coherence: 0.5 });
const [u, v, w] = field.sample(x, y, z); // divergence-free velocity, anywhere
const [u2, v2, w2] = field.sample(x, y, z, t); // β¦the same field, churning in timeHead to the JavaScript API Reference for every function, option, and method in plain language.
All ports produce the same field for the same seed and options β verified against a shared fixture to ~1e-15 (machine precision). Pick your stack:
| Platform | Install | Reference |
|---|---|---|
| JavaScript / TypeScript β reference implementation (spectral + atom engines, boundaries, GLSL, WASM batch) | npm install helix-noise | JavaScript API β |
Python (numpy) β spectral engine, vectorized sample_many | pip install helix-noise | Python reference β |
| Rust β zero-dependency, WASM-friendly crate | cargo add helix-noise | Rust reference β |
| Shaders β GLSL Β· HLSL Β· WGSL Β· Godot generator | generate.py --target glsl | Shaders reference β |
| React β react-three-fiber components (CPU + GPU particles) | npm install helix-noise-r3f | React (r3f) reference β |
The native ports scope v0.1 to the spectral engine, the free-slip SDF boundary, and the GLSL emitter; the atom engine (createAtoms) currently lives only in JavaScript and is a documented follow-up for the ports.