Slide 29
Slide 29 text
shifty
var myTweenable = new Tweenable();
myTweenable.tween( from, to );
myTweenable.tween( from, to, duration, callback, easing );
myTweenable.tween({
from: { }, // Object. Contains the properties to tween. Must all be
`Number`s. Note: This object's properties are modified by the tween.
to: { }, // Object. The "destination" `Number`s that the
properties in `from` will tween to.
duration: 1000, // Number. How long the tween lasts for, in milliseconds.
easing: 'linear', // String. Easing equation to use. You can specify any
easing method that was attached to `Tweenable.prototype.formula`.
start: function () {}, // Function. Runs as soon as the tween begins. Handy
when used with the `queue` extension.
step: function () {}, // Function. Runs each "frame" that the tween is updated.
callback: function () {} // Function. Runs when the tween completes.
});
Friday, November 11, 11