Draw with operations
sprite_draw_opsApply ordered integer-pixel drawing operations—rectangles, lines, circles, fills, gradients, dithering, shading, outlines, text, and transforms—to a selected sprite layer or frame.
Instructions
Vector-ish pixel ops, all snapped to integer pixels. Ops: clear, pixel(s), rect, line, circle/ellipse, polygon, fill (flood), dither, gradient, noise, scatter, replace, outline, shade, mirror, shift, text (3×5 font), crop. Example ops:[{op:"rect",x:4,y:4,w:8,h:8,color:"base"},{op:"shade",light:"nw"},{op:"outline",color:"outline",mode:"selective"}]. The "shade" op adds hue-shifted light/shadow; "outline" adds a real silhouette outline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | Ordered list of draw operations. Each needs an `op` field; colors accept hex/roles/indices. | |
| frame | No | Frame index (0-based), frame id or frame name. Omit = active frame. | |
| layer | No | Layer name. Omit = topmost layer. | |
| project | No | Project id. Omit to use the active project. | |
| allFrames | No | Apply the same ops to every frame (default false). |