This commit is contained in:
ntr 2018-12-14 12:43:24 +11:00
parent 4b1585aeff
commit 35d4f11881

View File

@ -29,6 +29,9 @@ function renderCryps() {
function resize() {
const canvas = document.querySelector("canvas");
if (!canvas) return false;
const windowWidth = window.innerWidth;
const windowHeight = window.innerHeight;
const windowRatio = windowWidth / windowHeight;
@ -42,13 +45,11 @@ function renderCryps() {
}
}
function somethingElse() {
console.log('grep');
}
window.addEventListener('mouseup', () => game.registry.set('pan', false));
window.addEventListener('mousedown', () => game.registry.set('pan', true));
window.addEventListener('resize', () => somethingElse, false);
window.addEventListener('resize', resize, true);
resize();
return game;
}