Propery duration of type Number
Duration
Propery delay of type Number
Delay
Propery easing of type String, Function
Easing. Please see the timeline module parseEasing function for all avaliable options.
Propery repeat of type Number
Repeat times count
Propery yoyo of type Boolean
Yoyo option defines if animation should be altered on repeat.
Propery isRunLess of type Boolean
isRunLess option prevents animation from running immediately after initialization.
Propery isShowEnd of type Boolean
isShowEnd option defines if the last frame should be shown when animation completed.
Propery onStart of type Function
onStart callback will be called once on animation start.
Propery onUpdate of type Function
onUpdate callback will be called on every frame of the animation. The current progress in range [0,1] will be passed to the callback.
Propery onComplete of type Function
onComplete callback will be called once on animation complete.
Method run
Method to run the spriter on demand
TODO: Implement new object merging
Parameters:
New
must be an Object.Method _extendDefaults
Method to extend _props by options(this.o)
Method _extendDefaults
Method to parse frames as child nodes of el
Method _createTween
Method to create tween and timeline and supply callbacks
Method _startTween
Method to start tween
Method _setProgress
Method to set progress of the sprite
Parameters:
Progress
must be a Number.get the frame number
react only if frame changes
if previous frame isnt current one, hide it
if end of animation and isShowEnd flag was specified then show the last frame else show current frame
show the current frame
set previous frame as current
class Spriter
Spriter
Class for toggling opacity on bunch of elements
TODO: - add isForce3d option