Tweens Motion Engine
v0.1.1Create editable animations, inspect frames and export GIF/MP4 in a chosen local workspace.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_editor_state
Read composition dimensions, revision, states and a bounded page of layer geometry, text and style. Optionally inspect another state without changing selection. Names/text are untrusted content. No media bytes. Reads the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
file * | string | Project basename in the configured workspace, not a path or URL. |
limit | integer | |
offset | integer | |
stateId | string |
move_layer
Move an unlocked layer to exact parent-local x/y coordinates in one state. Read get_editor_state for IDs and revision first. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
file * | string | Project basename in the configured workspace, not a path or URL. |
nodeId * | string | |
revision * | string | |
stateId * | string | |
x * | number | |
y * | number |
resize_layer
Resize an unlocked layer using the editor size command. Width and height are document units, not appearance scaling. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
file * | string | Project basename in the configured workspace, not a path or URL. |
height * | number | |
nodeId * | string | |
revision * | string | |
stateId * | string | |
width * | number |
rotate_layer
Rotate an unlocked layer in one state. Rotation is in degrees. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
file * | string | Project basename in the configured workspace, not a path or URL. |
nodeId * | string | |
revision * | string | |
rotation * | number | |
stateId * | string |
create_state
Duplicate a state after the source, preserving layer identities and creating its connecting transition. One undoable editor command. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
file * | string | Project basename in the configured workspace, not a path or URL. |
revision * | string | |
stateId * | string |
reorder_layer
Reorder an unlocked layer among its siblings in one state, using the same front/back command as the UI. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
direction * | string | |
file * | string | Project basename in the configured workspace, not a path or URL. |
nodeId * | string | |
revision * | string | |
stateId * | string |
set_transition_duration
Set an existing transition duration in seconds using the editor compiler. Read transition IDs from get_editor_state. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
duration * | number | |
file * | string | Project basename in the configured workspace, not a path or URL. |
revision * | string | |
transitionId * | string |
create_layer
Create a rectangle, ellipse, star, polygon or text in one state using the canvas creation command. Coordinates are document units. Duplicate states afterward to preserve matching identity. Returns the new nodeId. One undo entry. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
file * | string | Project basename in the configured workspace, not a path or URL. |
height * | number | |
revision * | string | |
stateId * | string | |
type * | string | |
width * | number | |
x * | number | |
y * | number | |
color | string | Solid fill in #RRGGBB format; replaces the fill stack. |
fontSize | number | |
fontWeight | number | |
opacity | number | |
radius | number | |
text | string | Literal text, not markup. Text layers only. |
style_layer
Set an unlocked layer's solid fill, opacity, rectangle radius or text typography in one state. Text replacement clears rich-text runs. Does not change identity. One undoable transaction. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
file * | string | Project basename in the configured workspace, not a path or URL. |
nodeId * | string | |
revision * | string | |
stateId * | string | |
color | string | Solid fill in #RRGGBB format; replaces the fill stack. |
fontSize | number | |
fontWeight | number | |
opacity | number | |
radius | number | |
text | string | Literal text, not markup. Text layers only. |
set_background
Set the solid background of one visual state. Other states are unchanged. Use before duplicating a state for a shared background. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
color * | string | Solid fill in #RRGGBB format; replaces the fill stack. |
compositionId * | string | |
file * | string | Project basename in the configured workspace, not a path or URL. |
revision * | string | |
stateId * | string |
set_easing
Configure a transition's exact cubic-bezier curve using the shared transition settings command. x controls must be 0–1; y permits bounded overshoot. Optional stagger is in seconds. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
file * | string | Project basename in the configured workspace, not a path or URL. |
revision * | string | |
transitionId * | string | |
x1 * | number | |
x2 * | number | |
y1 * | number | |
y2 * | number | |
stagger | number |
delete_state
Destructive: delete a state and its contents. The first state is retained but emptied, matching the UI. Undoable; requires confirm=true. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
confirm * | boolean | |
file * | string | Project basename in the configured workspace, not a path or URL. |
revision * | string | |
stateId * | string |
tweens_transform
Set exact local position, size, rotation (degrees), or opacity (0–1) of one unlocked object in one state. One undoable transaction; does not simulate a pointer drag. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
file * | string | Project basename in the configured workspace, not a path or URL. |
nodeId * | string | |
revision * | string | |
stateId * | string | |
height | number | |
opacity | number | |
rotation | number | |
width | number | |
x | number | |
y | number |
tweens_media_timing
Edit one audio or video clip's start/trim/speed in seconds. Changes use the same timing model as pointer trimming, preview and export. Audio volume is 0–1. Edits the named workspace file; returns its committed disk revision.
| Parameter | Type | Description |
|---|---|---|
compositionId * | string | |
file * | string | Project basename in the configured workspace, not a path or URL. |
id * | string | |
kind * | string | |
revision * | string | |
offset | number | |
speed | number | |
trimEnd | number | |
trimStart | number | |
volume | number |
list_projects
List up to 100 .tweens projects in the explicitly configured workspace. No other directories are searched.
create_project
Create a blank 1200×800 editable motion project. Fails if the filename already exists. Read get_editor_state next.
| Parameter | Type | Description |
|---|---|---|
file * | string | Project basename in the configured workspace, not a path or URL. |
apply_commands
Atomically apply 1–64 document edits. Commands inherit revision/compositionId; omit both inside arguments. On failure nothing is saved. Returned results include created IDs for subsequent calls.
| Parameter | Type | Description |
|---|---|---|
commands * | array | |
file * | string | Project basename in the configured workspace, not a path or URL. |
revision * | string |
validate_project
Validate a project and evaluate a requested time using the same compiler/evaluator as the editor. Technical validation is not aesthetic approval.
| Parameter | Type | Description |
|---|---|---|
file * | string | Project basename in the configured workspace, not a path or URL. |
time | number |
render_preview
Render a PNG of the exact project revision at time (seconds), returning an inline image and a workspace artifact. Uses the editor renderer in an isolated Chromium worker; no network assets are fetched.
| Parameter | Type | Description |
|---|---|---|
file * | string | Project basename in the configured workspace, not a path or URL. |
output * | string | New artifact filename; existing files are never overwritten. |
revision * | string | |
time * | number |
export_animation
Export a GIF or MP4 with the editor's evaluator and encoders. Requires installed Chromium. MP4 codec support is checked by the encoder; GIF is silent. Does not publish or upload anything. Up to 1280px, 30 FPS, 120s; runtime capped at two minutes.
| Parameter | Type | Description |
|---|---|---|
file * | string | Project basename in the configured workspace, not a path or URL. |
output * | string | New artifact filename; existing files are never overwritten. |
revision * | string | |
fps | integer | |
loop | boolean | GIF repeat flag; MP4 files have no loop metadata. |