tweaks again

This commit is contained in:
2026-03-19 18:20:11 +01:00
parent 13e7240d65
commit 8509608ba9
2 changed files with 16 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ let jsKeyRenamer = new Proxy({
["→"]: "ArrowRight", ["→"]: "ArrowRight",
["↑"]: "ArrowUp", ["↑"]: "ArrowUp",
["↓"]: "ArrowDown", ["↓"]: "ArrowDown",
["Space"]: " ", ["Espace"]: " ",
["Échap."]: "Escape", ["Échap."]: "Escape",
["Ret. arrière"]: "Backspace", ["Ret. arrière"]: "Backspace",
["Entrée"]: "Enter", ["Entrée"]: "Enter",
@@ -17,7 +17,7 @@ let friendyKeyRenamer = new Proxy({
["ArrowRight"]: "→", ["ArrowRight"]: "→",
["ArrowUp"]: "↑", ["ArrowUp"]: "↑",
["ArrowDown"]: "↓", ["ArrowDown"]: "↓",
[" "]: "Space", [" "]: "Espace",
["Escape"]: "Échap.", ["Escape"]: "Échap.",
["Backspace"]: "Ret. arrière", ["Backspace"]: "Ret. arrière",
["Enter"]: "Entrée", ["Enter"]: "Entrée",

View File

@@ -22,7 +22,6 @@ export class Vortex extends THREE.Group {
blending: THREE.MultiplyBlending blending: THREE.MultiplyBlending
}) })
) )
this.add(this.opaqueCylinder)
this.transparentCylinder = new THREE.Mesh( this.transparentCylinder = new THREE.Mesh(
new THREE.CylinderGeometry(30, 30, 1000, 12, 1, true), new THREE.CylinderGeometry(30, 30, 1000, 12, 1, true),
@@ -31,7 +30,6 @@ export class Vortex extends THREE.Group {
blending: THREE.AdditiveBlending blending: THREE.AdditiveBlending
}) })
) )
this.add(this.transparentCylinder)
this.position.set(5, 100, -10) this.position.set(5, 100, -10)
} }
@@ -41,20 +39,22 @@ export class Vortex extends THREE.Group {
switch (theme) { switch (theme) {
case "Plasma": case "Plasma":
new THREE.TextureLoader(this.loadingManager).load("./images/plasma.jpg", texture => { loader.load("./images/plasma.jpg", texture => {
texture.wrapS = THREE.RepeatWrapping texture.wrapS = THREE.RepeatWrapping
texture.wrapT = THREE.MirroredRepeatWrapping texture.wrapT = THREE.MirroredRepeatWrapping
texture.repeat.set(1, 2) texture.repeat.set(1, 2)
this.transparentCylinder.material.map = texture this.transparentCylinder.material.map = texture
this.transparentCylinder.material.opacity = 0.15 this.transparentCylinder.material.opacity = 0.15
this.add(this.transparentCylinder)
}) })
new THREE.TextureLoader(this.loadingManager).load("./images/plasma2.jpg", texture => { loader.load("./images/plasma2.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, 2)
this.opaqueCylinder.material.map = texture this.opaqueCylinder.material.map = texture
this.opaqueCylinder.material.blending = THREE.MultiplyBlending this.opaqueCylinder.material.blending = THREE.MultiplyBlending
this.add(this.opaqueCylinder)
}) })
this.globalRotation = 0.028 this.globalRotation = 0.028
@@ -67,32 +67,36 @@ export class Vortex extends THREE.Group {
break break
case "Space": case "Space":
new THREE.TextureLoader(this.loadingManager).load("./images/colorfull.jpg", texture => { loader.load("./images/colorfull.jpg", texture => {
texture.wrapS = THREE.RepeatWrapping texture.wrapS = THREE.RepeatWrapping
texture.wrapT = THREE.MirroredRepeatWrapping texture.wrapT = THREE.MirroredRepeatWrapping
texture.repeat.set(1, 4) texture.repeat.set(1, 4)
this.transparentCylinder.material.map = texture this.transparentCylinder.material.map = texture
this.transparentCylinder.material.opacity = 0.3 this.transparentCylinder.material.opacity = 0.3
this.add(this.transparentCylinder)
}) })
new THREE.TextureLoader(this.loadingManager).load("./images/stars_space.jpg", texture => { loader.load("./images/stars_space.jpg", texture => {
texture.wrapS = THREE.RepeatWrapping texture.wrapS = THREE.RepeatWrapping
texture.wrapT = THREE.RepeatWrapping texture.wrapT = THREE.RepeatWrapping
texture.repeat.set(3, 3) texture.repeat.set(3, 6)
this.opaqueCylinder.material.map = texture this.opaqueCylinder.material.map = texture
this.opaqueCylinder.material.blending = THREE.AdditiveBlending this.opaqueCylinder.material.blending = THREE.AdditiveBlending
this.add(this.opaqueCylinder)
}) })
this.globalRotation = 0.028 this.globalRotation = 0.028
this.opaqueTextureRotation = 0.006 this.opaqueTextureRotation = 0.006
this.opaqueMoveForward = 0.03 this.opaqueMoveForward = 0.06
this.transparentTextureRotation = 0.006 this.transparentTextureRotation = 0
this.transparentMoveForward = 0.06 this.transparentMoveForward = 0.01
this.visible = true this.visible = true
break break
case "Retro": case "Retro":
this.remove(this.transparentCylinder)
this.remove(this.opaqueCylinder)
this.visible = false this.visible = false
break break
} }