From 982c275ce4d705775307e6d12950a2d6f4758758 Mon Sep 17 00:00:00 2001 From: adrien Date: Sun, 1 Feb 2026 19:49:32 +0100 Subject: [PATCH] different cylinder size --- jsm/Menu.js | 2 +- jsm/Tetrominoes.js | 2 +- jsm/Vortex.js | 12 +++++------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/jsm/Menu.js b/jsm/Menu.js index 041e556..28639d0 100644 --- a/jsm/Menu.js +++ b/jsm/Menu.js @@ -148,7 +148,7 @@ export class Menu extends GUI { directionalLightPosition.add(scene.directionalLight.position, "z").listen() let vortex = dev.addFolder("vortex opacity").close() - vortex.add(scene.vortex.transparentCylinder.material, "opacity").name("dark").min(0).max(1).listen() + vortex.add(scene.vortex.transparentCylinder.material, "opacity").min(0).max(1).listen() changeMaterial(scene.minoes.material.constructor.name) diff --git a/jsm/Tetrominoes.js b/jsm/Tetrominoes.js index 551b4a4..a676323 100644 --- a/jsm/Tetrominoes.js +++ b/jsm/Tetrominoes.js @@ -165,7 +165,7 @@ InstancedMino.prototype.materials = { side: THREE.DoubleSide, transparent: true, opacity: 0.55, - roughness: 0.35, + roughness: 0.5, metalness: 0.9, }), Espace: new THREE.MeshStandardMaterial({ diff --git a/jsm/Vortex.js b/jsm/Vortex.js index d064b45..6591ef7 100644 --- a/jsm/Vortex.js +++ b/jsm/Vortex.js @@ -14,11 +14,9 @@ export class Vortex extends THREE.Group { this.opaqueTextureRotation = 0.006 this.opaqueMoveForward = 0.025 - - const commonCylinderGeometry = new THREE.CylinderGeometry(35, 35, 1000, 12, 1, true) this.opaqueCylinder = new THREE.Mesh( - commonCylinderGeometry, + new THREE.CylinderGeometry(40, 40, 1000, 12, 1, true), new THREE.MeshBasicMaterial({ side: THREE.BackSide, blending: THREE.NormalBlending @@ -27,7 +25,7 @@ export class Vortex extends THREE.Group { this.add(this.opaqueCylinder) this.transparentCylinder = new THREE.Mesh( - commonCylinderGeometry, + new THREE.CylinderGeometry(30, 30, 1000, 12, 1, true), new THREE.MeshLambertMaterial({ side: THREE.BackSide, blending: THREE.AdditiveBlending @@ -49,7 +47,7 @@ export class Vortex extends THREE.Group { texture.repeat.set(1, 2) this.transparentCylinder.material.map = texture }) - this.transparentCylinder.material.opacity = 0.14 + this.transparentCylinder.material.opacity = 0.05 new THREE.TextureLoader(this.loadingManager).load("./images/plasma2.jpg", texture => { texture.wrapS = THREE.RepeatWrapping @@ -71,10 +69,10 @@ export class Vortex extends THREE.Group { new THREE.TextureLoader(this.loadingManager).load("./images/colorfull.jpg", texture => { texture.wrapS = THREE.RepeatWrapping texture.wrapT = THREE.MirroredRepeatWrapping - texture.repeat.set(2, 4) + texture.repeat.set(2, 8) this.transparentCylinder.material.map = texture }) - this.transparentCylinder.material.opacity = 0.12 + this.transparentCylinder.material.opacity = 0.11 new THREE.TextureLoader(this.loadingManager).load("./images/stars_space.jpg", texture => { texture.wrapS = THREE.RepeatWrapping