-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Property Tween
Ryc O'Chet edited this page Jun 3, 2018
·
1 revision
- NOTE: This documentation is for Velocity v2.
The tween
property is a synthetic fake. It does not exist on any elements, and is instead used to pass a value back to the progress
callback. You may pass any forcefed value to animate between, but like all other properties it is cached, so you can pass a single value and have it tween from the previous value instead.
element.velocity({
tween: [456, 123]
}, {
progress: function(elements, percentComplete, remaining, tweenValue, activeCall) {
console.log("The current tween value is " + tweenValue)
}
});