[art] GardenerLayers: The gardener in layered parts, painted over one guide in register, checked on accept
This commit is contained in:
@@ -87,7 +87,8 @@ function characterOf(a: Asset, m: Manifest): { name: string; sheet: string; desc
|
||||
/** The reference pictures to attach when making `a`. */
|
||||
export function attachments(a: Asset, m: Manifest): string[] {
|
||||
const c = characterOf(a, m);
|
||||
return c && c.sheet !== a.id ? [c.sheet] : [];
|
||||
const sheet = c && c.sheet !== a.id ? [c.sheet] : [];
|
||||
return a.over ? [...sheet, a.over] : sheet;
|
||||
}
|
||||
|
||||
/** "Reference: …", for a picture of a character made after its sheet. */
|
||||
@@ -125,7 +126,34 @@ export function promptFor(a: Asset, m: Manifest, style: string): string {
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
/**
|
||||
* One layer of a layered character (STYLE.md §3b): only its part, painted over the guide in
|
||||
* register, so the app can stack the layers into any look the player chose.
|
||||
*/
|
||||
function layerPrompt(a: Asset, m: Manifest, style: string): string {
|
||||
const g = a.grid ?? { cols: 1, rows: 1 };
|
||||
const cells = a.cells ?? [];
|
||||
const c = characterOf(a, m);
|
||||
return [
|
||||
style,
|
||||
'',
|
||||
`Make: one layer of a layered sprite sheet: only one part of the ${c?.name ?? 'figure'}, in ${cells.length} poses, painted over a guide in exact register so the parts can be stacked into one figure.`,
|
||||
...referenceLines(a, m),
|
||||
`Guide: attach the image ${a.over ?? ''} and paint over it. Keep its canvas and its grid. In every picture, paint only the part named below, exactly where it sits on the guide's figure, at exactly the same size, pose and position; then leave out the guide itself, so that everything except this part is fully transparent.`,
|
||||
`Part: ${a.subject ?? ''}`,
|
||||
`Drawn alike: ${a.angle ?? ''}`,
|
||||
`Layout: the guide's ${g.cols} × ${g.rows} cells, read left to right, top row first; nothing moved, nothing scaled.`,
|
||||
`Canvas: ${a.width} × ${a.height} px, transparent everywhere except the part; no ground and no cast shadows.`,
|
||||
'The poses under the part, as in the guide:',
|
||||
...cells.map((cell, i) => `${i + 1}. ${cell.does}`),
|
||||
`Include: ${list(a.include)}`,
|
||||
`Avoid: ${list([...a.avoid, ...SHEET_AVOID, ...shared(a, m)])}`,
|
||||
board(a.id)
|
||||
].join('\n');
|
||||
}
|
||||
|
||||
function sheetPrompt(a: Asset, m: Manifest, style: string): string {
|
||||
if (a.over) return layerPrompt(a, m, style);
|
||||
const g = a.grid ?? { cols: 1, rows: 1 };
|
||||
const cells = a.cells ?? [];
|
||||
const many = (n: number, word: string): string => `${n} ${word}${n === 1 ? '' : 's'}`;
|
||||
|
||||
Reference in New Issue
Block a user