music
This commit is contained in:
@@ -32,11 +32,9 @@ export class Menu extends GUI {
|
|||||||
if (theme == "Rétro") {
|
if (theme == "Rétro") {
|
||||||
playfield.edge.visible = false
|
playfield.edge.visible = false
|
||||||
playfield.retroEdge.visible = true
|
playfield.retroEdge.visible = true
|
||||||
music.src = "audio/Tetris_MkVaffQuasi_Ultimix_OC_ReMix.mp3"
|
|
||||||
} else {
|
} else {
|
||||||
playfield.edge.visible = true
|
playfield.edge.visible = true
|
||||||
playfield.retroEdge.visible = false
|
playfield.retroEdge.visible = false
|
||||||
music.src = "audio/benevolence.m4a"
|
|
||||||
}
|
}
|
||||||
if (dev) changeMaterial()
|
if (dev) changeMaterial()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ export class TetraScene extends THREE.Scene {
|
|||||||
this.directionalLight = new THREE.DirectionalLight(0xffffff, 11)
|
this.directionalLight = new THREE.DirectionalLight(0xffffff, 11)
|
||||||
this.add(this.directionalLight)
|
this.add(this.directionalLight)
|
||||||
|
|
||||||
this.theme = settings.theme
|
|
||||||
|
|
||||||
/* Sounds */
|
/* Sounds */
|
||||||
this.music = music
|
this.music = music
|
||||||
|
|
||||||
@@ -42,6 +40,8 @@ export class TetraScene extends THREE.Scene {
|
|||||||
audioLoader.load('audio/hard-drop.wav', function( buffer ) {
|
audioLoader.load('audio/hard-drop.wav', function( buffer ) {
|
||||||
this.hardDropSound.setBuffer(buffer)
|
this.hardDropSound.setBuffer(buffer)
|
||||||
}.bind(this))
|
}.bind(this))
|
||||||
|
|
||||||
|
this.theme = settings.theme
|
||||||
}
|
}
|
||||||
|
|
||||||
set theme(theme) {
|
set theme(theme) {
|
||||||
@@ -50,16 +50,19 @@ export class TetraScene extends THREE.Scene {
|
|||||||
this.ambientLight.intensity = 0
|
this.ambientLight.intensity = 0
|
||||||
this.directionalLight.intensity = 1.75
|
this.directionalLight.intensity = 1.75
|
||||||
this.directionalLight.position.set(5, -20, 20)
|
this.directionalLight.position.set(5, -20, 20)
|
||||||
|
this.music.src = "audio/benevolence.m4a"
|
||||||
break
|
break
|
||||||
case "Espace":
|
case "Espace":
|
||||||
this.ambientLight.intensity = 7
|
this.ambientLight.intensity = 7
|
||||||
this.directionalLight.intensity = 5
|
this.directionalLight.intensity = 5
|
||||||
this.directionalLight.position.set(5, -20, 20)
|
this.directionalLight.position.set(5, -20, 20)
|
||||||
|
this.music.src = "audio/benevolence.m4a"
|
||||||
break
|
break
|
||||||
case "Rétro":
|
case "Rétro":
|
||||||
this.ambientLight.intensity = 1
|
this.ambientLight.intensity = 1
|
||||||
this.directionalLight.intensity = 10
|
this.directionalLight.intensity = 10
|
||||||
this.directionalLight.position.set(19, 120, 200)
|
this.directionalLight.position.set(19, 120, 200)
|
||||||
|
this.music.src = "audio/Tetris_MkVaffQuasi_Ultimix_OC_ReMix.mp3"
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
this.vortex.theme = theme
|
this.vortex.theme = theme
|
||||||
|
|||||||
Reference in New Issue
Block a user