Execute an array of {@link AnimationStep}s in parallel.
{@link AnimationStep}
The parallel animation step will not complete till all steps are finished.
animation steps to perform in serial
To test examples, append them to the boilerplate
p.animations.new() .inParallel([ p.animations.position({ target: [1, 0], duration: 2 }), p.animations.scale({ target: 2, duration: 2 }), ]) .start(); Copy
p.animations.new() .inParallel([ p.animations.position({ target: [1, 0], duration: 2 }), p.animations.scale({ target: 2, duration: 2 }), ]) .start();
// One of the parallel steps is a series of stepsp.animations.new() .delay(1) .inParallel([ p.animations.builder() .scale({ target: 0.5, duration: 1 }) .scale({ target: 2, duration: 1 }) .scale({ target: 1, duration: 2 }), p.animations.color({ target: [0, 0, 1, 1], duration: 4 }), p.animations.rotation({ target: Math.PI, duration: 4 }), ]) .start(); Copy
// One of the parallel steps is a series of stepsp.animations.new() .delay(1) .inParallel([ p.animations.builder() .scale({ target: 0.5, duration: 1 }) .scale({ target: 2, duration: 1 }) .scale({ target: 1, duration: 2 }), p.animations.color({ target: [0, 0, 1, 1], duration: 4 }), p.animations.rotation({ target: Math.PI, duration: 4 }), ]) .start();
Start animation
Get remaining duration of the animation.
define this if you want remaining duration from a custom time
Execute an array of
{@link AnimationStep}s in parallel.The parallel animation step will not complete till all steps are finished.
Param: steps
animation steps to perform in serial
See
To test examples, append them to the boilerplate
Example
Example