Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Name: Feature Merge
Title: Animation Modes
About: Be able to change the way the Animatronic animates/tweens between poses.
Labels: Enhancement
Assignees: Rikaisan
Description
I wanted to make an animatronic that had a really snappy and quick animation (think about a glitching/faulty robot), but that was not possible with the current implementation, so I added a new API to support what I needed + future expansion possibilities to the Animatronic:
animatronic.setAnimationType(mode)
wheremode
can be eitherrusty
orraw
for nowThe idea behind this implementation is to be able to add and support new tweening functions in the future with ease, think about the classic quadraticIn, exponentialOut, easeInOut, bounceIn and any other functions you might encounter in animation software.
Currently, I left the animation mode that was already implemented: 'rusty' as the default and added a new one: 'raw' which will skip the animation and just change the pose instantly to the one provided by the user when calling
animatronic.push()
.For now, the implementation is using a switch statement to not over-complicate the code, however, if many more modes are expected to be added in the future, it might be worth it to create an interface for animation modes.