|
|
@ -58,6 +58,7 @@ |
|
|
|
resizeCanvas(); |
|
|
|
resizeCanvas(); |
|
|
|
window.addEventListener('resize', resizeCanvas); |
|
|
|
window.addEventListener('resize', resizeCanvas); |
|
|
|
window.addEventListener('keydown', async e => { |
|
|
|
window.addEventListener('keydown', async e => { |
|
|
|
|
|
|
|
if(e.target.tagName.toLowerCase()=='input') return; |
|
|
|
if(e.key=='f') { |
|
|
|
if(e.key=='f') { |
|
|
|
if(document.fullscreenElement) await document.exitFullscreen(); |
|
|
|
if(document.fullscreenElement) await document.exitFullscreen(); |
|
|
|
else await main.requestFullscreen(); |
|
|
|
else await main.requestFullscreen(); |
|
|
|