2022-06-19 21:54:34 +00:00
|
|
|
export var canvas = document.getElementById('canvas');
|
|
|
|
export var ctx = canvas.getContext('2d');
|
2022-06-23 00:16:57 +00:00
|
|
|
export var wrapper = document.getElementById('game');
|
2022-06-23 05:44:57 +00:00
|
|
|
|
2022-06-24 12:10:06 +00:00
|
|
|
// scaleEverythingGood()
|
|
|
|
//
|
|
|
|
// window.addEventListener('resize', scaleEverythingGood);
|
|
|
|
//
|
|
|
|
// function scaleEverythingGood() {
|
|
|
|
// const width = window.innerWidth-2;
|
|
|
|
// const height = window.innerHeight-2;
|
|
|
|
// let canvasWidth
|
|
|
|
// if (canvas.width > canvas.height) {
|
|
|
|
// canvasWidth = Math.max(width, height)
|
|
|
|
// } else {
|
|
|
|
// canvasWidth = width
|
|
|
|
// }
|
|
|
|
// canvasWidth = canvasWidth/4
|
|
|
|
// canvas.style.width = `${canvasWidth}px`;
|
|
|
|
// }
|