space tweaks
This commit is contained in:
BIN
images/dark.jpg
BIN
images/dark.jpg
Binary file not shown.
|
Before Width: | Height: | Size: 977 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.3 KiB |
BIN
images/stars_space.jpg
Normal file
BIN
images/stars_space.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 341 KiB |
@@ -128,6 +128,8 @@ export class Menu extends GUI {
|
|||||||
if ("specularIntensity" in minoMaterial) material.add(minoMaterial, "specularIntensity" ).min(0).max(1)
|
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 ("thickness" in minoMaterial) material.add(minoMaterial, "thickness" ).min(0).max(5)
|
||||||
if ("transmission" in minoMaterial) material.add(minoMaterial, "transmission" ).min(0).max(1)
|
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
|
let dev
|
||||||
@@ -149,8 +151,8 @@ export class Menu extends GUI {
|
|||||||
directionalLightPosition.add(scene.directionalLight.position, "z").listen()
|
directionalLightPosition.add(scene.directionalLight.position, "z").listen()
|
||||||
|
|
||||||
let vortex = dev.addFolder("vortex opacity").close()
|
let vortex = dev.addFolder("vortex opacity").close()
|
||||||
vortex.add(scene.vortex.darkCylinder.material, "opacity").name("dark").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)
|
vortex.add(scene.vortex.colorFullCylinder.material, "opacity").name("colorFull").min(0).max(1).listen()
|
||||||
|
|
||||||
changeMaterial(minoes.material.constructor.name)
|
changeMaterial(minoes.material.constructor.name)
|
||||||
material.close()
|
material.close()
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ export class TetraScene extends THREE.Scene {
|
|||||||
this.directionalLight.position.set(5, -20, 20)
|
this.directionalLight.position.set(5, -20, 20)
|
||||||
break
|
break
|
||||||
case "Espace":
|
case "Espace":
|
||||||
this.ambientLight.intensity = 20
|
this.ambientLight.intensity = 7
|
||||||
this.directionalLight.intensity = 10
|
this.directionalLight.intensity = 5
|
||||||
this.directionalLight.position.set(5, -20, 20)
|
this.directionalLight.position.set(5, -20, 20)
|
||||||
break
|
break
|
||||||
case "Rétro":
|
case "Rétro":
|
||||||
|
|||||||
@@ -179,21 +179,20 @@ InstancedMino.prototype.materials = {
|
|||||||
envMap: environment,
|
envMap: environment,
|
||||||
side: THREE.DoubleSide,
|
side: THREE.DoubleSide,
|
||||||
transparent: true,
|
transparent: true,
|
||||||
opacity: 0.6,
|
opacity: 0.5,
|
||||||
roughness: 0.25,
|
roughness: 0.25,
|
||||||
metalness: 0.85,
|
metalness: 0.9,
|
||||||
}),
|
}),
|
||||||
Espace: new THREE.MeshStandardMaterial({
|
Espace: new THREE.MeshStandardMaterial({
|
||||||
envMap: environment,
|
envMap: environment,
|
||||||
side: THREE.DoubleSide,
|
side: THREE.DoubleSide,
|
||||||
transparent: true,
|
transparent: true,
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
roughness: 0.1,
|
roughness: 0,
|
||||||
metalness: 0.99,
|
metalness: 0.99,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
InstancedMino.prototype.materials['Plasma'].onBeforeCompile =
|
InstancedMino.prototype.materials['Plasma'].onBeforeCompile = shader => {
|
||||||
InstancedMino.prototype.materials['Espace'].onBeforeCompile = shader => {
|
|
||||||
shader.vertexShader = `
|
shader.vertexShader = `
|
||||||
varying vec3 vPos;
|
varying vec3 vPos;
|
||||||
${shader.vertexShader}
|
${shader.vertexShader}
|
||||||
|
|||||||
@@ -67,21 +67,21 @@ export class Vortex extends THREE.Group {
|
|||||||
break
|
break
|
||||||
|
|
||||||
case "Espace":
|
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.wrapS = THREE.RepeatWrapping
|
||||||
texture.wrapT = THREE.MirroredRepeatWrapping
|
texture.wrapT = THREE.MirroredRepeatWrapping
|
||||||
texture.repeat.set(2, 4)
|
texture.repeat.set(3, 6)
|
||||||
this.darkCylinder.material.map = texture
|
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 => {
|
new THREE.TextureLoader(this.loadingManager).load("./images/colorfull.jpg", texture => {
|
||||||
texture.wrapS = THREE.RepeatWrapping
|
texture.wrapS = THREE.RepeatWrapping
|
||||||
texture.wrapT = THREE.MirroredRepeatWrapping
|
texture.wrapT = THREE.MirroredRepeatWrapping
|
||||||
texture.repeat.set(2, 2)
|
texture.repeat.set(2, 4)
|
||||||
this.colorFullCylinder.material.map = texture
|
this.colorFullCylinder.material.map = texture
|
||||||
})
|
})
|
||||||
this.colorFullCylinder.material.opacity = 0.15
|
this.colorFullCylinder.material.opacity = 0.1
|
||||||
|
|
||||||
this.globalRotation = 0.028
|
this.globalRotation = 0.028
|
||||||
this.darkTextureRotation = 0.006
|
this.darkTextureRotation = 0.006
|
||||||
|
|||||||
Reference in New Issue
Block a user