Guide4 min read3 sections

Editable shared water

docs/WATER.mdSource updated 2026-10-25
Markdown
On this page 3 sections

A place can contain one bounded rectangular water surface with moving ripples, soft edges, view-dependent reflection color and sunlight highlights. It follows the room clock in both main-thread and Worker graphics, including portal views. Reduced motion freezes the waves. The surface is presentation; optional shared swimming now supplies gameplay. Buoyancy, river generation and shoreline simulation remain separate work.

#Try it

Restart the editor with npm run dev:editor and open its printed private link. Choose New world → Quiet pond, give it a name and choose Preview in atelier. Save and Publish to explore its invitation. The current template includes a jetty, a deeper pond bed, swimming, banks and a sloping stone exit, all ordinary editable objects. The template replaces the draft; publish an existing draft first if you want to keep its invitation, or Discard the preview to return to it.

For an existing place, open Atmosphere → Water. Enable the surface and set its color, opacity, wave height/spacing, cycle and direction. Expand Placement and size to set its centre and extent. Put the surface above a pond bed and below its banks. Preview, Save and Apply use the usual shared-revision workflow; publishing creates an immutable invitation. Cancel and Discard preserve the saved source, and saved Undo/Redo survive reopening.

#Contract and limits

  • World format 22 / water-world.22; presentation format 15; water-surface.1. Older worlds and presentation envelopes retain their existing validation rules. Old readers cannot accept the new format.
  • set-water owns validated source data and conflicts with overlapping water edits. Unrelated atmosphere edits remain mergeable. Arrangements omit the place-level water surface.
  • Position is bounded to ±10,000 metres, each side to 0.5–200 metres, wave height to 0–0.5 metres, wavelength to 1–32 metres and cycle to 2–120 seconds. Three normalized harmonics share a bounded phase derived from the room clock.
  • One optional 64-byte GPU uniform, no textures or gameplay entities, one draw. High/balanced/performance quality use 2,048 / 1,152 / 512 triangles. These are logical ownership counts, not driver memory measurements.
  • Geometry depth-tests against the world; premultiplied color blends over the existing scene. Reflection color comes from the environment lighting, not a reflected scene capture. No underwater rendering, refraction, foam, caustics, water shadows or multiple overlapping surfaces are claimed.
  • Quiet pond has a shallow solid bed. Travelers walk on that bed; the water does not supply a collider or change movement. Final character/environment art and the full terrain/advanced-world gates remain required.

#Acceptance · 2026-10-25

Delivered against baseline b3a78bd, using Node 22.23.4 and Chromium 141. The physical reference is Intel Arc B390; the portable profile uses SwiftShader.

Check Result
Full headless integration 892 passed, 66 skipped, zero failures
Explicit cooperative and PostgreSQL cooperative/trusted room restart checks 3 passed; includes both new database cases skipped by the ordinary suite
Water editing, two-player Apply/publication, pond publication, main/Worker graphics All 5 passed on both GPU profiles
Existing templates, main/Worker weather and daylight, failed-startup cleanup 7 hardware scenarios passed
Types/boundaries and production build Passed; 184 package source files
Detached packaged tools Pond template → export → import → check → compile passed

Native checks verify animated/calm differences, exact cycle/removal/reconstruction, reduced motion, geometry occlusion, portal timing, quality counts and bounded replacement ownership. Saved-edit tests verify invalid input, cancel, unchanged underlying content, reopening without spurious edits and durable undo/redo. Shared-player tests use both graphics placements and a browser clock skewed by a day. At the original water-only acceptance, the pond's traversal check walked off the jetty onto a shallow bed. The current swimming template is covered separately.

The first editor run exposed a stale presentation envelope version; the editor and template preview now use format 15. The combined hardware run passed 10 of 12 scenarios, with two obsolete test expectations: format-2 worlds acquire an empty model catalog on upgrade, and startup now has one additional shader pipeline. Both expectations were corrected and the two failed cases passed on rerun. The water editing fixture now explicitly owns a fresh legacy-format world. No acceptance timeout was increased. Raw local run details remain under .data/ld-water/; this guide is the feature's acceptance record.

Reproduction commands (browser runs need the isolated editor environment):

Terminal
node --import tsx --test --test-concurrency=4 tests/*.test.ts
node tools/cli/test-control.mjs tests/water-room.test.ts
DW_PLAYTEST=garden-ferry VITE_DW_PLAYTEST=garden-ferry \
DW_EDITOR_TOKEN=editor-browser-test-only-key-123456 \
npm run test:browser -- tests/browser/water.spec.ts tests/browser/editor-water.spec.ts
npm run build

Add DW_GPU_PROFILE=hardware to use the qualified physical GPU mode. CI now includes independent water-rendering and editor-water jobs. Remote CI and Docker were not run as part of this local acceptance. Engine build: 8cbaa1b75b956c4cb918e2e7a963a14bbbace3bc9cf637d9067f632a2882e0ba.

Published pond player view and narrow water controls were visually reviewed. The art is an editable starting example, not approval of the required final art pass. These are short functional checks; sustained/mobile GPU performance, the pre-existing software restoration reload timing gate and full milestones 0–18 remain open.

End of Water