Description
Provides a generic way to animate every float property on every obj
Author
Iavra
Parameters
@param Enable Persistence
@desc If set to true, running animations will be stored in the savefile and continued after loading.
@default false
How to Use
To animate an object a new Tween has to be created and started like this:
var myTween = new IAVRA.ANIMATE.Tween(object, {_x : 100}).duration(50).start();
This will cause the property "_x" of "object" to change from its current value to 100 over the next 50 frames, using linear easing (default).
The IAVRA.ANIMATE.Tween class contains the following functions:
All functions return the Tween object itself and can be used for chaining.
The IAVRA.ANIMATE module contains the following functions:
By default, animations are saved locally and get lost after saving and loading the game. The parameter "Enable Persistence" changes this and stores all animations in the savefile. Note that JSON.stringify() (which MV uses as its save mechanism) discards functions, which means that registered callbacks are lost after loading a game.
The second script contains JavaScript implementations of the Robert Penner easing functions, which can be used like this:
new IAVRA.ANIMATE.Tween(object, {...}).easing(IAVRA.EASING.quad.in).start();
Terms of Use
Free to use for both commercial and non-commercial games. Please give credit.
If you use the Easing Library, you must give credit to Robert Penner.
Download
Animate Everything: http://pastebin.com/WqZ1Sfs5
Easing Library: http://pastebin.com/Y6kMyksm
FAQ
Q: Can i rename the script or will it break?
A: You are free to name the files however you want, since i'm using my own method for loading parameters, which doesn't use the filename.
Provides a generic way to animate every float property on every obj
Author
Iavra
Parameters
@param Enable Persistence
@desc If set to true, running animations will be stored in the savefile and continued after loading.
@default false
How to Use
To animate an object a new Tween has to be created and started like this:
var myTween = new IAVRA.ANIMATE.Tween(object, {_x : 100}).duration(50).start();
This will cause the property "_x" of "object" to change from its current value to 100 over the next 50 frames, using linear easing (default).
The IAVRA.ANIMATE.Tween class contains the following functions:
All functions return the Tween object itself and can be used for chaining.
The IAVRA.ANIMATE module contains the following functions:
By default, animations are saved locally and get lost after saving and loading the game. The parameter "Enable Persistence" changes this and stores all animations in the savefile. Note that JSON.stringify() (which MV uses as its save mechanism) discards functions, which means that registered callbacks are lost after loading a game.
The second script contains JavaScript implementations of the Robert Penner easing functions, which can be used like this:
new IAVRA.ANIMATE.Tween(object, {...}).easing(IAVRA.EASING.quad.in).start();
Terms of Use
Free to use for both commercial and non-commercial games. Please give credit.
If you use the Easing Library, you must give credit to Robert Penner.
Download
Animate Everything: http://pastebin.com/WqZ1Sfs5
Easing Library: http://pastebin.com/Y6kMyksm
FAQ
Q: Can i rename the script or will it break?
A: You are free to name the files however you want, since i'm using my own method for loading parameters, which doesn't use the filename.