talicni007 Posted September 2, 2021 Share Posted September 2, 2021 Hello everyone, I am trying to replicate 3D Cards example in react https://pixijs.io/examples/#/plugin-projection/cards.js but I am facing a problem with pixi-layer https://github.com/pixijs/layers, somehow I cannot get acces to PIXI.display it is always undefined. I also had issues with linking pixi-projection with pixi.js but I solved it like this. Can someone give me some input how to proceed, thanks a lot import * as pixi from "pixi.js"; import * as projection from 'pixi-projection'; const PIXI = {...pixi, projection, application} export default PIXI; I am using these versions "@pixi/layers": "^1.0.8", "pixi-projection": "^0.4.2", "pixi.js": "^6.1.1", Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 2, 2021 Share Posted September 2, 2021 you are using `import` and webpack , right? You have to import stuff from plugins directly https://github.com/pixijs/layers#usage Or you may add "import * as display from '@pixi/layers' " and put it to your "const PIXI" Quote Link to comment Share on other sites More sharing options...
talicni007 Posted September 2, 2021 Author Share Posted September 2, 2021 Ugh, thanks. Importing is at display helped, don't know why I thought that display is a method. Thanks a lot! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.