# Plush Lagoon

A miniature toy-spa pool in Three.js: a GPU height-field water sim with refraction, Fresnel reflection and caustics, and seven plush toys that float, bob and bump into each other.

## Run

No build step. Serve the folder with any static server and open `index.html`:

```
python3 -m http.server 8000
```

Opening `index.html` directly from disk also works. Three.js (0.160.0) loads from the jsDelivr CDN, so an internet connection is needed.

## Controls

| Action | Mouse | Touch |
| --- | --- | --- |
| Pick a toy | Click it in the bottom bar | Tap it |
| Drop a toy in | Drag it from the bar onto the water, or click it and then click the water | Drag it up from the bar, or tap it and then tap the water |
| Make ripples | Click the water | Tap the water |
| Say hi to a toy | Click a floating toy (it hops) | Tap it |
| Dip a toy under | Press and hold on a floating toy | Press and hold |
| Move a toy | Press a toy and drag it across the pool | Same |
| Orbit the camera | Drag the background | One-finger drag |
| Zoom | Mouse wheel | Pinch |

Top right:

- **Day / Sunset / Night** change the lighting, sky and water colour.
- **Orbit** turns on a slow automatic camera turn.
- **Pause** freezes the water and toys.
- **Reset** clears the pool.

The info card shows the selected toy's name, a short description and its floatiness, splashiness and cuddliness.

## Notes

- The resolution adapts to keep the frame rate up. Add `?fixed` to the URL to turn that off.
- Add `?demo` to start with all seven toys in the pool.
- Up to 12 toys can float at once. The oldest one fades out when you add more.
