Skip to content

Commit fc1dfe4

Browse files
committed
docs(AGENTS): note palette slot semantics + free-fly camera auto-following
1 parent 1badac8 commit fc1dfe4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ This file collects facts that are **not derivable by reading the code** and woul
1010

1111
- **`test.js` parity test requires palette source injection.** The worker source template contains `${PALETTE_JS_SOURCE}` which is a literal string when read from disk (not a template literal at read time). The parity test must substitute `pal.PALETTE_JS_SOURCE` into the source before `import()`ing, or it fails with `Unexpected token '{'`. Any new `${...}` interpolations in the worker source must be mirrored in `test.js`.
1212

13+
- **Biome palette slot usage.** `client/TerrainBiomePalette.js` defines BIOME_KINDS (0-7: rolling_hills, grasslands, highlands, mountains, alpine, swamp, beach, forest), indexed from `src/terrain/BiomePresets.js`. Worker only uses palette slots 0 (low-elevation) and 1 (high-elevation) per kind via `paletteColor(kind, slot)`. Slots 2-4 currently unused. When changing terrain aesthetics, only slots 0+1 affect what renders.
14+
15+
- **Free-fly camera terrain following is auto-wired, requires no special case.** P key toggles free-fly editMode via `src/client/InputHandler.js` (`_editActive``input.editToggle`) → `client/app.js:147` calls `cam.setEditMode()``client/camera.js:111-120` writes `editCamPos` to `camera.position` each frame. Then `client/app.js:193` unconditionally calls `_terrain.update(camera.position)` every animate frame — it auto-follows the camera regardless of mode. Note: there is a SEPARATE editor mode in `client/editor.js:168` also bound to KeyP; both handlers fire but serve different systems and do not conflict. Terrain update is camera-agnostic.
16+
1317
## CI / Deploy
1418

1519
- **Declaudeify workflow force-rewrites history on every push.** After `git push`, a GitHub Action strips "Claude" strings from commit messages and force-pushes. Local `main` always diverges from origin after CI runs. Run `git pull --rebase` before every second push in a session, or the second push is rejected.

0 commit comments

Comments
 (0)