pixijs / spine-v8

PixiJS v8 port of the official spine runtime
https://pixijs.io/spine-v8/examples/
MIT License
38 stars 6 forks source link

Bug: mesh parts of Spine are not shown when using basis texture #7

Closed EneaEntertainment closed 1 week ago

EneaEntertainment commented 5 months ago

When png texture is used, everything works, but when basis texture is used for Spine, mesh parts are invisible.

Screenshot 2024-06-03 at 07 41 20

Demo: https://pixi8spine.enea.sk/ Repo: https://github.com/EneaEntertainment/pixi-8-spine

PixiJS 8.1.5, spine-pixi 1.0.10

Zyie commented 5 months ago

Hey, I believe we have fixed this in 1.1.0, feel free to reopen if not!

EneaEntertainment commented 5 months ago

sorry, same in 1.1.0

hotyes commented 5 months ago

Hello, any workaround for this issue?

davidetan commented 3 months ago

Spine expects the image of the texture to be an HTMLImageElement or an ImageBitmap. That's not the case when texture-basis is provided (an Array is received).

HTMLImageElement and ImageBitmap have both width and height properties that spine-core 4.1 used to get the width/height of the texture. These values are used to calculate the uvs that in case of meshes becomes NaN since width and height do not exists.

spine-core 4.2 no longer relies anymore on width and height of the image, but uses the information provided by the atlas file.

I'll try to backport to 4.1 the way the width and height of the image is read in 4.2.

Zyie commented 1 week ago

Hi

We have now moved this project to the official Esoteric Software repo for them to maintain. As a result we will be archiving this repo and closing all issues. If you still are having this issue please feel free to open an issue over on the new repo!

As for migrating between the projects it should be as simple as swapping out the imports from @pxi/spine-pixi to @esotericsoftware/spine-pixi-v8