Classes
Type Definitions
actorData
Properties:
Name | Type | Description |
---|---|---|
trackNames |
Array.<string>
|
The values of this array must
correspond 1:1 to the key names in |
propertyTracks |
Object.<Array.<rekapi.propertyData>>
|
|
end |
number
|
|
start |
number
|
|
id |
string
|
undefined
|
Type:
-
Object
actorSortFunction(actor) → {number}
Parameters:
Name | Type | Description |
---|---|---|
actor |
rekapi.Actor
|
A |
Returns:
- Type:
-
number
curveData
The properties of this object are used as arguments provided to
shifty.setBezierFunction
.
Properties:
Name | Type | Description |
---|---|---|
x1 |
number
|
|
x2 |
number
|
|
y1 |
number
|
|
y2 |
number
|
|
displayName |
string
|
Type:
-
Object
easingOption
Either the name of an easing
curve or
an array of four number
s ([x1, y1, x2, y2]
) that represent the points of
a Bezier curve.
- Source:
- See:
Type:
-
string
|Array.<number>
eventHandler(rekapi, data)
A function that is called when an event is fired. See the events listed below for details on the types of events that Rekapi supports.
Parameters:
Name | Type | Description |
---|---|---|
rekapi |
rekapi.Rekapi
|
A |
data |
Object
|
Data provided from the event (see |
keyframeFunction(actor, drift)
Parameters:
Name | Type | Description |
---|---|---|
actor |
rekapi.Actor
|
The |
drift |
number
|
A number that represents the delay between when the function is called and when it was scheduled. There is typically some amount of delay due to the nature of JavaScript timers. |
propertyData
Properties:
Name | Type | Description |
---|---|---|
value |
number
|
string
|
|
millisecond |
number
|
|
easing |
string
|
|
name |
string
|
|
id |
string
|
undefined
|
Type:
-
Object
render(context, state)
A function that gets called every time the actor's state is updated (once every frame). This function should do something meaningful with the state of the actor (for example, visually rendering to the screen).
Parameters:
Name | Type | Description |
---|---|---|
context |
Object
|
An actor's |
state |
Object
|
An actor's current state properties. |
renderer
An Object that provides utilities for rendering a rekapi.Actor
.
Properties:
Name | Type | Description |
---|---|---|
render |
rekapi.render
|
A function that renders a |
Type:
-
Object
timelineData
The JSON.stringify
-friendly data format for serializing a Rekapi
animation.
Properties:
Name | Type | Description |
---|---|---|
actors |
Array.<rekapi.actorData>
|
|
curves |
Object.<rekapi.curveData>
|
|
duration |
number
|
Type:
-
Object
Events
addKeyframeProperty
Parameters:
Name | Type | Description |
---|---|---|
keyframeProperty |
rekapi.KeyframeProperty
|
The |
addKeyframePropertyTrack
Fires when the a keyframe is added to an actor that creates a new keyframe property track.
Parameters:
Name | Type | Description |
---|---|---|
keyframeProperty |
rekapi.KeyframeProperty
|
The |
beforeAddKeyframeProperty
Fires just before the point where a rekapi.KeyframeProperty
is added
to the timeline. This event is called before any modifications to the
timeline are done.
beforeRemoveKeyframeProperty
Fires just before the point where a rekapi.KeyframeProperty
is
removed. This event is called before any modifications to the timeline are
done.
removeKeyframeProperty
Fires when a rekapi.KeyframeProperty
is removed. This event is
fired before the internal state of the keyframe (but not the timeline, in
contrast to rekapi.event:beforeRemoveKeyframeProperty
) has been
updated to reflect the keyframe property removal (this is in contrast to
rekapi.event:removeKeyframePropertyComplete
).
Parameters:
Name | Type | Description |
---|---|---|
keyframeProperty |
rekapi.KeyframeProperty
|
The |
removeKeyframePropertyComplete
Fires when a rekapi.KeyframeProperty
has finished being removed from
the timeline. Unlike rekapi.event:removeKeyframeProperty
, this is
fired after the internal state of Rekapi has been updated to reflect the
removal of the keyframe property.
Parameters:
Name | Type | Description |
---|---|---|
keyframeProperty |
rekapi.KeyframeProperty
|
The |
removeKeyframePropertyTrack
Fires when the last keyframe property in an actor's keyframe property track is removed. Rekapi automatically removes property tracks when they are emptied out, which causes this event to be fired.
Parameters:
Name | Type | Description |
---|---|---|
trackName |
string
|
name of the track that was removed. |