Jump to content

animation frame range index


edmundep
 Share

Recommended Posts

Is it possible to give the animation a frame index range instead of listing all the frames

 

something like this

 

this.flame.animations.add('burn2',[29,59]); // will play from frame 29 - 59
this.flame.animations.add('burn',[0,59,'burn2]); // will play from 0 - 59 then play burn2 animation

 

Thanks, haven't seen anything in the docs for this. :)

 

Kyle

Link to comment
Share on other sites

If they are integers you need then you can do it like this:

animations.add('burn', game.math.numberArray(29, 59));

If you need frames from a texture atlas, then use Phaser.Animation.generateFrameNames instead.

 

Thanks for the array generator. 

I'm curious too.. I have been using createjs, its  a canvas drawing api and a pretty powerful one, but wanted to try out phaser. 

 

One thing createjs does is allow me to name animations like 

animations.add ('burn',[frames]);// then create another animation that uses some frames but also another animation.animations.add('burn2',[frames, 'burn'] // so this one at the end of all the frames plays the burn animation aswell.

Is this something that i would have to do manually? I'm assuming its not integrated in this system?  

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...