The animation tool now works and I used it to design an idle animation with the classic bounce.
This commit is contained in:
parent
80f100f223
commit
547e8ec993
3 changed files with 9 additions and 15 deletions
|
|
@ -81,7 +81,7 @@ namespace animate2 {
|
||||||
bool frame_change = false;
|
bool frame_change = false;
|
||||||
|
|
||||||
if(elapsed < duration) {
|
if(elapsed < duration) {
|
||||||
// BUG: subframe will just run crazy because I don't actually do delta time difference here vvvvv
|
// BUG: subframe will just run crazy because I don't actually do delta time difference here
|
||||||
sequence.subframe = std::lerp(sequence.subframe, 1.0, sequence.timer.DELTA * transform.ease_rate);
|
sequence.subframe = std::lerp(sequence.subframe, 1.0, sequence.timer.DELTA * transform.ease_rate);
|
||||||
} else {
|
} else {
|
||||||
sequence.timer.restart();
|
sequence.timer.restart();
|
||||||
|
|
|
||||||
|
|
@ -38,17 +38,17 @@
|
||||||
"motion": "move_shake"
|
"motion": "move_shake"
|
||||||
},
|
},
|
||||||
"breathe": {
|
"breathe": {
|
||||||
"min_x": 0.90,
|
"min_x": 0,
|
||||||
"min_y": 0.90,
|
"min_y": 0,
|
||||||
"max_x": 1.0,
|
"max_x": 0,
|
||||||
"max_y": 1.0,
|
"max_y": -10,
|
||||||
"flipped": false,
|
"flipped": false,
|
||||||
"ease_rate": 3.5,
|
"ease_rate": 3.0,
|
||||||
"scaled": true,
|
"scaled": false,
|
||||||
"toggled": false,
|
"toggled": false,
|
||||||
"looped": true,
|
"looped": true,
|
||||||
"easing": "in_out_back",
|
"easing": "sine",
|
||||||
"motion": "scale_squeeze"
|
"motion": "move_bounce"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"forms": {
|
"forms": {
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,6 @@
|
||||||
#include <ranges>
|
#include <ranges>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/*
|
|
||||||
* TODO:
|
|
||||||
*
|
|
||||||
* - Bring back shaders.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
|
|
||||||
bool YES_SYNC=true;
|
bool YES_SYNC=true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue