Closed ShubhenduVaid closed 1 year ago
https://user-images.githubusercontent.com/9929523/132100948-cc2fe80f-3c80-4979-9764-bd24476bb0cc.mp4
Does this by any chance has what you're looking?
Does not work for me. I tried in index.js by adding it but the canvas is taking 100% width and height.
I am looking for something like window resize listener to set the width and height of game here such that it keeps the scaling intact.
It would be helpful to have the game scale well on different resolutions and screen sizes, done via the library.
Here is the config i am using. kaboom({ global: true, fullscreen: true, scale: 2, crisp: false, debug: false, clearColor: [0, 0.4, 0.6, 0.6], canvas: document.getElementById("game"), width: 640, height: 480, });
Yeah dynamic sizing on window resize is not there but planned
Already added in latest @next
(from alpha 1)
Link to my repo https://github.com/ShubhenduVaid/simple-game