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