From 1ff00b0e3f44f996a4b793a6fa1967b73cf6dc30 Mon Sep 17 00:00:00 2001 From: mnovak Date: Tue, 17 Nov 2026 19:18:38 +0100 Subject: [PATCH] [art] PlanetGarden: Her planet and the gardener on the board; the author's S2 and S6 recorded with their guards --- art/STYLE.md | 44 ++++- art/manifest.json | 215 ++++++++++++++++++++++ art/placeholders/gardener-carry.svg | 4 + art/placeholders/gardener-poses-sheet.svg | 4 + art/placeholders/gardener-pour.svg | 4 + art/placeholders/gardener-pull.svg | 4 + art/placeholders/gardener-reach.svg | 4 + art/placeholders/gardener-sheet.svg | 4 + art/placeholders/gardener-sit.svg | 4 + art/placeholders/gardener-stand.svg | 4 + art/placeholders/gardener-sweep.svg | 4 + art/placeholders/gardener-walk.svg | 4 + art/placeholders/home-planet-day.svg | 4 + art/placeholders/home-planet-golden.svg | 4 + art/placeholders/home-planet-night.svg | 4 + tools/art-prep/src/manifest.ts | 5 + tools/art-prep/src/placeholders.ts | 50 +++++ tools/art-prep/src/prompt.ts | 9 +- tools/art-prep/test/board.test.ts | 2 +- tools/art-prep/test/manifest.test.ts | 8 +- tools/art-prep/test/prompt.test.ts | 24 ++- 21 files changed, 393 insertions(+), 16 deletions(-) create mode 100644 art/placeholders/gardener-carry.svg create mode 100644 art/placeholders/gardener-poses-sheet.svg create mode 100644 art/placeholders/gardener-pour.svg create mode 100644 art/placeholders/gardener-pull.svg create mode 100644 art/placeholders/gardener-reach.svg create mode 100644 art/placeholders/gardener-sheet.svg create mode 100644 art/placeholders/gardener-sit.svg create mode 100644 art/placeholders/gardener-stand.svg create mode 100644 art/placeholders/gardener-sweep.svg create mode 100644 art/placeholders/gardener-walk.svg create mode 100644 art/placeholders/home-planet-day.svg create mode 100644 art/placeholders/home-planet-golden.svg create mode 100644 art/placeholders/home-planet-night.svg diff --git a/art/STYLE.md b/art/STYLE.md index 980446f..0c1ecb6 100644 --- a/art/STYLE.md +++ b/art/STYLE.md @@ -21,6 +21,14 @@ A picture that is off-style goes back for another try. It is never shipped. > the petals, and §6 makes prompts short enough for a generator to follow. The book's motifs > are no longer named in prompts (naming them invites them); they stay in §4 and §7, where the > review catches them. The picture list grew to every picture Phases 1–5 need (§4). +> +> **Changed by Mark, 2026-11-17: her world is a round tiny planet, and a gardener tends her.** +> Seeing the garden as a page of buttons, he asked for a game: a planet, a character who does the +> care with animations, gestures. He chose a **round tiny planet** (S2 below, reversed) and a +> **human gardener, a boy or a girl, chosen and dressed by the player** (S6, new), knowing that +> a child tending a rose on a small round planet is close to the book's most recognisable image. +> The guards that keep them our own are in §3b, §4 and review points 10–11, and a legal check of +> the look comes before any public release (`.agents/features/planet-garden.md` §0). --- @@ -29,7 +37,8 @@ A picture that is off-style goes back for another try. It is never shipped. | # | Choice | Decided | Why | |:--|:--|:--|:--| | S1 | The medium | Matte gouache on warm paper, with soft brush outlines | It is gentle and hand-made like the rest of Domi. It is also clearly not the book's look, which is a thin pen line with loose, pale watercolour. | -| S2 | Where the rose lives | A small garden bed on a hillside meadow, with a low dry-stone wall and a wide sky to the west | The sunset is real, so the scene needs a real horizon. It is an ordinary garden, never a tiny planet. | +| S2 | Where the rose lives | ~~A small garden bed on a hillside meadow~~ **A round tiny planet of her own, cultivated as a garden**: meadow over it, her bed on top, a low dry-stone wall, the chair, the wild bush. *Reversed by Mark 2026-11-17.* | He wants a world of her own, as a game has. It stays a garden, never a bare rock: no volcanoes, no baobab-like trees, no single lamp post (§4). The real sky is still code behind it (S5); the in-game sunset keeps the hillside garden for its wide horizon. | +| S6 | Who tends her | **A human gardener: a boy or a girl, chosen and dressed by the player** at the first open (skin tone, hair and its colour, clothes colour, a hat). *Decided by Mark 2026-11-17.* | The care is done by a character, with animations. The gardener is the player's own, so no two need look alike; simple work clothes and an apron, never a scarf, a long coat or cape, a green suit, a crown or a sword (§3b). | | S3 | The rose's face | A face in the middle of the bloom: two small eyes, often half-closed, a tiny mouth and a blush | This is the description in CLAUDE.md §1, drawn as written. | | S4 | The palette | §2 | It starts from the app's tokens (`--rose #b4485e`, `--paper #fbf6f1`). | | S5 | The sky | Drawn in code, never painted | The sun moves at the player's real time, and the stars are the real constellations. A painted sky could do neither. | @@ -59,7 +68,8 @@ A picture that is off-style goes back for another try. It is never shipped. > book for adults: understated, never sugary, never a children's sticker or a cute mascot. > Characters are alive but small-featured: their faces are a few tiny marks painted directly on > them, with eyes as small dark dots or crescents, often half-closed. No text, letters or numbers -> anywhere. No people, hands or human faces. Not watercolour: no wet washes, bleeding edges, blooms or +> anywhere. No people, hands or human faces, except the player's gardener where the picture names +> them. Not watercolour: no wet washes, bleeding edges, blooms or > pale tints. Not digital: no 3D rendering, gloss, airbrush gradients or lens effects. An > original design, in the manner of no existing artist, book or film. @@ -129,6 +139,26 @@ The rose is the only character in Phase 1. Every rose picture follows the charac --- +## 3b. The gardener (S6, decided by Mark 2026-11-17) + +The player's own gardener: a boy or a girl of about ten, chosen and dressed at the first open. +Every gardener picture follows `gardener-sheet`. + +- **Simple work clothes:** a plain short-sleeved shirt (the boy, with trousers) or tunic (the girl, + with bare legs), a cream canvas apron with one pocket, small sturdy boots. Hands small and simple. +- **A face like the others':** a few tiny painted marks, eyes often half-closed, calm and kind. +- **The choices the player makes** (skin tone, hair style and colour, clothes colour, straw hat, + cap or none) are the app's (`gardener.schema.json`). The board paints **the first look** (the girl: + braids, brown hair, sage clothes, straw hat; and the boy, short hair, the same colours) so the + character can be judged. **How the other looks are drawn** (separate layers for hair and hat, or + clothes painted to be tinted in code) **is still open** and waits for Mark: it decides how many + pictures the gardener needs. +- **Never:** a scarf, a long coat or cape, a suit with epaulettes, a crown, a sword, golden curls + with a green outfit, or anything that recreates the book's boy. He or she is a gardener at work. +- **Size:** standing, a little taller than the rose. + +--- + ## 3a. The fox (Phase 2: F1–F2) The fox is the second character. Every fox picture follows the character sheet `fox-sheet`. @@ -188,7 +218,11 @@ The fox is the second character. Every fox picture follows the character sheet ` sunset wave are pictures. - **The share frame (Phase 5):** a border of meadow round an empty middle where the player's sky is drawn. -- No flags, religious symbols, buildings, vehicles or people. +- **Her home planet (S2, reversed 2026-11-17):** a small round world seen whole, covered in meadow, + with her round garden bed on top, a low dry-stone wall curving behind it, the wooden chair on its + shoulder and a few meadow flowers. Everything outside the planet is transparent: the sky is code. + **Never** volcanoes, baobab-like trees or a lone lamp post on it: it is a garden, not a rock. +- No flags, religious symbols, buildings or vehicles. No people except the player's gardener. --- @@ -255,6 +289,10 @@ tick them: *Accept* is one tap. 8. It reads as one young red-orange fox with a cream mask and a ringed tail, shy and gentle, and nothing like the book's sandy, long-eared fox. 9. He matches `fox-sheet`: the same mask, ears, leg colour, tail rings and size. +10. The gardener is a child at garden work, matching `gardener-sheet`: plain shirt or tunic, an + apron, boots; no scarf, long coat, cape, suit, crown or sword, and nothing like the book's boy. +11. Her planet is a cultivated garden world: meadow, her bed, the wall, the chair; no volcanoes, + no baobab-like trees, no lone lamp post, and not the look of the book's little planet. --- diff --git a/art/manifest.json b/art/manifest.json index 172de5a..3a93c5a 100644 --- a/art/manifest.json +++ b/art/manifest.json @@ -8,6 +8,10 @@ "fox": { "sheet": "fox-sheet", "description": "The fox: a small, young fox; sitting, he is about as tall as the rose. A deep red-orange coat (#BC4A22), warm and glowing, never neon. A cream mask (#F3E3C8) on his face: cream cheeks and muzzle and a small cream spot above each eye. Deep brown legs and paws (#5A3A33). Rounded ears of middle size, cream inside with dark tips. A big bushy tail with three faint darker rings and a cream tip. Small dark eyes, often half-closed, a tiny dark nose and mouth. A fox's pointed muzzle and a fox's body: the mask and the tail rings are only a nod to a red panda. Shy, curious and gentle, never sly." + }, + "gardener": { + "sheet": "gardener-sheet", + "description": "The gardener: the player's own, a child of about ten at garden work, a little taller than the rose. The first look: a girl with brown hair in two braids, a wide straw hat, a plain sage-green short-sleeved tunic, a cream canvas apron with one pocket, bare legs and small sturdy brown boots; or a boy with short brown hair, the same straw hat, a plain sage-green shirt and trousers, the same apron and boots. A face of a few tiny painted marks: small dark eyes, often half-closed, a short calm mouth. Kind, absorbed in the work, never posing." } }, "avoid": [ @@ -675,6 +679,217 @@ 6 ] }, + { + "phase": 1, + "shipped": false, + "character": "gardener", + "allow": [ + "people, hands or human faces" + ], + "checks": [ + 2, + 3, + 4, + 5, + 10 + ], + "id": "gardener-sheet", + "type": "sheet", + "width": 1536, + "height": 1024, + "background": "full", + "smallest": null, + "usedBy": [ + "The reference for every gardener picture (STYLE.md §3b). Make it right after rose-sheet." + ], + "purpose": "Reference sheet that fixes the gardener's first look, the girl and the boy; never shown in the app.", + "subject": "The gardener, as described below, painted eight times: the top row the girl (front view; three-quarter view facing left; side view facing left; back view), the bottom row the boy in the same four views.", + "setting": "Isolated on plain warm off-white paper (#FBF6F1), no scenery, no ground.", + "composition": "Eight full figures in two rows of four, evenly spaced, all at the same scale, nothing overlapping.", + "include": [ + "identical proportions, clothes and apron in every view", + "the same tiny painted face in every view that shows it" + ], + "avoid": [ + "a pose that looks posed for a photograph", + "any tool or prop in their hands" + ] + }, + { + "phase": 1, + "shipped": true, + "character": "gardener", + "allow": [ + "people, hands or human faces" + ], + "checks": [ + 2, + 3, + 4, + 5, + 6, + 7, + 10 + ], + "id": "gardener-poses-sheet", + "type": "spritesheet", + "width": 1536, + "height": 1024, + "background": "transparent", + "smallest": 120, + "usedBy": [ + "The gardener at work on her planet (planet-garden.md G5): each pose is shown while the care it belongs to happens." + ], + "purpose": "The gardener's poses for each act of care, the girl in the first look.", + "angle": "The whole girl gardener in every cell, in side view facing right unless the cell says otherwise, at the same scale as gardener-sheet, the same light from the left.", + "grid": { + "cols": 4, + "rows": 2 + }, + "cells": [ + { + "id": "gardener-stand", + "does": "standing beside something just out of the picture, hands at the sides, looking at it fondly." + }, + { + "id": "gardener-walk", + "does": "walking to the right, mid-step, arms swinging a little." + }, + { + "id": "gardener-pour", + "does": "holding a small round sage-green watering can in both hands, tipping it forward to the right, a thin stream of water falling." + }, + { + "id": "gardener-pull", + "does": "crouched, both hands round something low on the ground just out of the picture, leaning back to pull." + }, + { + "id": "gardener-sweep", + "does": "bending a little, sweeping one hand across the grass to the right, gathering." + }, + { + "id": "gardener-carry", + "does": "carrying a small curved woven willow hurdle upright in front of them with both arms." + }, + { + "id": "gardener-reach", + "does": "reaching one hand out gently to the right and up, as if to touch a petal, fingers soft." + }, + { + "id": "gardener-sit", + "does": "sitting on nothing (the chair is its own picture), in three-quarter view facing left towards a sunset outside the picture, hands in the lap." + } + ], + "include": [ + "the same gardener as gardener-sheet in every cell" + ], + "avoid": [ + "ground or grass under them", + "the rose or any plant in the picture" + ] + }, + { + "id": "home-planet-day", + "type": "layer", + "phase": 1, + "width": 1024, + "height": 1024, + "background": "transparent", + "shipped": true, + "smallest": null, + "usedBy": [ + "Her home planet in the garden scene (planet-garden.md), chosen by the real sun's light (engine lightAt)." + ], + "purpose": "Her own small round world, seen whole, with everything around it transparent for the real sky behind.", + "subject": "No characters. A small round planet seen whole from the side, cultivated as a garden: soft meadow grass all over it with a few small meadow flowers, warm earth showing at its underside, on its top a round garden bed of warm umber soil (empty: the rose is her own picture), a low curving dry-stone wall behind the bed, a small weathered wooden chair with a pale pink cushion on its right shoulder.", + "setting": "The same planet in soft bright daylight from high on the left, fresh greens.", + "composition": "Square. The planet centred, about 70 % of the width across; its top, with the empty bed, a little above the middle. Everything outside the planet fully transparent.", + "include": [ + "a fully transparent sky", + "an empty garden bed on top, centred" + ], + "avoid": [ + "a painted sky, sun, moon or stars", + "a rose or any large flower in the bed", + "people or animals" + ], + "checks": [ + 2, + 3, + 4, + 5, + 6, + 11 + ] + }, + { + "id": "home-planet-golden", + "type": "layer", + "phase": 1, + "width": 1024, + "height": 1024, + "background": "transparent", + "shipped": true, + "smallest": null, + "usedBy": [ + "Her home planet in the garden scene (planet-garden.md), chosen by the real sun's light (engine lightAt)." + ], + "purpose": "Her own small round world, seen whole, with everything around it transparent for the real sky behind.", + "subject": "No characters. A small round planet seen whole from the side, cultivated as a garden: soft meadow grass all over it with a few small meadow flowers, warm earth showing at its underside, on its top a round garden bed of warm umber soil (empty: the rose is her own picture), a low curving dry-stone wall behind the bed, a small weathered wooden chair with a pale pink cushion on its right shoulder.", + "setting": "The same planet in low evening light from the left: amber gold (#F2B860) and coral (#E9846A) on the wall and grass, long soft shadows to the right.", + "composition": "Square. The planet centred, about 70 % of the width across; its top, with the empty bed, a little above the middle. Everything outside the planet fully transparent.", + "include": [ + "a fully transparent sky", + "an empty garden bed on top, centred" + ], + "avoid": [ + "a painted sky, sun, moon or stars", + "a rose or any large flower in the bed", + "people or animals" + ], + "checks": [ + 2, + 3, + 4, + 5, + 6, + 11 + ] + }, + { + "id": "home-planet-night", + "type": "layer", + "phase": 1, + "width": 1024, + "height": 1024, + "background": "transparent", + "shipped": true, + "smallest": null, + "usedBy": [ + "Her home planet in the garden scene (planet-garden.md), chosen by the real sun's light (engine lightAt)." + ], + "purpose": "Her own small round world, seen whole, with everything around it transparent for the real sky behind.", + "subject": "No characters. A small round planet seen whole from the side, cultivated as a garden: soft meadow grass all over it with a few small meadow flowers, warm earth showing at its underside, on its top a round garden bed of warm umber soil (empty: the rose is her own picture), a low curving dry-stone wall behind the bed, a small weathered wooden chair with a pale pink cushion on its right shoulder.", + "setting": "The same planet in night: dusk indigo (#2E3561) shadows, soft silver-blue light from above, one or two lamp-gold glow-worms in the grass; calm and safe.", + "composition": "Square. The planet centred, about 70 % of the width across; its top, with the empty bed, a little above the middle. Everything outside the planet fully transparent.", + "include": [ + "a fully transparent sky", + "an empty garden bed on top, centred" + ], + "avoid": [ + "a painted sky, sun, moon or stars", + "a rose or any large flower in the bed", + "people or animals" + ], + "checks": [ + 2, + 3, + 4, + 5, + 6, + 11 + ] + }, { "id": "fox-sheet", "type": "sheet", diff --git a/art/placeholders/gardener-carry.svg b/art/placeholders/gardener-carry.svg new file mode 100644 index 0000000..91a665e --- /dev/null +++ b/art/placeholders/gardener-carry.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/gardener-poses-sheet.svg b/art/placeholders/gardener-poses-sheet.svg new file mode 100644 index 0000000..66ba910 --- /dev/null +++ b/art/placeholders/gardener-poses-sheet.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/gardener-pour.svg b/art/placeholders/gardener-pour.svg new file mode 100644 index 0000000..8c24246 --- /dev/null +++ b/art/placeholders/gardener-pour.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/gardener-pull.svg b/art/placeholders/gardener-pull.svg new file mode 100644 index 0000000..666f590 --- /dev/null +++ b/art/placeholders/gardener-pull.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/gardener-reach.svg b/art/placeholders/gardener-reach.svg new file mode 100644 index 0000000..b68508b --- /dev/null +++ b/art/placeholders/gardener-reach.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/gardener-sheet.svg b/art/placeholders/gardener-sheet.svg new file mode 100644 index 0000000..c910949 --- /dev/null +++ b/art/placeholders/gardener-sheet.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/gardener-sit.svg b/art/placeholders/gardener-sit.svg new file mode 100644 index 0000000..e553fc8 --- /dev/null +++ b/art/placeholders/gardener-sit.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/gardener-stand.svg b/art/placeholders/gardener-stand.svg new file mode 100644 index 0000000..94db29c --- /dev/null +++ b/art/placeholders/gardener-stand.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/gardener-sweep.svg b/art/placeholders/gardener-sweep.svg new file mode 100644 index 0000000..873b8ee --- /dev/null +++ b/art/placeholders/gardener-sweep.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/gardener-walk.svg b/art/placeholders/gardener-walk.svg new file mode 100644 index 0000000..5c64d37 --- /dev/null +++ b/art/placeholders/gardener-walk.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/home-planet-day.svg b/art/placeholders/home-planet-day.svg new file mode 100644 index 0000000..21a15fa --- /dev/null +++ b/art/placeholders/home-planet-day.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/home-planet-golden.svg b/art/placeholders/home-planet-golden.svg new file mode 100644 index 0000000..4b157f6 --- /dev/null +++ b/art/placeholders/home-planet-golden.svg @@ -0,0 +1,4 @@ + + + + diff --git a/art/placeholders/home-planet-night.svg b/art/placeholders/home-planet-night.svg new file mode 100644 index 0000000..de154e6 --- /dev/null +++ b/art/placeholders/home-planet-night.svg @@ -0,0 +1,4 @@ + + + + diff --git a/tools/art-prep/src/manifest.ts b/tools/art-prep/src/manifest.ts index f02afdd..c3f8634 100644 --- a/tools/art-prep/src/manifest.ts +++ b/tools/art-prep/src/manifest.ts @@ -36,6 +36,8 @@ export interface Asset { readonly cells?: readonly Cell[]; readonly include: readonly string[]; readonly avoid: readonly string[]; + /** Shared avoid lines this picture may break, each named exactly (the gardener is a person: planet-garden.md). */ + readonly allow?: readonly string[]; /** Indices into STYLE.md §7, the review points shown on its card. */ readonly checks: readonly number[]; } @@ -108,6 +110,9 @@ export function checkManifest(m: Manifest, checklistLength: number): string[] { problems.push(`${a.id}: a ${a.type} sits over other pictures, so its background must be transparent`); } if (a.type !== 'spritesheet' && (a.subject ?? '').trim() === '') problems.push(`${a.id}: no subject`); + for (const line of a.allow ?? []) { + if (!m.avoid.includes(line)) problems.push(`${a.id}: allows "${line}", which is not in the shared avoid list`); + } for (const i of a.checks) { if (!Number.isInteger(i) || i < 0 || i >= checklistLength) problems.push(`${a.id}: review point ${i} is not in STYLE.md §7`); } diff --git a/tools/art-prep/src/placeholders.ts b/tools/art-prep/src/placeholders.ts index b20eb4d..72b672f 100644 --- a/tools/art-prep/src/placeholders.ts +++ b/tools/art-prep/src/placeholders.ts @@ -332,6 +332,47 @@ function planet(W: number, H: number, id: string): string { + `${drawing(things, id)}`; } +type Pose = 'stand' | 'walk' | 'pour' | 'pull' | 'sweep' | 'carry' | 'reach' | 'sit'; + +/** The gardener's stand-in in a 120 × 200 box, feet on the bottom edge, facing right (STYLE.md §3b). */ +function gardener(pose: Pose, boy = false): string { + const skin = '#cf9a72', hair = '#7a4b2e', cloth = C.leaf, apron = '#efe4d2'; + const lean = { stand: 0, walk: 4, pour: 10, pull: 28, sweep: 18, carry: 6, reach: 14, sit: 0 }[pose]; + const arm = { stand: 8, walk: -12, pour: -70, pull: -150, sweep: -40, carry: -80, reach: -95, sit: -30 }[pose]; + const legs = pose === 'sit' + ? `` + : ``; + const body = boy + ? `` + : ``; + const held = pose === 'pour' ? `` + : pose === 'carry' ? Array.from({ length: 4 }, (_, i) => ``).join('') : ''; + const braids = boy ? '' : ``; + return `${legs} + ${body} + + ${held} + ${braids} + + + `; +} + +const GARDENER_POSES: Record = { + 'gardener-stand': 'stand', 'gardener-walk': 'walk', 'gardener-pour': 'pour', 'gardener-pull': 'pull', + 'gardener-sweep': 'sweep', 'gardener-carry': 'carry', 'gardener-reach': 'reach', 'gardener-sit': 'sit' +}; + +/** Her home planet's stand-in (STYLE.md S2): a round meadow world, the empty bed on top, the wall and the chair. */ +function homePlanet(W: number, H: number, light: 'day' | 'golden' | 'night'): string { + const meadow = { day: C.meadow, golden: '#c9b07a', night: '#3c4a6a' }[light]; + const cx = W / 2, cy = H * 0.58, r = W * 0.35; + return ` + + + `; +} + /** The share frame's stand-in: meadow along the bottom and up the sides, the middle left empty. */ function shareFrame(W: number, H: number): string { return `` @@ -360,6 +401,12 @@ function single(a: Asset): string { const { width: W, height: H } = a; switch (a.type) { case 'sheet': { + if (a.character === 'gardener') { + // The girl along the top, the boy along the bottom; the side and back views are flipped stand-ins. + const row = (boy: boolean, y: number): string => + [0, 1, 2, 3].map((i) => `${gardener('stand', boy)}`).join(''); + return `${row(false, 40)}${row(true, 560)}`; + } if (a.character === 'fox') { const views: FoxLook[] = [{ pose: 'sit', eyes: 'half' }, { pose: 'stand', eyes: 'half' }, { pose: 'stand', eyes: 'half', tilt: -8 }, { pose: 'sit', eyes: 'half', behind: true }]; const figures = views.map((l, i) => `${fox(l)}`).join(''); @@ -388,6 +435,7 @@ function single(a: Asset): string { return fit(drawing({ ...PROPS, ...V2_PROPS }, a.id), 200, 200, W, H, 0.7); case 'layer': { if (a.id.startsWith('planet-')) return planet(W, H, a.id); + if (a.id.startsWith('home-planet-')) return homePlanet(W, H, a.id.endsWith('golden') ? 'golden' : a.id.endsWith('night') ? 'night' : 'day'); if (a.id === 'share-frame') return shareFrame(W, H); const time = (['morning', 'day', 'sunset', 'night'] as const).find((t) => a.id.endsWith(t)) ?? 'day'; return garden(W, H, time); @@ -426,6 +474,8 @@ function cellBody(id: string, W: number, H: number): string { if (look) return fit(rose(look), 200, 520, W, H); const pose = FOXES[id]; if (pose) return fit(fox(pose), 300, 240, W, H); + const gardenerPose = GARDENER_POSES[id]; + if (gardenerPose) return fit(gardener(gardenerPose), 120, 200, W, H); if (id in TALL || id in V2_TALL) return fit(drawing({ ...TALL, ...V2_TALL }, id), 200, 400, W, H); return fit(drawing({ ...PROPS, ...MORE_PROPS, ...V2_PROPS }, id), 200, 200, W, H, 0.7); } diff --git a/tools/art-prep/src/prompt.ts b/tools/art-prep/src/prompt.ts index bb98f44..5938b00 100644 --- a/tools/art-prep/src/prompt.ts +++ b/tools/art-prep/src/prompt.ts @@ -71,6 +71,9 @@ const MAKE: Record, string> = { const list = (items: readonly string[]): string => items.join('; '); +/** The shared avoid lines, less any this picture is allowed to break. */ +const shared = (a: Asset, m: Manifest): string[] => m.avoid.filter((line) => !(a.allow ?? []).includes(line)); + /** A sheet is cut apart, so its pictures must not touch. Everything else is said positively in the layout. */ const SHEET_AVOID = ['pictures touching or overlapping', 'grid lines, frames or labels']; @@ -116,7 +119,7 @@ export function promptFor(a: Asset, m: Manifest, style: string): string { lines.push( canvasLine(a.width, a.height, a.background, a.type === 'sprite'), `Include: ${list(a.include)}`, - `Avoid: ${list([...a.avoid, ...m.avoid])}`, + `Avoid: ${list([...a.avoid, ...shared(a, m)])}`, board(a.id) ); return lines.join('\n'); @@ -138,7 +141,7 @@ function sheetPrompt(a: Asset, m: Manifest, style: string): string { 'Pictures:', ...cells.map((c, i) => `${i + 1}. ${c.does}`), `Include: ${list(a.include)}`, - `Avoid: ${list([...a.avoid, ...SHEET_AVOID, ...m.avoid])}`, + `Avoid: ${list([...a.avoid, ...SHEET_AVOID, ...shared(a, m)])}`, board(a.id) ].join('\n'); } @@ -155,7 +158,7 @@ export function cellPromptFor(a: Asset, cell: Cell, m: Manifest, style: string): `Drawn alike: ${a.angle ?? ''}`, canvasLine(width, height, 'transparent', true), `Include: ${list(a.include)}`, - `Avoid: ${list([...a.avoid, ...m.avoid])}`, + `Avoid: ${list([...a.avoid, ...shared(a, m)])}`, board(`${cell.id} (one picture of ${a.id})`) ].join('\n'); } diff --git a/tools/art-prep/test/board.test.ts b/tools/art-prep/test/board.test.ts index be161cb..8e2ba9e 100644 --- a/tools/art-prep/test/board.test.ts +++ b/tools/art-prep/test/board.test.ts @@ -19,7 +19,7 @@ describe('the board data', () => { for (const c of a.cells ?? []) expect(c).toMatchObject({ id: expect.any(String), width: expect.any(Number), height: expect.any(Number), prompt: expect.any(String) }); } } - expect(data.checklist).toHaveLength(10); + expect(data.checklist).toHaveLength(12); expect(data.assets.every((a) => Number.isInteger(a.phase))).toBe(true); }); diff --git a/tools/art-prep/test/manifest.test.ts b/tools/art-prep/test/manifest.test.ts index e0aea42..9c356d6 100644 --- a/tools/art-prep/test/manifest.test.ts +++ b/tools/art-prep/test/manifest.test.ts @@ -18,15 +18,16 @@ describe('art/manifest.json', () => { expect(checkManifest(readManifest(), POINTS)).toEqual([]); }); - it('asks for the 34 Phase 1 pictures: the rose sheet first, then her stages, care, moments and touch, the care things, chair, garden, letter and icons', () => { + it('asks for the 46 Phase 1 pictures: the rose sheet first, then her stages, care, moments and touch, the care things, chair, garden, letter, icons, the gardener and her planet', () => { const m = readManifest(); expect(m.assets[0]?.id).toBe('rose-sheet'); const phase1 = m.assets.filter((a) => a.phase === 1); const pictures = phase1.flatMap((a: Asset) => (a.cells ? a.cells.map((c) => c.id) : [a.id])); - expect(pictures).toHaveLength(34); + expect(pictures).toHaveLength(46); expect(pictures).toEqual(expect.arrayContaining([ 'rose-bud', 'rose-full-bloom', 'rose-waiting', 'rose-tickled', 'rose-gentle', 'petal-folded', 'weeds-growing', - 'watering-can-pouring', 'garden-chair', 'garden-sunset', 'garden-night', 'letter-header', 'app-icon', 'app-icon-maskable', 'favicon-mark' + 'watering-can-pouring', 'garden-chair', 'garden-sunset', 'garden-night', 'letter-header', 'app-icon', 'app-icon-maskable', 'favicon-mark', + 'gardener-sheet', 'gardener-pour', 'gardener-pull', 'home-planet-day', 'home-planet-night' ])); }); @@ -68,6 +69,7 @@ describe('checkManifest refuses', () => { ['a Phase 1 picture listed after Phase 3', withAsset('lanterns-sheet', (a) => { a.phase = 1; }), /lanterns-sheet: phase 1 comes after phase 3; list the pictures in phase order/], ['a picture with no subject', withAsset('garden-chair', (a) => { delete a.subject; }), /no subject/], ['a picture nobody uses', withAsset('garden-chair', (a) => { a.usedBy = []; }), /usedBy is empty/], + ['an allowance for a line the shared list does not have', withAsset('gardener-sheet', (a) => { a.allow = ['a dragon']; }), /allows "a dragon", which is not in the shared avoid list/], ['a name from the book in a prompt', withAsset('garden-chair', (a) => { a.subject = 'a chair for the Little Prince'; }), /"Little Prince" \(little-prince\)/], ['a medical word in a cell', withAsset('rose-care-sheet', (a) => { (a.cells as { does: string }[])[0]!.does = 'thirsty, waiting to be healed'; }), /"healed" \(medical\)/], ['the word the game never says, in the shared avoid list', (() => { const m = clone(readManifest()); (m.avoid as string[]).push('a lonely look'); return m; })(), /avoid list: "lonely"/] diff --git a/tools/art-prep/test/prompt.test.ts b/tools/art-prep/test/prompt.test.ts index 1702853..9a370ce 100644 --- a/tools/art-prep/test/prompt.test.ts +++ b/tools/art-prep/test/prompt.test.ts @@ -23,9 +23,9 @@ describe('STYLE.md', () => { } }); - it('§7 has the ten review points, a point split over two lines read as one', () => { + it('§7 has the twelve review points, a point split over two lines read as one', () => { const points = reviewPoints(readStyle()); - expect(points).toHaveLength(10); + expect(points).toHaveLength(12); expect(points[8]).toBe("It reads as one young red-orange fox with a cream mask and a ringed tail, shy and gentle, and nothing like the book's sandy, long-eared fox."); expect(points[3]).toBe('Nothing from the book: no glass dome, screen, tiny planet, desert, child or scarf, and no look of its drawings.'); }); @@ -37,15 +37,16 @@ describe('STYLE.md', () => { }); describe('the prompts', () => { - it('every one starts with STYLE.md §1 word for word, then says what to make: 35 cards and 66 one-at-a-time prompts', () => { - expect(allPrompts).toHaveLength(35 + 66); + it('every one starts with STYLE.md §1 word for word, then says what to make: 40 cards and 74 one-at-a-time prompts', () => { + expect(allPrompts).toHaveLength(40 + 74); for (const p of allPrompts) expect(p.startsWith(style + '\n\nMake: ')).toBe(true); }); it('every one ends with the shared avoid list and its board id', () => { - const shared = readManifest().avoid.join('; '); + const m = readManifest(); for (const a of data.assets) { - expect(a.prompt).toContain(shared); + const allowed = m.assets.find((x) => x.id === a.id)?.allow ?? []; + expect(a.prompt).toContain(m.avoid.filter((l) => !allowed.includes(l)).join('; ')); expect(a.prompt.endsWith(`\nBoard id: ${a.id}`)).toBe(true); for (const c of a.cells ?? []) expect(c.prompt.endsWith(`\nBoard id: ${c.id} (one picture of ${a.id})`)).toBe(true); } @@ -76,6 +77,17 @@ describe('the prompts', () => { for (const id of ['care-props-sheet', 'favicon-mark', 'letter-header']) expect(by.get(id)?.attach).toEqual([]); }); + it("only the gardener's own pictures may show a person; every other prompt still says no people (STYLE.md S6)", () => { + const people = 'people, hands or human faces'; + for (const a of data.assets) { + const prompts = [a.prompt, ...(a.cells ?? []).map((c) => c.prompt)]; + const isGardener = a.attach.includes('gardener-sheet') || a.id === 'gardener-sheet'; + // The Avoid line only: §1 itself names the exception for every picture. + for (const p of prompts) expect((p.split('\nAvoid: ')[1] ?? '').includes(people), a.id).toBe(!isGardener); + } + expect(data.assets.find((a) => a.id === 'gardener-poses-sheet')?.attach).toEqual(['gardener-sheet']); + }); + it('every rose prompt puts her face on the petals, never on a round head', () => { for (const a of data.assets.filter((x) => x.attach.includes('rose-sheet') || x.id === 'rose-sheet')) { for (const p of [a.prompt, ...(a.cells ?? []).map((c) => c.prompt)]) {