From 77a4bd01b58ccaef9b6cb8eb0c9bec1ef3665107 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Tue, 4 Nov 2025 18:22:09 +0000 Subject: [PATCH] 1 --- assets/js/main.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/assets/js/main.js b/assets/js/main.js index a75a685..fba20e6 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -29,19 +29,25 @@ function init3DLogo() { // Texture const textureLoader = new THREE.TextureLoader(); - textureLoader.load('assets/pasted-20251022-215019-f7191fbf.png', function(texture) { - // Plane - const geometry = new THREE.PlaneGeometry(5, 1.5); - const material = new THREE.MeshStandardMaterial({ map: texture, transparent: true, roughness: 0.4, metalness: 0.2 }); - plane = new THREE.Mesh(geometry, material); - scene.add(plane); - }); + textureLoader.load('assets/pasted-20251022-215019-f7191fbf.png', + function(texture) { + // Plane + const geometry = new THREE.PlaneGeometry(5, 1.5); + const material = new THREE.MeshStandardMaterial({ map: texture, transparent: true, roughness: 0.4, metalness: 0.2 }); + plane = new THREE.Mesh(geometry, material); + scene.add(plane); + }, + undefined, // onProgress callback not needed + function(err) { + console.error('An error happened while loading the texture.', err); + } + ); // Lights const ambientLight = new THREE.AmbientLight(0xffffff, 0.7); scene.add(ambientLight); - const pointLight = new THREE.PointLight(0xffffff, 0.8); + const pointLight = new THREE.PointLight(0xDB7093, 1.2); // Purple-red light pointLight.position.set(0, 0, 5); scene.add(pointLight); @@ -89,4 +95,4 @@ function init3DLogo() { } } -window.addEventListener('load', init3DLogo); \ No newline at end of file +window.addEventListener('load', init3DLogo);