diff --git a/index.html b/index.html index 68e0667..8c08bc9 100644 --- a/index.html +++ b/index.html @@ -12,8 +12,8 @@ diff --git a/jsm/TetraGUI.js b/jsm/TetraGUI.js index 544d60d..795888e 100644 --- a/jsm/TetraGUI.js +++ b/jsm/TetraGUI.js @@ -54,19 +54,19 @@ export class TetraGUI extends GUI { scene.vortex.colorFullTextureRotation = 0.006 scene.vortex.colorFullMoveForward = 0.015 - scene.ambientLight.intensity = 1 - scene.directionalLight.intensity = 1 + scene.ambientLight.intensity = 4 + scene.directionalLight.intensity = 4 - Mino.material.opacity = 0.6 - Mino.material.roughness = 0.4 - Mino.material.metalness = 0.95 + Mino.mesh.material.opacity = 0.6 + Mino.mesh.material.roughness = 0.4 + Mino.mesh.material.metalness = 0.95 } break case "Espace": darkTexture = new THREE.TextureLoader(loadingManager).load("./images/dark.jpg", texture => { texture.wrapS = THREE.RepeatWrapping texture.wrapT = THREE.MirroredRepeatWrapping - texture.repeat.set(2, 4) + texture.repeat.set(1, 2) }) colorfullTexture = new THREE.TextureLoader(loadingManager).load("./images/colorfull.jpg", texture => { texture.wrapS = THREE.RepeatWrapping @@ -75,18 +75,22 @@ export class TetraGUI extends GUI { }) loadingManager.onLoad = function() { scene.vortex.darkCylinder.material.map = darkTexture - scene.vortex.darkCylinder.material.opacity = 0.055 + scene.vortex.darkCylinder.material.opacity = 0.1 scene.vortex.colorFullCylinder.material.map = colorfullTexture - scene.vortex.colorFullCylinder.material.opacity = 0.6 + scene.vortex.colorFullCylinder.material.opacity = 0.4 scene.vortex.globalRotation = 0.028 scene.vortex.darkTextureRotation = 0.006 - scene.vortex.darkMoveForward = 0.007 + scene.vortex.darkMoveForward = 0.02 scene.vortex.colorFullTextureRotation = 0.006 - scene.vortex.colorFullMoveForward = 0.02 + scene.vortex.colorFullMoveForward = 0.007 - scene.ambientLight.intensity = 0.6 - scene.directionalLight.intensity = 1 + scene.ambientLight.intensity = 20 + scene.directionalLight.intensity = 10 + + Mino.mesh.material.opacity = 0.6 + Mino.mesh.material.roughness = 0.08 + Mino.mesh.material.metalness = 0.98 } break } diff --git a/jsm/TetraScene.js b/jsm/TetraScene.js index c36e3eb..bc23475 100644 --- a/jsm/TetraScene.js +++ b/jsm/TetraScene.js @@ -14,10 +14,10 @@ export class TetraScene extends THREE.Scene { this.vortex = new Vortex(this.loadingManager) this.add(this.vortex) - this.ambientLight = new THREE.AmbientLight(0xffffff, 1) + this.ambientLight = new THREE.AmbientLight(0xffffff, 4) this.add(this.ambientLight) - this.directionalLight = new THREE.DirectionalLight(0xffffff, 1) + this.directionalLight = new THREE.DirectionalLight(0xffffff, 4) this.directionalLight.position.set(5, 0, 20) this.add(this.directionalLight) diff --git a/jsm/gamelogic.js b/jsm/gamelogic.js index 8e133f0..0064b80 100644 --- a/jsm/gamelogic.js +++ b/jsm/gamelogic.js @@ -30,7 +30,7 @@ const TRANSLATION = { } const ROTATION = { - CW: 1, // ClockWise + CW: 1, // ClockWise CCW: 3, // CounterClockWise } @@ -57,7 +57,7 @@ const envRenderTarget = new THREE.WebGLCubeRenderTarget(256) const environnement = envRenderTarget.texture environnement.type = THREE.HalfFloatType environnement.camera = new THREE.CubeCamera(1, 1000, envRenderTarget) -environnement.camera.position.set(5, 10) +environnement.camera.position.set(5, 10, 0) class InstancedMino extends THREE.InstancedMesh { @@ -121,7 +121,7 @@ class Mino extends THREE.Object3D { side: THREE.DoubleSide, transparent: true, opacity: 0.6, - roughness: 0.06, + roughness: 0.4, metalness: 0.95, }) this.mesh = new InstancedMino(minoGeometry, minoMaterial, 2*ROWS*COLUMNS) diff --git a/loading.css b/loading.css index 3d78d4d..85d4e82 100644 --- a/loading.css +++ b/loading.css @@ -127,6 +127,7 @@ body { padding: 0; width: 100vw; height: 100vh; + cursor: progress; } .e-loadholder {