Constructor
new AnimationScripts()
Creates a new AnimationScripts object.
- Source:
Members
(readonly) length :number
Returns the number of scripts registered by the handler.
Type:
- number
- Source:
Methods
add(index, callback, scope) → {undefined}
Adds a new script to the current animation sequence. The script is added to
a specific keyframe and there can only be one script per keyframe.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | Index of the keyframe to which the script is to be added. |
callback |
function | Reference to the function that represents the script. |
scope |
Object | Scope within which the script is executed. |
- Source:
Returns:
- Type
- undefined
remove(index) → {undefined}
Deletes a script from a keyframe.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | Index of the keyframe whose script is to be deleted. |
- Source:
Returns:
- Type
- undefined