Scrub is an animation data editor which allows you to make and preview .anm
files.
load #scrub
File format
The .anm
file format consists of a table with string keys and values containing animations. Each animation contains string keys with arrays of data, each the same length. The only required key in an animation is duration
, which is a series of numbers indicating the amount of time it takes for each frame to elapse. There is an optional events
key, where the values are a dictionary of strings keys and arbitrary values, representing each event that occurs at the start of its respective frame.
Within the Scrub cart, the script src/animation.lua contains everything you need to play the animations in the .anm
files in your own projects.
Features
Scrub will automatically detect the properties sprite
and pivot
, and will show a sprite in the viewport that reflects them.
Scrub supports properties and events with values that are:
- numbers, such as
3.5
- userdata vectors, such as
(3.5,8)
- strings, such as
foo
- booleans, written as
true
orfalse
- nil, written as
nil
(properties only)
Scrub supports custom palettes in the same format that OkPal uses.
Hotkeys
- Space - Play
- Left - Select last frame
- Right - Select next frame
- Insert - Insert a new frame
- Delete - Delete selected frames
- Shift+Click - Frame multi-select
Planned features
- Allow previewing sprites from files other than
0.gfx
- Automatic sprite sequences
- Show 2D vectors, and be able to edit them and the pivot in the viewport
- Undo
- Buttons on the transport for last frame, next frame, start, end, and playback speed
- Specify which properties are the sprite/pivot
Known bugs
None at the moment.
Changelog
v2
- Added frame events
v1.1
- Fixed spaces being added when you click on properties
- Fixed program crashing when it can't find
ram/cart/gfx/gfx.0
(probably) - Fixed left/right hotkeys causing the properties window to lag behind the selection
- Added support for boolean properties
- Added whitespace tolerance for all non-string property values
[Please log in to post a comment]