Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Latest commit

 

History

History
23 lines (17 loc) · 623 Bytes

seek.md

File metadata and controls

23 lines (17 loc) · 623 Bytes

seek()

This Ani instance method seeks to a percentage point in the animation's timeline.

Syntax

// Obtain an Ani instance and call seek()
ani.seek(to);

Parameters

  • to - Number: A number between 0 and 1, representing 0% and 100% respectively, of the animation's total timing. Here the total timing is calculated as delay + duration + endDelay.

Return

  • Ani - The ani instance.

Usage

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);