-
-
Notifications
You must be signed in to change notification settings - Fork 444
ISSUE #3100: Add support for different animations mode, reverse, ping pong, looping or not #3385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
2f3c864
f84dfca
dd6eb26
3f4f307
031016f
09c6cb2
d8ef127
cae3097
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -212,6 +212,16 @@ class animationManager | |
| */ | ||
| void SetCheatSheetConfigured(bool configured); | ||
|
|
||
| /** | ||
| * Internal setter for Mode. | ||
| */ | ||
| void SetAnimationMode(const std::string& mode); | ||
|
|
||
| /** | ||
| * Internal setter for repeats. | ||
| */ | ||
| void SetAnimationRepeat(int repeat); | ||
|
|
||
| options& Options; | ||
| window_impl& Window; | ||
| vtkF3DMetaImporter* Importer = nullptr; | ||
|
|
@@ -231,6 +241,20 @@ class animationManager | |
| // Dynamic options | ||
| bool Autoplay = false; | ||
| double SpeedFactor = 1.0; | ||
|
|
||
| /** | ||
| * Enum listing possible blending modes. | ||
| */ | ||
| enum class AnimationModeType : unsigned char | ||
| { | ||
| FORWARD, | ||
| BACKWARD, | ||
| PINGPONG | ||
| }; | ||
| AnimationModeType AnimationMode = AnimationModeType::FORWARD; | ||
| int AnimationMaxRepeat = -1; | ||
| int AnimationModeDirection = 1; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is the point of this ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, you're right. That's a typo in the comment; it should be replaced with "Enum listing possible animation modes." The purpose of this code is to manage animation modes, repeat counts, and animation direction (depending on the mode). |
||
| int AnimationCurrentRepeat = 0; | ||
| }; | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # StreamVersion 1.2 | ||
| # Start animation mode backward | ||
| KeyPressEvent 989 6 0 32 1 space 0 | ||
| CharEvent 989 6 0 32 1 space 0 | ||
| KeyReleaseEvent 989 6 0 32 1 space 0 | ||
|
|
||
| # Time for moving | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
| TimerEvent 989 6 0 32 1 space 0 | ||
|
|
||
| # Stop animation mode backward | ||
| KeyPressEvent 989 6 0 32 1 space 0 | ||
| CharEvent 989 6 0 32 1 space 0 | ||
| KeyReleaseEvent 989 6 0 32 1 space 0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # StreamVersion 1.2 | ||
| # Start animation mode forward | ||
| KeyPressEvent 8 16 0 32 1 space 0 | ||
| CharEvent 8 16 0 32 1 space 0 | ||
| KeyReleaseEvent 8 16 0 32 1 space 0 | ||
|
|
||
| # Time for moving | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
| TimerEvent 8 16 0 32 1 space 0 | ||
|
|
||
| # Stop animation mode forward | ||
| KeyPressEvent 8 16 0 32 1 space 0 | ||
| CharEvent 8 16 0 32 1 space 0 | ||
| KeyReleaseEvent 8 16 0 32 1 space 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens with 0 btw ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... maybe the animation shouldn't run at all, so we need to add an additional condition in code (we have one tick before stop now)