Skip to content

Allow having more animations with the same sprite #92

@shikaan

Description

@shikaan

We are currently running with the assumption that animations animate all the frames in a sprite.

There are cases where the sprite does not match an animation one to one, but it's rather a collection of frames which needs to be arranged in a certain way to put together an animation.

For example,
image

Here the first and the fourth frames represent the walk down animation. It's composed of 4 frames:

  1. the fourth frame
  2. the first frame
  3. the fourth frame horizontally flipped
  4. the first frame again

It would be nice to have animations that account for this scenario. Something like

auto animation = Animation(
  "sprite",     // Sprite label
  {3, 0, 3, 0}, // Frame index to be chosen
  {{}, {}, Transform{.flipX = true}, {}}
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions