Skip to content

alexgreensh/anidoodle / skills/anidoodle

anidoodle

Flagged

Code-drawn stills, films, 3D motion graphics, explainers and web animations in 32 styles, with scores, narration and subtitles. Use when asked for an illustration, animation, video or drawing lesson.

FileKindSize
SKILL.mdskill md13.7 KB
assets/styles.jpgbinary1.6 MB
engine/SFX_VERSIONING.mdmarkdown862 B
engine/assets/brand/lantern/brand.jsonconfig1.8 KB
engine/assets/brand/lantern/brand.tsscript1.7 KB
engine/assets/brand/lantern/lanternMark.svgother687 B
engine/assets/fonts/InstrumentSans-Bold.ttfbinary66.5 KB
engine/assets/fonts/InstrumentSans-OFL.txtmarkdown4.3 KB
engine/assets/fonts/InstrumentSans-Regular.ttfbinary66.4 KB
engine/assets/fonts/Lora-Bold.ttfbinary130.7 KB
engine/assets/fonts/Lora-OFL.txtmarkdown4.3 KB
engine/assets/fonts/PROVENANCE.mdmarkdown3.2 KB
engine/assets/fonts/Poppins-Bold.ttfbinary152.3 KB
engine/assets/fonts/Poppins-OFL.txtmarkdown4.3 KB
engine/assets/fonts/poppinsBold.tsscript203.7 KB
engine/assets/narration/narrationDemo.jsonconfig700 B
engine/assets/refs/PROVENANCE.jsonconfig836 B
engine/assets/refs/vangogh-almond-blossom.jpgbinary1021.9 KB
engine/facts/launchClip.jsonconfig789 B
engine/facts/launchExample.jsonconfig708 B
engine/facts/launchExampleBrand.jsonconfig1.2 KB
engine/facts/launchExampleClean.jsonconfig1.4 KB
engine/facts/launchExampleCleanChat.jsonconfig1.1 KB
engine/package-lock.jsonmanifest122.6 KB
engine/package.jsonmanifest934 B
engine/reviews/launchClip.jsonconfig4.8 KB
engine/reviews/launchExample.jsonconfig4.4 KB
engine/reviews/launchExampleBrand.jsonconfig9.2 KB
engine/reviews/launchExampleClean.jsonconfig4.4 KB
engine/reviews/launchExampleCleanChat.jsonconfig13.3 KB
engine/src/canvas-core/adaptAlmond.tsscript15.2 KB
engine/src/canvas-core/adaptAquarelle.tsscript14.1 KB
engine/src/canvas-core/adaptScrapbook.tsscript11.5 KB
engine/src/canvas-core/assetKit.tsscript8.4 KB
engine/src/canvas-core/bake.tsscript8.0 KB
engine/src/canvas-core/bakerSheet.tsscript4.7 KB
engine/src/canvas-core/balloon.tsscript20.0 KB
engine/src/canvas-core/balloonDraw.tsscript4.7 KB
engine/src/canvas-core/banner.tsscript42.3 KB
engine/src/canvas-core/bitRig.tsscript23.9 KB
engine/src/canvas-core/blueprint.tsscript42.5 KB
engine/src/canvas-core/blueprintKit.tsscript15.1 KB
engine/src/canvas-core/brandKit.tsscript10.4 KB
engine/src/canvas-core/brickBalloon.tsscript31.1 KB
engine/src/canvas-core/brokenColour.tsscript31.2 KB
engine/src/canvas-core/brokenColourKit.tsscript9.7 KB
engine/src/canvas-core/callout.tsscript9.6 KB
engine/src/canvas-core/calloutDemo.tsscript3.6 KB
engine/src/canvas-core/camera.tsscript13.2 KB
engine/src/canvas-core/character/build.tsscript2.9 KB
engine/src/canvas-core/character/check.tsscript9.5 KB
engine/src/canvas-core/character/design.tsscript7.3 KB
engine/src/canvas-core/character/human/balance.tsscript8.2 KB
engine/src/canvas-core/character/human/canon.tsscript3.8 KB
engine/src/canvas-core/character/human/clothing.tsscript4.5 KB
engine/src/canvas-core/character/human/figure.tsscript4.0 KB
engine/src/canvas-core/character/human/hands.tsscript10.9 KB
engine/src/canvas-core/character/human/head.tsscript23.2 KB
engine/src/canvas-core/character/human/mannequin.tsscript15.7 KB
engine/src/canvas-core/character/human/skeleton.tsscript10.3 KB
engine/src/canvas-core/character/human/walk.tsscript7.9 KB
engine/src/canvas-core/character/identity.tsscript2.3 KB
engine/src/canvas-core/character/math3.tsscript5.6 KB
engine/src/canvas-core/character/render/brick.tsscript4.0 KB
engine/src/canvas-core/character/render/grid.tsscript5.2 KB
engine/src/canvas-core/character/render/marker.tsscript3.5 KB
engine/src/canvas-core/character/render/pencil.tsscript6.6 KB
engine/src/canvas-core/character/render/pixel.tsscript3.1 KB
engine/src/canvas-core/character/render/riso.tsscript7.1 KB
engine/src/canvas-core/character/render/scratch.tsscript6.2 KB
engine/src/canvas-core/character/render/storybook.tsscript5.6 KB
engine/src/canvas-core/character/render/sumi.tsscript5.3 KB
engine/src/canvas-core/character/render/woodcut.tsscript4.3 KB
engine/src/canvas-core/character/shape2d.tsscript4.7 KB
engine/src/canvas-core/character/types.tsscript3.3 KB
engine/src/canvas-core/character/view25d.tsscript2.9 KB
engine/src/canvas-core/characters/mira/drawn.tsscript5.1 KB
engine/src/canvas-core/characters/mira/index.tsscript19.1 KB
engine/src/canvas-core/characters/mira/palettes.tsscript7.0 KB
engine/src/canvas-core/characters/mira/poses.tsscript10.2 KB
engine/src/canvas-core/characters/theo/baker.tsscript15.0 KB
engine/src/canvas-core/characters/theo/index.tsscript6.1 KB
engine/src/canvas-core/characters/theo/poses.tsscript10.6 KB
engine/src/canvas-core/characters/theo/wardrobe.tsscript12.4 KB
engine/src/canvas-core/charcoalErasure.tsscript30.7 KB
engine/src/canvas-core/charcoalErasureKit.tsscript9.4 KB
engine/src/canvas-core/cheetahBody.tsscript16.5 KB
engine/src/canvas-core/cheetahDusk.tsscript20.9 KB
engine/src/canvas-core/cheetahRig.tsscript8.9 KB
engine/src/canvas-core/cheetahRun.tsscript19.0 KB
engine/src/canvas-core/cheetahRunSigned.tsscript173 B
engine/src/canvas-core/cheetahScenery.tsscript11.8 KB
engine/src/canvas-core/cheetahTurn.tsscript5.5 KB
engine/src/canvas-core/colouredPencil.tsscript45.0 KB
engine/src/canvas-core/colouredPencilCrow.tsscript13.4 KB
engine/src/canvas-core/colouredPencilKit.tsscript17.8 KB
engine/src/canvas-core/core.tsscript30.0 KB
engine/src/canvas-core/cues.tsscript7.7 KB
engine/src/canvas-core/drafting.tsscript7.4 KB
engine/src/canvas-core/drawingMarks.tsscript13.3 KB
engine/src/canvas-core/drawingScore.tsscript17.5 KB
engine/src/canvas-core/dreamGlaze.tsscript30.9 KB
engine/src/canvas-core/dreamGlazeDraw.tsscript10.4 KB
engine/src/canvas-core/dreamGlazeKit.tsscript19.1 KB
engine/src/canvas-core/embroidery.tsscript32.2 KB
engine/src/canvas-core/embroideryAlive.tsscript19.6 KB
engine/src/canvas-core/embroideryKit.tsscript14.6 KB
engine/src/canvas-core/endCard.tsscript8.8 KB
engine/src/canvas-core/figureSheet.tsscript8.2 KB
engine/src/canvas-core/film.tsscript6.4 KB
engine/src/canvas-core/fixtureDeck.tsscript165 B
engine/src/canvas-core/fixtureMotion.tsscript5.4 KB
engine/src/canvas-core/fixtureRigBrokenGrip.tsscript250 B
engine/src/canvas-core/fixtureShip.tsscript7.4 KB
engine/src/canvas-core/fixtureShipBlind.tsscript159 B
engine/src/canvas-core/fixtureShipGreen.tsscript159 B
engine/src/canvas-core/fixtureShipLocked.tsscript126 B
engine/src/canvas-core/fixtureShipRed.tsscript157 B
engine/src/canvas-core/fixtureShipTrack.tsscript125 B
engine/src/canvas-core/fixtureWorld.tsscript166 B
engine/src/canvas-core/flatVector.tsscript22.8 KB
engine/src/canvas-core/folkTale.tsscript56.9 KB
engine/src/canvas-core/folkTaleKit.tsscript42.7 KB
engine/src/canvas-core/formMascot.tsscript4.9 KB
engine/src/canvas-core/fox.tsscript15.7 KB
engine/src/canvas-core/foxDraw.tsscript5.6 KB
engine/src/canvas-core/fromPhoto.tsscript8.7 KB
engine/src/canvas-core/gallery.tsscript9.5 KB
engine/src/canvas-core/halftone.tsscript10.3 KB
engine/src/canvas-core/halftoneKit.tsscript9.7 KB
engine/src/canvas-core/halftoneScene.tsscript26.5 KB
engine/src/canvas-core/input.tsscript16.8 KB
engine/src/canvas-core/isometric.tsscript36.2 KB
engine/src/canvas-core/isometricKit.tsscript3.9 KB
engine/src/canvas-core/kinetic.tsscript42.6 KB
engine/src/canvas-core/kineticDemo.tsscript3.6 KB
engine/src/canvas-core/koi.tsscript28.9 KB
engine/src/canvas-core/koiAlive.tsscript34 B
engine/src/canvas-core/koiDraw.tsscript3.5 KB
engine/src/canvas-core/koiDrawKit.tsscript6.9 KB
engine/src/canvas-core/koiWorld.tsscript9.3 KB
engine/src/canvas-core/launch.tsscript39.5 KB
engine/src/canvas-core/launch2.tsscript27.6 KB
engine/src/canvas-core/launch3.tsscript9.2 KB
engine/src/canvas-core/launchClip.tsscript39 B
engine/src/canvas-core/launchCode.tsscript3.8 KB
engine/src/canvas-core/launchCut.tsscript6.9 KB
engine/src/canvas-core/launchExample.tsscript3.4 KB
engine/src/canvas-core/launchExampleBrand.tsscript7.7 KB
engine/src/canvas-core/launchExampleClean.tsscript6.7 KB
engine/src/canvas-core/launchExampleCleanChat.tsscript5.0 KB
engine/src/canvas-core/launchExampleCleanScore.tsscript3.4 KB
engine/src/canvas-core/launchExampleScore.tsscript3.7 KB
engine/src/canvas-core/launchGallery.tsscript9.2 KB
engine/src/canvas-core/launchKit.tsscript28.1 KB
engine/src/canvas-core/launchLayout.tsscript19.9 KB
engine/src/canvas-core/launchLook.tsscript17.7 KB
engine/src/canvas-core/launchSound.tsscript5.8 KB
engine/src/canvas-core/launchTemplate.tsscript117.8 KB
engine/src/canvas-core/lesson.tsscript9.4 KB
engine/src/canvas-core/lessonCat.tsscript22.4 KB
engine/src/canvas-core/lessonCatFinal.tsscript204 B
engine/src/canvas-core/lessonCatSheet.tsscript263 B
engine/src/canvas-core/lessonOwl.tsscript49.3 KB
engine/src/canvas-core/lessonOwlFinal.tsscript204 B
engine/src/canvas-core/lessonOwlLayout.tsscript11.0 KB
engine/src/canvas-core/lessonOwlScore.tsscript8.7 KB
engine/src/canvas-core/lessonOwlSheet.tsscript446 B
engine/src/canvas-core/lessonOwlSocial.tsscript6.2 KB
engine/src/canvas-core/lettering.tsscript5.9 KB
engine/src/canvas-core/lighthouse.tsscript12.3 KB
engine/src/canvas-core/lighthouseDraw.tsscript5.5 KB
engine/src/canvas-core/lowPoly.tsscript24.5 KB
engine/src/canvas-core/mascotHero.tsscript4.6 KB
engine/src/canvas-core/mechanism.tsscript27.9 KB
engine/src/canvas-core/mechanismBlueprint.tsscript260 B
engine/src/canvas-core/mechanismDraw.tsscript297 B
engine/src/canvas-core/mechanismExplorer.tsscript4.8 KB
engine/src/canvas-core/mechanismHands.tsscript17.1 KB
engine/src/canvas-core/mechanismKit.tsscript38.9 KB
engine/src/canvas-core/mechanismPencil.tsscript277 B
engine/src/canvas-core/mechanismStipple.tsscript250 B
engine/src/canvas-core/mellan.tsscript9.7 KB
engine/src/canvas-core/mellanUnspool.tsscript3.2 KB
engine/src/canvas-core/midCentury.tsscript24.6 KB
engine/src/canvas-core/miraComic.tsscript4.3 KB
engine/src/canvas-core/miraEveryHand.tsscript5.2 KB
engine/src/canvas-core/miraRiso.tsscript3.6 KB
engine/src/canvas-core/miraSheet.tsscript8.0 KB
engine/src/canvas-core/miraTile.tsscript5.1 KB
engine/src/canvas-core/miraTriptych.tsscript2.7 KB
engine/src/canvas-core/miraWalk.tsscript7.7 KB
engine/src/canvas-core/moonPhases.tsscript16.7 KB
engine/src/canvas-core/moonPhasesDraw.tsscript4.3 KB
engine/src/canvas-core/morph.tsscript8.8 KB
engine/src/canvas-core/morphDemo.tsscript2.4 KB
engine/src/canvas-core/motif.tsscript2.5 KB
engine/src/canvas-core/motionKit.tsscript9.3 KB
engine/src/canvas-core/motionMeta.tsscript1.1 KB
engine/src/canvas-core/music/arc.tsscript6.2 KB

engine/src/canvas-core/adaptAquarelle.ts

View on GitHub
// PASTEL BLOTCH WATERCOLOUR · a hand ADAPTED from a reference the owner brought
// (~/Pictures/aquarelle/lightshot-aquarelle.png, a pastel watercolour backdrop behind a terminal
// window; the window is UI, not the hand, and was excluded from the analysis). Grown from the
// nearest plate by eye, ranunculus (pencil & watercolour), with the pencil taken OUT: this hand has
// no drawn line at all. The reference's picture (an abstract rainbow backdrop, the terminal) is not
// used: only its way of making marks. Subject here is new.
//
// MEDIUM RECIPE (written before any code, adapt-a-style.md step 3):
//   MARK   a blotch: one loaded round brush set down and pushed about, so each shape is ONE flat
//          puddle of dilute pigment with a jagged coastline (big lobes plus a fine torn fringe),
//          never an ellipse, never a stroke with a direction.
//   EDGE   hard-dry: the puddle dries with a crisp, slightly darker rim where pigment migrates to
//          the edge, a pale bloom inside. No soft blending into neighbours, no line.
//   ORDER  palest big puddles first, left to dry; smaller, stronger puddles GLAZED over them (the
//          overlaps multiply into deeper secondary colours); paper left bare between islands;
//          a few spatter dots flicked on; last, opaque white gouache sparkles with a halo.
//   PAPER  warm cream cold-press, a soft grain that shows in the washes.
//   PALETTE high key only (the darkest wash is still light): apricot, butter, blush, mauve,
//          lilac, mint, seafoam, powder blue, a clear teal for the deepest glaze.
//
// SUBJECT: a moon jellyfish (Aurelia aurita) drifting in sunlit water. Anatomy: a shallow
// translucent bell, wider than tall, seen a little from the side so its rim is an ellipse; FOUR
// horseshoe-shaped gonads (the pale rings that name it) showing through the bell's top; a fringe
// of many fine marginal tentacles hanging from the rim; four frilly oral arms trailing from the
// centre underneath, longer than the bell is wide. REFERENCE (from knowledge): aquarium and diver
// photographs of Aurelia; its structure only, never a photograph's composition.
// LIGHT: from the surface, above: the top of the bell is left as bare paper, the water deepens
// from apricot at the top to teal at the bottom, the arms catch the light on their upper folds.
import { Gfx, PENCIL, displace, fractal, rng, type Ctx, type Env, type P } from "./core";
import type { Film } from "./film";

export const STYLE = { id: "adaptAquarelle", name: "Pastel blotch watercolour", family: "watercolour", medium: "dilute watercolour puddles with hard pooled rims on cream cold-press, white gouache sparkles; no line", nearest: "ranunculus", hero: "a moon jellyfish in sunlit water", house: "styles/house/pastel-blotch.json" };

const PAPER = "#f5f1e6";
const J = { bell: "#c173b8", bell2: "#9d5fb8", gonad: "#a8418c", arm: "#e0708f", arm2: "#b15aa8", fringe: "#9a4e97" }; // the subject: warm magentas against a cool ground, a full value step darker than the water
const C = { apricot: "#f7a86a", butter: "#f7d77e", blush: "#f5b5a6", rose: "#eb97ad", mauve: "#cf95c6", lilac: "#b49ae0", mint: "#a6e0bd", sea: "#8fd3cc", powder: "#9dbdec", teal: "#5fb3b8", deep: "#4f8fc4" }; // the reference is pastel but CLEAN: high key, real chroma
const W = 1080, H = 1080;

const ellipse = (cx: number, cy: number, rx: number, ry: number, rot = 0, n = 72): P[] => Array.from({ length: n }, (_, i) => { const a = (i / n) * Math.PI * 2, x = Math.cos(a) * rx, y = Math.sin(a) * ry; return [cx + x * Math.cos(rot) - y * Math.sin(rot), cy + x * Math.sin(rot) + y * Math.cos(rot)] as P; });
const densify = (pts: P[], step: number): P[] => { const out: P[] = []; for (let i = 0; i < pts.length; i++) { const a = pts[i], b = pts[(i + 1) % pts.length], n = Math.max(1, Math.ceil(Math.hypot(b[0] - a[0], b[1] - a[1]) / step)); for (let k = 0; k < n; k++) out.push([a[0] + ((b[0] - a[0]) * k) / n, a[1] + ((b[1] - a[1]) * k) / n]); } return out; };
const size = (pts: P[]) => { let x0 = 1e9, y0 = 1e9, x1 = -1e9, y1 = -1e9; for (const [x, y] of pts) { x0 = Math.min(x0, x); y0 = Math.min(y0, y); x1 = Math.max(x1, x); y1 = Math.max(y1, y); } return Math.max(20, Math.min(x1 - x0, y1 - y0)); };
// the coastline: big lobes scaled to the puddle, then a fine torn fringe that is the same size on every puddle (it is the paper's, not the shape's)
// (fractal() sits near 0.5 with a spread of about +-0.15, so the amplitudes are ~3x the visible wobble)
const coast = (pts: P[], seed: number, lobes = 1): P[] => { const s = size(pts); return displace(displace(displace(densify(pts, 3), s * 0.9 * lobes, 1.4 / s, 2, seed), s * 0.22 * lobes, 5 / s, 2, seed + 7), 13, 0.06, 3, seed + 17); };
const hex = (c: string) => [parseInt(c.slice(1, 3), 16), parseInt(c.slice(3, 5), 16), parseInt(c.slice(5, 7), 16)];
const darker = (c: string, k: number) => { const [r, g, b] = hex(c); return `rgb(${Math.round(r * k)},${Math.round(g * k)},${Math.round(b * k)})`; };
const path = (c: Ctx, pts: P[]) => { c.moveTo(pts[0][0], pts[0][1]); for (let i = 1; i < pts.length; i++) c.lineTo(pts[i][0], pts[i][1]); c.closePath(); };

// ONE puddle: flat pigment, a darker dried rim, a paler bloom inside. `holes` are reserved paper.
const puddle = (g: Gfx, shape: P[], col: string, o: { seed: number; a?: number; rim?: number; lobes?: number; holes?: P[][] }) => {
  const c = g.cur, edge = coast(shape, o.seed, o.lobes ?? 1), a = o.a ?? 0.55; g.mark(edge, 12);
  c.save(); if (o.holes?.length) { c.beginPath(); c.rect(-50, -50, W + 100, H + 100); o.holes.forEach((h) => path(c, h)); c.clip("evenodd"); } // reserved paper: the brush went round it
  c.beginPath(); path(c, edge); c.globalAlpha = a; c.fillStyle = col; c.fill();
  c.globalAlpha = (o.rim ?? 0.5) * a; c.strokeStyle = darker(col, 0.72); c.lineWidth = 3; c.lineJoin = "round"; c.beginPath(); path(c, edge); c.stroke();
  // the bloom: where the water pushed pigment outward as it dried, the middle is a shade paler (drawn as the paper colour, thin)
  const r = rng(o.seed * 7 + 3), s = size(shape), cx = shape.reduce((t, p) => t + p[0], 0) / shape.length, cy = shape.reduce((t, p) => t + p[1], 0) / shape.length;
  if (s > 60 && !o.holes?.length) { c.globalAlpha = 0.16; c.fillStyle = PAPER; c.beginPath(); path(c, coast(ellipse(cx + (r() - 0.5) * s * 0.2, cy + (r() - 0.5) * s * 0.2, s * 0.22, s * 0.17, r() * 3), o.seed + 9, 0.8)); c.fill(); }
  c.globalAlpha = 1; c.restore();
};
const sparkle = (c: Ctx, x: number, y: number, s: number, rot: number) => {
  const gr = c.createRadialGradient(x, y, 0, x, y, s * 1.6); gr.addColorStop(0, "rgba(255,255,250,0.85)"); gr.addColorStop(0.3, "rgba(255,255,250,0.35)"); gr.addColorStop(1, "rgba(255,255,250,0)"); c.fillStyle = gr; c.fillRect(x - s * 2, y - s * 2, s * 4, s * 4);
  c.fillStyle = "rgba(255,255,252,0.97)";
  for (const [ax, ay, len, wid] of [[Math.cos(rot), Math.sin(rot), s * 2.2, s * 0.16], [-Math.sin(rot), Math.cos(rot), s * 1.6, s * 0.14]] as number[][]) { c.beginPath(); c.moveTo(x - ax * len, y - ay * len); c.quadraticCurveTo(x - ay * wid, y + ax * wid, x + ax * len, y + ay * len); c.quadraticCurveTo(x + ay * wid, y - ax * wid, x - ax * len, y - ay * len); c.fill(); }
};

// ---------------------------------------------------------------- the jellyfish
const BELL = { cx: 548, top: 250, rimY: 452, rx: 232, ry: 58 };
const bellShape = (): P[] => { const out: P[] = []; for (let i = 0; i <= 40; i++) { const t = i / 40, a = Math.PI + t * Math.PI; out.push([BELL.cx + Math.cos(a) * BELL.rx, BELL.rimY + Math.sin(a) * (BELL.rimY - BELL.top) * (0.92 + 0.08 * Math.sin(t * Math.PI))]); } for (let i = 1; i < 30; i++) { const a = (i / 30) * Math.PI; out.push([BELL.cx + Math.cos(a) * BELL.rx, BELL.rimY + Math.sin(a) * BELL.ry]); } return out; };
// a horseshoe: a thick arc seen through the curved top of the bell
const horseshoe = (cx: number, cy: number, r: number, open: number, sq: number): P[] => { const o: P[] = [], i2: P[] = []; for (let k = 0; k <= 24; k++) { const a = open + 0.55 + (k / 24) * (Math.PI * 2 - 1.1); o.push([cx + Math.cos(a) * r, cy + Math.sin(a) * r * sq]); i2.push([cx + Math.cos(a) * r * 0.52, cy + Math.sin(a) * r * 0.52 * sq]); } return [...o, ...i2.reverse()]; };
// an oral arm: a ribbon that wavers as it trails, its frilled edge given by the puddle's own coastline
// oral arms are frilled curtains, not limbs: wide and ruffled under the bell, twisting as they sway, thinning to wisps
const arm = (x0: number, y0: number, len: number, lean: number, w0: number, seed: number): P[] => { const r = rng(seed), L: P[] = [], R: P[] = [], n = 40, ph = r() * 6; for (let i = 0; i <= n; i++) { const t = i / n, x = x0 + lean * t * len + Math.sin(t * 7 + ph) * 40 * t, y = y0 + t * len * (1 - 0.1 * t), twist = 0.55 + 0.45 * Math.abs(Math.cos(t * 6 + ph)), w = w0 * Math.pow(1 - t, 0.8) * twist + 2, fr = (k: number) => Math.sin(t * 60 + k + ph) * 6 * (1 - t); L.push([x - w + fr(0), y]); R.push([x + w + fr(2), y]); } return [...L, ...R.reverse()]; };
// all four drift the same way (the current carries them), one leads, never splayed like legs
const ARMS = [[528, 468, 380, 0.22, 36, 61], [556, 474, 450, 0.34, 42, 62], [582, 470, 330, 0.46, 34, 63], [544, 478, 270, 0.12, 28, 64]] as const;

const draw = (ctx: Ctx, _f: number, env: Env) => {
  const g = new Gfx(ctx, env, 0, PENCIL), r = rng(4242);
  ctx.setTransform(env.scale, 0, 0, env.scale, 0, 0); ctx.fillStyle = PAPER; ctx.fillRect(0, 0, W, H);
  const bell = bellShape(), reserve: P[][] = [displace(densify(bell.map(([x, y]) => [BELL.cx + (x - BELL.cx) * 1.14, 470 + (y - 470) * 1.14] as P), 3), 20, 0.07, 3, 5)]; // the painter works AROUND the jellyfish's bell
  // 1. the water: pale big puddles, warm near the surface, cool below, islands of bare paper between
  const rows = [{ y: 90, cols: [C.apricot, C.butter, C.sea, C.apricot, C.butter, C.mint] }, { y: 300, cols: [C.butter, C.mint, C.sea, C.powder, C.apricot, C.sea] }, { y: 520, cols: [C.mint, C.lilac, C.sea, C.powder, C.mint, C.lilac] }, { y: 740, cols: [C.sea, C.powder, C.teal, C.mint, C.powder, C.sea] }, { y: 960, cols: [C.powder, C.teal, C.sea, C.deep, C.teal, C.powder] }];
  g.group("paint", () => rows.forEach((row, ri) => row.cols.forEach((col, ci) => {
    if ((ri * 7 + ci * 3) % 3 === 1) return; // a third of the places stay bare paper: rests the eye can breathe in // a bare rest: not every place gets a puddle
    const x = 40 + ci * 205 + (ri % 2) * 90 + (r() - 0.5) * 60, y = row.y + (r() - 0.5) * 60, rx = 115 + r() * 60, ry = 95 + r() * 45;
    puddle(g, ellipse(x, y, rx, ry, r() * 3), col, { seed: 100 + ri * 10 + ci, a: 0.62, rim: 0.8, holes: ri < 3 ? reserve : undefined });
  })), { blend: "multiply", blur: 1.6 }); // the first, wettest puddles dried with a slightly softer edge
  // 2. glazes: smaller, stronger puddles over the first, some crossing each other
  g.group("paint", () => { for (let i = 0; i < 5; i++) { const band = i % 5, x = 60 + r() * 960, y = 60 + band * 220 + (r() - 0.5) * 120, near = Math.hypot(x - BELL.cx, (y - 380) * 1.6) < 300; if (near && band < 2) continue; const col = [C.apricot, C.rose, C.lilac, C.sea, C.teal][band]; puddle(g, ellipse(x, y, 50 + r() * 50, 40 + r() * 40, r() * 3), col, { seed: 300 + i, a: 0.34, rim: 0.6, holes: reserve }); } }, { blend: "multiply" });
  // 3. the jellyfish: bell wash with the sunlit top left as paper, the gonads, the arms, the fringe
  const hi = coast(ellipse(BELL.cx - 70, BELL.top + 58, 105, 30, -0.18), 511, 0.15);
  g.group("paint", () => { puddle(g, bell, J.bell, { seed: 501, a: 0.62, rim: 1, lobes: 0.03, holes: [hi] }); puddle(g, ellipse(BELL.cx, BELL.rimY, BELL.rx * 0.96, BELL.ry * 0.9), J.bell2, { seed: 502, a: 0.45, rim: 0.9, lobes: 0.03 }); }, { blend: "multiply" });
  g.group("paint", () => { // four horseshoes in a clover round the bell's centre, each opening toward the middle, foreshortened by the tilt
    [0.8, 2.35, 3.9, 5.5].forEach((a, i) => { const x = BELL.cx + Math.cos(a) * 58, y = 392 + Math.sin(a) * 30; puddle(g, horseshoe(x, y, 42, a + Math.PI - 0.2, 0.58), J.gonad, { seed: 520 + i, a: 0.42, rim: 0.7, lobes: 0.03 } /* big soft rings touching in a clover: small dark ones read as a face */); }); }, { blend: "multiply" });
  g.group("paint", () => ARMS.forEach(([x, y, len, lean, w, s]) => puddle(g, arm(x, y, len, lean, w, s), s % 2 ? J.arm : J.arm2, { seed: s, a: 0.55, rim: 1, lobes: 0.04 })), { blend: "multiply" });
  // the marginal tentacles: the only thin marks, a rigger brush dragged down from the rim and lifted
  g.group("paint", () => { for (let i = 0; i < 46; i++) { const t = i / 45, a = Math.PI * (0.02 + t * 0.96), x = BELL.cx + Math.cos(a) * BELL.rx * 0.97, y = BELL.rimY + Math.sin(a) * BELL.ry * 0.9, len = 70 + r() * 110 + Math.sin(t * Math.PI) * 60, ph = r() * 6; const pts: P[] = Array.from({ length: 8 }, (_, k) => [x + Math.sin(k * 0.7 + ph) * 7 * (k / 7) + (k / 7) * (x - BELL.cx) * 0.08, y + (k / 7) * len] as P); g.pen(pts, { w: 1.2, color: i % 3 ? J.fringe : J.arm, seed: 700 + i, opacity: 0.8, boil: 0, wobble: 0.4, retrace: false, taper: 1 }); } }, { blend: "multiply" });
  // 4. spatter: pigment flicked off the brush, a few, in drifts
  const c = g.cur; ctx.save(); ctx.setTransform(env.scale, 0, 0, env.scale, 0, 0);
  for (let i = 0; i < 38; i++) { const cluster = [[180, 220], [880, 160], [860, 720], [200, 820], [520, 900]][i % 5], x = cluster[0] + (r() - 0.5) * 260, y = cluster[1] + (r() - 0.5) * 200, s = 1.4 + r() * r() * 5.5; ctx.globalAlpha = 0.55; ctx.fillStyle = [C.rose, C.teal, C.apricot, C.lilac, C.deep][i % 5]; ctx.beginPath(); ctx.arc(x, y, s, 0, Math.PI * 2); ctx.fill(); }
  ctx.globalAlpha = 1;
  // 5. white gouache sparkles last: bioluminescent glints round the bell and sunlight in the water
  [[330, 250, 17, 0.1], [800, 300, 12, 0.3], [700, 560, 21, 0.05], [410, 610, 10, 0.2], [940, 470, 16, 0.15], [140, 470, 13, 0.25], [860, 900, 18, 0.1], [260, 980, 12, 0.2], [620, 170, 9, 0.3], [470, 760, 9, 0.1], [90, 120, 14, 0.05]].forEach(([x, y, s, rt]) => sparkle(ctx, x, y, s, rt));
  ctx.restore(); void c; void fractal;
  g.paper("coldpress", 0.1); g.paper("paper", 0.05);
};

export const adaptAquarelle: Film = { meta: { title: "Moon jellyfish · pastel blotch watercolour (adapted hand)", W, H, fps: 30, bpm: 120, durationFrames: 1 }, assets: { images: {} }, shots: [{ id: "still", start: 0, end: 1, draw }] };
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall