gca Posted May 4, 2016 Share Posted May 4, 2016 Hi guys, In the last days I've been trying to compile my first game, using the cocoon cloud compiler. It's not been easy an easy task, filled with loads of trials and errors. I feel there's a huge lack of (good) documentation on the cocoon side. Either way, I finally manage to do it. However, my canvas settings (which are: game = new Phaser.Game("100%", "100%", Phaser.AUTO, 'game', null, true);) result in a white gap below the canvas element, which I think is the same as the android toolbar before it hides. Any idea on how to fix this issue? Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted May 4, 2016 Share Posted May 4, 2016 game = new Phaser.Game(window.screen.availWidth * window.devicePixelRatio, window.screen.availHeight * window.devicePixelRatio, Phaser.CANVAS, 'gamewindow'); Link to comment Share on other sites More sharing options...
gca Posted May 5, 2016 Author Share Posted May 5, 2016 On 5/4/2016 at 0:40 PM, VitaZheltyakov said: ... While it fills the whole screen, now its bigger than the screen itself. Tested in several devices and desktop Link to comment Share on other sites More sharing options...
gca Posted May 6, 2016 Author Share Posted May 6, 2016 Anyone? This is the only thing left holding me from releasing it! Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted May 6, 2016 Share Posted May 6, 2016 On 05.05.2016 at 4:24 PM, gca said: While it fills the whole screen, now its bigger than the screen itself. Tested in several devices and desktop This code works correctly with CocoonJs and Crosswalk. Not desktop, not mobile brauser Link to comment Share on other sites More sharing options...
gca Posted May 6, 2016 Author Share Posted May 6, 2016 Yes, I used the code you have given. Compiled through Cocoon, but the resolution is off. It ends up bigger than the screen (I'd say about 30-40% bigger) Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted May 7, 2016 Share Posted May 7, 2016 8 hours ago, gca said: Yes, I used the code you have given. Compiled through Cocoon, but the resolution is off. It ends up bigger than the screen (I'd say about 30-40% bigger) Try: game = new Phaser.Game(window.innerWidth * window.devicePixelRatio, window.innerHeight * window.devicePixelRatio, Phaser.CANVAS, 'gamewindow'); Link to comment Share on other sites More sharing options...
Recommended Posts