AnimationManager: Difference between revisions
From Crumbled World Wiki
(Created page with "{{:AnimationManagerExampleCode}} ==Constructor== {| class="wikitable" !|function !|description |- |AnimationManager() | |- |} ==Functions== {| class="wikitable" !|return !|function !|description |- | |update(float deltaTime)) |Update the animation, step animation one frame forward. This is done automatically in model. |- | |stopFade(string name, float time) |Sto...") |
(No difference)
|
Latest revision as of 12:57, 5 July 2025
Constructor
| function | description |
|---|---|
| AnimationManager() |
Functions
| return | function | description |
|---|---|---|
| update(float deltaTime)) | Update the animation, step animation one frame forward. This is done automatically in model. | |
| stopFade(string name, float time) | Stop the named animation over the given time. | |
| stopFade(float time) | Stop all animation over the given time. | |
| stop(string name) | Stop the named animation immediately. | |
| stop() | Stop all animation immediately. | |
| rewind(string name) | Set current time of an animation to 0. | |
| fastForwardAnimations(float time) | moves all animations forward with set amount. | |
| bool | isPlaying(string name) | Is the named animation playing. |
| bool | isPlaying() | Is any animation playing. |
| play(string name, number speed, PlayMode mode) | Play the given animation at a fixed speed. | |
| blend(string name, float fadeLength, PlayMode mode) | Blend in animation. and stop other animation. | |
| crossFade(string name, float fadeLength, PlayMode mode) | Blend in animation. ande fade out other animations | |
| crossFadeQueued(string name, float fadeLength, QueuedMode mode, PlayMode mode) | Blend in animation. ande fade out other animations | |
| play(string name, QueuedMode mode, PlayMode mode) | Play the given animation as fast the queueing is done. | |
| Vec3 | getBonePosition(string name) | Get bone local position from name. |
| Matrix | getBoneMatrix(string name) | Get bone local matrix from name. |
| float | getFrameTimeFromClip(string name) | Returns the frame the animation is on if it isPlaying(name), or it returns -1 |
| float | getLengthOfClip(string name) | Returns the length of the animation if found, or it returns -1 |
| table | getNameListOfClips() | Returns a table with the names of all animations |