Compare commits
2 Commits
f8081583c5
...
a0893fd881
Author | SHA1 | Date | |
---|---|---|---|
a0893fd881 | |||
1a026db655 |
4
app.js
4
app.js
@ -36,6 +36,8 @@ let game = {
|
||||
holdQueue.clear()
|
||||
playfield.init()
|
||||
|
||||
scene.music.currentTime = 0
|
||||
|
||||
this.playing = true
|
||||
stats.clock.start()
|
||||
|
||||
@ -133,7 +135,7 @@ let game = {
|
||||
renderer.domElement.onfocus = null
|
||||
gui.settings.domElement.onfocus = null
|
||||
game.playing = false
|
||||
scene.music.stop()
|
||||
scene.music.pause()
|
||||
stats.clock.stop()
|
||||
messagesSpan.addNewChild("div", { className: "show-level-animation", innerHTML: `<h1>GAME<br/>OVER</h1>` })
|
||||
|
||||
|
@ -54,12 +54,12 @@ export class TetraGUI extends GUI {
|
||||
scene.vortex.colorFullTextureRotation = 0.006
|
||||
scene.vortex.colorFullMoveForward = 0.025
|
||||
|
||||
scene.ambientLight.intensity = 1
|
||||
scene.directionalLight.intensity = 2
|
||||
//scene.ambientLight.intensity = 1
|
||||
scene.directionalLight.intensity = 1.8
|
||||
|
||||
Mino.mesh.material.opacity = 0.6
|
||||
Mino.mesh.material.roughness = 0.4
|
||||
Mino.mesh.material.metalness = 0.95
|
||||
Mino.mesh.material.opacity = 0.7
|
||||
Mino.mesh.material.roughness = 0.48
|
||||
Mino.mesh.material.metalness = 0.9
|
||||
}
|
||||
break
|
||||
case "Espace":
|
||||
@ -138,7 +138,7 @@ export class TetraGUI extends GUI {
|
||||
cameraPosition.add(scene.camera, "fov", 0, 200).onChange(() => scene.camera.updateProjectionMatrix())
|
||||
|
||||
let light = dev.addFolder("lights intensity").close()
|
||||
light.add(scene.ambientLight, "intensity").name("ambient").min(0).max(20)
|
||||
//light.add(scene.ambientLight, "intensity").name("ambient").min(0).max(20)
|
||||
light.add(scene.directionalLight, "intensity").name("directional").min(0).max(20)
|
||||
|
||||
let directionalLightPosition = dev.addFolder("directionalLight.position").close()
|
||||
@ -170,9 +170,9 @@ export class TetraGUI extends GUI {
|
||||
envMap: environnement,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.8,
|
||||
roughness: 0.2,
|
||||
metalness: 0.9,
|
||||
opacity: 0.7,
|
||||
roughness: 0.48,
|
||||
metalness: 0.67,
|
||||
})
|
||||
break
|
||||
case "MeshPhysicalMaterial":
|
||||
@ -182,7 +182,7 @@ export class TetraGUI extends GUI {
|
||||
transparent: true,
|
||||
opacity: 0.6,
|
||||
roughness: 0.5,
|
||||
metalness: 0.9,
|
||||
metalness: 0.67,
|
||||
attenuationDistance: 0.5,
|
||||
ior: 2,
|
||||
sheen: 0,
|
||||
|
@ -12,10 +12,10 @@ export class TetraScene extends THREE.Scene {
|
||||
this.vortex = new Vortex(loadingManager)
|
||||
this.add(this.vortex)
|
||||
|
||||
this.ambientLight = new THREE.AmbientLight(0xffffff, 1)
|
||||
this.add(this.ambientLight)
|
||||
/*this.ambientLight = new THREE.AmbientLight(0xffffff, 1)
|
||||
this.add(this.ambientLight)*/
|
||||
|
||||
this.directionalLight = new THREE.DirectionalLight(0xffffff, 2)
|
||||
this.directionalLight = new THREE.DirectionalLight(0xffffff, 1.8)
|
||||
this.directionalLight.position.set(5, -20, 20)
|
||||
this.add(this.directionalLight)
|
||||
|
||||
|
@ -120,9 +120,9 @@ class Mino extends THREE.Object3D {
|
||||
envMap: environnement,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.8,
|
||||
roughness: 0.2,
|
||||
metalness: 0.9,
|
||||
opacity: 0.7,
|
||||
roughness: 0.48,
|
||||
metalness: 0.67,
|
||||
})
|
||||
this.mesh = new InstancedMino(minoGeometry, minoMaterial, 2*ROWS*COLUMNS)
|
||||
}
|
||||
@ -353,7 +353,7 @@ Z.prototype.freeColor = new THREE.Color(COLORS.Z)
|
||||
class Playfield extends THREE.Group {
|
||||
constructor() {
|
||||
super()
|
||||
this.visible = false
|
||||
//this.visible = false
|
||||
|
||||
const edgeMaterial = new THREE.MeshStandardMaterial({
|
||||
color: COLORS.EDGE,
|
||||
@ -361,7 +361,7 @@ class Playfield extends THREE.Group {
|
||||
transparent: true,
|
||||
opacity: 0.2,
|
||||
roughness: 0.1,
|
||||
metalness: 0.9,
|
||||
metalness: 0.67,
|
||||
})
|
||||
const edgeShape = new THREE.Shape()
|
||||
.moveTo(-.3, SKYLINE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user