Purgeri Posted February 26, 2018 Share Posted February 26, 2018 Can I give id to PIXI.application or what is the best practice to addEventListener to canvas? document.getElementByTagName('canvas')[0] sound a bit ugly solution. Quote Link to comment Share on other sites More sharing options...
AndersSpandex Posted November 16, 2022 Share Posted November 16, 2022 Hello! Kind of late reply maybe. But you can do it by setting an id on the view like e.g., this: const app = new PIXI.Application(); app.view.id = 'theIdYouWantToSet'; Hope this helps. /Anders 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.