Class TransformAnimationComponent

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class TransformAnimationComponent : public Component

Manages animations based on provided keyframes.

Public Types

enum TransitionType

First word is for incoming, second word for outgoing.


SmashSmash = 0
EaseEase = 1
SmashEase = 2
EaseSmash = 3
enum AnimationMode


None = 0
Looping = 1
Alternating = 2

Public Functions

TransformAnimationComponent(Entity &owner, const JSON::json &data)
void pushKeyframe(const Keyframe &keyFrame)
void popKeyframe(int count)
bool isPlaying() const
bool isPlayOnStart() const
bool hasEnded() const
float getStartTime() const
float getEndTime() const
void reset()
void interpolate(float t)
void setPlaying(bool enabled)
bool setupData()

Perform setting up internal data needed from other components after they have been added to the owning entity.

JSON::json getJSON() const

Get JSON representation of the component data needed to re-construct component from memory.

void draw()

Expose the component data with ImGui.

struct Keyframe

Public Members

float timePosition
Matrix transform