Closed CodeAndWeb closed 4 weeks ago
oh ! interesting ! thank you for reporting it !
Same problem when creating a single sprite with atlas.createSpriteFromName("spritename")
. Is multi-pack supported at all? or am I doing something wrong?
well it is supposed to be supported, but I guess either with limitations, or we had some regression in the last few versions, I'll definitely look into it
Hi, so I cloned your git, executed it and ...... it's just working here ....
is there something I'm missing to reproduce the bug ?
Have you checked out the "multipack-broken" branch?
of course it did not.... sorry, I did not realize there was a specific branch for it. Saw it now and indeed it's not working properly
Dear Olivier,
Facing same problem on WebGL:
Canvas is working fine:
Have already updated my package to the latest melonJS release
wow thank you ! I was really scratching my head with this one, looking at the logic implementation of the multi-texture TextureAtlas support, and could not find what was wrong. Now thank to you, I know that the issue is with the WebGL renderer, and now I know where to look !
I managed to pin point the issue, it's actually a regression following that change : https://github.com/melonjs/melonJS/commit/16c5d3c8e369a333e1dde7be3482cd32d50d472d
fixed in version 17.3.0
When an animated sprite is created with
createAnimationFromName()
on a TextureAtlas which has multiple textures ("multi-pack"), all animation frames must be placed on the first texture. Otherwise the animation is broken:To Reproduce
git clone -b multipack-broken https://github.com/CodeAndWeb/melonjs-sprite-sheet-example.git
npm run dev