diff --git a/images/colorfull.jpg b/images/colorfull.jpg index b917cf0..a4c1aba 100644 Binary files a/images/colorfull.jpg and b/images/colorfull.jpg differ diff --git a/jsm/Menu.js b/jsm/Menu.js index 28639d0..f187d9b 100644 --- a/jsm/Menu.js +++ b/jsm/Menu.js @@ -26,7 +26,7 @@ export class Menu extends GUI { this.settings = this.addFolder("Options") this.settings.add(settings, "startLevel").name("Niveau initial").min(1).max(15).step(1) - this.settings.add(settings, "theme", ["Plasma", "Espace", "Rétro"]).name("Thème").onChange(theme => { + this.settings.add(settings, "theme", ["Plasma", "Space", "Retro"]).name("Thème").onChange(theme => { scene.theme = theme if (dev) changeMaterial() }) diff --git a/jsm/Settings.js b/jsm/Settings.js index 2175701..975ecb2 100644 --- a/jsm/Settings.js +++ b/jsm/Settings.js @@ -3,7 +3,7 @@ let jsKeyRenamer = new Proxy({ ["→"]: "ArrowRight", ["↑"]: "ArrowUp", ["↓"]: "ArrowDown", - ["Espace"]: " ", + ["Space"]: " ", ["Échap."]: "Escape", ["Ret. arrière"]: "Backspace", ["Entrée"]: "Enter", @@ -17,7 +17,7 @@ let friendyKeyRenamer = new Proxy({ ["ArrowRight"]: "→", ["ArrowUp"]: "↑", ["ArrowDown"]: "↓", - [" "]: "Espace", + [" "]: "Space", ["Escape"]: "Échap.", ["Backspace"]: "Ret. arrière", ["Enter"]: "Entrée", diff --git a/jsm/TetraScene.js b/jsm/TetraScene.js index f09b8ea..6d050af 100644 --- a/jsm/TetraScene.js +++ b/jsm/TetraScene.js @@ -72,7 +72,7 @@ export class TetraScene extends THREE.Scene { switch (theme) { case "Plasma": this.ambientLight.intensity = 0 - this.directionalLight.intensity = 5 + this.directionalLight.intensity = 3 this.directionalLight.position.set(5, -20, 20) this.music.src = "audio/Moon-Over-Moscow-DJ-ResiDance-Mix-2022.mp3" this.background = new THREE.Color(0xffffff) @@ -80,8 +80,8 @@ export class TetraScene extends THREE.Scene { this.playfield.edge.visible = true this.playfield.retroEdge.visible = false break - case "Espace": - this.ambientLight.intensity = 2 + case "Space": + this.ambientLight.intensity = 5 this.directionalLight.intensity = 10 this.directionalLight.position.set(2, 15, 20) this.music.src = "audio/benevolence.m4a" @@ -90,7 +90,7 @@ export class TetraScene extends THREE.Scene { this.playfield.edge.visible = true this.playfield.retroEdge.visible = false break - case "Rétro": + case "Retro": this.ambientLight.intensity = 1 this.directionalLight.intensity = 10 this.directionalLight.position.set(19, 120, 200) diff --git a/jsm/Tetrominoes.js b/jsm/Tetrominoes.js index a676323..7df1d07 100644 --- a/jsm/Tetrominoes.js +++ b/jsm/Tetrominoes.js @@ -79,17 +79,17 @@ export class InstancedMino extends THREE.InstancedMesh { } set theme(theme) { - if (theme == "Rétro") { + if (theme == "Retro") { this.resetColor() this.update = this.updateOffset - if (this.materials["Rétro"]) { - this.material = this.materials["Rétro"] + if (this.materials["Retro"]) { + this.material = this.materials["Retro"] } else { - this.materials["Rétro"] = [] - const loadingManager = new THREE.LoadingManager(() => this.material = this.materials["Rétro"]) + this.materials["Retro"] = [] + const loadingManager = new THREE.LoadingManager(() => this.material = this.materials["Retro"]) new THREE.TextureLoader(loadingManager).load("images/sprites.png", (texture) => { - this.materials.Rétro[4] = - this.materials.Rétro[5] = new TileMaterial({ + this.materials.Retro[4] = + this.materials.Retro[5] = new TileMaterial({ color: COLORS.RETRO, map: texture, bumpMap: texture, @@ -100,10 +100,10 @@ export class InstancedMino extends THREE.InstancedMesh { }, 8, 8) }) new THREE.TextureLoader(loadingManager).load("images/edges.png", (texture) => { - this.materials.Rétro[0] = - this.materials.Rétro[1] = - this.materials.Rétro[2] = - this.materials.Rétro[3] = new TileMaterial({ + this.materials.Retro[0] = + this.materials.Retro[1] = + this.materials.Retro[2] = + this.materials.Retro[3] = new TileMaterial({ color: COLORS.RETRO, map: texture, bumpMap: texture, @@ -168,7 +168,7 @@ InstancedMino.prototype.materials = { roughness: 0.5, metalness: 0.9, }), - Espace: new THREE.MeshStandardMaterial({ + Space: new THREE.MeshStandardMaterial({ envMap: environment, side: THREE.DoubleSide, transparent: true, diff --git a/jsm/Vortex.js b/jsm/Vortex.js index 5e42994..bb41d88 100644 --- a/jsm/Vortex.js +++ b/jsm/Vortex.js @@ -66,13 +66,13 @@ export class Vortex extends THREE.Group { this.visible = true break - case "Espace": + case "Space": new THREE.TextureLoader(this.loadingManager).load("./images/colorfull.jpg", texture => { texture.wrapS = THREE.RepeatWrapping texture.wrapT = THREE.MirroredRepeatWrapping - texture.repeat.set(2, 4) + texture.repeat.set(1, 4) this.transparentCylinder.material.map = texture - this.transparentCylinder.material.opacity = 0.15 + this.transparentCylinder.material.opacity = 0.3 }) new THREE.TextureLoader(this.loadingManager).load("./images/stars_space.jpg", texture => { @@ -87,12 +87,12 @@ export class Vortex extends THREE.Group { this.opaqueTextureRotation = 0.006 this.opaqueMoveForward = 0.03 this.transparentTextureRotation = 0.006 - this.transparentMoveForward = 0.04 + this.transparentMoveForward = 0.06 this.visible = true break - case "Rétro": + case "Retro": this.visible = false break }