pause on fullscreen exit
This commit is contained in:
@@ -111,6 +111,7 @@ export class Menu extends GUI {
|
||||
})
|
||||
|
||||
let minoMaterial = scene.minoes.material instanceof Array ? scene.minoes.material[0] : scene.minoes.material
|
||||
if ("color" in minoMaterial) material.addColor(minoMaterial, "color" )
|
||||
if ("opacity" in minoMaterial) material.add(minoMaterial, "opacity" ).min(0).max(1)
|
||||
if ("reflectivity" in minoMaterial) material.add(minoMaterial, "reflectivity" ).min(0).max(1)
|
||||
if ("roughness" in minoMaterial) material.add(minoMaterial, "roughness" ).min(0).max(1)
|
||||
|
||||
@@ -66,8 +66,8 @@ export class TetraScene extends THREE.Scene {
|
||||
}.bind(this))
|
||||
this.floorSound = new THREE.Audio(listener)
|
||||
audioLoader.load('audio/floor.ogg', function( buffer ) {
|
||||
this.floorSoung.setBuffer(buffer)
|
||||
this.floorSoung.setVolume(settings.sfxVolume/100)
|
||||
this.floorSound.setBuffer(buffer)
|
||||
this.floorSound.setVolume(settings.sfxVolume/100)
|
||||
}.bind(this))
|
||||
this.moveSound = new THREE.Audio(listener)
|
||||
audioLoader.load('audio/move.ogg', function( buffer ) {
|
||||
@@ -93,7 +93,7 @@ export class TetraScene extends THREE.Scene {
|
||||
case "Plasma":
|
||||
this.ambientLight.intensity = 1
|
||||
this.directionalLight.intensity = 3
|
||||
this.directionalLight.position.set(5, -20, -10)
|
||||
this.directionalLight.position.set(5, 50, -20)
|
||||
this.music.src = "audio/Moon-Over-Moscow-DJ-ResiDance-Mix-2022.mp3"
|
||||
this.background = new THREE.Color(0xffffff)
|
||||
this.fog.color.set(0xffffff)
|
||||
@@ -103,7 +103,7 @@ export class TetraScene extends THREE.Scene {
|
||||
case "Space":
|
||||
this.ambientLight.intensity = 3
|
||||
this.directionalLight.intensity = 10
|
||||
this.directionalLight.position.set(2, 15, 20)
|
||||
this.directionalLight.position.set(2, 15, -20)
|
||||
this.music.src = "audio/benevolence.m4a"
|
||||
this.background = new THREE.Color(0x000000)
|
||||
this.fog.color.set(0x000000)
|
||||
|
||||
@@ -93,7 +93,7 @@ export class InstancedMino extends THREE.InstancedMesh {
|
||||
color: COLORS.RETRO,
|
||||
map: texture,
|
||||
bumpMap: texture,
|
||||
bumpScale: 5,
|
||||
bumpScale: 1,
|
||||
envMap: environment,
|
||||
envMapIntensity: 5,
|
||||
roughness: 0.03,
|
||||
@@ -109,7 +109,7 @@ export class InstancedMino extends THREE.InstancedMesh {
|
||||
color: COLORS.RETRO,
|
||||
map: texture,
|
||||
bumpMap: texture,
|
||||
bumpScale: 5,
|
||||
bumpScale: 1,
|
||||
envMap: environment,
|
||||
envMapIntensity: 5,
|
||||
roughness: 0.03,
|
||||
@@ -170,7 +170,7 @@ InstancedMino.prototype.materials = {
|
||||
transparent: true,
|
||||
opacity: 0.66,
|
||||
roughness: 0.1,
|
||||
metalness: 0.95,
|
||||
metalness: 0.6,
|
||||
onBeforeCompile: shader => {
|
||||
shader.vertexShader = `
|
||||
varying vec3 vPos;
|
||||
@@ -478,8 +478,8 @@ class Playfield extends THREE.Group {
|
||||
.lineTo(COLUMNS, 0)
|
||||
.lineTo(COLUMNS, SKYLINE)
|
||||
.lineTo(COLUMNS + 1, SKYLINE)
|
||||
.lineTo(COLUMNS + 1, -1)
|
||||
.lineTo(-1, -1)
|
||||
.lineTo(COLUMNS + 1, -6/8)
|
||||
.lineTo(-1, -6/8)
|
||||
.moveTo(-1, SKYLINE)
|
||||
const retroEdgeTexture = new THREE.TextureLoader(loadingManager).load("images/edge.png", (texture) => {
|
||||
texture.wrapS = THREE.RepeatWrapping
|
||||
@@ -489,7 +489,7 @@ class Playfield extends THREE.Group {
|
||||
color: COLORS.RETRO,
|
||||
map: retroEdgeTexture,
|
||||
bumpMap: retroEdgeTexture,
|
||||
bumpScale: 5,
|
||||
bumpScale: 1,
|
||||
envMap: environment,
|
||||
envMapIntensity: 5,
|
||||
roughness: 0.03,
|
||||
|
||||
Reference in New Issue
Block a user