Class glTFAnimation
A class that provides functionality for gltf animations.
Methods
glTFAnimation:init (animations) | The public constructor. |
glTFAnimation:set_action_by_name (name) | Set the action by name. |
glTFAnimation:set_action (i) | Set the action by index. |
glTFAnimation:get_action_count () | Get the total number of actions. |
glTFAnimation:update (dt) | Update animations. |
Methods
- glTFAnimation:init (animations)
-
The public constructor.
Parameters:
- animations table Animations loaded with the glTFLoader
- glTFAnimation:set_action_by_name (name)
-
Set the action by name.
Parameters:
- name string Action name
- glTFAnimation:set_action (i)
-
Set the action by index.
Parameters:
- i number Action index
- glTFAnimation:get_action_count ()
-
Get the total number of actions.
Returns:
-
number
- glTFAnimation:update (dt)
-
Update animations.
Parameters:
- dt number