Package com.biodigital.humansdk
Class HKTimeline
java.lang.Object
com.biodigital.humansdk.HKTimeline
Timeline object - for interacting with chapters and animations in a scene
-
Field Summary
FieldsModifier and TypeFieldDescriptionAn ordered list of chapter IDsA map of chapter IDs to Chapter objects.A map of chapter IDs to Chapter objects.double
The current animation timedouble
The current animation durationboolean
true if the animation is currently playing -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Jump to the chapter with the given ID and play it in a loopvoid
moveToChapter
(String chapterId) Jump to the chapter with the given IDvoid
moveToTime
(double time) Jump to the given time in the current scene's current animationvoid
Jump to the next chaptervoid
pause()
Pause the animationvoid
play()
Play the animation from the beginningvoid
Jump to the previous chaptervoid
unpause()
Unpause the animation
-
Field Details
-
currentChapter
A map of chapter IDs to Chapter objects. -
chapters
A map of chapter IDs to Chapter objects. -
chapterList
An ordered list of chapter IDs -
currentTime
public double currentTimeThe current animation time -
duration
public double durationThe current animation duration -
playing
public boolean playingtrue if the animation is currently playing
-
-
Constructor Details
-
HKTimeline
public HKTimeline()
-
-
Method Details
-
play
public void play()Play the animation from the beginning -
pause
public void pause()Pause the animation -
unpause
public void unpause()Unpause the animation -
nextChapter
public void nextChapter()Jump to the next chapter -
prevChapter
public void prevChapter()Jump to the previous chapter -
moveToChapter
Jump to the chapter with the given ID- Parameters:
chapterId
- ID of the chapter
-
moveToTime
public void moveToTime(double time) Jump to the given time in the current scene's current animation- Parameters:
time
- animation offset in seconds
-
loop
Jump to the chapter with the given ID and play it in a loop- Parameters:
chapterId
- ID of the chapter
-