squash_stretch
Generates squash-and-stretch animation frames from a single pixel-art pose by resampling a layer at specified amounts, with optional volume preservation and anchor control.
Instructions
Generate squash & stretch frames of a layer from one pose.
Each value in amounts makes one frame: 0.3 = stretched 30% taller
(and narrower when preserve_volume), -0.3 = squashed 30% flatter and
wider. A jump might be [-0.25, 0.3, 0.1, 0, -0.2, 0]: crouch, launch,
air, apex, land, settle. Pixels are resampled nearest-neighbour about
the anchor (bottom keeps the feet on the ground), with no blur and no
new colours; clean the result with cleanup_lines.
Args: filename: Aseprite file layer_name: Layer with the pose frame_index: Frame holding the source pose amounts: One deformation per output frame, -0.6 to 0.8 anchor: bottom, top, center, left or right start_frame: First frame to write (0 = the frame after frame_index); missing frames are added preserve_volume: Widen when squashing, narrow when stretching frame_duration_ms: Duration for added frames (0 = copy the last one)
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": {
"filename": "<filename>",
"layer_name": "<layer_name>",
"frame_index": "<frame_index>",
"amounts": "<amounts>"
},
"name": "squash_stretch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| anchor | No | bottom | |
| amounts | Yes | ||
| filename | Yes | ||
| layer_name | Yes | ||
| frame_index | Yes | ||
| start_frame | No | ||
| preserve_volume | No | ||
| frame_duration_ms | No |