pixi-projection
pixi-projection copied to clipboard
PIXI 6 support
Are there any plans to support PIXI 6?
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.
@ivanpopelyshev
However, it still cannot be used at present. May I ask if you can provide a demo


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())
use require, not import. Or wait when i convert it at last :)
@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.
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.
I tried both! I get the same issue with both, unfortunately.
On Jun 24, 2021, at 4:37 PM, Ivan Popelyshev @.***> wrote:
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.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
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. 😅
https://github.com/pixijs/pixijs/pull/7548 got merged, hope new release soon , i need this for projection too
Any news on progress?
@vkarponen tomorrow!
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
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 🤔
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.
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
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)
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 :)
Done, try 0.4.1 in npm
@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?
oh !@#$ OK, 0.4.2 fixed.
https://github.com/pixijs/pixi-projection/commit/24787ea4315063ef8009abaeb0a23765898e94c8