From dd633943bbec1f9d2bf68c95482a4461374c7fdb Mon Sep 17 00:00:00 2001
From: Esguerra Montana <32esla1mpg@hft-stuttgart.de>
Date: Sun, 16 Jun 2024 17:12:51 +0000
Subject: [PATCH] Update index.html

---
 public/index.html | 33 ++++++++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/public/index.html b/public/index.html
index 8c1f716..d252b52 100644
--- a/public/index.html
+++ b/public/index.html
@@ -31,6 +31,32 @@ async function activateXR() {
   const ambientLight = new THREE.AmbientLight(0x404040); // soft white light
   scene.add(ambientLight);
 
+  
+
+   // Create the torus geometry
+  const torusRadius = 1;
+  const torusTube = 0.4;
+  const torusSegments = 64;
+  const torusGeometry = new THREE.TorusGeometry(torusRadius, torusTube, torusSegments, torusSegments);
+
+  // 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
+    clearcoatRoughness: 0.1
+  });
+
+  // Create the torus mesh
+  const torusMesh = new THREE.Mesh(torusGeometry, goldMaterial);
+
+  // Add the torus mesh to the scene
+  scene.add(torusMesh);
+
+
+
+
   // Color of the tetrahedron geometry.
   //const material = new THREE.MeshPhysicalMaterial({ color: 0xC70039, roughness: 0.5, metalness: 0.5, clearcoat: 1.0, clearcoatRoughness: 0.1 });
 
@@ -43,6 +69,7 @@ async function activateXR() {
   // Add the mesh to the scene
   //scene.add(tetrahedron);
 
+/*
 // Define the vertices
   var vertices = new Float32Array([
     -1.0, 0.0, 1.0,  // P0
@@ -98,7 +125,7 @@ async function activateXR() {
 
   // Add the meshes to the scene
   scene.add(wallMesh);
-  scene.add(roofMesh);
+  scene.add(roofMesh);*/
 
   // Set up the WebGLRenderer, which handles rendering to the session's base layer.
   const renderer = new THREE.WebGLRenderer({
@@ -148,9 +175,9 @@ async function activateXR() {
       camera.projectionMatrix.fromArray(view.projectionMatrix);
       camera.updateMatrixWorld(true);
 
-      // Rotate the house
+      /*// Rotate the house
       wallMesh.rotation.y += 0.01;
-      roofMesh.rotation.y += 0.01;
+      roofMesh.rotation.y += 0.01;*/
 
       // Render the scene with THREE.WebGLRenderer.
       renderer.render(scene, camera);
-- 
GitLab