offset_cels
Move a layer's cel across multiple animation frames along a straight or arced path, applying linear or eased spacing in one Aseprite launch.
Instructions
Move one layer's drawn cel along a path across frames, in one Aseprite launch.
The cel on the first listed frame stays where it is; every later frame is placed
along the way to `(dx, dy)` from it, and the last frame lands exactly there. This is
the same work as one `set_cel_position` per frame, minus the launches and minus
computing the intermediate positions by hand.
Args:
frames: The frames to place, in the order the movement passes through them.
dx, dy: The whole movement, in pixels, from the first frame to the last.
ease: How the movement is *spaced*: `linear`, `ease_in` (starts slow),
`ease_out` (arrives slow), `ease_in_out`, or `gravity` (horizontal speed
stays even while the vertical accelerates, as a thrown object does).
arc_height: Bend the path into an arc this many pixels high at its midpoint,
perpendicular to the straight line between the ends. A jump or a thrown
object needs this; a slide does not.
Easing belongs here, in the spacing, and not in the frame durations. Applying a curve
to both applies it twice, and the result reads as slow motion rather than as weight.
Positions are whole pixels, so it is the running position that gets rounded and not
each step: the leftover fraction carries forward instead of being reintroduced every
frame, which is the difference between spacing that reads as speed and spacing that
reads as a limp. The returned `deltas` are the spacing a viewer actually sees, and
`max_error_px` is how far the furthest frame sits from the ideal curve, which stays
below one pixel.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dx | No | Default: 0. | |
| dy | No | Default: 0. | |
| ease | No | Default: "linear". | linear |
| layer | Yes | ||
| frames | Yes | ||
| filename | Yes | ||
| arc_height | No | Default: 0.0. |