Camera the tiles follow.
The frame tiles are built in (the world itself on flat worlds).
ReadonlyobjectRoot of all river tiles (placed in the current frame).
Resolved settings. Change them with Rivers.set / Rivers.reset.
ReadonlystatsLive counters, refreshed by Rivers.update.
Seconds of flow time.
ReadonlyuniformsShader uniforms (for advanced tweaks).
Σ k·chop of the waves (normalises whitecaps).
deepColor.
detail.
Unit drift direction of the ripples (x, z).
detailScale, metres.
detailSpeed, m/s.
environmentIntensity.
Seconds per flow-map cycle (rivers).
foam, 0 … 1.
foamColor.
foamWidth, metres.
Vertex spacing per metre of distance (2π / segments for the ocean rings; 0 = uniform grid).
Smallest vertex spacing, metres. Waves shorter than ~3 spacings fade out in the vertex stage.
Multiplier from geometry x/z to tangent-plane metres (the ocean's ring scale).
horizonColor.
Surface distance beyond which vertices are clamped (the horizon on planets).
Sphere radius the surface bends to (sea radius on planets; huge = flat).
Flow speed (m/s) where river rapids start foaming.
reflectivity (F0).
refraction.
roughness.
shallowColor.
skyColor.
specular.
Sun colour × intensity.
Direction towards the sun, world space.
tan(fov / 2) of the camera, for the per-pixel detail fade.
Seconds, advanced by the owner's update().
visibility, metres.
Per wave: direction x, direction z, wavenumber k, amplitude.
Per wave: horizontal amplitude (chop), phase (radians, includes −ωt), unused, unused.
Active entries in waveA/waveB.
Whitecap amount 0 … 1 (oceans and lakes).
The world.
Removes the rivers from the scene and frees their GPU resources.
Replaces all settings: anything not in input goes back to the defaults.
Changes settings, merging into earlier ones. Look settings apply instantly; layout and flow settings rebuild tiles (old ones stay until replaced).
Moves the floating origin. Same as set({ origin }).
Streams tiles around the camera, builds within the time budget and advances the flow. Called
automatically when a scene was given (and by <Rivers>); otherwise call it once per frame.
Seconds since the last frame; measured if omitted.
Milliseconds for tile building this frame. Defaults to settings.buildBudget.
StaticcreateCreates rivers and builds the tiles nearest the camera so the first frame has water.
River water surfaces for a world's noise rivers, streamed in camera-centred tiles.
Each tile samples the world on a grid; wherever there is river water it builds a surface at the river's level, extended a little so it tucks under the banks. The flow direction comes from the slope of the river surface (with the across-channel part removed), and drives flow-mapped ripples and foam that move downstream. Tiles build within a per-frame time budget, nearest first; most tiles are rejected after a 3×3 probe, and only cells near water are sampled at full resolution. On planets, tiles live in a local frame that is re-centred on the camera every
reframeDistance.Example