API Docs for: 0.1
Show:

TimingManager Class

Defined in: js/timing.js:5

Consumes timing information and runs handlers bound to animation labels.

Constructor

TimingManager

(
  • timingInfo
  • [timeUnit="ms"]
)

Defined in js/timing.js:5

Parameters:

  • timingInfo Array | Object

    Timing information, as exported by the animaker package in R. For more information, refer to ?export in R once animaker has loaded.

  • [timeUnit="ms"] String optional

    Determine what time units the timing information exported from animaker refers to. Must be one of "ms" (milliseconds), "s" (seconds), or "m" (minutes).

Methods

cancel

()

Defined in js/timing.js:92

Cancels all pending animations that are queued by the timing manager.

frameApply

(
  • [fps=10]
  • [t=0]
)

Defined in js/timing.js:119

Plays all animations associated with actions at a given rate per second.

Parameters:

  • [fps=10] Number optional

    How many frames per second are going to be drawn. By default this is 10.

  • [t=0] Number optional

    An optional delay (in timeUnits) to add to the entire animation

frameTiming

(
  • [t=0]
)
Array

Defined in js/timing.js:104

Returns all of the timing information about the frames that are to be played at a given time.

Parameters:

  • [t=0] Number optional

    The time in milliseconds to select an animation from

Returns:

Array:

A list of matching animations to play at the current time

play

(
  • [t=0]
)

Defined in js/timing.js:66

Plays all animations associated with actions

Parameters:

  • [t=0] Number optional

    An optional delay (in timeUnits) to add to the entire animation.

register

(
  • fns
  • [overwrite=false]
)

Defined in js/timing.js:46

Registers an action to an animation

Parameters:

  • fns Object

    An object where the keys are the labels for an animation, and the values are a function to register as an action to that animation

  • [overwrite=false] Boolean optional

    Allows us to overwrite existing actions for animations.