1
This commit is contained in:
parent
bb91ec1151
commit
77a4bd01b5
@ -29,19 +29,25 @@ function init3DLogo() {
|
|||||||
|
|
||||||
// Texture
|
// Texture
|
||||||
const textureLoader = new THREE.TextureLoader();
|
const textureLoader = new THREE.TextureLoader();
|
||||||
textureLoader.load('assets/pasted-20251022-215019-f7191fbf.png', function(texture) {
|
textureLoader.load('assets/pasted-20251022-215019-f7191fbf.png',
|
||||||
// Plane
|
function(texture) {
|
||||||
const geometry = new THREE.PlaneGeometry(5, 1.5);
|
// Plane
|
||||||
const material = new THREE.MeshStandardMaterial({ map: texture, transparent: true, roughness: 0.4, metalness: 0.2 });
|
const geometry = new THREE.PlaneGeometry(5, 1.5);
|
||||||
plane = new THREE.Mesh(geometry, material);
|
const material = new THREE.MeshStandardMaterial({ map: texture, transparent: true, roughness: 0.4, metalness: 0.2 });
|
||||||
scene.add(plane);
|
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
|
// Lights
|
||||||
const ambientLight = new THREE.AmbientLight(0xffffff, 0.7);
|
const ambientLight = new THREE.AmbientLight(0xffffff, 0.7);
|
||||||
scene.add(ambientLight);
|
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);
|
pointLight.position.set(0, 0, 5);
|
||||||
scene.add(pointLight);
|
scene.add(pointLight);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user