KeyframeProperty

rekapi. KeyframeProperty

Represents an individual component of an rekapi.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

new KeyframeProperty(millisecond, name, value, easingopt)

Source:
Parameters:
Name Type Attributes Default Description
millisecond number

Sets rekapi.KeyframeProperty#millisecond.

name string

Sets rekapi.KeyframeProperty#name.

value number | string | boolean | rekapi.keyframeFunction

Sets rekapi.KeyframeProperty#value.

easing rekapi.easingOption <optional>
"linear"

Sets rekapi.KeyframeProperty#easing.

Members

actor :rekapi.Actor|undefined

The rekapi.Actor to which this rekapi.KeyframeProperty belongs, if any.

Source:
Type:

easing :rekapi.easingOption

The easing curve by which this rekapi.KeyframeProperty should be animated.

Source:
Type:

hasFired :boolean

Flag to determine if this rekapi.KeyframeProperty's rekapi.keyframeFunction should be invoked in the current animation loop.

Source:
Type:
  • boolean

id :string

The unique ID of this rekapi.KeyframeProperty.

Source:
Type:
  • string

millisecond :number

Where on the animation timeline this rekapi.KeyframeProperty is.

Source:
Type:
  • number

name :string

This rekapi.KeyframeProperty's name, such as "x" or "opacity".

Source:
Type:
  • string

nextProperty :rekapi.KeyframeProperty|null

A reference to the rekapi.KeyframeProperty that follows this one in a rekapi.Actor's property track.

Source:
Type:

value :number|string|boolean|rekapi.keyframeFunction

The value that this rekapi.KeyframeProperty represents.

Source:
Type:

Methods

detach()

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.Rekapi instance.

Source:
Fires:

exportPropertyData(configopt) → {rekapi.propertyData}

Export this rekapi.KeyframeProperty to a JSON.stringify-friendly Object.

Source:
Parameters:
Name Type Attributes Description
config Object <optional>
Name Type Attributes Default Description
withId boolean <optional>
false

If true, include internal id value in exported data.

Returns:
Type:
rekapi.propertyData

getValueAt(millisecond) → {number|string|boolean|rekapi.keyframeFunction|rekapi.KeyframeProperty#value}

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.

Source:
Parameters:
Name Type Description
millisecond number

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

Returns:
Type:
number | string | boolean | rekapi.keyframeFunction | rekapi.KeyframeProperty#value

invoke() → {any}

Source:
Returns:
Type:
any

Whatever value is returned for this rekapi.KeyframeProperty's rekapi.keyframeFunction.

linkToNext(nextPropertyopt)

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.

Source:
Parameters:
Name Type Attributes Description
nextProperty KeyframeProperty <optional>

The rekapi.KeyframeProperty that should immediately follow this one on the animation timeline.

modifyWith(newProperties)

Source:
Parameters:
Name Type Description
newProperties Object

Valid values are:

Name Type Attributes Description
millisecond number <optional>

Sets rekapi.KeyframeProperty#millisecond.

name string <optional>

Sets rekapi.KeyframeProperty#name.

value number | string | boolean | rekapi.keyframeFunction <optional>

Sets rekapi.KeyframeProperty#value.

easing string <optional>

Sets rekapi.KeyframeProperty#easing.