You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current state, you must reverse the animation frames to reverse the order of animation. See discussion
// Pseudo codeconstforwards=ex.Animation({...});// animation that endsconstbackwards=forwards.clone();backwards.frames.reverse();// reverses in place, okay because clone() creates a new frames list so the 'forwards' animation should be fineconstactor=newex.Actor({...});actor.graphics.use(forwards);forwards.events.on('end',()=>{actor.graphics.use(backwards);});
Proposal
Add a property or method to reverse the direction of play.
Possilbly? API design notes welcome
constanimation=newex.Animation({...});animation.reverse();// reverse the play directionanimation.direction;// Forwards or backwards sentinel
The text was updated successfully, but these errors were encountered:
Closes#2069
## Changes
- Adds `.reverse()` to animations
- Adds an optional `reverse: true` to the constructor bag
- Inspect the play direction with `.direction` and new enum
- New unit tests
Closes#2069
## Changes
- Adds `.reverse()` to animations
- Adds an optional `reverse: true` to the constructor bag
- Inspect the play direction with `.direction` and new enum
- New unit tests
Context
In the current state, you must reverse the animation frames to reverse the order of animation. See discussion
Proposal
Add a property or method to reverse the direction of play.
Possilbly? API design notes welcome
The text was updated successfully, but these errors were encountered: