-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
How to use PIXI.Application() when there is already a canvas element in HTML? #6391
Comments
Do something like you were doing in v4, pass the const app = new Application({ view: document.getElementById(“board”) }) Check out the docs: http://pixijs.io/docs |
Thank you, I will try this right away and report back. |
Thank you, the following has worked for me and I will report later if that elderly lady with the weird Yandex browser replies. My new code is:
|
I reopen issue because this is feature support problem. У вас другая проблема, как я вижу по скриншоту.
|
Thanks for your comment Konstantin and let's stick to English lanuage :-) Do you mean I should keep the
and add another line with pixi.js-legacy.js? And how to get it activated? |
Legacy build is same as pixi.js build, but include canvas renderer. Pass |
Yes, the lady just reported back, that her issue "This browser does not support WebGL" is not solved - so switching to PIXI.Application was not enough there. But I think I will better ignore her problem, because I don't want to downgrade the experience of all the rest users by switching to legacy and Thank you |
Pixi (pixi legacy) must automatically detect supported renderer ('forceCanvas:false') when you use Application. If it isn't true, it is bug. |
This seems answered now. Can we close this @eXponenta? |
Good evening,
my issue is not a bug, but more my difficulty to understand the documentation.
I am using pixi.js version 5.2.0 to create a word app at Facebook and your library is great, thank you all very much for developing it.
However recently I have migrated my code from pixi.js 4 to 5 and I am not sure how to change my code:
My problem is that the v5 doc suggests:
But I already have a canvas element in my HTML file:
How can I please use the new PIXI.Application, but attach it to the existing canvas element?
As you see probably see from my code I am not very proficient in the latest Javascript syntax, but I think my issue is very simple, I am just missing some guidance. Thank you.
Environment
pixi.js
version: 5.2.0Here the error reported by some of my game users (using Opera browser or maybe Yandex browser - the communication with the user is challenging, she is an elderly lady):
The text was updated successfully, but these errors were encountered: