Search the Community
Showing results for tags 'emit'.
Hello, I'm trying to understand how some parts of Phaser work. But I'm confused by the emit functions. For example arcade/world.js script at https://github.com/photonstorm/phaser/blob/master/src/physics/arcade/World.js contains: ... this.emit('overlap', body1.gameObject, body2.gameObject, body1, body2); ... this.emit('collide', body1.gameObject, body2.gameObject, body1, body2); ... sprite.emit('overlap', body.gameObject, tile, body, null); ... sprite.emit('collide', body.gameObject, tile, body, null); ... the same in many other places in Phaser. Please explain how to find the
Apologies for what is a very vague question. My game runs fine for quite awhile, but eventually starts to spend 90% of its time (checked via chrome's profiler) in the emit function from pixi. I can't really share the ~18k lines of code, but I only do a few things in pixi so maybe someone knows right away that one of these things is an issue. It is a bit difficult for me to find the issue as it does take quite awhile to appear. Are any of these things suspects for causing pixi to 'emit' more and more over time? animating by changing a sprite texture: this.body.texture = PIXI.Texture
Hi, I try to search everywhere and I only found one example which is in ReactPIXI. My question is how I can make React communicate/emit data to PixiJs ? For example, React emit data and it listened by Pixi. Is there any good example out there? Thank you.