Valmor Posted October 24, 2017 Share Posted October 24, 2017 Hi the div in code generated from babylon playground, in .zip mode like this: <div id="canvasZone"> <canvas id="renderCanvas"></canvas> </div> I need change code, removing this because resizing or mobile device cause a problem no resizing canvas <canvas id="renderCanvas"></canvas> Is this a correct thing or did I do somenthin wrong? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 24, 2017 Share Posted October 24, 2017 Can you make sure that the css is correct? Both canvas and div should be set to 100% Quote Link to comment Share on other sites More sharing options...
Valmor Posted October 25, 2017 Author Share Posted October 25, 2017 Hi @Deltakosh Thanks for the quick response. Yes, I understand, is that in the example / code generated there is in the <style> is not in 100%, alias, there is no reference to canvasZone style. For beginners like me this can be hard to detect when it comes to learning. Congratulations for this great project image: my first tests Quote Link to comment Share on other sites More sharing options...
Valmor Posted October 25, 2017 Author Share Posted October 25, 2017 The code generated in playground: (..) <style> html, body { overflow: hidden; width: 100%; height: 100%; margin: 0; padding: 0; } #renderCanvas { width: 100%; height: 100%; touch-action: none; } </style> </head> <body> <div id="canvasZone"> <canvas id="renderCanvas"></canvas> </div> (...) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 25, 2017 Share Posted October 25, 2017 Just to be sure: this is what you should get out of the zip file. Quote Link to comment Share on other sites More sharing options...
Valmor Posted October 26, 2017 Author Share Posted October 26, 2017 hello Yes! Screenshot now!now! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 26, 2017 Share Posted October 26, 2017 Do you use engine.resize() after loading the scene. canvasZone Is totally useless, you can remove its div tags. I'm not sure I understand the problem. Quote Link to comment Share on other sites More sharing options...
Valmor Posted October 27, 2017 Author Share Posted October 27, 2017 No problem. As a initiator in BJS it look me a while to know that I was not adjusting the window because of the div. As a playground is to facilitate a learning, so I suggested this improvement. But, of course, it is not an impediment, just a suggestion. Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 27, 2017 Share Posted October 27, 2017 Will be updated in a couple of hours Valmor 1 Quote Link to comment Share on other sites More sharing options...
Valmor Posted October 27, 2017 Author Share Posted October 27, 2017 ohh yeaaa! Thanks! 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.