This Ani instance method seeks to a percentage point in the animation's timeline.
// Obtain an Ani instance and call seek()
ani.seek(to);
to
-Number
: A number between0
and1
, representing 0% and 100% respectively, of the animation's total timing. Here the total timing is calculated asdelay + duration + endDelay
.
Ani
- Theani
instance.
let ani = new Ani(el, [{opacity:1}, {opacity:0}], {delay: 100, duration:600});
// The following will seek the animation to 350ms
ani.seek(0.5);