hunts Posted July 18, 2017 Share Posted July 18, 2017 hy guyss! How can i scale the rendering canvas manually? i don't want to use the predefined function : window.addEventListener("resize", function () { engine.resize(); }); Is there any other way to set the canvas size? Quote Link to comment Share on other sites More sharing options...
rdzar Posted July 18, 2017 Share Posted July 18, 2017 I noticed when changing the <canvas> element size, the engine updates with it. Is that what you're searching for? Quote Link to comment Share on other sites More sharing options...
JohnK Posted July 18, 2017 Share Posted July 18, 2017 engine.setSize(width, height) Make sure you do not set width and height as a css style. If you are using a template from BJS documentation delete width:100% and height:100% from #renderCanvas GameMonetize and hunts 2 Quote Link to comment Share on other sites More sharing options...
hunts Posted July 18, 2017 Author Share Posted July 18, 2017 Not that @rdzar Yeah, I did that and it's working fine @JohnK 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.