tween_cels
Animate a layer's cels across frames by interpolating position, opacity, or scale from start to end, with easing and optional looping.
Instructions
Animate a layer's cels from start to end across the frames, in frame order.
position: start/end are {x, y} absolute cel positions (top-left of the cel image in sprite coordinates). opacity: numbers 0..255. scale: a factor, or {x, y} factors, 0.05..16 of the source_frame cel, resized nearest-neighbour around the anchor and written as a new cel in every frame (created where missing). position and opacity need a cel in every frame. Values round to the nearest integer, halves away from zero. Needs at least 2 frames; frame i of n gets t = i/(n-1), or i/n with loop. easing: ease_in t², ease_out 1-(1-t)², ease_in_out quadratic in/out, ease_out_back overshoots past end then settles, bounce bounces into end. The layer must not be locked.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"layer": "<layer>",
"frames": "<frames>",
"property": "<property>",
"start": "<start>",
"end": "<end>"
},
"name": "tween_cels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | position: {x, y} cel position; opacity: 0..255; scale: a factor or {x, y} factors, 0.05..16 | |
| loop | No | Stop one step before end so a looping animation stays smooth | |
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| layer | Yes | Layer name, or a 'group/child' path for nested layers | |
| start | Yes | position: {x, y} cel position; opacity: 0..255; scale: a factor or {x, y} factors, 0.05..16 | |
| anchor | No | scale only: point of the cel that stays in place | center |
| easing | No | How the value moves from start to end | linear |
| frames | Yes | Frames: a number, "1-4", "1-4,7" or "all" (1-based) | |
| property | Yes | What to animate | |
| source_frame | No | scale only: frame whose cel is scaled; default first frame |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||