# Translate or interpolate a layer across multiple frames

**URL:** https://community.aseprite.org/t/translate-or-interpolate-a-layer-across-multiple-frames/16444
**Category:** Help
**Created:** [December 6, 2022, 4:08pm UTC](https://community.aseprite.org/t/translate-or-interpolate-a-layer-across-multiple-frames/16444 "2022-12-06T16:08:36Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![behreandtjeremy](https://community.aseprite.org/user_avatar/community.aseprite.org/behreandtjeremy/32/6606_2.png) [@behreandtjeremy](https://community.aseprite.org/u/behreandtjeremy)
#### Post date: [December 7, 2022, 1:16am UTC](https://community.aseprite.org/t/translate-or-interpolate-a-layer-across-multiple-frames/16444/2 "2022-12-07T01:16:51Z")

</div>

Hi @madjackmcmad,

There are a few scripting options out there. I haven’t tried them myself.

> **[Path Animator Script by Gasparoken](https://gasparoken.itch.io/path-animator-script)**
>
> Script for Aseprite to animate through a path

> **[The Tween Machine For Aseprite by CarbsCode](https://carbscode.itch.io/the-tween-machine)**
>
> Quickly create in-between interpolated frames using position, scale and rotation!

> **[NxPA Studio for Aseprite by Kacper Woźniak](https://thkaspar.itch.io/nxpa)**
>
> Image scaling, processing and analysing

There could be even more that my brief search didn’t turn up.

If you have some coding knowledge and/or want to make your own, links to key documentation in the scripting API are below.

[Cel position](https://github.com/aseprite/api/blob/main/api/cel.md#celposition)  
[Frame duration](https://github.com/aseprite/api/blob/main/api/frame.md#frameduration)  
[Sprite frames](https://github.com/aseprite/api/blob/main/api/sprite.md#spriteframes)  
[Sprite new cel](https://github.com/aseprite/api/blob/main/api/sprite.md#spritenewcel)

There’s an extra wrinkle where the cel boundaries in a sprite opened from a gif are not [trimmed](https://community.aseprite.org/t/crop-transparent-pixels-from-cel-images-for-imported-gifs/11259) of excess alpha on load. The simple way to fix this is to use [app.command.CanvasSize](https://github.com/aseprite/api/blob/main/api/command/CanvasSize.md) with trim content active (default keyboard shortcut: `C`).

It’s a separate deal if you want to move the image contents, as you might if you were wrapping the image around its edges to make an infinite scroller. There’s currently a [bug](https://community.aseprite.org/t/app-command-movemask-error-when-wrapping-with-a-value-higher-than-sprite-width/10437) that prevents that from being done easily with built-in commands, but a workaround can be managed if you understand how the `%` operator works.

Cheers,  
Jeremy

---

_[View the full topic](https://community.aseprite.org/t/translate-or-interpolate-a-layer-across-multiple-frames/16444)._
