Rotation animation step
The rotation animation step animates the first Rotation transform in the FigureElement's Transform.
By default, the rotation will start with the element's current rotation.
Use either delta or target to define it's end point
delta
target
To test examples, append them to the boilerplate
// Using durationp.animations.new() .rotation({ target: Math.PI, duration: 2 }) .start(); Copy
// Using durationp.animations.new() .rotation({ target: Math.PI, duration: 2 }) .start();
// Using velocityp.animations.new() .rotation({ target: Math.PI, velocity: Math.PI / 2 }) .start(); Copy
// Using velocityp.animations.new() .rotation({ target: Math.PI, velocity: Math.PI / 2 }) .start();
// Different ways to create a stand-alone stepconst step1 = p.animations.rotation({ target: Math.PI, duration: 2 });const step2 = new Fig.Animation.RotationAnimationStep({ element: p, target: 0, duration: 2,});p.animations.new() .then(step1) .then(step2) .start(); Copy
// Different ways to create a stand-alone stepconst step1 = p.animations.rotation({ target: Math.PI, duration: 2 });const step2 = new Fig.Animation.RotationAnimationStep({ element: p, target: 0, duration: 2,});p.animations.new() .then(step1) .then(step2) .start();
Get remaining duration of the animation.
define this if you want remaining duration from a custom time
Rotation animation step
The rotation animation step animates the first Rotation transform in the FigureElement's Transform.
By default, the rotation will start with the element's current rotation.
Use either
deltaortargetto define it's end pointParam: options
See
To test examples, append them to the boilerplate
Example
Example
Example