Coming soon

River water for three.js

Water that moves like a river, and that the things floating on it can feel.

Most water in three.js is a scrolling texture or an open-ocean system. river3d is built for the harder case: shallows, currents, eddies, rapids and waterfalls. It's a real fluid simulation running on the GPU, built on three.js's WebGPURenderer and TSL.

The physics

A live simulation, not an animation

Shallow-water flow is simulated on the GPU around the camera. Water follows the riverbed: fast through the narrows, slow in the pools, curling into eddies behind rocks.

What you see is what floats

Rafts, leaves and sticks all read the same live water. Heavier bodies push back, so wakes and splashes move the things around them.

Eddies from the maths

Nothing is hand-placed. Leaves get caught and circle, and a waterfall's plunge pool drags things back toward the falls.

Wind and chop

Wind with direction, speed and gusts. Chop grows with open water upwind, so sheltered bays stay calm while open water roughens.

Water that changes in play

Open a sluice and the river surges, then settles. Gates, plugs and dams change the flow live.

20,000 floating particles

Thousands of leaves ride the surface, simulated on the GPU.

Underwater

Dive below and look up through the surface, with caustics and an underwater look.

The look

Stylised, cel-shaded water

Toon shading bands, ink outlines and foam lines, written in TSL so it keeps working as three.js updates.

Tunable live

Shading bands, outline width, chop height, wind and ripple strength, all adjustable at runtime.

More styles on the way

Further looks are in development.

Built for real projects

WebGPU first

With a WebGL2 fallback: where WebGPU isn't available, the water runs on the CPU in a worker.

Quality tiers

From handheld to high-end desktop. Trade water area, detail, particle count and reflections for frame rate.

Performance-led

Designed to hit 60 fps at 1080p on a MacBook Air, with a benchmark harness that measures every change.

A map pipeline

Describe a river network (forks, merges, lakes, rocks, falls) and the tooling carves the terrain and pre-solves the flow, so the water is settled when the scene loads.

Debug views

See flow, depth, speed, foam and wind at a glance.

Coming soon

river3d is in development. Check back here for the launch.