Draw with ASCII grid
sprite_draw_gridDraw pixel-art sprites and multi-frame animations from text grids, mapping each character to a color or palette role via a legend.
Instructions
THE PRIMARY DRAWING TOOL for LLMs. Write the sprite as text rows; each character maps to a color via legend. "." / space = transparent. Use "---" on its own line between grids to create several animation frames in one call. Example: grid:"..ooo..\n.osssso.\n..ooo..", legend:{o:"outline",s:"skin"}. If legend is omitted, characters are auto-mapped to palette roles (outline, shadow, base, light, highlight, accent...).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | Top-left offset in pixels. | |
| grid | Yes | Sprite as text rows (or an array of rows). Separate frames with a line of dashes '---'. | |
| clear | No | Clear the layer before drawing (default true). | |
| frame | No | Frame index (0-based), frame id or frame name. Omit = active frame. | |
| layer | No | Layer name. Omit = topmost layer. | |
| scale | No | Integer upscale of each grid cell (default 1). | |
| legend | No | char → color: hex, semantic role, palette index, 'ramp:3', or 'transparent'. | |
| mirrorX | No | Mirror every drawn pixel horizontally (draw only the left half). | |
| mirrorY | No | ||
| project | No | Project id. Omit to use the active project. | |
| durationMs | No | Duration for frames created from a multi-frame grid. | |
| namePrefix | No |