Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixi.js v7.x & pixi-spine compatibility #115

Open
kulabros opened this issue Mar 22, 2023 · 10 comments
Open

Pixi.js v7.x & pixi-spine compatibility #115

kulabros opened this issue Mar 22, 2023 · 10 comments

Comments

@kulabros
Copy link

kulabros commented Mar 22, 2023

Hi, is there a chance to have/make this pixi-projection be compatible with newest pixi.js release? My build fails at pixi-spine related deps, as I'm trying to install with newest pixi.js and pixi-spine libs versions. Installations fails at @pixi/utils dependency, which I have installed separately and also next fail is at @pixi/core, @pixi/spine.. Am I missing something new to do to make this version be installed? Thanks a LOT for any help.

@kulabros kulabros changed the title Pixi.js v7.x compatibility Pixi.js v7.x & pixi-spine compatibility Mar 22, 2023
@kulabros
Copy link
Author

kulabros commented Mar 22, 2023

I've removed @pixi/utils dependency, that should be included in @pixi/core since I've read release notes further to older releases. Now there's only pixi-spine incompatibility problem, when I try to install pixi-projection.

npm install pixi-projection
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @pixi/[email protected]
npm ERR! node_modules/@pixi/core
npm ERR! peer @pixi/core@"^7.0.0" from @pixi-spine/[email protected]
npm ERR! node_modules/@pixi-spine/base
npm ERR! peer @pixi-spine/base@"^4.0.0" from @pixi-spine/[email protected]
npm ERR! node_modules/@pixi-spine/loader-base
npm ERR! peer @pixi-spine/loader-base@"^4.0.0" from @pixi-spine/[email protected]
npm ERR! node_modules/@pixi-spine/loader-uni
npm ERR! @pixi-spine/loader-uni@"^4.0.3" from [email protected]
npm ERR! node_modules/pixi-spine
npm ERR! 1 more (pixi-spine)
npm ERR! peer @pixi-spine/base@"^4.0.0" from @pixi-spine/[email protected]
npm ERR! node_modules/@pixi-spine/loader-uni
npm ERR! @pixi-spine/loader-uni@"^4.0.3" from [email protected]
npm ERR! node_modules/pixi-spine
npm ERR! pixi-spine@"^4.0.3" from the root project
npm ERR! 5 more (@pixi-spine/runtime-3.7, @pixi-spine/runtime-3.8, ...)
npm ERR! peer @pixi/core@"^7.0.0" from @pixi-spine/[email protected]
npm ERR! node_modules/@pixi-spine/loader-base
npm ERR! peer @pixi-spine/loader-base@"^4.0.0" from @pixi-spine/[email protected]
npm ERR! node_modules/@pixi-spine/loader-uni
npm ERR! @pixi-spine/loader-uni@"^4.0.3" from [email protected]
npm ERR! node_modules/pixi-spine
npm ERR! pixi-spine@"^4.0.3" from the root project
npm ERR! @pixi-spine/loader-base@"^4.0.3" from [email protected]
npm ERR! node_modules/pixi-spine
npm ERR! pixi-spine@"^4.0.3" from the root project
npm ERR! 70 more (@pixi-spine/loader-uni, @pixi-spine/runtime-3.7, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! pixi-projection@"" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @pixi/[email protected]
npm ERR! node_modules/@pixi/core
npm ERR! peer @pixi/core@"^6.0.4" from [email protected]
npm ERR! node_modules/pixi-projection
npm ERR! pixi-projection@"
" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

EDIT: --legacy-peer-deps does not work at all, but --force options seems to install the deps but anyway, npm ci than fails on existing deps, so it's useless trying to force to use peer deps..

Is this planned to be updated? Thank you

@ivanpopelyshev
Copy link
Collaborator

working on it

@kulabros
Copy link
Author

kulabros commented Mar 22, 2023

Very cool, good luck! Thank you for quick reply

@venaissance
Copy link

Looking forward to your good results. @ivanpopelyshev

@kareljuricka
Copy link

Any update @ivanpopelyshev ?

@ivanpopelyshev
Copy link
Collaborator

done, version 1.0.0 , pelase check. cant upload to github yet , and i didnt test it with spine

@ivanpopelyshev
Copy link
Collaborator

It works with spine, Re-newed examples will be up soon on official site.

@gabrielliwerant
Copy link

It works with spine, Re-newed examples will be up soon on official site.

The example links in the repo readme are dead. Any updates?

@kulabros
Copy link
Author

kulabros commented Oct 21, 2024

Hello, I'm back after a while.. Thank you for the updated version! I'm successfully running my big project with all plugins on latest v7 version, including pixi-spine and pixi-projection. It works fine.

But I've found one problem with applySpine2dMixin. If I apply this mixin to the SpineBase.prototype, most of the cases works well, but there's one composition of three spine animations in container's under it's top container, and when there's the mixin applied, animation is rendered bad, there's another inserted image (different images) in the animation, where it should not be.

I think it's something around the transform hack, or the mesh is not read correctly. I'm trying to figure out, from where I can import Spine2d module, because I can't find it in the 1.0.0 version.

The about text says "You can apply mixin from @pixi-spine/projection to force spine objects to spawn 2d or 3d instances of sprites and meshes." Example code has deps to 'pixi-projection' and '@pixi-spine/base'

Q1) From where should I import the Spine2d correctly?
Q2) Is it possible there's a bug, of reading the 2d mesh container, when mixin applied and there's multiple spine animations in the container?

"@pixi-spine/base": "^4.0.3",
"@pixi-spine/runtime-4.1": "^4.0.3",
"@pixi/animate": "^3.0.1",
"pixi-filters": "^5.3.0",
"pixi-particles": "^4.3.1",
"pixi-projection": "^1.0.0",
"pixi-spine": "^4.0.4",
"pixi-timer": "^1.0.1",
"pixi.js": "^7.4.2",

Have a nice day :)

@kulabros
Copy link
Author

I found, that when I use the applySpine2dMixin method directly to the Spine constructor's I'm using, it works!

Only if I call applySpine2dMixin with SpineBase.prototype parameter, then I have the rendering/mesh problem, where another image is in the spine animation, that should not be there.

Anyway, I have imported the pixi-projection 1.0.0 and I can't see the export for the Spine2d, but when I look here at the repo, it should be there. Is the applySpine2dMixin the best/only method?

I know I can use convertTo2d, but that is for existing Container instance.

When I want to create Spine2d constructor for later instancing, I'd need the Spine2d module, which I can't find.

Now I fixed the problem, calling the applySpine2dMixin only to the constructors I create, not to the SpineBase.prototype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants