onfullscreenchange

This commit is contained in:
2026-01-27 00:40:08 +01:00
parent d0d65b8654
commit 9f4ab194be
2 changed files with 10 additions and 6 deletions

15
app.js
View File

@@ -145,18 +145,23 @@ let game = {
},
fullscreen: function() {
if (!document.fullscreenElement) {
document.body.requestFullscreen();
menu.settings.fullscreenButton.name("Quitter le plein écran");
} else {
if (document.fullscreenElement) {
if (document.exitFullscreen) {
document.exitFullscreen();
menu.settings.fullscreenButton.name("Plein écran");
}
} else {
document.body.requestFullscreen();
}
}
}
document.onfullscreenchange = function() {
if (document.fullscreenElement) {
menu.settings.fullscreenButton.name("Quitter le plein écran");
} else {
menu.settings.fullscreenButton.name("Plein écran");
}
}
function playSound(sound, note=0) {
sound.stop()

View File

@@ -149,7 +149,6 @@ export class Menu extends GUI {
let vortex = dev.addFolder("vortex opacity").close()
vortex.add(scene.vortex.transparentCylinder.material, "opacity").name("dark").min(0).max(1).listen()
vortex.add(scene.vortex.opaqueCylinder.material, "opacity").name("opaque").min(0).max(1).listen()
changeMaterial(scene.minoes.material.constructor.name)