Better support to Texture Packer

Hello. I would like to ask if you are planning to add better support for Texture Packer.
Would be nice to have at least support for:

  1. trimmed sprites
  2. rotated sprites
  3. play animation based on name. i.e sprite.playAnimation(“run_”)

We have this open issue: Add support for TexturePacker class (Texture atlas) · Issue #6877 · BabylonJS/Babylon.js · GitHub

Pinging @TheLeftover

1 Like

Greg, thanks for your comment. Your timing is excellent if you would like to steer some input on BABYLON support. You pack now with Texture Packer or is that your intention?

The current thinking is we want to unpack an incoming image file and companion JSON file following normal conventions. If there is something specific you would like to see, please do spell it out.

Also, if you would be interested in testing an early version of the module, that would be delightful.

Hello @TheLeftover I used to use Texture Packer in my previous projects but they were pure 2D with other engine. I uses it a lot at it was a simple but great way to reduce draw call - all images from the same texture were batched together.

Now i’m trying to find a good engine for next project which consist of 2D and 3D scenes and based on my exp i wanted to use TexturePacker here in similar way :slight_smile: :slight_smile:

And of course, If you have any early version of that module i would like to see it :slight_smile:

Greg, that sounds perfect. I love to have a “customer” to work with. Especially since you are familiar with using TexturePacker.

One thing that would be helpful, if you are inclined, is to upload a representative texture and companion file. I don’t think it matters if it was targeted to 2D or 3D.

This will help me with targeting. :slight_smile:

Best,

EDIT: Request fulfilled! I found such material referenced in this playground. Babylon.js Playground No surprises.

Let me come back with some more information on the upcoming feature, say Monday. After that, I can fast-track it if you need it.

Hey, yes, PG mentioned by you and this https://www.babylonjs-playground.com/#39PIWI#10. Here i’ve turned on trim and rotate options for spritesheets.

Greg, I got it. Thank you very much.

I am “on the job” as they say. I may be in touch. Please do likewise.

@Greg, question:

It seems like the existing SpriteManager is relevant functionality. See Babylon.js Playground

To me it looks like SpriteManager (and SpritePackedManager) comes up short but I wanted to make sure you were aware of it. (You did not use it in your playgrounds.)

I am thinking that the right definition for this ticket (Add TexturePack support (Texture Atlas + Json file) · Issue #5314 · BabylonJS/Babylon.js · GitHub) might be to enhance SpriteManager for better support of the TexturePacker utility.

Comments solicited.