diff --git a/images/dark.jpg b/images/dark.jpg deleted file mode 100644 index cfd5438..0000000 Binary files a/images/dark.jpg and /dev/null differ diff --git a/images/fond_etoile.gif b/images/fond_etoile.gif deleted file mode 100644 index 68af73c..0000000 Binary files a/images/fond_etoile.gif and /dev/null differ diff --git a/images/stars_space.jpg b/images/stars_space.jpg new file mode 100644 index 0000000..37a31c7 Binary files /dev/null and b/images/stars_space.jpg differ diff --git a/jsm/Menu.js b/jsm/Menu.js index f4d81dd..57eb546 100644 --- a/jsm/Menu.js +++ b/jsm/Menu.js @@ -128,6 +128,8 @@ export class Menu extends GUI { if ("specularIntensity" in minoMaterial) material.add(minoMaterial, "specularIntensity" ).min(0).max(1) if ("thickness" in minoMaterial) material.add(minoMaterial, "thickness" ).min(0).max(5) if ("transmission" in minoMaterial) material.add(minoMaterial, "transmission" ).min(0).max(1) + if ("clearcoat" in minoMaterial) material.add(minoMaterial, "clearcoat" ).min(0).max(1) + if ("clearcoatRoughness" in minoMaterial) material.add(minoMaterial, "clearcoatRoughness" ).min(0).max(1) } let dev @@ -149,8 +151,8 @@ export class Menu extends GUI { directionalLightPosition.add(scene.directionalLight.position, "z").listen() let vortex = dev.addFolder("vortex opacity").close() - vortex.add(scene.vortex.darkCylinder.material, "opacity").name("dark").min(0).max(1) - vortex.add(scene.vortex.colorFullCylinder.material, "opacity").name("colorFull").min(0).max(1) + vortex.add(scene.vortex.darkCylinder.material, "opacity").name("dark").min(0).max(1).listen() + vortex.add(scene.vortex.colorFullCylinder.material, "opacity").name("colorFull").min(0).max(1).listen() changeMaterial(minoes.material.constructor.name) material.close() diff --git a/jsm/TetraScene.js b/jsm/TetraScene.js index f8b8aed..8222388 100644 --- a/jsm/TetraScene.js +++ b/jsm/TetraScene.js @@ -52,8 +52,8 @@ export class TetraScene extends THREE.Scene { this.directionalLight.position.set(5, -20, 20) break case "Espace": - this.ambientLight.intensity = 20 - this.directionalLight.intensity = 10 + this.ambientLight.intensity = 7 + this.directionalLight.intensity = 5 this.directionalLight.position.set(5, -20, 20) break case "Rétro": diff --git a/jsm/Tetrominoes.js b/jsm/Tetrominoes.js index 9f4d257..000cb81 100644 --- a/jsm/Tetrominoes.js +++ b/jsm/Tetrominoes.js @@ -179,21 +179,20 @@ InstancedMino.prototype.materials = { envMap: environment, side: THREE.DoubleSide, transparent: true, - opacity: 0.6, + opacity: 0.5, roughness: 0.25, - metalness: 0.85, + metalness: 0.9, }), Espace: new THREE.MeshStandardMaterial({ envMap: environment, side: THREE.DoubleSide, transparent: true, opacity: 0.8, - roughness: 0.1, + roughness: 0, metalness: 0.99, }) } -InstancedMino.prototype.materials['Plasma'].onBeforeCompile = -InstancedMino.prototype.materials['Espace'].onBeforeCompile = shader => { +InstancedMino.prototype.materials['Plasma'].onBeforeCompile = shader => { shader.vertexShader = ` varying vec3 vPos; ${shader.vertexShader} diff --git a/jsm/Vortex.js b/jsm/Vortex.js index 6825230..dd2da80 100644 --- a/jsm/Vortex.js +++ b/jsm/Vortex.js @@ -67,21 +67,21 @@ export class Vortex extends THREE.Group { break case "Espace": - new THREE.TextureLoader(this.loadingManager).load("./images/dark.jpg", texture => { + new THREE.TextureLoader(this.loadingManager).load("./images/stars_space.jpg", texture => { texture.wrapS = THREE.RepeatWrapping texture.wrapT = THREE.MirroredRepeatWrapping - texture.repeat.set(2, 4) + texture.repeat.set(3, 6) this.darkCylinder.material.map = texture }) - this.darkCylinder.material.opacity = 0.08 + this.darkCylinder.material.opacity = 0.2 new THREE.TextureLoader(this.loadingManager).load("./images/colorfull.jpg", texture => { texture.wrapS = THREE.RepeatWrapping texture.wrapT = THREE.MirroredRepeatWrapping - texture.repeat.set(2, 2) + texture.repeat.set(2, 4) this.colorFullCylinder.material.map = texture }) - this.colorFullCylinder.material.opacity = 0.15 + this.colorFullCylinder.material.opacity = 0.1 this.globalRotation = 0.028 this.darkTextureRotation = 0.006