Light Well
A shaft of light falls slanting through the rippling surface, lands on the sand as a moving net of caustics, and catches the fish as they cross it; bubbles rise from the floor in wobbling strings. Each fish lives like its kind: small orange fish mill in the light, a shoal of silversides turns as one and flashes as it turns, a barracuda hangs in the shade and now and then lunges at the shoal, which bursts apart and closes again, a pufferfish hovers and swells into a spiny ball when frightened, and gobies dart along the sand and dig. The light swings with your cursor; a click ripples the floor and startles everyone near it.
Needs: None. A 2D canvas.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| fish | number | 6 | How many of the small orange fish that mill in the light. |
| shoal | number | 14 | Silversides in the shoal: they school, flash as they turn, and burst apart when the barracuda strikes. |
| barracuda | boolean | true | A barracuda that hangs in the shade and now and then lunges at the shoal. |
| puffer | boolean | true | A pufferfish that hovers on its fins and swells into a spiny ball when frightened. |
| gobies | number | 2 | Gobies on the sand, darting in short hops and digging. |
| cell | number | 3 | Size of one dither pixel in px. |
| color | string | "#f08a2c" | The fish's colour, where the light catches them. |
| light | string | "#dff4f2" | The light's colour. On a light page it is deepened so it still reads. |
| water | string | "#2f7f8c" | The water's colour, deepening with depth. |
| dust | boolean | true | Dust hanging in the beam, glinting where the light catches it. |
| bubbles | boolean | true | Strings of bubbles rising from the floor. |
| speed | number | 1 | Time scale. 0 holds the moment. |
| interactive | boolean | true | The light follows the cursor and the fish follow the light; a click ripples the floor and startles the fish. Read on the window, so content above keeps its clicks. |
| seed | number | 5 | Picks the fish and the dust. |
| opacity | number | 1 | Opacity of the whole scene. |
| dpr | number | null | Device pixel ratio to render at. Math.min(devicePixelRatio, 2) when unset. |
| className | string | – | Class on the root element, which fills its parent. |
| style | CSSProperties | – | Style on the root element. Theme it through the --mlui-* variables. |