More
Changelog
Every release of naturegl-river. The package follows semantic versioning.
#1.0.0
2026-09-24 First release. The single hard-coded stream of waterpro.html is now a reusable authoring API.
#Added
RiverSystemwithcreate,update,render,resize,loadPreset,getParams,setParam,setQualityLevelanddispose.render()runs a depth pipeline: HalfFloat render target +DepthTexture→ composite → water.addRiver(): spline ribbons with per-point width and depth, flow-space UVs, constant-discharge speed, rapids on steep sections, and automatic fades into lakes. Read more.addLake(): circle or polygon lakes with slow drift.addWaterfall(): ballistic sheet and veil, spray droplets, mist puffs, plunge churn and plume, ripple rings, and a lip clip plane. Read more.addObstacle(): foam ring, bow wave and flow-aligned wake.carveTerrain(): beds, basins and plunge pools cut into any height function. Read more.patchMaterial(): waterline wet band, splash zone, underwater film, caustics and caustic reflections on any standard material, driven by a top-down water map.sample(),sampleHeight(),sampleFlow(),isInWater(),isUnderwater(), andfloaters.add(). Read more.setSky()for an external sky (sun, equirect env map, cloud shadow, fog colour), andbindLights()for the built-in one. Read more.- 9 presets, one file each:
clear,morning,golden,overcast,glacial,muddy,swamp,dusk,night. - 4 quality levels.
- Demo: the mountain-stream valley authored with the API (brook → lake → outlet → cascade → main run). It keeps the original look and adds preset, slider, quality, Glide and Copy preset JSON controls, plus the
window.__procontract. - Examples:
examples/basic(Vite) andexamples/cdn(import map +build/). scripts/smoke.mjs: headless real-GPU test of every preset.
#Changed from waterpro.html
- three r160 → r186:
THREE.TimerreplacesClock, andPCFShadowMapwithshadow.radiusreplaces the deprecatedPCFSoftShadowMap.