Skip to content

Add a basic animation system#232

Merged
waynemwashuma merged 25 commits into
wimaengine:devfrom
waynemwashuma:animation
Sep 5, 2025
Merged

Add a basic animation system#232
waynemwashuma merged 25 commits into
wimaengine:devfrom
waynemwashuma:animation

Conversation

@waynemwashuma
Copy link
Copy Markdown
Collaborator

@waynemwashuma waynemwashuma commented Aug 19, 2025

Objective

Introduces a foundational implementation for animation playback. It adds support for defining animation clips, associating them with entities, and driving arbitrary targets which are updated over time through animation clips.

Technical Detail

The following are new concepts introduced:

  • AnimationClip: Represents a collection of time-based animation data.Acts as the container for one or more AnimationTracks.
  • ​AnimationTrack: Defines a timeline of keyframes for a single effector type.Supports multiple effector categories:
  • AnimationEffector: Defines the way that an AnimationTrack affects an entity, component or resource.
  • AnimationPlayer : Component responsible for playback control of a multiple animation clips.
  • AnimationTarget: Component which marks an entity to be animated by an AnimationPlayer.

The following animation effectors have been implemented to test the animation system:

  • Position2DAnimationEffector: Affects the position of a 2d entity.
  • Orientation2DAnimationEffector: Affects the orientation of a 2d entity.
  • Scale2DAnimationEffector: Affects the scale of a 2d entity.
  • Position3DAnimationEffector: Affects the position of a 3d entity.
  • Orientation3DAnimationEffector: Affects the orientation of a 3d entity.
  • Scale3DAnimationEffector: Affects the scale of a 3d entity.

Future work:

  • Advanced easing functions e.g cubic, descrete.
  • Animation blending through a mixer(and maybe an animation graph)
  • Animation weights.
  • Animation masking.
  • Animation events.

Solution

N/A

Showcase

See the demo added.

Migration guide

N/A

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@waynemwashuma waynemwashuma self-assigned this Aug 19, 2025
@waynemwashuma waynemwashuma added type:enhancement New feature or request mod:animation This PR/issue affects the animation system labels Aug 19, 2025
@waynemwashuma waynemwashuma deleted the branch wimaengine:dev August 20, 2025 16:36
@waynemwashuma waynemwashuma reopened this Aug 21, 2025
@waynemwashuma waynemwashuma changed the title Animation Add a basic animation system Aug 30, 2025
@waynemwashuma waynemwashuma marked this pull request as ready for review August 30, 2025 09:17
@waynemwashuma waynemwashuma merged commit 4d0e51b into wimaengine:dev Sep 5, 2025
5 checks passed
@waynemwashuma waynemwashuma deleted the animation branch September 5, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:animation This PR/issue affects the animation system type:enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant