Closed salojoo closed 1 year ago
@Zyie I remember that we had this working, I'm wondering if it's related to non-legacy packages being peerDependencies
of @pixi/react
?
I'm considering whether we should nuke all pixi packages from peerDependencies
and just explicit instruct users to install it alongside pixi-react?
@Zyie I remember that we had this working, I'm wondering if it's related to non-legacy packages being
peerDependencies
of@pixi/react
?I'm considering whether we should nuke all pixi packages from
peerDependencies
and just explicit instruct users to install it alongside pixi-react?
I don't think that is the issue
The pixi legacy packages are just mixins for the normal pixi packages so as long as they are installed and imported then it should work.
pixi.js-legacy
will import these mixins so as long as import 'pixi.js-legacy'
is called within the project everything should work
Also for this example Filters do not work in pixi-legacy which may be why it is not working
I removed the filtering, but the error still persist
Tried updating pixi.js to 7.2.0 and pixi-react to 7.03, but no luck. Adding import 'pixi.js-legacy'
doesn't help either
I'm having trouble building and running the repo locally so didn't manage to create a patch, but the problem seems to be that Pixi v7 deprecated context
in favor of canvasContext
.
https://pixijs.download/dev/docs/PIXI.CanvasRenderer.html#context
should be fixed in 7.1.0
!
thanks for the help @salojoo
Current Behavior
Cannot use canvas with legacy pixi package.
Unable to auto-detect a suitable renderer.
. This can be fixed withimport "@pixi/canvas-renderer";
this.app.renderer.context.extensions is undefined
Expected Behavior
Should render with canvas using
forceCanvas
option.Steps to Reproduce
https://codesandbox.io/s/heuristic-booth-0pzgbk
Environment
@pixi/react
version: 7.0.2pixi.js-legacy
version: 7.1.4React
version: 18.2.0ReactDOM
version: 18.2.0Possible Solution
No response
Additional Information
No response