PIXI.Container don't have method containsPoint cause event cannot be triggered at Container
See original GitHub issuelet app = new PIXI.Application(800, 600);
document.body.appendChild(app.view);
app.stage.interactive = true;
app.stage.on('click', () => {
console.log('CLICKED');
})
Expect Click on stage would trigger click event.
Actual Nothing triggered
Found out the reason is PIXI.Container
doesn’t have method containsPoint
, and it lead to hitTest is skiped.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
PIXI.Container don't have method containsPoint cause event ...
Click on stage would trigger click event. Actual Nothing triggered. Found out the reason is PIXI.Container doesn't have method containsPoint , ...
Read more >PIXI.Container - PixiJS API Documentation
Container is a general-purpose display object that holds children. ... default behaviour of pixi 4.0-5.2 and caused many problems to users.
Read more >pixijs/pixi.js - Gitter
Hi, I just hit Could not find a declaration file for module '@pixi/core' when trying to use it with typescript. Any list of...
Read more >https://fgregor.com/js/pixi-5.3.3.min.js.map
n// If `Object.create(null)` is not supported we prefix the event names with ... reflex, can't be an ear\n\n // now make sure we...
Read more >Large number of interactive objects - Performance - Pixi.js
You need custom containsPoint method on container that has all those tiles. Whether you draw with graphics, sprites or pixi-tilemap.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
By the way, about box - if you try to use
width
andheight
on containers, they also work Flash way, so prepare to study docs and sources about it.It would be good if someone implements containers for for web-devs based on their DOM experience, you should go for it 😃 Basic pixi container: https://github.com/pixijs/pixi.js/blob/dev/src/core/display/Container.js
Not a bug. Either add click event to interaction manager (renderer.plugins.interaction) directly, either use background element: