xiushihuatie

It's very difficult to understand what's going on without seeing the code.
Can you show us the new version of the code?

Related Discussions
...

我们主要对pixijs做了升级,还有对应的spine-pixi进行了更换,但是效果上出现了问题,https://spine-demo-jade.vercel.app/,这个是我们原来的展现形式,都是通过动画和插槽实现的功能,但是pixijs8 版本的剪裁功能不生效了,请麻烦排查一下问题

demo.zip
1MB

Thanks for providing us with the code.

From what I can see, you just added the spine-pixi runtime to the package.json, but you are still using pixi-spine. spine-pixi is not yet compatible with Pixi 8, so if you want to use the latest version, you have to use pixi-spine as you are doing right now.

Unfortunately, as far as I can see from the pixi-spine repository, clipping attachments are not yet fully functional. I suppose the best thing you can do to work with clipping attachments is to downgrade to version 7 of Pixi, right now.

    Davide 感谢你的回复,原来是兼容性的问题,我去和程序沟通一下。

    a month later

    太恐怖了,我们之后尝试了pixi8,简直是一场灾难,它的动画融合功能完全是错的,我们不得不含泪使用7,我一整个月都在为了7的简陋而不断地做无用功……

      xiushihuatie

      I'm sorry to hear that. We're working with the pixi team to make a stable runtime that works with pixi8. Unfortunately, the changes to pixi8 were so many that it is taking longer than expected.
      I've recently made several PRs to stabilize the runtime, and clipping attachments should work now. However, since the pixi runtime for pixi8 is still under development, I don't think it's wise to use it right now.

      However, spine-pixi, our current official runtime, is stable and works efficiently with pixi7 offering the same functionalities of it. Are you encountering any problem using it?

        Davide 我们确实遇见了,这件事说来话长,因此我跳过一切前置,来向您传达到现在也没有解决的重大疑问:

        spine的导出是带有一个宽高的,在它的json文件里,我们起初以为是四个骨骼+图片设在四角就可以决定它的宽高,然后却发现并不是这样计算的,spine的宽高对我们来说非常重要,它到底由什么决定?

        All json properties are explained in the JSON export format guide in here.

        The height and width property of a skeleton are:

        width: The AABB width for the skeleton's attachments as it was in the setup pose in Spine. This can be used as a general size of the skeleton, though the skeleton's AABB depends on how it is posed.
        height: The AABB height for the skeleton's attachments as it was in the setup pose in Spine.

        It implies that they represent the rectangle containing the skeleton during the setup pose.

        If you need to know precisely the height of a certain animation, there are runtime APIs that can help you calculate it precisely.
        However, it's unclear to me which runtime and version you are using now.

        What do you need the height for? Knowing your goal might help us in giving you better advice.

          a month later

          Davide Davide pixi7无法获得spine的某个骨骼坐标系,我们必须要写死一个宽高然后进行后续的招式和动画的制作。

            xiushihuatie

            You can transform Spine coordinates to Pixi coordinates and vice versa using the skeletonToPixiWorldCoordinates and pixiWorldCoordinatesToSkeleton functions respectively.

            Moreover, you can get the bounds (x, y, width, height) of the current pose by using Skeleton.getBounds (or Skeleton.getBoundsRect). If you iterate over the frames of an animation, you can get the animation bounds and transform them to the Pixi coordinate system.

              a month later

              Davide 十分感谢您的指教。 spine4.2的版本现在如何能够最无损地导出像素gif呢,期待您的回复

                xiushihuatie

                Hello again 🙂

                There's nothing particularly complicated in the export settings. The higher the quality, the better the result. My advice is to have a look at the user guide's dedicated section and play with the settings. Be aware that depending on your settings, the file size can significantly increase.

                You might also consider using the APNG format. As stated in the doc:

                APNG is a lossless animated image format that supports transparency, so no loss of quality will occur.

                However, keep in mind that APNG is not as widely supported as GIF.