tendril

Plants, drawn as dots.

A dandelion clock going off downwind, a fern unrolling from the tip, a sunflower turning with the day, trees bending in a gust that runs through the wood, wheat rippling, kelp swaying in the swell. No dependencies, one script.

Flags

The same oak four ways. They stack.

Use it

One script, then a canvas. Height is the size; a wider canvas gives a field or a wood more room.

<script src="https://cdn.jsdelivr.net/gh/TonkaTuff/tendril@v0.1.0/dist/tendril.min.js"></script>
<canvas class="plant" width="300" height="200" data-plant-body="oak"></canvas>
attributevaluewhat it does
data-plant-bodynameany name above
data-plant-formclump · field · gum · willow · wood · grass · kelpa clump of ferns; a field of sunflowers; which tree, or a wood of them; grass or kelp instead of wheat
data-plant-windnumberhow hard it blows (1); every mode leans on the same gust field, so plants on a page move together
data-plant-period / -puff / -seedsnumberdandelion: seconds between puffs (9), the fraction of seeds that go (0.6), seeds at a 64px height (90)
data-plant-cycle / -countnumberfern: seconds to unfurl and curl back (16), fronds in a clump (5); trees in a wood
data-plant-daynumberseconds for a sunflower to follow the sun across and back (30)
data-plant-depthnumberhow many times a tree forks (5, a wood 4)
data-plant-nnumberstems in a field at a 64px height (wheat 48, grass 90, kelp 14)
data-plant-temponumberhow fast it all happens (1)
data-plant-ink / -lite / -ground1monochrome dots that follow the page theme · half the dots · a dusk behind
data-plant-glow0no soft glow, just the dots on a clear canvas