morph-tile-loop
Installation
SKILL.md
Morph tile loop
One engine (assets/engine.js, no libraries) turns a config into the whole loop: timeline, zoom, lattice, shape drawing, controls. You never write drawing code; you describe one tile and when it changes. template/index.html is a teal/navy square-lattice loop (preview assets/tile-loop.png); examples/hex-bloom.html is a riso hex-lattice loop (assets/hex-bloom.png).
How the loop works
- One tile = layers of the same shape family, drawn back to front at shrinking radii. Layer radius
r, exponente, rotation and visibility are functions of named channels. - Shape is a polar superellipse with
points-fold symmetry.e = 1circle;e < 1pushes out to a polygon (a square at 4 points; at 6 points it reads as a soft six-point star);e > 1pinches in to a concave star. Turning a star layer byπ/pointsputs its points on the polygon's corners. - Channels are eased keyframes (
[[t, v], …]). The usual pair:g(rings open out of the flat circle) andm(circle → star/polygon). With every channel at 0, all layers collapse to the last layer's fill, so a single flat dot is the rest state — that's what makes the start, the halftone and the end match. - Camera zooms out log-space to
1/depth, then dives back to 1 at the end. Neighbours fade in as it zooms out, so frame 0 is one shape. The lattice turns byspinturns, which must be a symmetry of the lattice (square1/4, hex1/6) so the last frame equals the first. - Tiles under 3 px are drawn in each layer's flat
tinycolour. Mid-zoom the grid turns into a halftone tint. This is part of the look, so picktinycolours on purpose (a warm grey-orange reads as grey from far away).