You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The canvas is weirdly resized upon resizing the browser window. I noticed it when I alt+tabbed between my IDE and the browser, the canvas slowly get larger.
import{Text,device,game,video}from'melonjs';device.onReady(function(){// initialize the display canvas once the device/browser is readyif(!video.init(100,30,{parent : "screen",scale : "auto"})){alert("Your browser does not support HTML5 canvas.");return;}// set a gray background colorgame.world.backgroundColor.parseCSS("#202020");// add a font text display objectgame.world.addChild(newText(609,281,{font: "Arial",size: 160,fillStyle: "#FFFFFF",textBaseline : "middle",textAlign : "center",text : "Hello World !"}));});
The text was updated successfully, but these errors were encountered:
To be noted that the same behavior appears when showing the developer tools within the browser. Since it does not happened in other cases, it never really bothered me.
@KUNDAN1334 just a heads up, in case you haven't started yet, we just pushed some big changes on the build process ! make sure to update your repo first before starting any changes. Sorry about that ! :P
The canvas is weirdly resized upon resizing the browser window. I noticed it when I alt+tabbed between my IDE and the browser, the canvas slowly get larger.
The text was updated successfully, but these errors were encountered: