MCP: pixel art and vector art areas (#429)
- Area table with pixelart and vectorart. - Notes on paint_pixels, pixel rows in get_asset and colors. - Tests section with the new e2e 71 check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent
180cc43a15
commit
c611f34a0d
1 file changed
+22
-4
+22
-4
@@ -58,7 +58,7 @@ the badge says *Agent offline* meanwhile.
|
||||
| `get_view` | What you are looking at: the project, the tab and the document it shows, the selection with names (objects, nodes by type, frames, keys ...), the camera of the view, whether the game is playing or paused, tabs in windows of their own, and the menu or dialog on top (a menu by its first entries) |
|
||||
| `screenshot` | The whole editor as drawn, as a PNG, at most `maxWidth` pixels wide (1280 unless asked otherwise) |
|
||||
| `list_assets` | The project's settings (start scene, layers, play settings, master bus) and the assets with ids, names and types, by type or a part of the name |
|
||||
| `get_asset` | One asset as stored, with the rows of its properties and the named objects of a scene or container, the content of a placed container too (marked `fromContainer`, ids like `<container object>~<path>`). A graph is only counted, and so are the pixels of a drawing and the cells of a map past 400. An animation lists what its rows may aim at (`targets`, the root as `""`), with the properties each offers |
|
||||
| `get_asset` | One asset as stored, with the rows of its properties and the named objects of a scene or container, the content of a placed container too (marked `fromContainer`, ids like `<container object>~<path>`). A graph is only counted, and so are the cells of a map past 400. Pixel art lists its palette as `colors` and, up to 16 384 pixels over all layers and frames, every layer of every frame as rows of characters (`.` is transparent, `1`-`9`, `a`-`z`, `A`-`Z` the indices 1 to 61); a bigger one says how many pixels are painted. Colors of palettes and vector art read as `#rrggbb`. An animation lists what its rows may aim at (`targets`, the root as `""`), with the properties each offers |
|
||||
| `get_graph` | A graph: every node with its settings and its ports as they are now (the ports it declares itself under `ports`), the edges, the groups and comments with their boxes and colors |
|
||||
| `lint_graph` | How a graph reads, counted as you see it: nodes on top of each other, links that cross, links running over a node that is not theirs, links running right to left, the longest links, with a few ids of each |
|
||||
| `catalog` | What there is to make: the commands by area with what each does, and with a query (an area or command names) their arguments; the nodes a graph can hold (all of them, or the best matches of a search in full); the asset types and their properties; the variable kinds |
|
||||
@@ -112,7 +112,7 @@ it. One Ctrl+Z takes the whole call back.
|
||||
answer, up to 110 seconds; Cancel, Escape or no answer leave everything as it was.
|
||||
- **You see what the agent works on.** After each call the editor brings up what its last step
|
||||
worked on: the graph's tab with every node the call touched there selected, the scene or
|
||||
container with its objects selected, the tab of an animation, curve, texture, tile or tilemap
|
||||
container with its objects selected, the tab of an animation, curve, texture, tile, tilemap, pixel art or vector art
|
||||
(with the frame picked when the call worked on one), or the asset in the inspector. Objects in another scene
|
||||
switch the scene, inside the agent's undo step, so Ctrl+Z goes back to the scene you had.
|
||||
Account menu → *Follow agent* switches this off (kept in this browser); while the game runs the
|
||||
@@ -135,10 +135,12 @@ for an area or for command names asked for.
|
||||
| animation | `set_animation_root`, `add_animation_track`, `remove_animation_tracks`, `retarget_animation_track`, `set_track_relative`, `set_animation_key`, `set_key_easing`, `remove_animation_keys`, `move_animation_keys`, `shift_animation_frames`, `key_straight_run`, `set_curve_points` |
|
||||
| textures | `add_frame`, `set_frame_rect`, `rename_frame`, `remove_frame`, `slice_frames`, `set_nine_slice`, `set_sort_line`, `set_frame_collision` |
|
||||
| tiles | `add_tile_picture`, `remove_tile_picture`, `move_tile_picture`, `paint_tiles`, `add_tilemap_layer`, `duplicate_tilemap_layer`, `remove_tilemap_layer`, `move_tilemap_layer`, `set_tilemap_layer`, `resize_placed_tilemap` |
|
||||
| pixelart | `paint_pixels`, `add_pixel_layer`, `duplicate_pixel_layer`, `remove_pixel_layer`, `set_pixel_layer`, `move_pixel_layer`, `merge_pixel_layer_down`, `add_pixel_frame`, `remove_pixel_frame`, `move_pixel_frame`, `resize_pixel_canvas`, `set_palette_colors`, `remove_palette_color` |
|
||||
| vectorart | `add_vector_shape`, `set_vector_shape_outline`, `set_vector_shape_style`, `transform_vector_shapes`, `duplicate_vector_shape`, `remove_vector_shapes`, `combine_vector_shapes`, `rename_vector_shape`, `order_vector_shape`, `move_vector_shapes`, `group_vector_shapes`, `ungroup_vector_shapes`, `add_vector_layer`, `remove_vector_layer`, `move_vector_layer`, `set_vector_layer` |
|
||||
| project | `rename_project`, `set_layer_names`, `set_play_from`, `set_while_playing`, `set_game_link_zoom`, `set_symbol_scale`, `set_master_volume`, `set_master_fx` |
|
||||
|
||||
A change to the fields of a Struct asset reaches every variable and node of that type, as it does
|
||||
from the inspector. Pixel art, vector art, songs and compositions come next (#429, stage 5).
|
||||
from the inspector. Songs, patterns and compositions come next (#429, stage 5d).
|
||||
|
||||
- **Animations** name a row by its target and property, as `get_asset` lists them, and a key by
|
||||
its row and frame. An easing is a name like `sine-out` or `curve:<id>` for a Curve asset; how
|
||||
@@ -148,6 +150,16 @@ from the inspector. Pixel art, vector art, songs and compositions come next (#42
|
||||
the tilemap has, its own or that of a placement grown at an edge. At most 20 000 cells a step.
|
||||
- **A nine-slice** without `fill` keeps the fill the picture has. *Generate collision* stays with
|
||||
you: it reads the pixels of the texture, so the agent sets outlines by their corners.
|
||||
- **Painting pixel art** goes one layer on one frame a step, through draw steps in order: `rows`
|
||||
(a small picture in the characters `get_asset` reads, a space leaving the pixel alone), `pixels`,
|
||||
`line`, `rect`, `ellipse`, `fill` and `clear`, with palette indices, 0 erasing. An index the palette
|
||||
lacks or a pixel outside the canvas is refused. The cel is kept in the browser and saved like one
|
||||
you painted. Merging, resizing and taking a palette color out use the same rule as the side panel.
|
||||
- **Vector shapes** take rings of points in canvas pixels, or a `rect` or an `ellipse` given by its
|
||||
box. Fill, opacity, a gradient or picture fill and the outline go along when the shape is made, or
|
||||
later with `set_vector_shape_style`; `paint` of type `solid` and an outline of width 0 take them
|
||||
away again. `transform_vector_shapes` moves, scales, turns and mirrors shapes and groups with their
|
||||
paints, round their middle unless `about` names a point.
|
||||
Not for the agent, on purpose: textures, fonts, sounds and videos need a file, pasting needs the
|
||||
clipboard (the agent builds directly instead), and switching a plugin on would run its code.
|
||||
|
||||
@@ -231,6 +243,12 @@ What is behind it on the server, and the routes it uses: [API](API), [Developmen
|
||||
picked in its tab, a sheet sliced into a grid; a tilemap painted with rectangles and cells and
|
||||
read back, cells outside the grid, tiles that are none and too many cells refused, the grid of a
|
||||
placement grown at its edge, layers added, changed and moved.
|
||||
- `tests/editor/agent-drawing.test.ts`: pixel art painted with rows, a rect and a fill in order and
|
||||
read back as rows, indices the palette lacks, pixels outside and unknown characters refused, a
|
||||
copied frame and a second layer merged down and resized round the middle, a palette color taken
|
||||
out with its pixels, a big canvas only counted; an ellipse lying on its box all the way round, a
|
||||
rect turned round its middle, a gradient and an outline set and taken away, a shape moved on top
|
||||
of a group, and unknown shapes refused.
|
||||
- `tests/editor/graph-arrange.test.ts`: the layout on the graph an agent really built for "walk with
|
||||
the arrow keys" (no overlaps, no link over a node, none backwards, at most 8 crossings with one
|
||||
Owner for four moves and 4 with one each), chains running straight, the flow on top when two
|
||||
@@ -247,6 +265,6 @@ What is behind it on the server, and the routes it uses: [API](API), [Developmen
|
||||
agent building a walking object whose graph comes up with its nodes selected and arranged,
|
||||
Arrange in the header untangling it as one undo step, the open tab's camera going after a node
|
||||
added far away, a Variables node with a port and a group framing every drawn node, an animation keyed by
|
||||
the agent coming up in its tab, the object moving when played, the agent holding the arrow and clicking the
|
||||
the agent coming up in its tab, pixel art it paints read back as rows and its cel saved to the server, the object moving when played, the agent holding the arrow and clicking the
|
||||
object itself and reading with `get_runtime` how far it went, one Ctrl+Z taking it back, a delete waiting for
|
||||
the user's Cancel; and the badge switching it off.
|
||||
Reference in new issue
Block a user