space tweaks

This commit is contained in:
2026-01-24 15:19:49 +01:00
parent e8bc24d337
commit 1e7d29d6e3
7 changed files with 15 additions and 14 deletions

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

View File

@@ -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()

View File

@@ -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":

View File

@@ -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}

View File

@@ -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