Train Window
Snowy peaks barely move far off while a line of firs slides past and the meadow streams by, faster the nearer it is, with the telegraph wires dipping and rising between poles. Move the pointer to lean and look along the line; click and the train pulls up in the meadow, waits, and pulls away again.
Needs: None. A 2D canvas.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| cell | number | 4 | Size of one dither pixel in px. |
| seat | string | "#cf6e35" | The seat backs. |
| green | string | "#8aa84c" | The meadow; the firs and the far range are drawn from it. |
| sky | string | "#8db4dc" | The sky through the glass, a light stipple. |
| speed | number | 1 | Time scale. 0 holds the moment. |
| interactive | boolean | true | Lean with the pointer; a click pulls the train up for a moment. Read on the window, so content above keeps its clicks. |
| seed | number | 4 | Picks the country the line runs through. |
| 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. |