Ezelia / EZGUI

EZGUI - The missing GUI for Pixi.js and Phaser.io
http://ezgui.ezelia.com
440 stars 95 forks source link

EZGUI doesn't work with phaser 2.4.4 #30

Closed Dreaded-Gnu closed 8 years ago

Dreaded-Gnu commented 8 years ago

The gui library doesn't work any longer with version 2.4.4 of phaser. Within the browser the following error is thrown:

Uncaught TypeError: Cannot read property 'resolution' of undefined PIXI.CanvasRenderer @ phaser.js:20082 (anonymous function) @ EZGUI.js:652

With phaser 2.4.2 it works quite well. To reproduce it, replace content of phaser-2.4.2.js with phaser 2.4.4 release.

All I'm doing is including the ezgui library at header right after phaser and phaser compat: < script src="vendor/phaser/phaser.js">< /script> < script src="vendor/ezgui/phaser-compat-2.4.js">< /script> < script src="vendor/ezgui/EZGUI.js">< /script>

Difference between Phaser 2.4.2 and 2.4.4 is that Pixi.CanvasRenderer awaits a phaser game object.

scabros commented 8 years ago

hi, yes, is true. you can view a workaround about this here:

https://github.com/Ezelia/EZGUI/issues/11

near the end

alaa-eddine commented 8 years ago

Just pushed a new version with a partial fix. this fix works fine with Canvas Renderer but webGL renderer seem to have an issue. this seems to be related to phaser code but I need to isolate it in a separate example so I can open an issue on phaser repository.

alaa-eddine commented 8 years ago

Update : the issue with WebGL renderer is due to a phaser issue which was fixed here : https://github.com/photonstorm/phaser/issues/2141

since the patch is still not available in official branch here is a patched version http://ezgui.ezelia.com/js/phaser-2.4.4.js