# River Terrace — Iso Forest 0.3.0 companion

A small terraced forest scene demonstrating streams, falls, a lake and marsh. Free CC0 companion, version water-v1. The original pack remains unchanged under `../pack/`.

From the extracted `iso-forest-0.3.0` folder (the one containing `pack/` and `companion/`), start your local HTTP server. With Python 3 installed, run:

```
python -m http.server 8080 --bind 127.0.0.1
```

Open http://127.0.0.1:8080/companion/index.html and choose Summer or Winter. Stop the server with Ctrl+C. The page loads its scripts, scene data and sprite sheets from that folder.

## Make a clearing of your own

Copy the entire `companion/` folder to a sibling called `clearing/`. Replace the contents of `clearing/scene.json` with the following. Open http://127.0.0.1:8080/clearing/index.html. The grass and water go down first, followed by the pine on the back tile and the flowers on the near bank.

```json
{
  "id": "first-clearing",
  "width": 128,
  "height": 104,
  "origin": {"x": 64, "y": 60},
  "sprites": [
    {"name": "grass_1", "i": 0, "j": 0, "height": 0},
    {"name": "stream", "i": 1, "j": 0, "height": 0},
    {"name": "grass_2", "i": 0, "j": 1, "height": 0},
    {"name": "grass_3", "i": 1, "j": 1, "height": 0},
    {"name": "tree_pine", "i": 0, "j": 0, "height": 0},
    {"name": "flowers_white", "i": 1, "j": 1, "height": 0}
  ]
}
```

## Use in your project

Import `createWaterScene` from `scene.mjs`, call it with a canvas, and retain the returned handle. Default paths expect `companion/` beside `pack/`. Pass `packRoot` and `sceneUrl` to change that layout; both resolve relative to the module, not your page URL.

```
const scene = await createWaterScene(canvas);
scene.setSeason('winter'); // summer, autumn, winter, spring
scene.setMotionAllowed(false);
// On component unmount:
scene.dispose();
```

`scene.json` is editable ordered sprite data: name, grid i/j and height. Position is `(origin.x + (i-j)*16, origin.y + (i+j)*8 - height*16)`, then subtract each frame's pivot. Keep nearest-neighbour filtering. Preserve draw order when moving a large tree or waterfall; scene layers are explicit, not a general occlusion engine.

Animation uses each sequence's own durations. Winter freezes animated water and removes directional flow. Reduced-motion preference, offscreen and hidden-page states stop the timer. Pause/resume retains elapsed time; dispose removes timers/listeners/observers. This is a small 2D scene, not an editor, game engine or guaranteed full-rate renderer on every device.

## Contents and licence

`pack/` contains the exact immutable 0.3.0 source, original manifest, sheets, individual tiles, Tiled maps and documentation. Its original repository contract expects catalogue context; use the independent `verify-download.mjs` at the archive root for a standalone integrity check (`node verify-download.mjs`). That script checks the complete release file list against `download-manifest.json`.

The pack and this companion are CC0 1.0. Credit to BitBlur is appreciated, not required. The original full CC0 text is at `pack/LICENSE.txt`. Existing 0.1.0 remains a separate stable download; nothing here changes its bytes or terms.

The public 0.3.0 ZIP is free under CC0. Its original “review candidate” labels describe the packaging stage.
