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 6 support #87

Open
sergaks opened this issue Apr 19, 2021 · 20 comments
Open

PIXI 6 support #87

sergaks opened this issue Apr 19, 2021 · 20 comments

Comments

@sergaks
Copy link

sergaks commented Apr 19, 2021

Are there any plans to support PIXI 6?

@ivanpopelyshev
Copy link
Collaborator

currently im moving pixi-spine to v6, its almost ready, projection is next.

As for projection, it should work like that, the old way, with window.PIXI=PIXI , and without typings.

@jahnli
Copy link

jahnli commented Apr 26, 2021

@ivanpopelyshev
However, it still cannot be used at present. May I ask if you can provide a demo

image

image

@PabloNeirotti
Copy link

PabloNeirotti commented Jun 24, 2021

Same. Writing the same thing and it isn't working. In my case I get:

Attempted import error: 'projection' is not exported from 'pixi.js-legacy' (imported as 'PIXI').

(Error probably triggering on the first line that attempts to use the camera: new PIXI.projection.Camera3d())

@ivanpopelyshev
Copy link
Collaborator

use require, not import. Or wait when i convert it at last :)

@qtiki
Copy link

qtiki commented Jun 24, 2021

@ivanpopelyshev do you have a plan/estimate when you would be looking into this? I could take a peek at some point now that my pixi-particles v6 port PR has been approved. If you're going to do this soon then there's no point for me to look at it since you'll probably get it done much faster anyways and I'd like to avoid us doing the same work twice.

@ivanpopelyshev
Copy link
Collaborator

this week probably. The problem is that i want to separate it to multiple packages so it will be something like pixi-spine by structure.

@PabloNeirotti
Copy link

PabloNeirotti commented Jun 24, 2021 via email

@qtiki
Copy link

qtiki commented Jun 24, 2021

The problem is that i want to separate it to multiple packages so it will be something like pixi-spine by structure.

@ivanpopelyshev I guessed you might have some plans like that. That does make it a bit more complicated so I'll keep my fingers off the plugin for now. 😅

@ivanpopelyshev
Copy link
Collaborator

pixijs/pixijs#7548 got merged, hope new release soon , i need this for projection too

@vkarponen
Copy link

Any news on progress?

@ivanpopelyshev
Copy link
Collaborator

@vkarponen tomorrow!

@ivanpopelyshev
Copy link
Collaborator

ivanpopelyshev commented Jul 4, 2021

OK, now we have a problem: current version that projection typings work with [email protected]. There are a few possible problems with that versions number, for example you cant use pixi-spine with it because it does not satisfy the "peer-dependency" condition

@miltoncandelero
Copy link

What's your dependency on pixi spine? Spine can work on 6 or greater, this works on 6.1 or greater, shouldn't be an issue 🤔

@ivanpopelyshev
Copy link
Collaborator

c:\rep\pixi-games\pixi-projection>npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @pixi/[email protected]
npm ERR! node_modules/@pixi/constants
npm ERR!   dev @pixi/constants@"^6.1.0-rc.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @pixi/constants@"^6.0.2" from @pixi-spine/[email protected]
npm ERR! node_modules/@pixi-spine/base
npm ERR!   dev @pixi-spine/base@"^3.0.4" 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.

@ivanpopelyshev
Copy link
Collaborator

The main problem is that if i remove spine dep, then someone else can try to use pixi-spine with pixi-projection and it'll be problem for him anyway

@miltoncandelero
Copy link

I don't say remove the dep, I mean write it differently.
>=6 would work but when 7 comes out it won't give you an error., Or you can ^6.0.0||^6.1.0

(Syntax might be off, I am from my phone)

@ivanpopelyshev
Copy link
Collaborator

OK, that can wait, i just put as any in many places with a comment that i'll remove in 6.1.0. I hope that doesnt affect user code :)

@ivanpopelyshev
Copy link
Collaborator

Done, try 0.4.1 in npm

@bjindal-ig
Copy link

@ivanpopelyshev I tried using 0.4.1 in npm and had the following error:
game-main.js:83709 Uncaught RangeError: Maximum call stack size exceeded
at h.convertTo3d

when using modules. So, for now I modified the function PIXI.Sprite.prototype.convertTo3d which had convertTo3d.call(this); to PIXI.Container.prototype.convertTo3d.call(this);

This solves the issue for me, Is there a better approach which could be updated in the package?

@ivanpopelyshev
Copy link
Collaborator

ivanpopelyshev commented Aug 2, 2021

oh !@#$
OK, 0.4.2 fixed.

24787ea

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

8 participants