Skip to main content

RemoteTrack

The track used to synchronize with remote system, like an animation loop in an iframe.

Implements

Index

Constructors

constructor

  • Parameters

    • remote: Remote
    • remoteTimeDifferenceLimit: number = defaultRemoteTimeDifferenceLimit

    Returns RemoteTrack

Properties

remote

remote: Remote

Methods

check

  • check(): { progress: number; time: number }
  • A function called by timeline to fetch the progress of the track.


    Returns { progress: number; time: number }

    • progress: number
    • time: number

pause

  • pause(): void
  • A function called by timeline to hint that the timeline is stop playing useful to control another system used by the track


    Returns void

play

  • play(): void
  • A function called by timeline to hint that the timeline is start playing useful to control another system used by the track


    Returns void

resume

  • resume(): void
  • A function called by timeline to hint that the timeline is no longer stuck by any tracks useful to control another system used by the track


    Returns void

seek

  • seek(time: number, progress: number): void
  • A function called by timeline to hint that the timeline is seeked useful to control another system used by the track


    Parameters

    • time: number
    • progress: number

    Returns void

suspend

  • suspend(): void
  • A function called by timeline to hint that the timeline is stuck by one of the tracks useful to control another system used by the track


    Returns void

update

  • update(time: number, progress: number): boolean
  • A function called by timeline to ensure the progress across all tracks are synchronized This function was called in every frame when the timeline is playing You can update the time in your track or check the time against the time in another system The return value should be true if and only if the track was stuck


    Parameters

    • time: number
    • progress: number

    Returns boolean