Tween parameters
Configure values, timings, and behaviors of animated properties.
Tween parameters can be specified globally for all properties directly with the other animation parameters, or locally for a specific property using an Object
.
All animatable properties inherit the global parameters, which can be overridden locally for a specific tween.
animate('.square', {
x: {
┌───────────────────┐
│ to: 100, │
│ delay: 0, ├─ Local Tween Parameters
│ ease: 'inOut(4)'│
└───────────────────┘
},
scale: 1,
opacity: .5,
┌───────────────────┐
│ duration: 400, │
│ delay: 250, ├─ Global Tween Parameters
│ ease: 'out(3)', │
└───────────────────┘
loop: 3,
alternate: true,
});
In this section