If game object doesn't fill browser window, it's scaled instead of clipped
Opened this issue · 0 comments
hyphz commented
If p/create-game
is called with values other than the size of the browser window, then the created game canvas is not limited to the given pixel size. Rather, it seems that the game is fitted to fill the whole browser anyway and the coordinates in the window are scaled to the given values. In addition, clientX
and clientY
in mousemove events do not have this scaling applied, so code such as the nightcoders example stops working (the text no longer follows the mouse, instead separating from it)