add_element
Add one shape, textbox, sprite (image requires imageAssetId) or Lua-only prefab (requires catalog prefabId; exported Lua defines PREFAB_IDS locally). Prefer add_elements for multiple shapes: one atomic edit/undo step.…
name: string?, x: number?, y: number?, width: number?, height: number?, rotation: number?, rotationX: number?, rotationY: number?, … (list cut; the site may define more)
add_elements
Add many elements in one call. Atomic, one undo step. Returns count and ids in input order; returnElements:true adds full elements. Pixels: origin top-left, x right, y down; x/y are box centers, rotation…
elements: array, select: boolean?, returnElements: boolean?
clear_canvas
Remove all elements and reset the canvas to a blank scene (undoable).
export_sceneread-onlyuntrusted content
Export scene text: css / svg / json / lua. Stretch CSS/SVG bake the current dimensions as an embedded PNG while preserving source ID/type for re-import; drawing never uses the library Stretch thumbnail. JSON preserves…
format: string
get_asset_inforead-onlyuntrusted content
Read one indexed six-digit sprite ID, original imageUrl, optional indexed stretchPreviewUrl, m_Border metadata, supported imageTypes, defaultImageType and defaultSize. imageType chooses a Basic or Stretch thumbnail…
id: integer, imageType: string?, refresh: boolean?
get_canvas_previewread-onlyuntrusted content
Render without selection outlines. Region uses top-left canvas coordinates, clips to canvas and enlarges to maxSize; full canvas only shrinks. PNG preserves alpha; JPEG uses white matte. Use output:image for…
maxSize: number?, region: object?, format: string?, quality: number?, output: string?
get_prefab_inforead-onlyuntrusted content
Look up one official Prefab/entity ID and return its name, category labels/IDs, thumbnail URL and PNG pixel dimensions. Does not list the catalog or edit the canvas. Add a verified result with type:prefab and…
id: integer, refresh: boolean?
get_sceneread-onlyuntrusted content
Read canvas, metadata and elements. Start with summary:true; use list_elements for paginated inspection. No arguments returns the full scene including library. Pixels: origin top-left, x right, y down; x/y are box…
offset: integer?, limit: integer?, name: string?, type: string?, ids: array?, region: object?, summary: boolean?, includeLibrary: boolean?, … (list cut; the site may define more)
import_sourceuntrusted content
Import CSS/JSON/SVG/Lua text, replacing the entire scene in one undo step. Prefer batch tools for direct edits. JSON with canvas requires element id/type/x/y/width/height; text settings use textBox. SVG supports basic…
sourceType: string, content: string, name: string?
list_asset_categoriesread-onlyuntrusted content
Start here to discover shape category keys/Chinese labels and available image counts. icons/图标 combines function, gameplay and skill icons. Next call list_asset_uses with a category to see purposes available within…
query: string?, tone: string?, refresh: boolean?
list_asset_usesread-onlyuntrusted content
Discover purposes available inside a shape category (e.g. category:图标 or function-icon). Counts respect category/tone and count each image once per purpose. Defaults return nonempty medium-grained purposes…
category: string?, tone: string?, query: string?, refresh: boolean?, group: string?, includeFine: boolean?, includeEmpty: boolean?
list_elementsread-onlyuntrusted content
List elements bottom-to-top, paginated (default 100, max 1000). Filter by name substring, type, ids, or intersection with a region (rotated bounding boxes). Returns total/matched/count/nextOffset. By default entries…
offset: integer?, limit: integer?, name: string?, type: string?, ids: array?, region: object?, details: boolean?
prepare_asset_packread-onlyuntrusted content
Select every matching image for batch download and local comparison/processing. Supply category/use/query/tone filters, explicit ids, or all:true for the complete library. This returns a concrete POST request and a…
category: string?, use: string?, query: string?, tone: string?, refresh: boolean?, ids: array?, all: boolean?
preview_assetsread-onlyuntrusted content
Compare original Basic sprites on an ID-labeled checkerboard contact sheet, without adding to the canvas. For Stretch thumbnails use search_assets' indexed stretchPreviewUrl or get_asset_info; for actual target…
category: string?, use: string?, query: string?, tone: string?, refresh: boolean?, ids: array?, offset: integer?, limit: integer?, … (list cut; the site may define more)
redo
Redo the previously undone operation.
remove_element
Remove the element with the given id from the canvas.
id: string
remove_elements
Remove multiple elements atomically in one undo step. Every id must exist; duplicates are removed once. Remaining layers retain their order.
ids: array
search_assetsread-onlyuntrusted content
Find existing sprites with category AND purpose AND keyword conditions. Prefer list_asset_categories → list_asset_uses({category}) → search_assets({category,use,query}); category/use accept discovered keys or full…
category: string?, use: string?, query: string?, tone: string?, refresh: boolean?, offset: integer?, limit: integer?
set_canvas
Patch canvas size, view-only backdrop and GIA mask in one undo step. The backdrop is an editor viewing preference only and never exports; scenes are always transparent, so use a canvas-filling rectangle element for a…
width: number?, height: number?, background: string?, mask: object?
set_elements
Replace ALL elements while preserving canvas, metadata and library. Empty array clears elements. Atomic, one undo step. Returns count and ids in input order; returnElements:true adds full elements. Pixels: origin…
elements: array, select: boolean?, returnElements: boolean?
set_selection
Select one element by id, or pass null/omit id to clear the selection outline. Does not change scene/history.
id?
undo
Undo the last editing operation.
update_element
Patch one element by id; prefer update_elements for batches. Preserves selection; unchanged values create no undo step. Pixels: origin top-left, x right, y down; x/y are box centers, rotation counter-clockwise.…
id: string, name: string?, x: number?, y: number?, width: number?, height: number?, rotation: number?, rotationX: number?, … (list cut; the site may define more)
update_elements
Patch a batch of {id, ...fields} atomically in one undo step. Ids must exist and be unique. Returns changed count; no-op edits create no history. zIndex accepts fractional/negative sort keys, then normalizes. Pixels…
updates: array