Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/base/StarAnimatedPartSet.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2025-06-03 08:03:18 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2025-06-03 08:03:18 +1000
commit4048e211c50af86dc278f13b1b2eb2a9ec00b7bf (patch)
tree02f9be4afceb18d1e947bec7ab85afd4afaae350 /source/base/StarAnimatedPartSet.hpp
parentbb328ef289fc48743d38a3061d854bc65ce84baa (diff)
revert networked animator changes for now
Diffstat (limited to 'source/base/StarAnimatedPartSet.hpp')
-rw-r--r--source/base/StarAnimatedPartSet.hpp28
1 files changed, 3 insertions, 25 deletions
diff --git a/source/base/StarAnimatedPartSet.hpp b/source/base/StarAnimatedPartSet.hpp
index 43755be..a608924 100644
--- a/source/base/StarAnimatedPartSet.hpp
+++ b/source/base/StarAnimatedPartSet.hpp
@@ -2,7 +2,6 @@
#include "StarOrderedMap.hpp"
#include "StarJson.hpp"
-#include "StarMatrix3.hpp"
namespace Star {
@@ -47,11 +46,7 @@ public:
String stateName;
float timer;
unsigned frame;
- float frameProgress;
JsonObject properties;
- bool reverse;
- unsigned nextFrame;
- JsonObject nextProperties;
};
struct ActivePartInformation {
@@ -59,18 +54,6 @@ public:
// If a state match is found, this will be set.
Maybe<ActiveStateInformation> activeState;
JsonObject properties;
- JsonObject nextProperties;
-
- Mat3F animationAffineTransform() const;
- void setAnimationAffineTransform(Mat3F const& matrix);
- void setAnimationAffineTransform(Mat3F const& mat1, Mat3F const& mat2, float progress);
-
- float xTranslationAnimation;
- float yTranslationAnimation;
- float xScaleAnimation;
- float yScaleAnimation;
- float xShearAnimation;
- float yShearAnimation;
};
enum AnimationMode {
@@ -114,7 +97,7 @@ public:
};
AnimatedPartSet();
- AnimatedPartSet(Json config, uint8_t animatiorVersion);
+ AnimatedPartSet(Json config);
// Returns the available state types.
StringList stateTypes() const;
@@ -135,7 +118,7 @@ public:
// beginning. If alwaysStart is true, then starts the state animation off at
// the beginning even if no state change has occurred. Returns true if a
// state animation reset was done.
- bool setActiveState(String const& stateTypeName, String const& stateName, bool alwaysStart = false, bool reverse = false);
+ bool setActiveState(String const& stateTypeName, String const& stateName, bool alwaysStart = false);
// Restart this given state type's timer off at the beginning.
void restartState(String const& stateTypeName);
@@ -158,8 +141,7 @@ public:
// state type is ordered, it is possible to simply serialize and deserialize
// the state index for that state type.
size_t activeStateIndex(String const& stateTypeName) const;
- bool activeStateReverse(String const& stateTypeName) const;
- bool setActiveStateIndex(String const& stateTypeName, size_t stateIndex, bool alwaysStart = false, bool reverse = false);
+ bool setActiveStateIndex(String const& stateTypeName, size_t stateIndex, bool alwaysStart = false);
// Animate each state type forward 'dt' time, and either change state frames
// or transition to new states, depending on the config.
@@ -168,8 +150,6 @@ public:
// Pushes all the animations into their final state
void finishAnimations();
- uint8_t version() const;
-
private:
static AnimationMode stringToAnimationMode(String const& string);
@@ -178,8 +158,6 @@ private:
OrderedHashMap<String, StateType> m_stateTypes;
StringMap<Part> m_parts;
-
- uint8_t m_animatorVersion;
};
}