anim-base-debug.js revision 5977f41bf2914e3174de1e275499c5ccb36e8bae
5562N/A * Handles animation _queueing and threading. 5562N/A * @description fires when an animation begins. 5562N/A * @param {Event} ev The start event. 5562N/A * @description fires every frame of the animation. 5562N/A * @param {Event} ev The tween event. 5562N/A * @description fires after the animation completes. 5562N/A * @param {Event} ev The end event. 5562N/A * Regex of properties that should use the default unit. 5562N/A * @property RE_DEFAULT_UNIT 5562N/A * The default unit to use with properties that pass the RE_DEFAULT_UNIT test. 5562N/A return c * t / d + b;
// linear easing 5562N/A * Bucket for custom getters and setters 5562N/A * The default setter to use when setting object properties. 5562N/A * The default getter to use when getting object properties. 5562N/A * The object to be animated. 5562N/A * The length of the animation. Defaults to "1" (second). 5562N/A * The method that will provide values to the attribute(s) during the animation. 5562N/A * Defaults to "Easing.easeNone". 5562N/A * The starting values for the animated properties. 5562N/A * Fields may be strings, numbers, or functions. 5562N/A * If a function is used, the return value becomes the from value. 5562N/A * If no from value is specified, the DEFAULT_GETTER will be used. 5562N/A * The ending values for the animated properties. 5562N/A * Fields may be strings, numbers, or functions. 5562N/A * Date stamp for the first frame of the animation. * Current time the animation has been running. * Whether or not the animation is currently running. * The number of times the animation should run * The number of iterations that have occurred. * Resets when an animation ends (reaches iteration count or stop() called). * @attribute iterationCount * How iterations of the animation should behave. * Possible values are "normal" and "alternate". * Normal will repeat the animation, alternate will reverse on every other pass. value:
'normal' // | alternate (fwd on odd, rev on even per spec) * Whether or not the animation is currently paused. * If true, animation begins from last frame * Runs all animation instances. * Pauses all animation instances. for (
var i
in _running) {
// stop timer if nothing running * Stops all animation instances. for (
var i
in _running) {
// stop timer if nothing running * Called per Interval to handle each animation frame. * Starts or resumes an animation. * percent start time marker. * Pauses the animation and * freezes it in its current state and time. * Calling run() will continue where it left off. * Stops the animation and resets its time. * @description fires when an animation is paused. * @param {Event} ev The pause event. * @description fires when an animation is resumed (run from pause). * @param {Event} ev The pause event. }
else {
// ensure final frame value is set // TODO: handle keyframes if (
this.
get(
'direction') ===
'alternate') {
* @description fires when an animation begins an iteration. * @param {Event} ev The iteration event. to =
this.
get(
'to') || {},
dur =
this.
get(
'duration') *
1000,
if (
typeof val ===
'function') {
}
else if (
typeof begin ===
'function') {
Y.
error(
'invalid "from" or "to" for "' +
name +
'"',
'Anim');
// TODO: move to computedStyle? (browsers dont agree on default computed offsets) get = (
attr ===
'left') ?
'getX':
'getY',
set = (
attr ===
'left') ?
'setX':
'setY';
},
'@VERSION@' ,{
requires:[
'base',
'node']});