Frame Animator
Sprite sheet frame-by-frame animator with configurable frame durations, loops, and ping-pong modes.
Type: FrameAnimationNode · Category: Animation & Effects · Also found as: animationnode, frameanimation, animation
Settings
Section titled “Settings”Saved in the scene beside the common properties:
| Setting | Scene key | |
|---|---|---|
| Frames | frames |
The images, in order (project paths) |
| FPS | fps |
Frames per second |
| Loop | loop |
Start over after the last frame |
A Frame Animation plays a list of separate images. For sprite sheets,
several named animations, property tracks and events, use an
Animation Player (the Animation tab edits it); for .aseprite files, an
Aseprite node.
{ "type": "FrameAnimationNode", "name": "Flame", "fps": 12, "loop": true, "frames": ["textures/flame_1.png", "textures/flame_2.png", "textures/flame_3.png"]}Properties
Section titled “Properties”No reflected properties of its own: its settings are described above.
Plus the common properties every node has.
Lua methods
Section titled “Lua methods”Call them on the node (self.node in its script, or self.node:get_node("path")). Every node also has the Node methods.
FrameAnimationNode:connect(event, handler)
Section titled “FrameAnimationNode:connect(event, handler)”Connects a handler to one of this node’s events: animation_finished (A non-looping animation ended (Aseprite: a tag’s repeats are done)); the tree events; custom ones.
self.node:connect("animation_finished", function(value, source) Log.info("animation_finished") end)eventFrameAnimationNodeEvent|stringhandlerfun(value:any, source: FrameAnimationNode)
Returns integer id Connection id for disconnect
FrameAnimationNode:get_property(path)
Section titled “FrameAnimationNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("position")pathFrameAnimationNodeProperty|string
Returns any
FrameAnimationNode:set_property(path, value, y)
Section titled “FrameAnimationNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("position", 100, 50)pathFrameAnimationNodeProperty|stringvalueanyy?number
In a scene file
Section titled “In a scene file”{ "type": "FrameAnimationNode", "name": "FrameAnimator", "position": [ 0, 0 ]}