Closed qikong333 closed 4 years ago
You can see the list of public methods here: https://github.com/ievgennaida/animation-timeline-control/blob/master/lib/timeline.d.ts or https://github.com/ievgennaida/animation-timeline-control/blob/master/src/timeline.ts
All available methods will be displayed in the popup if you are using IDE like visual studio code.
To set time units you can use:
timeline.setTime(4000);
timeline.redraw();
To get current time you can use:
timeline.getTime();
Or you can subscribe on time changed event:
TypeScript:
timeline.onTimeChanged((event: TimelineTimeChangedEvent) => {
if(event.source !== TimelineEventSource.User){
// Do something.
}
});