Major rework of basic game code - pre-work for multiplayer
Includes automatic generation of required HTML elements and better responsiveness
This commit is contained in:
6
js/helper-functions.js
Normal file
6
js/helper-functions.js
Normal file
@@ -0,0 +1,6 @@
|
||||
HTMLCanvasElement.prototype.adjustResolution = function (ctx, scale) {
|
||||
this.width = this.clientWidth;
|
||||
this.height = this.clientHeight;
|
||||
|
||||
ctx.scale(scale, scale);
|
||||
};
|
Reference in New Issue
Block a user