API Docs for: 1.7.3
Show:

Rekapi.KeyframeProperty Class

Represents an individual component of an actor's keyframe state. In most cases you won't need to deal with this object directly, as the Rekapi.Actor APIs abstract a lot of what this Object does away for you.

Constructor

Rekapi.KeyframeProperty

(
  • millisecond
  • name
  • value
  • opt_easing
)

Parameters:

  • millisecond Number

    Where on the animation timeline this Rekapi.KeyframeProperty is.

  • name String

    The property's name, such as "x" or "opacity".

  • value Number | String | Function

    The value that this Rekapi.KeyframeProperty represents.

  • opt_easing String=

    The easing curve at which this Rekapi.KeyframeProperty should be animated to. Defaults to "linear".

Methods

detach

() chainable

Disassociates this Rekapi.KeyframeProperty from its Rekapi.Actor. This is called by various Rekapi.Actor methods and triggers the removeKeyframeProperty event on the associated Rekapi instance.

exportPropertyData

() Object

Returns:

Object:

A serializable Object representation of this Rekapi.KeyframeProperty.

getValueAt

(
  • millisecond
)
Number

Calculate the midpoint between this Rekapi.KeyframeProperty and the next Rekapi.KeyframeProperty in a Rekapi.Actor's property track.

In just about all cases, millisecond should be between this Rekapi.KeyframeProperty's millisecond and the millisecond of the Rekapi.KeyframeProperty that follows it in the animation timeline, but it is valid to specify a value outside of this range.

Parameters:

  • millisecond Number

    The millisecond in the animation timeline to compute the state value for.

Returns:

Number:

invoke

()

Assuming this is a function keyframe, call the function.

Returns:

:

Whatever value is returned from the keyframe function that was set for this Rekapi.KeyframeProperty.

linkToNext

(
  • nextProperty
)

Create the reference to the Rekapi.KeyframeProperty that follows this one on a Rekapi.Actor's property track. Property tracks are just linked lists of Rekapi.KeyframePropertys.

Parameters:

modifyWith

(
  • newProperties
)

Parameters:

  • newProperties Object

    Valid values correspond to Rekapi.KeyframeProperty's constructor parameters:

    • millisecond (number)
    • name (string)
    • value (number|string)
    • easing (string)