Not yet, but I think your proposal is a great idea to handle tightly packed assets. Excalibur sprites are already just coordinates over a backing texture so it should be possible to build this pretty easily.
In the mean time you could construct each Sprite of the animation by hand and build an Animation that way. Animations are really just a list of sprites.
Load up the texture that contains the packed sprite sheet then plug in your values.
https://excaliburjs.com/docs/api/edge/classes/_drawing_sprite_.sprite.html
https://excaliburjs.com/docs/api/edge/classes/_drawing_animation_.animation.html
I'll open an issue on Excalibur for this to be more convenient off of spritesheets
Hi!Most of the image resources I have are not aligned in rows and columns but are tightly packed, e.g. lots of resources from kenney.nl. This means I can't use them to create an ex.Spritesheet. Is there any way to create an animation from the single sprites from a texture? E.g. pass an array of {x,y,w,h} objects instead of indices on getAnimationByIndices?
--
You received this message because you are subscribed to the Google Groups "excaliburjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excaliburjs...@googlegroups.com.
To post to this group, send email to excal...@googlegroups.com.
Visit this group at https://groups.google.com/group/excaliburjs.
To view this discussion on the web visit https://groups.google.com/d/msgid/excaliburjs/23db9c26-a8a4-454e-851e-917198439e77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
this.addDrawing(new ex.Animation(this._engine, [new ex.Sprite(...), new ex.Sprite(...)], this._speed, true));