oscillate_cels
Swing a layer's cels along a sine wave across selected frames to create bob or sway loops in Aseprite, with adjustable X/Y amplitude, cycles, and phase.
Instructions
Swing a layer's cels along a sine wave across the frames (a bob or sway loop).
Frame i of n is placed at base + amplitude * sin(2π(cycles * i/n + phase)), rounded, so the last frame leads back into the first. The base is chosen so the first frame keeps its current position: running the tool again with the same arguments gives the same result. An axis with amplitude 0 is left as it is. Every frame needs a cel. 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>"
},
"name": "oscillate_cels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Sprite file. Relative paths resolve against the server root. | |
| layer | Yes | Layer name, or a 'group/child' path for nested layers | |
| phase | No | Offset in cycles | |
| cycles | No | Full waves across the frames | |
| frames | Yes | Frames: a number, "1-4", "1-4,7" or "all" (1-based) | |
| amplitude_x | No | Horizontal swing in pixels | |
| amplitude_y | No | Vertical swing in pixels |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||