From 307b62ed66dd694af1bb0f3d429f41f7ead8f911 Mon Sep 17 00:00:00 2001 From: Esguerra Montana <32esla1mpg@hft-stuttgart.de> Date: Sun, 16 Jun 2024 17:26:21 +0000 Subject: [PATCH] Update index.html --- public/index.html | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/public/index.html b/public/index.html index e18ea4d..d335edc 100644 --- a/public/index.html +++ b/public/index.html @@ -33,7 +33,8 @@ async function activateXR() { - // Create the torus geometry + // CREATE TORUS GEOMETRY + const torusRadius = 1; const torusTube = 0.4; const torusSegments = 64; @@ -41,24 +42,21 @@ async function activateXR() { // Create a metallic gold material const goldMaterial = new THREE.MeshPhysicalMaterial({ - color: 0xFFD700, // Gold color - metalness: 1.0, // Fully metallic - roughness: 0.4, // Adjust for shininess - clearcoat: 0.2, // Add clear coat for a polished effect + color: 0xFFD700, + metalness: 1.0, + roughness: 0.4, + clearcoat: 0.2, clearcoatRoughness: 0.1 }); - // Create the torus mesh const torusMesh = new THREE.Mesh(torusGeometry, goldMaterial); - // Scale the torus mesh to make it smaller torusMesh.scale.set(0.2, 0.2, 0.2); - // Add the torus mesh to the scene scene.add(torusMesh); - + //CREATE TETRAHEDRON GEOMETRY // Color of the tetrahedron geometry. //const material = new THREE.MeshPhysicalMaterial({ color: 0xC70039, roughness: 0.5, metalness: 0.5, clearcoat: 1.0, clearcoatRoughness: 0.1 }); @@ -72,6 +70,8 @@ async function activateXR() { // Add the mesh to the scene //scene.add(tetrahedron); + +//CREATE A HOUSE ROTATING /* // Define the vertices var vertices = new Float32Array([ @@ -126,9 +126,10 @@ async function activateXR() { wallMesh.position.set(0, -1.5, -3); roofMesh.position.set(0, -1.5, -3); - // Add the meshes to the scene + // Add the house to the scene scene.add(wallMesh); scene.add(roofMesh);*/ + // Set up the WebGLRenderer, which handles rendering to the session's base layer. const renderer = new THREE.WebGLRenderer({ -- GitLab