# Millbrook Pond

A calm countryside pond diorama in Three.js: a timber watermill with a turning waterwheel, a dock, a footbridge and a rowboat with an angler, all built in code (no external models, textures or HDRIs). The water uses a real-time planar reflection, a refraction pass of the pond bed, depth tint, a Fresnel blend, normal-mapped wind ripples and dynamic ring ripples from the wheel, boat, float and rising fish.

## Run

ES modules need http, so serve the folder (no build step):

```
python3 -m http.server 8000
# open http://localhost:8000/index.html
```

three.js (0.170.0) loads from the jsDelivr CDN via an import map.

## Controls

| Input | Action |
|---|---|
| Drag (mouse or touch) | Orbit the camera |
| Scroll wheel / pinch | Zoom |
| Tap / click the water | Make ripples |
| **Orbit** button (or `Space`) | Pause / resume the slow auto-orbit (it also resumes after a short idle) |
| **Afternoon** / **Golden hour** buttons (or `1` / `2`) | Switch time of day |

The small control pill at the bottom fades out when not in use.

## Capture mode

Open `index.html?capture=1`. All UI is hidden, input is disabled, and the camera plays a scripted 12-second move around the pond that ends exactly where it started. The water wheel, boat, dragonflies, birds, leaves, smoke and sway are all periodic over the same 12 s, so a recording of one loop repeats seamlessly.

## Other URL parameters

- `mode=golden` starts in golden hour.
- `freeze=<seconds>`, `az`, `el`, `dist` hold the clock or camera, for debugging and screenshots.

## Performance

The pixel ratio is capped (1.5 on touch devices, 2 on desktop) and adapts to the measured frame time. The reflection and refraction targets render at reduced resolution, and small detail (grass, flowers) is skipped in the reflection while trees, sky and life are skipped in the refraction pass. The shadow map is 1024 on phones.
