Meadow shader preview: Short grass and dandelions swaying under a foggy sky, graded like a film still.
ittybitty

Meadow

Short grass and dandelions swaying under a foggy sky, graded like a film still.

Code

Use as
Code view

Copy embed: paste into Webflow, Framer, Squarespace or any HTML · Copy for agent: paste into Cursor or Claude · Copy code: the files for your own build.

For your own build, add meadow.js, ittybitty-shader.js, runtime.js and pointer.js next to this page. Highlighted values follow the controls.

<!-- Quickest: one element. Size it with CSS; it fills its box. -->
<script type="module" src="./ittybitty-shader.js"></script>
<ittybitty-shader effect="meadow" style="width: 100%; aspect-ratio: 16 / 10;"></ittybitty-shader>

<!-- Or with JavaScript, for full control: -->
<canvas id="meadow" aria-hidden="true" style="width: 100%; aspect-ratio: 16 / 10; display: block"></canvas>

<script type="module">
  import { meadow } from './meadow.js';

  const canvas = document.getElementById('meadow');
  const effect = meadow(canvas, {
    showFlowers: true,
    showFilm: true,
    sky: 'fog',
    zoom: 0.75,
    height: 0.3,
    density: 0.7,
    flowers: 0.55,
    clocks: 0.7,
    sway: 0.45,
    gusts: 0.7,
    speed: 0.35,
    exposure: -0.3,
    saturation: 0.25,
    matte: 0.2,
    grain: 0.5,
    noise: 0.1,
    tint: '#8c9aa6',
    grass: '#4f6b2c',
    interactive: true,
    // Performance
    dpr: 1,
    adaptive: true,
  });

  // Later: effect.set(…), effect.pause(), effect.resume(), effect.destroy()
</script>

Details

A field of short grass runs out to a hazy horizon, dotted with dandelions in flower and gone to seed, all swaying slowly in the wind. The scene is drawn cheaply and the grade does the work: wash it out to black and white with grain and faded blacks, or turn it up to a vivid summer afternoon. Fog, a sunny day, a pale blue sky or night.

Payload
11.6 KB brotli for meadow.js, ittybitty-shader.js, runtime.js and pointer.js, measured at build time.
Resolution
Device pixel ratio capped at 1: the grain and fog hide the softness, and it halves the cost on high-density screens.
Frame rate
Display rate.
When unseen
Stops rendering when the canvas leaves the viewport or the tab is hidden, and resumes where it left off.
Reduced motion
Shows a single still frame. Controls still update it.
Layers
Up to five effects fuse into one shader and one draw call. Filters such as dithering and halftone process the layers beneath them.
Browsers
Any browser with WebGL2: Chrome and Edge 56+, Firefox 51+, Safari 15+.
Licence
MIT. Copy it, change it, ship it.
Source
meadow.js on GitHub, in a public repo that logs every change.