mcp
v0.4.13MCP server for OpenBone: let AI agents rig, animate and wire up interactive skeletal animations
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
set_document setDocument
[project] Change document settings: name, artboard size, skeleton origin within the artboard (pixels, y-down), background, fps, reference scale, texture filter ("nearest" for pixel art).
| Parameter | Type | Description |
|---|---|---|
background | ||
fps | number | |
height | number | |
name | string | |
originX | number | |
originY | number | |
referenceScale | number | Size in percent the rig's physics (gravity, wind) and IK softness values were made for (default 100); they scale by the skeleton's size relative to it |
textureFilter | string | How images are sampled when scaled: "nearest" keeps hard pixel edges (pixel art), "linear" (default) smooths |
width | number |
add_image addImage
[project] Register an image asset (PNG/JPG/WebP as a data: URI, URL, or path relative to the project file).
| Parameter | Type | Description |
|---|---|---|
height * | number | |
name * | string | |
src * | string | |
width * | number | |
id | string | Optional explicit id (generated when omitted) |
update_image updateImage
[project] Change an image asset: name, src (new pixels, e.g. the art file changed) and size. When the size changes, region attachments using it grow or shrink with it (same pixel density; their place, scale and rotation are kept).
| Parameter | Type | Description |
|---|---|---|
image * | string | Image id or name |
height | number | |
name | string | |
src | string | |
width | number |
delete_image deleteImage
[project] Remove an image asset. Fails if attachments still use it.
| Parameter | Type | Description |
|---|---|---|
image * | string | Image id or name |
set_atlas setAtlas
[project] Store a texture atlas: packed pages (images, usually PNG data: URIs) and, per image, the rectangle it occupies in a page. Packed images are drawn from their page, so the WebGL renderer batches them into one draw call. Optional `white` is a solid white block in a page that untextured shapes sample from. Set `premultipliedAlpha` when the page pixels are premultiplied (renderers then use the matching blend). Regions may be trimmed (offsets) and carry an outline `polygon` (polygon packing). Pass `atlas: null` to remove the atlas. With `stripImageSources`, packed images lose their own src…
| Parameter | Type | Description |
|---|---|---|
atlas * | ||
stripImageSources | boolean |
add_bone addBone
[rig] Add a bone. Position/rotation are local to the parent (y-up, degrees CCW). Parent defaults to the root bone.
| Parameter | Type | Description |
|---|---|---|
color | string | Hex color like #ff8800 or #ff880080 |
id | string | Optional explicit id (generated when omitted) |
inherit | string | |
length | number | |
name | string | |
parent | ||
rotation | number | Degrees, counter-clockwise, relative to parent |
scaleX | number | |
scaleY | number | |
shearX | number | |
shearY | number | |
x | number | |
y | number |
update_bone updateBone
[rig] Change a bone's setup pose, name or parent.
| Parameter | Type | Description |
|---|---|---|
bone * | string | Bone id or name |
color | string | Hex color like #ff8800 or #ff880080 |
inherit | string | |
length | number | |
name | string | |
parent | ||
rotation | number | Degrees, counter-clockwise, relative to parent |
scaleX | number | |
scaleY | number | |
shearX | number | |
shearY | number | |
x | number | |
y | number |
delete_bone deleteBone
[rig] Delete a bone with all its descendant bones, their slots and any constraints/timelines that reference them.
| Parameter | Type | Description |
|---|---|---|
bone * | string | Bone id or name |
add_slot addSlot
[rig] Add a slot (a draw-order layer attached to a bone that displays one attachment). Appended on top of the draw order unless index given.
| Parameter | Type | Description |
|---|---|---|
bone * | string | Bone id or name |
blend | string | |
color | string | Hex color like #ff8800 or #ff880080 |
dark | string | Two-colour tint: what the image's dark parts become (#rrggbb) |
id | string | Optional explicit id (generated when omitted) |
index | integer | Draw order position (0 = back) |
name | string |
update_slot updateSlot
[rig] Change a slot's name, bone, tint color, two-colour tint (dark: what the image's dark parts become, null for none), blend mode, visible attachment (null to hide) or draw-order index.
| Parameter | Type | Description |
|---|---|---|
slot * | string | Slot id or name |
attachment | string | null | |
blend | string | |
bone | string | Bone id or name |
color | string | Hex color like #ff8800 or #ff880080 |
dark | ||
index | integer | |
name | string |
delete_slot deleteSlot
[rig] Delete a slot and its attachments.
| Parameter | Type | Description |
|---|---|---|
slot * | string | Slot id or name |
add_skin addSkin
[rig] Add a skin (an alternative set of attachments, e.g. outfits).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
id | string | Optional explicit id (generated when omitted) |
rename_skin renameSkin
[rig] Rename a skin. The default skin (the first one) keeps its name.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
skin * | string | Skin id or name |
delete_skin deleteSkin
[rig] Delete a skin and all of its attachments. The default skin cannot be deleted.
| Parameter | Type | Description |
|---|---|---|
skin * | string | Skin id or name |
duplicate_skin duplicateSkin
[rig] Copy a skin (all its attachments) into a new skin, e.g. to start a new outfit from an existing one.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
skin * | string | Skin id or name |
id | string | Optional explicit id (generated when omitted) |
add_to_skin addToSkin
[rig] Make bones and/or constraints skin-only (Spine skin bones/constraints): anything listed in any skin is active only while a skin listing it is set. Inactive bones (and the bones below them) are not posed and their slots are not drawn; inactive constraints are skipped. Example: a cape's bones and physics only in the 'knight' skin.
| Parameter | Type | Description |
|---|---|---|
skin * | string | Skin (not the default skin) id or name |
bones | array | |
constraints | array |
remove_from_skin removeFromSkin
[rig] Take bones and/or constraints out of a skin's list. Once no skin lists them they are always active again.
| Parameter | Type | Description |
|---|---|---|
skin * | string | Skin (not the default skin) id or name |
bones | array | |
constraints | array |
copy_attachment copyAttachment
[attachment] Copy an attachment from one skin to another (and optionally to another slot or name). Copying a default-skin attachment into an outfit skin under the same name makes the outfit override it.
| Parameter | Type | Description |
|---|---|---|
attachment * | string | |
slot * | string | Slot id or name |
toSkin * | string | Skin id or name |
fromSkin | string | Defaults to the default skin |
name | string | New attachment name (defaults to the same name) |
toSlot | string | Defaults to the same slot |
add_region addRegion
[attachment] Attach an image (textured quad) to a slot. Offset/rotation are relative to the slot's bone.
| Parameter | Type | Description |
|---|---|---|
image * | string | Image id or name |
slot * | string | Slot id or name |
activate | boolean | Show this attachment in the slot's setup pose |
color | string | Hex color like #ff8800 or #ff880080 |
height | number | |
name | string | Attachment name (defaults to the image/shape name) |
rotation | number | |
scaleX | number | |
scaleY | number | |
skewX | number | Skew in degrees (slants the vertical edges) |
skewY | number | Skew in degrees (slants the horizontal edges) |
skin | string | Defaults to the default skin |
width | number | |
x | number | |
y | number |
add_shape addShape
[attachment] Attach a vector shape (rect, ellipse or polygon) to a slot; no image needed. Great for quick prototypes and UI.
| Parameter | Type | Description |
|---|---|---|
shape * | string | |
slot * | string | Slot id or name |
activate | boolean | Show this attachment in the slot's setup pose |
fill | string | Hex color like #ff8800 or #ff880080 |
height | number | |
name | string | Attachment name (defaults to the image/shape name) |
points | array | Polygon points flat [x0,y0,x1,y1,...] (polygon only) |
radius | number | Rect corner radius |
rotation | number | |
skin | string | Defaults to the default skin |
stroke | string | Hex color like #ff8800 or #ff880080 |
strokeWidth | number | |
width | number | |
x | number | |
y | number |
add_mesh addMesh
[attachment] Attach a deformable mesh. Either give a grid (cols x rows over the image, centred at x,y) or explicit vertices/uvs/triangles.
| Parameter | Type | Description |
|---|---|---|
image * | string | Image id or name |
slot * | string | Slot id or name |
activate | boolean | Show this attachment in the slot's setup pose |
color | string | Hex color like #ff8800 or #ff880080 |
cols | integer | |
height | number | |
hull | integer | |
name | string | Attachment name (defaults to the image/shape name) |
rows | integer | |
skin | string | Defaults to the default skin |
triangles | array | |
uvs | array | |
vertices | array | |
width | number | |
x | number | |
y | number |
add_linked_mesh addLinkedMesh
[attachment] Add a linked mesh (like Spine's): a mesh that uses another mesh's vertices, triangles and weights with a different image, e.g. the same rigged sleeve in another outfit or colour. Edit the parent and every linked mesh follows. `deform: true` (default) makes the parent's deform keys move it too. The parent defaults to the same slot; give `parentSlot` / `parentSkin` when it lives elsewhere.
| Parameter | Type | Description |
|---|---|---|
image * | string | Image id or name |
parent * | string | Name of the parent mesh attachment |
slot * | string | Slot id or name |
activate | boolean | Show this attachment in the slot's setup pose |
color | string | Hex color like #ff8800 or #ff880080 |
deform | boolean | |
name | string | Attachment name (defaults to the image/shape name) |
parentSkin | string | Skin of the parent mesh id or name |
parentSlot | string | Slot of the parent mesh id or name |
skin | string | Defaults to the default skin |
add_bounding_box addBoundingBox
[attachment] Attach a bounding-box polygon (hit area for listeners/pointer events). Give vertices or a rect.
| Parameter | Type | Description |
|---|---|---|
slot * | string | Slot id or name |
activate | boolean | |
height | number | |
name | string | Attachment name (defaults to the image/shape name) |
skin | string | Defaults to the default skin |
vertices | array | |
width | number | |
x | number | |
y | number |
add_clipping addClipping
[attachment] Add a clipping mask to a slot. It is not drawn; the slots after it in draw order, up to and including `end`, are clipped to its outline (e.g. keep a shine sweep inside a rounded button). Give a rect/ellipse (width, height, radius) or polygon points, or raw vertices.
| Parameter | Type | Description |
|---|---|---|
slot * | string | Slot id or name |
activate | boolean | Show this attachment in the slot's setup pose |
end | Last slot that is clipped; null = every slot drawn after this one | |
height | number | |
name | string | Attachment name (defaults to the image/shape name) |
points | array | Polygon points flat [x0,y0,...] (shape polygon) |
radius | number | Rect corner radius |
rotation | number | |
shape | string | |
skin | string | Defaults to the default skin |
vertices | array | Raw outline flat [x0,y0,...] in slot-bone space; overrides shape |
width | number | |
x | number | |
y | number |
add_point addPoint
[attachment] Attach a point (a named locator, e.g. a gun muzzle) to a slot.
| Parameter | Type | Description |
|---|---|---|
slot * | string | Slot id or name |
activate | boolean | |
name | string | Attachment name (defaults to the image/shape name) |
rotation | number | |
skin | string | Defaults to the default skin |
x | number | |
y | number |
add_path addPath
[attachment] Attach a bezier path (used by path constraints) to a slot, in slot-bone space. Give `anchors` (flat [x0,y0,x1,y1,...]; handles are placed automatically for a smooth curve) or `vertices` (flat, 3 points per knot: [inX,inY, x,y, outX,outY, ...]). Bind it to control bones with autoWeights to bend it.
| Parameter | Type | Description |
|---|---|---|
slot * | string | Slot id or name |
activate | boolean | |
anchors | array | Points the curve passes through, flat [x0,y0,x1,y1,...] |
closed | boolean | |
color | string | Hex color like #ff8800 or #ff880080 |
name | string | Attachment name (defaults to the image/shape name) |
skin | string | Defaults to the default skin |
vertices | array | Explicit knots, 6 numbers each: in handle, anchor, out handle |
update_attachment updateAttachment
[attachment] Change properties of an existing attachment (any field of its type, e.g. x, y, width, fill, vertices). Mesh vertices are slot-bone local; on a weighted mesh they are re-bound to the same bones at the new position. When the vertex count changes pass uvs too (triangles are recomputed if omitted).
| Parameter | Type | Description |
|---|---|---|
attachment * | string | |
props * | object | |
slot * | string | Slot id or name |
skin | string | Skin id or name |
delete_attachment deleteAttachment
[attachment] Remove an attachment from a slot.
| Parameter | Type | Description |
|---|---|---|
attachment * | string | |
slot * | string | Slot id or name |
skin | string | Skin id or name |
auto_weights autoWeights
[attachment] Bind a mesh (or path or bounding box) to bones automatically: each vertex is weighted to its nearest bones (by distance to the bone segment) in the setup pose.
| Parameter | Type | Description |
|---|---|---|
attachment * | string | |
bones * | array | Bones that may influence the mesh |
slot * | string | Slot id or name |
falloff | number | Higher = sharper transitions |
maxInfluences | integer | |
skin | string | Skin holding the mesh (defaults to the default skin) |
set_weights setWeights
[attachment] Set explicit weights for one mesh, path or bounding-box vertex (positions computed from the setup pose). Weights are normalised.
| Parameter | Type | Description |
|---|---|---|
attachment * | string | |
influences * | array | |
slot * | string | Slot id or name |
vertex * | integer | |
skin | string | Skin holding the mesh (defaults to the default skin) |
set_mesh_weights setMeshWeights
[attachment] Set bone weights for many mesh vertices at once (e.g. a weight-painting stroke). Each entry replaces that vertex's influences; vertices not listed keep theirs. Weights are normalised per vertex and the mesh keeps its setup-pose shape.
| Parameter | Type | Description |
|---|---|---|
attachment * | string | |
slot * | string | Slot id or name |
vertices * | array | |
skin | string | Skin holding the mesh (defaults to the default skin) |
set_weights_in_area setWeightsInArea
[attachment] Set bone weights for every vertex of a mesh, path or bounding box that lies inside an area of the setup pose (skeleton space, y up): a box {xMin?, xMax?, yMin?, yMax?} (leave a side out for no limit, e.g. {yMax:205} = everything below y 205) or a polygon [x0,y0,x1,y1,...]. Use it to pin parts to one bone (feet to the legs bone, a hem to the skirt) without listing vertex indices. blend: vertices up to this far outside the area get a share falling off to 0 (a soft edge). mode replace (default) swaps the vertex's influences for these; add mixes them into its current ones. Weights are…
| Parameter | Type | Description |
|---|---|---|
attachment * | string | |
influences * | array | |
slot * | string | Slot id or name |
area | object | Box in skeleton space (y up); omitted sides are unbounded |
blend | number | Soft edge: distance outside the area over which the new weights fade out |
mode | string | |
polygon | array | Polygon [x0,y0,x1,y1,...] in skeleton space (y up), instead of area |
skin | string | Skin holding the attachment (defaults to the default skin) |
smooth_weights smoothWeights
[attachment] Smooth a weighted mesh: blend each vertex's bone weights toward the average of its mesh neighbours (strength 0..1). Optionally only some vertices.
| Parameter | Type | Description |
|---|---|---|
attachment * | string | |
slot * | string | Slot id or name |
skin | string | Skin id or name |
strength | number | |
vertices | array | Vertex indices (default all) |
prune_weights pruneWeights
[attachment] Prune a weighted mesh: drop bone influences below `threshold` and keep at most `maxInfluences` per vertex, then renormalise. Optionally only some vertices.
| Parameter | Type | Description |
|---|---|---|
attachment * | string | |
slot * | string | Slot id or name |
maxInfluences | integer | |
skin | string | Skin id or name |
threshold | number | |
vertices | array |
swap_weights swapWeights
[attachment] Swap two bones' weights on a mesh: every vertex (or only `vertices`) gives bone `from`'s weight to `to` and the other way round. Handy after mirroring a limb or binding the wrong bone. The mesh keeps its setup-pose shape.
| Parameter | Type | Description |
|---|---|---|
attachment * | string | |
from * | string | Bone id or name |
slot * | string | Slot id or name |
to * | string | Bone id or name |
skin | string | Skin id or name |
vertices | array | Vertex indices (default all) |
add_ik_constraint addIkConstraint
[constraint] Add an IK constraint: 1 bone aims at the target, or 2 bones (parent then child, e.g. thigh+shin) bend to reach it. Optional softness, stretch and compress.
| Parameter | Type | Description |
|---|---|---|
bones * | array | |
target * | string | Target bone id or name |
bendPositive | boolean | |
compress | boolean | 1-bone only: scale the bone down when the target is closer than its length |
id | string | Optional explicit id (generated when omitted) |
mix | number | |
name | string | |
softness | number | 2-bone only: distance before full extension where the chain eases into straight (0 = off) |
stretch | boolean | Scale bones up along their length when the target is out of reach |
uniform | boolean | With stretch/compress: scale both axes, keeping proportions |
volume | boolean | With stretch/compress: keep volume (the bone gets thinner as it stretches, wider as it squashes). Ignored with uniform |
update_ik_constraint updateIkConstraint
[constraint] Change an IK constraint's mix, bend direction, softness, stretch/compress/uniform/volume, target or name. Animate bend/stretch/compress with setKeys (properties bend: 1|-1, stretch: 1|0, compress: 1|0; stepped).
| Parameter | Type | Description |
|---|---|---|
constraint * | string | IK constraint id or name |
bendPositive | boolean | |
compress | boolean | 1-bone only: scale the bone down when the target is closer than its length |
mix | number | |
name | string | |
softness | number | 2-bone only: distance before full extension where the chain eases into straight (0 = off) |
stretch | boolean | Scale bones up along their length when the target is out of reach |
target | string | Bone id or name |
uniform | boolean | With stretch/compress: scale both axes, keeping proportions |
volume | boolean | With stretch/compress: keep volume (the bone gets thinner as it stretches, wider as it squashes). Ignored with uniform |
add_transform_constraint addTransformConstraint
[constraint] Make bones copy (mix toward) the rotation/translation/scale/shear of a target bone, plus offsets. World or local space; absolute or relative (adds the target's change from its setup pose).
| Parameter | Type | Description |
|---|---|---|
bones * | array | |
target * | string | Target bone id or name |
id | string | Optional explicit id (generated when omitted) |
local | boolean | Copy local (parent-space) values instead of world transforms |
localSource | boolean | Mapping only: read the target's local values (default: same space as `local`) |
map | array | Property mapping (replaces copying): each entry writes offset + target[from] x scale, clamped to min..max, into every bone's `to`; entries with the same `to` add up. Example: target x drives rotation:… |
mixRotate | number | |
mixScale | number | |
mixShear | number | Blend of the shear between the bone's axes |
mixTranslate | number | |
name | string | |
offsetRotation | number | |
offsetScaleX | number | Added to the copied scale |
offsetScaleY | number | |
offsetShear | number | |
offsetX | number | |
offsetY | number | |
relative | boolean | Add the target's change from its setup pose instead of copying its absolute value |
update_transform_constraint updateTransformConstraint
[constraint] Change a transform constraint's mixes, offsets, space (local), relative mode, property mapping (map, localSource), bones, target or name.
| Parameter | Type | Description |
|---|---|---|
constraint * | string | Transform constraint id or name |
bones | array | |
local | boolean | Copy local (parent-space) values instead of world transforms |
localSource | boolean | Mapping only: read the target's local values (default: same space as `local`) |
map | array | Property mapping (replaces copying): each entry writes offset + target[from] x scale, clamped to min..max, into every bone's `to`; entries with the same `to` add up. Example: target x drives rotation:… |
mixRotate | number | |
mixScale | number | |
mixShear | number | Blend of the shear between the bone's axes |
mixTranslate | number | |
name | string | |
offsetRotation | number | |
offsetScaleX | number | Added to the copied scale |
offsetScaleY | number | |
offsetShear | number | |
offsetX | number | |
offsetY | number | |
relative | boolean | Add the target's change from its setup pose instead of copying its absolute value |
target | string | Bone id or name |
add_path_constraint addPathConstraint
[constraint] Place and rotate a chain of bones along a slot's path attachment (add one with addPath). Bones are ordered parent first. Good for tails, tentacles, ropes and things moving along a track.
| Parameter | Type | Description |
|---|---|---|
bones * | array | |
target * | string | Slot showing a path attachment id or name |
constantSpeed | boolean | Measure positions inside each curve segment by arc length, so bones stay evenly spaced (default true). false: raw bezier parameter, bones bunch where handles are short |
id | string | Optional explicit id (generated when omitted) |
mixRotate | number | |
mixX | number | |
mixY | number | |
name | string | |
offsetRotation | number | |
position | number | Where the first bone sits along the path |
positionMode | string | fixed: position is a distance; percent: 0..1 of the path length |
rotateMode | string | tangent: follow the curve direction; chain: point at the next bone's spot; chainScale: chain and stretch to reach it |
spacing | number | |
spacingMode | string | length: bone length + spacing; fixed: spacing; percent: spacing x path length; proportional: spacing x path length shared by bone length |
update_path_constraint updatePathConstraint
[constraint] Change a path constraint's modes, position, spacing, mixes, bones, target slot or name.
| Parameter | Type | Description |
|---|---|---|
constraint * | string | Path constraint id or name |
bones | array | |
constantSpeed | boolean | Measure positions inside each curve segment by arc length, so bones stay evenly spaced (default true). false: raw bezier parameter, bones bunch where handles are short |
mixRotate | number | |
mixX | number | |
mixY | number | |
name | string | |
offsetRotation | number | |
position | number | Where the first bone sits along the path |
positionMode | string | fixed: position is a distance; percent: 0..1 of the path length |
rotateMode | string | tangent: follow the curve direction; chain: point at the next bone's spot; chainScale: chain and stretch to reach it |
spacing | number | |
spacingMode | string | length: bone length + spacing; fixed: spacing; percent: spacing x path length; proportional: spacing x path length shared by bone length |
target | string | Slot id or name |
add_physics_constraint addPhysicsConstraint
[constraint] Add spring-based secondary motion (hair, cloth, antennae, tails) to a bone. Add one per bone of a chain, parent first. Deterministic for a fixed timestep.
| Parameter | Type | Description |
|---|---|---|
bone * | string | Bone id or name |
damping | number | Velocity decay per second |
fps | number | Simulation steps per second (fixed timestep) |
gravity | number | Downward acceleration (units/s²) |
id | string | Optional explicit id (generated when omitted) |
inertia | number | How much of the bone's own movement is resisted (1 = full lag) |
mass | number | |
mix | number | |
name | string | |
rotate | number | How much the simulation rotates the bone |
scaleX | number | How much the simulation stretches the bone |
strength | number | Spring stiffness back to the animated pose |
volume | boolean | Keep volume when scaleX stretches the bone (it gets thinner as it stretches) |
wind | number | Sideways +x acceleration (units/s²) |
x | number | How much the simulation moves the bone origin horizontally |
y | number | How much the simulation moves the bone origin vertically |
update_physics_constraint updatePhysicsConstraint
[constraint] Change a physics constraint's channels, spring settings, gravity, wind, mix, bone or name.
| Parameter | Type | Description |
|---|---|---|
constraint * | string | Physics constraint id or name |
bone | string | Bone id or name |
damping | number | Velocity decay per second |
fps | number | Simulation steps per second (fixed timestep) |
gravity | number | Downward acceleration (units/s²) |
inertia | number | How much of the bone's own movement is resisted (1 = full lag) |
mass | number | |
mix | number | |
name | string | |
rotate | number | How much the simulation rotates the bone |
scaleX | number | How much the simulation stretches the bone |
strength | number | Spring stiffness back to the animated pose |
volume | boolean | Keep volume when scaleX stretches the bone (it gets thinner as it stretches) |
wind | number | Sideways +x acceleration (units/s²) |
x | number | How much the simulation moves the bone origin horizontally |
y | number | How much the simulation moves the bone origin vertically |
delete_constraint deleteConstraint
[constraint] Delete an IK, transform, path or physics constraint (and its animation timelines).
| Parameter | Type | Description |
|---|---|---|
constraint * | string | Constraint id or name |
set_constraint_order setConstraintOrder
[constraint] Set the order constraints are applied in each frame (all kinds in one list; default: ik, transform, path, physics, each in creation order). Pass every constraint (id or name) once, first applied first; an empty list restores the default order. Example: apply a transform constraint before an IK so the IK sees its result.
| Parameter | Type | Description |
|---|---|---|
constraints * | array | Every constraint, in the new order; [] goes back to the default order |
add_slider addSlider
[constraint] Add a slider: a driver scrubs an animation (Spine 4.2 sliders). Driver = a bone's local property (bone + property, e.g. shoulder rotation 0..100 plays a shadow or corrective animation) or a number input. from..to of the driver maps to timeFrom..timeTo seconds (default the whole animation); mix blends it in; additive adds its change on top. Sliders apply before IK and the other constraints.
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
additive | boolean | Add the animation's change from the setup pose instead of replacing |
bone | Driver bone (its local property scrubs the animation) | |
from | number | Driver value that shows timeFrom |
id | string | Optional explicit id (generated when omitted) |
input | string | null | Driver number input (name or id, any state machine) instead of a bone |
loop | boolean | Wrap past the range instead of clamping |
mix | number | |
name | string | |
property | string | Driver property of the bone |
timeFrom | ||
timeTo | Default: the animation's length | |
to | number | Driver value that shows timeTo |
update_slider updateSlider
[constraint] Change a slider's animation, driver (bone + property, or input), ranges, mix, loop, additive or name.
| Parameter | Type | Description |
|---|---|---|
slider * | string | Slider name or id |
additive | boolean | Add the animation's change from the setup pose instead of replacing |
animation | string | Animation id or name |
bone | Driver bone (its local property scrubs the animation) | |
from | number | Driver value that shows timeFrom |
input | string | null | Driver number input (name or id, any state machine) instead of a bone |
loop | boolean | Wrap past the range instead of clamping |
mix | number | |
name | string | |
property | string | Driver property of the bone |
timeFrom | ||
timeTo | Default: the animation's length | |
to | number | Driver value that shows timeTo |
delete_slider deleteSlider
[constraint] Delete a slider.
| Parameter | Type | Description |
|---|---|---|
slider * | string | Slider name or id |
create_animation createAnimation
[animation] Create an empty animation. Duration 0 means 'until the last key'.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
duration | number | |
id | string | Optional explicit id (generated when omitted) |
update_animation updateAnimation
[animation] Rename an animation, change its duration, mark whether it is exported (export: false keeps a helper animation out of exports unless picked), or give it a colour for the editor's lists (color: null removes it).
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
color | ||
duration | number | |
export | boolean | |
name | string |
delete_animation deleteAnimation
[animation] Delete an animation (state machine states using it are cleared).
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
set_keys setKeys
[animation] Set one or more keyframes on a timeline (absolute values). Keys are merged into the timeline (same time = replaced); pass replace:true to make the timeline exactly these keys. Examples: bone rotation {target:'bone', id:'arm', property:'rotation', keys:[{time:0,value:0},{time:0.5,value:45,curve:'easeInOut'}]}; path constraint {target:'path', id:'tail-path', property:'position', keys:[...]}; slot color value '#ff0000'; particle emitter {target:'particles', id:'exhaust', property:'emitting', keys:[{time:0,value:true},{time:1,value:false}]} or property 'rate' (numbers); slot attachment…
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
keys * | array | |
target * | string | What is animated: bone property, slot color/attachment, constraint (ik/transform/path/physics) values, particle emitter (id = slot; emitting true/false, rate), mesh/path deform, sequence frame, draw o… |
attachment | string | Mesh/path attachment name (deform) or sequence attachment name (sequence) |
id | string | Bone/slot/constraint id or name (not needed for drawOrder) |
property | string | bone: rotation|x|y|scaleX|scaleY|shearX|shearY|inherit (stepped: normal|onlyTranslation|noRotation|noScale); slot: color|attachment; ik: mix|softness|bend|stretch|compress; transform: mix|mixRotate|mi… |
replace | boolean | true: the timeline gets exactly these keys (its other keys are removed); false (default): keys are added, replacing any at the same times |
delete_key deleteKey
[animation] Delete the keyframe at `time` from a timeline (removes the timeline when empty).
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
target * | string | What is animated: bone property, slot color/attachment, constraint (ik/transform/path/physics) values, particle emitter (id = slot; emitting true/false, rate), mesh/path deform, sequence frame, draw o… |
time * | number | |
attachment | string | |
id | string | |
property | string |
move_key moveKey
[animation] Move a keyframe to a new time (and optionally change its curve).
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
target * | string | What is animated: bone property, slot color/attachment, constraint (ik/transform/path/physics) values, particle emitter (id = slot; emitting true/false, rate), mesh/path deform, sequence frame, draw o… |
time * | number | |
attachment | string | |
curve | ||
id | string | |
newTime | number | |
property | string |
delete_timeline deleteTimeline
[animation] Remove a whole timeline (all keys for that property) from an animation.
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
target * | string | What is animated: bone property, slot color/attachment, constraint (ik/transform/path/physics) values, particle emitter (id = slot; emitting true/false, rate), mesh/path deform, sequence frame, draw o… |
attachment | string | |
id | string | |
property | string |
remove_broken_keys removeBrokenKeys
[animation] Remove timelines, event keys and sound keys that point at bones, slots, constraints, events or sounds no longer in the document (left behind by hand edits or merges). Without `animation`, cleans every animation.
| Parameter | Type | Description |
|---|---|---|
animation | string | Animation id or name |
add_event addEvent
[animation] Define a named event (fired from animation keys or listeners, delivered to scripts and the host app).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
audio | string | |
float | number | |
id | string | Optional explicit id (generated when omitted) |
int | integer | |
string | string |
add_event_key addEventKey
[animation] Fire an event at a time in an animation (optionally overriding its payload). Creates the event if needed.
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
event * | string | |
time * | number | |
float | number | |
int | integer | |
string | string |
delete_event_key deleteEventKey
[animation] Remove an event key from an animation.
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
event * | string | Event id or name |
time * | number |
transform_keys transformKeys
[animation] Shift and/or scale picked keys in time (the dopesheet's move and scale): newTime = pivot + (time - pivot) * scale + offset, clamped at 0 and rounded to frames when `fps` is given. Moved keys replace keys already at their new time. Example: shift a walk's keys 0.25 s later {animation:'walk', keys:[{target:'bone', id:'leg', property:'rotation', times:[0,0.5]}], offset:0.25}; play twice as fast {…, scale:0.5, pivot:0}.
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
events | array | |
fps | number | |
keys | array | |
offset | number | |
pivot | number | |
scale | number |
paste_keys pasteKeys
[animation] Paste keys (e.g. copied from this or another animation) at time `at`: each key's time is relative to the start of the copy. Creates timelines as needed and replaces keys already at those times. Event keys paste the same way. Example: {animation:'run', at:0.5, keys:[{target:'bone', id:'head', property:'rotation', time:0, value:10}, {target:'bone', id:'head', property:'rotation', time:0.2, value:-5, curve:'easeInOut'}]}.
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
at | number | |
events | array | |
keys | array |
delete_keys deleteKeys
[animation] Delete many picked keys at once (timelines left empty are removed). Same `keys` / `events` shape as transformKeys.
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
events | array | |
keys | array |
create_state_machine createStateMachine
[interactivity] Create a state machine (Rive-style) with one empty layer.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
id | string | Optional explicit id (generated when omitted) |
layerName | string |
delete_state_machine deleteStateMachine
[interactivity] Delete a state machine.
| Parameter | Type | Description |
|---|---|---|
stateMachine * | string | State machine id or name |
add_layer addLayer
[interactivity] Add a layer. Layers run in parallel; later layers override properties they key (e.g. body walk + face blink).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
stateMachine * | string | State machine id or name |
id | string | Optional explicit id (generated when omitted) |
add_input addInput
[interactivity] Add an input the host app / listeners / scripts control: bool, number, string or trigger (one-shot). Text attachments show inputs with {name} templates; number inputs can drive properties through bindings (addBinding).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
stateMachine * | string | State machine id or name |
type * | string | |
default | boolean | number | string | |
id | string | Optional explicit id (generated when omitted) |
mutes | string | Bool inputs: the bus (id or name) this input mutes while true, "master" for every sound, "" for none. Then the host, page controls, listeners and scripts all mute it by setting the input (e.g. a music… |
update_input updateInput
[interactivity] Rename an input, change its default value, or make a bool input mute a sound bus (`mutes`).
| Parameter | Type | Description |
|---|---|---|
input * | string | Input id or name |
stateMachine * | string | State machine id or name |
default | boolean | number | string | |
mutes | string | Bool inputs: the bus (id or name) this input mutes while true, "master" for every sound, "" for none. Then the host, page controls, listeners and scripts all mute it by setting the input (e.g. a music… |
name | string |
delete_input deleteInput
[interactivity] Delete an input and every condition, action and binding using it.
| Parameter | Type | Description |
|---|---|---|
input * | string | Input id or name |
stateMachine * | string | State machine id or name |
add_state addState
[interactivity] Add a state to a layer. 'animation' plays one animation; 'blend1d' blends animations by a number input; 'exit' stops the layer. The first state added becomes the entry state. onComplete names a state to go to once the animation has played through (play once, then continue).
| Parameter | Type | Description |
|---|---|---|
stateMachine * | string | State machine id or name |
animation | string | Animation id or name |
blend | array | |
blendInput | string | Number input id or name |
entry | boolean | Make this the layer's entry state |
id | string | Optional explicit id (generated when omitted) |
layer | string | Defaults to the first layer |
loop | boolean | |
name | string | |
onComplete | State to go to when the animation finishes (after the first cycle when looping) | |
speed | number | |
type | string | |
x | number | |
y | number |
update_state updateState
[interactivity] Change a state's name, animation, loop, speed, blend setup, onComplete target (null clears it), editor position, or make it the entry.
| Parameter | Type | Description |
|---|---|---|
state * | string | State id or name |
stateMachine * | string | State machine id or name |
animation | ||
blend | array | |
blendInput | string | Number input id or name |
entry | boolean | |
layer | string | Defaults to the first layer |
loop | boolean | |
name | string | |
onComplete | ||
speed | number | |
x | number | |
y | number |
delete_state deleteState
[interactivity] Delete a state and its transitions.
| Parameter | Type | Description |
|---|---|---|
state * | string | State id or name |
stateMachine * | string | State machine id or name |
layer | string | Defaults to the first layer |
add_transition addTransition
[interactivity] Add a transition between states. from may be '@any'. All conditions must pass (trigger inputs pass when fired). Optional cross-fade duration (s) and exitTime (fraction of the source animation that must have played).
| Parameter | Type | Description |
|---|---|---|
from * | string | State id/name or "@any" |
stateMachine * | string | State machine id or name |
to * | string | State id or name |
conditions | array | |
duration | number | |
exitTime | ||
id | string | Optional explicit id (generated when omitted) |
layer | string | Defaults to the first layer |
update_transition updateTransition
[interactivity] Replace a transition's conditions, duration or exitTime.
| Parameter | Type | Description |
|---|---|---|
stateMachine * | string | State machine id or name |
transition * | string | |
conditions | array | |
duration | number | |
exitTime | ||
layer | string | Defaults to the first layer |
delete_transition deleteTransition
[interactivity] Delete a transition.
| Parameter | Type | Description |
|---|---|---|
stateMachine * | string | State machine id or name |
transition * | string | |
layer | string | Defaults to the first layer |
add_listener addListener
[interactivity] React to pointer input on a slot's bounding box (or the whole artboard when slot is null): down, up, click, enter, exit, move → actions (setInput, toggleInput, fireTrigger, reportEvent, runScript, playSound, stopSound, setEmitter {slot, emitting} to start/stop a particle emitter, emitParticles {slot, count} for a one-off burst).
| Parameter | Type | Description |
|---|---|---|
actions * | array | |
event * | string | |
stateMachine * | string | State machine id or name |
id | string | Optional explicit id (generated when omitted) |
name | string | |
slot |
delete_listener deleteListener
[interactivity] Delete a listener.
| Parameter | Type | Description |
|---|---|---|
listener * | string | |
stateMachine * | string | State machine id or name |
add_script addScript
[interactivity] Add a sandboxed JavaScript script. Define any of: onStart(), onUpdate(dt), onEvent(e), onPointer(p), or custom functions for runScript actions. API: ob.input(name) / ob.setInput(name, v) / ob.fire(name) / ob.emit(event, payload) / ob.bone(name) -> {x,y,rotation,scaleX,scaleY,worldX,worldY} / ob.setBone(name, {rotation,...}) / ob.slot(name, {color, attachment}) / ob.time / ob.log(...).
| Parameter | Type | Description |
|---|---|---|
code * | string | |
name * | string | |
id | string | Optional explicit id (generated when omitted) |
update_script updateScript
[interactivity] Replace a script's code or name.
| Parameter | Type | Description |
|---|---|---|
script * | string | Script id or name |
code | string | |
name | string |
attach_script attachScript
[interactivity] Run a script for the whole state machine, or only while a given state is active.
| Parameter | Type | Description |
|---|---|---|
script * | string | Script id or name |
stateMachine * | string | State machine id or name |
layer | string | Defaults to the first layer |
state | string | State id or name |
delete_script deleteScript
[interactivity] Delete a script and detach it everywhere.
| Parameter | Type | Description |
|---|---|---|
script * | string | Script id or name |
set_state_input setStateInput
[interactivity] Make a state set a bool/number/string input when it is entered (value null removes it). Use it to reset a round: e.g. the idle state sets multiplier back to 1 and status to 'Press START' after a crash or cash-out.
| Parameter | Type | Description |
|---|---|---|
input * | string | Input id or name |
state * | string | State id or name |
stateMachine * | string | State machine id or name |
value * | boolean | number | string | null | |
layer | string | Layer id or name |
add_audio addAudio
[audio] Add an audio file (WAV/MP3/OGG) as a data: URI or a path relative to the project. By default also creates a sound of the same name on the sfx bus, ready to play from event keys, audio keys, states or listeners.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
src * | string | data: URI, relative path or URL |
bus | Bus for the created sound (default sfx; null = master) | |
duration | number | Seconds (0 = unknown) |
id | string | Optional explicit id (generated when omitted) |
loop | boolean | Created sound loops |
sound | boolean | Also create a sound using this asset |
soundId | string | Optional explicit id (generated when omitted) |
update_audio updateAudio
[audio] Rename an audio asset or replace its source / duration.
| Parameter | Type | Description |
|---|---|---|
asset * | string | Audio asset id or name |
duration | number | |
name | string | |
src | string |
delete_audio deleteAudio
[audio] Delete an audio asset, the sounds that use it and everything that plays them.
| Parameter | Type | Description |
|---|---|---|
asset * | string | Audio asset id or name |
add_sound addSound
[audio] Create a sound from an audio asset with its own bus, volume, rate (pitch), loop and fade in/out.
| Parameter | Type | Description |
|---|---|---|
asset * | string | Audio asset id or name |
name * | string | |
bus | Bus id/name (default sfx); null plays straight into the master | |
fadeIn | number | Fade-in seconds when started |
fadeOut | number | Fade-out seconds when stopped (also when its state/animation ends) |
id | string | Optional explicit id (generated when omitted) |
loop | boolean | |
rate | number | Playback rate / pitch (1 = original, 2 = octave up) |
volume | number | Linear volume (1 = unchanged) |
update_sound updateSound
[audio] Change a sound's name, asset, bus, volume, rate, loop or fades.
| Parameter | Type | Description |
|---|---|---|
sound * | string | Sound id or name |
asset | string | Audio asset id or name |
bus | Bus id/name (default sfx); null plays straight into the master | |
fadeIn | number | Fade-in seconds when started |
fadeOut | number | Fade-out seconds when stopped (also when its state/animation ends) |
loop | boolean | |
name | string | |
rate | number | Playback rate / pitch (1 = original, 2 = octave up) |
volume | number | Linear volume (1 = unchanged) |
delete_sound deleteSound
[audio] Delete a sound and every key, state hook, listener action and event reference that plays it (the asset stays).
| Parameter | Type | Description |
|---|---|---|
sound * | string | Sound id or name |
add_bus addBus
[audio] Add a mixer bus (documents start with sfx, music and ui). Sounds route into one bus; bus volume and mute apply to all of them.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
id | string | Optional explicit id (generated when omitted) |
muted | boolean | |
volume | number | Linear volume (1 = unchanged) |
update_bus updateBus
[audio] Rename a bus or change its volume / mute.
| Parameter | Type | Description |
|---|---|---|
bus * | string | Bus id or name |
muted | boolean | |
name | string | |
volume | number | Linear volume (1 = unchanged) |
delete_bus deleteBus
[audio] Delete a bus. Its sounds play straight into the master.
| Parameter | Type | Description |
|---|---|---|
bus * | string | Bus id or name |
set_audio_mix setAudioMix
[audio] Set the master volume and/or mute every sound in the document.
| Parameter | Type | Description |
|---|---|---|
master | number | Linear volume (1 = unchanged) |
muted | boolean |
add_audio_key addAudioKey
[audio] Start a sound at a time on an animation's audio track (replaces a key of the same sound at that time).
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
sound * | string | Sound id or name |
time * | number | |
loop | boolean | Overrides the sound's loop; looping keys stop when the animation ends or is replaced |
rate | number | Overrides the sound's rate |
volume | number | Multiplies the sound's volume |
update_audio_key updateAudioKey
[audio] Move an audio key or change its volume / rate / loop overrides (null clears an override).
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
sound * | string | Sound id or name |
time * | number | |
loop | boolean | null | |
newTime | number | |
rate | ||
volume |
delete_audio_key deleteAudioKey
[audio] Remove an audio key from an animation.
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
sound * | string | Sound id or name |
time * | number |
set_event_sound setEventSound
[audio] Play a sound whenever an event fires (from animation keys, listeners or scripts). sound null removes it.
| Parameter | Type | Description |
|---|---|---|
event * | string | Event id or name |
sound * | ||
volume | number | Linear volume (1 = unchanged) |
set_state_sound setStateSound
[audio] Play or stop a sound when a state is entered or exited (replaces the same sound's hook for that moment). A looping sound played on enter stops (with its fade-out) when the state exits.
| Parameter | Type | Description |
|---|---|---|
sound * | string | Sound id or name |
state * | string | State id or name |
stateMachine * | string | State machine id or name |
action | string | |
layer | string | Defaults to the first layer |
on | string | |
volume | number | Linear volume (1 = unchanged) |
delete_state_sound deleteStateSound
[audio] Remove a state's sound hook (for one moment, or both when `on` is omitted).
| Parameter | Type | Description |
|---|---|---|
sound * | string | Sound id or name |
state * | string | State id or name |
stateMachine * | string | State machine id or name |
layer | string | Layer id or name |
on | string |
add_font addFont
[project] Add a font file (TTF/OTF; WOFF/WOFF2 work on the web only) as a data: URI or a path relative to the project. Text attachments whose font list names `family` use it (the face whose weight is closest to theirs) before any installed font, in the editor and every runtime.
| Parameter | Type | Description |
|---|---|---|
family * | string | Family name texts use in their font list, e.g. "Noto Serif JP" |
name * | string | Asset name (usually the file name) |
src * | string | data: URI, relative path or URL |
id | string | Optional explicit id (generated when omitted) |
style | string | |
weight | integer | CSS weight of the file's face (400 regular, 700 bold) |
update_font updateFont
[project] Rename a font asset, change its family, weight or style, or replace its file.
| Parameter | Type | Description |
|---|---|---|
font * | string | Font id or name |
family | string | |
name | string | |
src | string | |
style | string | |
weight | integer | CSS weight of the file's face (400 regular, 700 bold) |
delete_font deleteFont
[project] Delete a font asset. Texts that used its family fall back to installed fonts.
| Parameter | Type | Description |
|---|---|---|
font * | string | Font id or name |
add_sequence addSequence
[attachment] Attach a frame-by-frame sequence (image sequence or sprite sheet) to a slot. Frames are image refs in order, sheet cells {image, rect:{x,y,width,height}}, or a `grid` over one sheet image. The frame shown is floor(time x fps) + offset, mapped by mode; bind `input` (a number input) to drive the frame from a state machine, or key it with setKeys target 'sequence'.
| Parameter | Type | Description |
|---|---|---|
slot * | string | Slot id or name |
activate | boolean | Show this attachment in the slot's setup pose |
color | string | Hex color like #ff8800 or #ff880080 |
fps | number | |
frames | array | Frames in order: image ids/names, or {image, rect, trim} |
grid | object | Cut a sprite sheet image into a grid of frames (give cols/rows or the frame size) |
height | number | |
input | string | null | Number input (id or name) whose value is the frame counter |
mode | string | loop wraps; once plays through then hides; pingPong goes forward then back; holdLast stops on the last frame |
name | string | Attachment name (defaults to the image/shape name) |
offset | integer | Frames added to the frame counter |
rotation | number | |
scaleX | number | |
scaleY | number | |
skewX | number | Skew in degrees (slants the vertical edges) |
skewY | number | Skew in degrees (slants the horizontal edges) |
skin | string | Defaults to the default skin |
width | number | Frame width (default: the first frame's size) |
x | number | |
y | number |
set_sequence_frames setSequenceFrames
[attachment] Replace or reorder the frames of a sequence attachment (frames in the new order, or a `grid` over a sheet image). `resize` sets the attachment size to the first frame's size.
| Parameter | Type | Description |
|---|---|---|
attachment * | string | |
slot * | string | Slot id or name |
frames | array | |
grid | object | Cut a sprite sheet image into a grid of frames (give cols/rows or the frame size) |
resize | boolean | |
skin | string | Defaults to the skin that holds the attachment (active skin, then default) |
add_particles addParticles
[attachment] Attach a particle emitter to a slot (rocket exhaust, sparks, confetti, smoke, coins). It emits from the slot bone's world transform. Start from a `preset` (fire, smoke, sparks, confetti, exhaust, coins) and override any setting. Key `emitting`/`rate` with setKeys (target 'particles', id = slot); state machines switch it with setStateEmitter or setEmitter/emitParticles listener actions.
| Parameter | Type | Description |
|---|---|---|
slot * | string | Slot id or name |
activate | boolean | Show this emitter in the slot's setup pose |
angle | number | Spread in degrees around the direction |
angularVelocity | array | Extra spin in degrees per second as [min, max]; each particle picks a random value in between |
blend | string | |
bursts | array | One-off spawns: count particles at time seconds into each emitter cycle |
colors | array | Colour over life: stops with t 0..1 and #rrggbbaa colours (alpha fades) |
drag | number | Velocity decay per second |
duration | number | Emitter cycle length in seconds |
emitting | boolean | Emitting on/off in the setup pose (keyable: timeline target 'particles', property 'emitting') |
endRotation | array | Rotation at death in degrees (interpolated over the life) as [min, max]; each particle picks a random value in between |
endSize | array | Size at death as [min, max]; each particle picks a random value in between |
gravity | number | Downward acceleration in units/s² (negative rises) |
height | number | Box height |
image | string | Image for look 'image' (packed atlas images work too) |
lifetime | array | Seconds a particle lives as [min, max]; each particle picks a random value in between |
look | string | circle = soft dot, square, spark = streak along velocity, image = textured quad |
loop | boolean | Repeat the cycle (bursts replay each cycle); false stops emitting after duration |
maxParticles | integer | Live particle cap; extra spawns are dropped |
name | string | Attachment name (defaults to the preset name or 'particles') |
preset | string | |
prewarm | boolean | Start as if one cycle had already run (smoke and exhaust look settled at time 0) |
radius | number | Circle radius / cone mouth half-width |
rate | number | Particles per second (keyable: property 'rate') |
rotation | number | Emission direction in degrees in slot-bone space (90 = bone +y) |
seed | integer | Random seed: the same seed and time give the same particles |
shape | string | Where particles spawn: point, circle (emits outwards), box, cone (mouth of radius) |
skin | string | Defaults to the default skin |
space | string | world: particles stay put when the bone moves (trails); local: they move with the bone |
speed | array | Start speed in units/s as [min, max]; each particle picks a random value in between |
startRotation | array | Rotation at birth in degrees as [min, max]; each particle picks a random value in between |
startSize | array | Size at birth as [min, max]; each particle picks a random value in between |
stretch | number | Spark streak length in seconds of velocity |
width | number | Box width |
x | number | |
y | number |
update_particles updateParticles
[attachment] Change settings of a particle emitter (validated). Pass only the fields to change; `preset` first resets every field to that preset.
| Parameter | Type | Description |
|---|---|---|
attachment * | string | Particles attachment name |
slot * | string | Slot id or name |
angle | number | Spread in degrees around the direction |
angularVelocity | array | Extra spin in degrees per second as [min, max]; each particle picks a random value in between |
blend | string | |
bursts | array | One-off spawns: count particles at time seconds into each emitter cycle |
colors | array | Colour over life: stops with t 0..1 and #rrggbbaa colours (alpha fades) |
drag | number | Velocity decay per second |
duration | number | Emitter cycle length in seconds |
emitting | boolean | Emitting on/off in the setup pose (keyable: timeline target 'particles', property 'emitting') |
endRotation | array | Rotation at death in degrees (interpolated over the life) as [min, max]; each particle picks a random value in between |
endSize | array | Size at death as [min, max]; each particle picks a random value in between |
gravity | number | Downward acceleration in units/s² (negative rises) |
height | number | Box height |
image | string | Image for look 'image' (packed atlas images work too) |
lifetime | array | Seconds a particle lives as [min, max]; each particle picks a random value in between |
look | string | circle = soft dot, square, spark = streak along velocity, image = textured quad |
loop | boolean | Repeat the cycle (bursts replay each cycle); false stops emitting after duration |
maxParticles | integer | Live particle cap; extra spawns are dropped |
preset | string | |
prewarm | boolean | Start as if one cycle had already run (smoke and exhaust look settled at time 0) |
radius | number | Circle radius / cone mouth half-width |
rate | number | Particles per second (keyable: property 'rate') |
rotation | number | Emission direction in degrees in slot-bone space (90 = bone +y) |
seed | integer | Random seed: the same seed and time give the same particles |
shape | string | Where particles spawn: point, circle (emits outwards), box, cone (mouth of radius) |
skin | string | Skin id or name |
space | string | world: particles stay put when the bone moves (trails); local: they move with the bone |
speed | array | Start speed in units/s as [min, max]; each particle picks a random value in between |
startRotation | array | Rotation at birth in degrees as [min, max]; each particle picks a random value in between |
startSize | array | Size at birth as [min, max]; each particle picks a random value in between |
stretch | number | Spark streak length in seconds of velocity |
width | number | Box width |
x | number | |
y | number |
set_state_emitter setStateEmitter
[interactivity] Make a state switch a slot's particle emitter on or off when the state is entered (emitting null removes the switch). Turning it on restarts the emitter cycle, so bursts replay.
| Parameter | Type | Description |
|---|---|---|
emitting * | boolean | null | |
slot * | string | Slot with a particles attachment id or name |
state * | string | State id or name |
stateMachine * | string | State machine id or name |
layer | string | Layer id or name |
add_text addText
[attachment] Attach text to a slot. `text` is a template: {input} or {input:0.00} shows a state machine input (number patterns: 0.00 decimals, #,##0 thousands, leading + sign, trailing %, any other characters kept, e.g. {multiplier:0.00x} → 2.35x). The width x height box (estimated when omitted) is the alignment frame and hit area.
| Parameter | Type | Description |
|---|---|---|
slot * | string | Slot id or name |
activate | boolean | Show this attachment in the slot's setup pose |
align | string | |
color | string | Hex color like #ff8800 or #ff880080 |
font | string | CSS font family |
height | number | |
name | string | Attachment name (defaults to the image/shape name) |
outline | string | Hex color like #ff8800 or #ff880080 |
outlineWidth | number | |
rotation | number | |
size | number | |
skin | string | Defaults to the default skin |
text | string | |
weight | integer | |
width | number | |
x | number | |
y | number |
add_binding addBinding
[interactivity] Drive a bone, slot or constraint property from a number (or bool) input, every frame after animations: input [inMin, inMax] maps linearly (clamped) to [outMin, outMax]. Bone: rotation/x/y/scaleX/scaleY/shearX/shearY; slot: color (hex outputs) or alpha (0..1); constraints: their keyable values (ik mix, path position, ...). Example: altitude 0..100 → rocket bone y 0..300.
| Parameter | Type | Description |
|---|---|---|
input * | string | Number input id or name |
object * | string | Bone, slot or constraint id or name |
outMax * | ||
outMin * | ||
property * | string | |
stateMachine * | string | State machine id or name |
target * | string | |
id | string | Optional explicit id (generated when omitted) |
inMax | number | |
inMin | number |
update_binding updateBinding
[interactivity] Change an input binding's input, target object, property or ranges.
| Parameter | Type | Description |
|---|---|---|
binding * | string | |
stateMachine * | string | State machine id or name |
inMax | number | |
inMin | number | |
input | string | Number input id or name |
object | string | Bone, slot or constraint id or name |
outMax | ||
outMin | ||
property | string | |
target | string |
delete_binding deleteBinding
[interactivity] Delete an input binding.
| Parameter | Type | Description |
|---|---|---|
binding * | string | |
stateMachine * | string | State machine id or name |
set_folder setFolder
[project] Put slots, skins, animations, events, constraints or state machines in a folder ("body/arms"; null or "" = top level). Folders only organise the editor lists and tree: they never change drawing, posing or exports.
| Parameter | Type | Description |
|---|---|---|
folder * | string | null | Folder path, "/" between levels; null or "" for the top level |
items * | array | |
kind * | string | What the items are (constraint = IK, transform, path, physics constraints and sliders) |
rename_folder renameFolder
[project] Rename or move a folder with everything in it, sub-folders included ("body/arms" → "limbs"). `to` null or "" deletes the folder level: its items and sub-folders move up into the parent. For slots, `bone` limits it to the slots of one bone.
| Parameter | Type | Description |
|---|---|---|
from * | string | Current folder path |
kind * | string | What the items are (constraint = IK, transform, path, physics constraints and sliders) |
to * | string | null | New path; null or "" removes this level (contents move to the parent folder) |
bone | string | Slots only: only the slots on this bone |
import_data importData
[project] Import data from another OpenBone project (like Spine's "Import data"). Picked `animations` and `skins` (ids or names in the source) are copied, matching bones, slots, constraints and events by name; keys and attachments for bones or slots this project lacks are skipped and reported. The images and sounds they use come along (reused when a same-named one exists here). `skeleton: true` brings in the whole skeleton (bones, slots, constraints and every skin's attachments) under a new root bone named after the source project. `onConflict` decides what happens when a picked animation or s…
| Parameter | Type | Description |
|---|---|---|
document * | Source project: an OpenBone document object or its JSON text | |
animations | array | Source animation ids or names to copy |
onConflict | string | |
skeleton | boolean | Bring in the whole skeleton under a new root bone |
skins | array | Source skin ids or names to copy |
new_project
Start a new empty project (root bone only). With `path` (.obone), it is saved and autosaved after every edit. An existing file at `path` is never replaced unless `overwrite` is true: use open_project to edit it.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
background | string | null | |
height | number | |
originX | number | |
originY | number | |
overwrite | boolean | Replace an existing file at `path` (its contents are lost) |
path | string | |
width | number |
open_project
Open an .obone file.
| Parameter | Type | Description |
|---|---|---|
path * | string |
save_project
Save the project (optionally to a new path).
| Parameter | Type | Description |
|---|---|---|
path | string |
get_guide
How to use OpenBone tools: coordinate system, workflow, examples.
get_summary
Readable outline of the open project: bones, slots, animations, state machines.
get_document
Raw JSON of the open document or one section of it.
| Parameter | Type | Description |
|---|---|---|
section | string |
validate
Check the document for broken references and problems. Issues with a `fix` can be repaired by calling the tool `fix.tool` with `fix.args` (the editor's one-click fix). With hints: true, also lists advisory hints (unused images, empty skins/animations, settings with no effect) that never block an export.
| Parameter | Type | Description |
|---|---|---|
hints | boolean | Also list advisory hints |
undo
Undo the last edit.
redo
Redo the last undone edit.
import_image
Import a PNG/JPG/WebP from disk as an image asset (size detected). Stored as a path relative to the project file, or embedded when `embed` is true or the project is unsaved.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
embed | boolean | |
name | string |
import_font
Import a font file (TTF/OTF; WOFF/WOFF2 work on the web only) from disk as a font asset. Its family, weight and style are read from the file unless given. Texts whose font list names that family draw with it in the editor, render_frame, exports and every runtime, before installed fonts, so text looks the same everywhere. Stored as a path relative to the project file, or embedded when `embed` is true or the project is unsaved.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
embed | boolean | |
family | string | Family name texts use (default: the family in the file) |
name | string | |
style | string | |
weight | integer |
import_audio
Import a WAV/MP3/OGG/FLAC file from disk (its duration is read from the file) as an audio asset plus a sound of the same name (on the sfx bus unless `bus` is given). Stored as a path relative to the project file, or embedded when `embed` is true or the project is unsaved. Then play it with add_audio_key, set_event_sound, set_state_sound or a playSound listener action.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
bus | string | |
embed | boolean | |
loop | boolean | |
name | string |
pack_atlas
Pack every image into texture atlas pages (embedded PNGs, or JPEGs) and store them with set_atlas, so renderers draw packed images (and shapes) from one texture: fewer WebGL draw calls. Re-run after adding images. With stripImageSources the file carries only the pages. Identical images are stored once (alias) and blank ones take no space (ignoreBlank) by default; filterMin/filterMag/wrapX/wrapY/pixelFormat are written for runtimes; debug outlines every region.
| Parameter | Type | Description |
|---|---|---|
alias | boolean | Store identical images (same pixels after trimming) once; their regions share a rect (default true) |
alphaThreshold | integer | Alpha at or below this counts as transparent for trimming, polygons and blank images (default 0) |
bleed | boolean | Give fully transparent pixels the colour of the nearest visible one (alpha stays 0): no dark fringes when filtered (default on unless premultipliedAlpha) |
debug | boolean | Draw a magenta outline around every region on the pages (for checking a pack) |
duplicatePadding | boolean | With edge padding, copy opaque edges opaque too: hard edges like a loose texture (default true; off = opaque edges fade out) |
edgePadding | boolean | Repeat each image's edge pixels into half its padding so filtering never reads neighbours (default true) |
filterMag | string | Texture magnification filter (default linear) |
filterMin | string | Texture minification filter written for runtimes (default linear) |
ignoreBlank | boolean | Fully transparent images take no space; their regions are marked empty (default true) |
jpegQuality | integer | JPEG quality (default 90) |
maxHeight | integer | |
maxSize | integer | Largest page width and height (default 2048); maxWidth / maxHeight override one axis |
maxWidth | integer | |
minHeight | integer | |
minWidth | integer | Smallest page width (default 0) |
multipleOf4 | boolean | Page sizes are multiples of 4, for block-compressed formats (default false) |
padding | integer | Empty pixels around each image (default 2) |
pageFormat | string | Page image format (default png); JPEG pages are opaque |
pixelFormat | string | Pixel format hint for runtimes (default RGBA8888) |
polygons | boolean | Polygon packing: region attachments draw a tight outline around the visible pixels instead of the full quad |
powerOfTwo | boolean | Page sizes are powers of two (default true) |
premultipliedAlpha | boolean | Store page pixels premultiplied (rgb × alpha); renderers use the matching blend |
resample | string | Resampling for scaled packs (default bilinear) |
rotate | boolean | Turn images 90° when that packs tighter (images used by particles stay upright) |
scale | Store images at this fraction of their size; "auto" shrinks only as much as needed to fit one page | |
scales | array | export_file atlas format: several scales in one pack, one data file + page set each, e.g. [{scale:1,suffix:""},{scale:0.5,suffix:"@0.5x"}] |
square | boolean | Pages are square (default false) |
stripImageSources | boolean | |
stripWhitespace | boolean | Pack each image by its visible bounds (meshes keep what their uvs cover; particle images stay whole) |
wrapX | string | Texture wrap along x (default clamp) |
wrapY | string |
render_frame
Render the artboard to a PNG you can look at. Setup pose by default; or an animation at `time`; or a state machine after `steps`. Bones are drawn as blue wedges, bounding boxes dashed orange, clipping masks dashed violet.
| Parameter | Type | Description |
|---|---|---|
animation | string | |
scale | number | |
showBones | boolean | |
showBoundingBoxes | boolean | |
skin | string | Skin (outfit) name to show; default skin only when omitted |
stateMachine | string | State machine name (empty string = first) |
steps | array | |
time | number | |
wireframe | boolean |
render_gif
Render an animated GIF of an animation or state machine run, saved to `out` (and returned as an image).
| Parameter | Type | Description |
|---|---|---|
animation | string | |
duration | number | |
fps | integer | |
out | string | Output path (default next to the project) |
scale | number | |
showBones | boolean | |
skin | string | Skin (outfit) name to show; default skin only when omitted |
stateMachine | string | |
steps | array | State machine inputs over time (each step's advance is its duration) |
simulate_state_machine
Run a state machine headlessly through steps (set inputs, fire triggers, pointer events, advance time) and get a log of state changes, events, input changes, audio commands and script output. Use to test interactivity.
| Parameter | Type | Description |
|---|---|---|
steps * | array | |
stateMachine | string |
inspect_pose
World positions/rotations of bones (skeleton space, y-up) for the setup pose or an animation at a time.
| Parameter | Type | Description |
|---|---|---|
animation | string | |
bones | array | |
time | number |
export_file
Export the project like the editor's Export dialog (same code as `openbone export`). Formats: obone (whole project; embed: true makes it self-contained), json / obonb (runtime data: picked animations, state machines; obonb is binary; pack: true embeds a texture atlas), atlas (ZIP: runtime JSON + atlas pages as PNG/JPEG files; atlas.scales gives one data file + page set per scale), png / jpeg (one frame, or a ZIP of every frame with sequence: true), apng, gif, psd (one layer per frame), avi / mov (Motion-JPEG video with the run's sound), mp4 (H.264 + AAC) / webm (VP9 + Opus) through ffmpeg on t…
| Parameter | Type | Description |
|---|---|---|
format * | string | |
animation | string | |
animations | array | json/obonb/atlas: animations to keep (names; default all marked for export). spritesheet: clips (default all exported animations) |
atlas | object | Texture atlas settings for atlas / pack |
audio | boolean | avi/mov/mp4/webm: include the sound the run plays (WAV decodes always; MP3/OGG/FLAC and the mp4/webm encoders need ffmpeg on the PATH) |
binary | boolean | web: animation as .obonb (default true); atlas: runtime data as .obonb instead of .json (default false) |
clip | boolean | web: false draws past the artboard's edges (default: clipped to the artboard) |
duration | number | Seconds (default the animation's length, or 2 for state machines) |
embed | boolean | obone/json/obonb: embed every image and audio file in the file, so it opens on its own anywhere (e.g. a copy to open in the web editor, which can't read files next to it) |
engine | string | |
fit | string | web: how the artboard fits the player (default contain) |
fps | integer | |
fullscreenFit | string | web: fit while full screen (default auto) |
minify | boolean | web: minified player |
out | string | Output path (default <project>.<ext> next to the project) |
pack | boolean | json/obonb/web: pack images into an embedded texture atlas |
quality | number | mp4/webm: quality 0..1 (default 0.85) |
scale | number | |
sequence | boolean | png/jpeg: every frame in a ZIP instead of one frame |
singleFile | boolean | web: one HTML file (works from file://) |
skin | string | |
stateMachine | string | |
stateMachines | array | json/obonb/atlas: state machines to keep (default all) |
steps | array | |
time | number | png/jpeg single frame: time in the animation |
transparent | boolean | Transparent background (png, apng, gif, psd, spritesheet) |
trace_mesh
Trace a mesh from an image's visible pixels (like the editor's Trace mesh / Re-trace outline): less transparent area is drawn and the mesh can bend. On a region: replaces it with a mesh in the same place, size, rotation and tint. On a mesh: re-traces it where it sits (same image mapping) and binds it again to the same bones with automatic weights (or to `bones`), with as many influences per vertex as before; its deform keys no longer apply. maxHull: outline detail cap (16 simple, 48 balanced, 96+ detailed); tolerance: how closely the outline follows the edge in image pixels (default 1% of the…
| Parameter | Type | Description |
|---|---|---|
slot * | string | |
attachment | string | Region or mesh attachment name (default the slot's current one) |
bones | array | Re-tracing a mesh: bind to these bones instead of the ones it used |
falloff | number | Re-tracing a weighted mesh: automatic weights falloff (default 2; higher = sharper) |
interior | integer | |
maxHull | integer | |
padding | number | |
skin | string | Skin holding the attachment (default: where it is found) |
threshold | integer | Alpha above this counts as visible |
tolerance | number | Outline simplification in image pixels (smaller follows the edge more closely; default 1% of the image's longer side). maxHull only caps the count. |
lip_sync
Lip sync: analyse a sound (WAV) and key a mouth slot's attachments to it, stepped, starting at `start` seconds in `animation` (created if missing); the sound is added to the animation's audio track. Six shapes: rest, closed (M/B/P), small, open, wide, round; the slot's attachment names are guessed per shape unless `mapping` is given.
| Parameter | Type | Description |
|---|---|---|
slot * | string | Mouth slot with one attachment per mouth shape |
sound * | string | Sound name or id |
animation | string | Animation name (default: a new 'lipsync <sound>' animation) |
mapping | object | Shape → attachment name |
start | number |
pose_bones
Pose tool (inverse kinematics without a constraint): bend `bone` and up to `chain`-1 of its parents so the bone's tip reaches a target point, given in ARTBOARD pixels (y-down, top-left origin; the same space as render_frame). Without `animation` it changes the setup pose; with `animation` (+ `time`) it sets rotation keys there. The root bone never moves.
| Parameter | Type | Description |
|---|---|---|
bone * | string | |
x * | number | |
y * | number | |
animation | string | |
chain | integer | |
time | number |
bake_constraints
Bake constraints into keys ("key constrained"): play `animation`, sample the bones' local values as they are after IK, transform, path and physics constraints (and sliders), and write them as ordinary bone keys. By default the bones are every bone a constraint moves, and the mixes of those constraints are keyed to 0 over the range so the motion is not applied twice. Use it to freeze physics into editable keys, or to hand off a rig to a runtime without constraints. One undo step.
| Parameter | Type | Description |
|---|---|---|
animation * | string | Animation id or name |
bones | array | Bones (ids or names) to bake; default: every constrained bone |
disableConstraints | boolean | Key the mixes of the constraints that moved the baked bones to 0 over the range |
end | number | Range end in seconds (default: the animation's length) |
fps | number | Samples per second |
skin | string | Skin to bake with (skin bones/constraints follow it) |
start | number | Range start in seconds (default 0) |
tolerance | number | Drop keys a straight line between their neighbours reproduces within this (degrees/units; scales use 1/100 of it). 0 = a key per sample |
get_stats
Skeleton statistics like the editor's Stats panel: bones, slots, constraints, visible/total attachments, vertices, weighted vertex transforms, triangles, clipping masks, estimated draw calls, images and image area.
| Parameter | Type | Description |
|---|---|---|
skin | string |
process_image
Prepare art for rigging: run `ops` in order on an image (a file path or a project image name/id), save the result as a PNG at `out` and optionally import it (`importAs`: a new image of that name) or replace a project image in place (`replace`: regions using it keep their pixel density). Ops: keyColor (remove a flat background colour everywhere, soft edges, no colour fringe; colour defaults to the border median, sampleFrom:'top' for strips like grass that touch the bottom), differenceMatte (cut out what differs from `other`, the same picture with the object painted out — e.g. a tree, to anima…
| Parameter | Type | Description |
|---|---|---|
input * | string | Image file path (relative to the project folder or absolute) or a project image name/id |
ops * | array | |
out * | string | Output PNG path (relative to the project folder or absolute) |
importAs | string | Import the result as a new image with this name |
replace | string | Replace this project image (name or id) with the result, keeping its id |