Set.animate(…)
优质
小牛编辑
130浏览
2023-12-01
Animates each element in set in sync.
Parameters
- attrsobjectkey-value pairs of destination attributes
- durationnumberduration of the animation in milliseconds
- easingfunctioneasing function frommina or custom
- callbackfunctioncallback function that executes whenthe animation ends
or
Parameters
- animationarrayarray of animation parameter for eachelement in set in format
[attrs, duration, easing, callback]
Usage
// animate all elements in set to radius 10
set.animate({r: 10}, 500, mina.easein);
// or
// animate first element to radius 10, but second to radius 20 and in different time
set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
Returns: Element the current element