HKTimeline

@objc
public class HKTimeline : NSObject

Timeline object

  • The current animation time

    Declaration

    Swift

    @objc
    public var currentTime: Float
  • The currently loaded Chapter to access title and description

    Declaration

    Swift

    @objc
    public var currentChapter: HKChapter?
  • A map of chapter IDs to HKChapter objects.

    Declaration

    Swift

    @objc
    public var chapters: [String : HKChapter]
  • An ordered list of chapter IDs

    Declaration

    Swift

    @objc
    public var chapterList: [String]
  • Undocumented

    Declaration

    Swift

    @objc
    public func play()
  • Pause the current scene’s animation

    Declaration

    Swift

    @objc
    public func pause()
  • Unpause the current scene’s animation

    Declaration

    Swift

    @objc
    public func unpause()
  • Jump to the current module’s next chapter

    Declaration

    Swift

    @objc
    public func nextChapter()
  • Jump to the current module’s previous chapter

    Declaration

    Swift

    @objc
    public func prevChapter()
  • Jump to the chapter with the given chapterID

    Declaration

    Swift

    @objc
    public func moveToChapter(chapterID: String)
  • Jump to the given time in the current scene’s current animation

    Declaration

    Swift

    @objc
    public func moveToTime(time: Float)
  • Check if there is an animation playing

    Declaration

    Swift

    @objc
    public func playing() -> Bool

    Return Value

    is the current scene playing an animation?

  • Check the current animation length

    Declaration

    Swift

    @objc
    public func duration() -> Float

    Return Value

    time in seconds of the current animation’s total length as a Float