Tween library for PICO-8
A downloadable tool
Download NowName your own price
Tween
... is small library to create simple as possible tweens in PICO-8 for your next game or tool.
Simple example
Copy the complete source code of tween into PICO-8 (maybe as new tab). After that you can use the functions of tween as following:
-- some object t={x=1, y=2} function _init() -- create a new tween tweens.create() -- add a motion for t[x] and move it to x=10 in 3s (linear) .add(t, "x", 10, 3) -- stay for 1s .delay(1) .start() end function _update60() -- update all tweens in each frame tweens.update() end
API
tweens.create() -- all motions will played in parallel .parallel() -- adds a new motion for obj[key] to bring it to target in duration in seconds .add(obj, key, target, duration, easing) -- stay for a duration in seconds .delay() -- set a listener for finished tweens. It will call listener(tween) .on_finish(some_function) -- starts the tween .start() -- stops the tween .stop() -- easings tweens.linear tweens.ease_in_quad tweens.ease_out_quad tweens.ease_in_sin tweens.ease_out_sin
Download
Download NowName your own price
Click download now to get access to the following files:
Tween libary
External
Leave a comment
Log in with itch.io to leave a comment.