Skip to content

Animation : duration per frame not working #7103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
supertanuki opened this issue Apr 7, 2025 · 1 comment
Open

Animation : duration per frame not working #7103

supertanuki opened this issue Apr 7, 2025 · 1 comment

Comments

@supertanuki
Copy link

supertanuki commented Apr 7, 2025

Version

  • Phaser Version: tested in 3.88.2, 4.0.0-rc.1
  • Operating system: Any (Ubuntu...)
  • Browser: Any (Firefox, Chrome..)

Description

In the doc https://docs.phaser.io/phaser/concepts/animations#add-animation we can specify a duration per frame :

this.anims.create({
  key: "spikes",
  repeat: -1,
  defaultTextureKey: "spikes",
  duration: 3300,
  frames: [
    { frame: 0, duration: 3000 },
    { frame: 1, duration: 100 },
    { frame: 2, duration: 200 },
    ...
  ],
});

This does not work. In the game, all frames have the same duration.

Nota : not fixed by the commit mentioned here #7070 (tested on 4.0.0-rc.1)

Example Test Code

Not working version with phaser 3.88.2 on jsfiddle

Working version with phaser 3.87.0 on jsfiddle

@paulcoyle
Copy link

I have tested this on 4.0.0-rc.2 and it appears to be working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants