diff --git a/public/index.html b/public/index.html index 8c1f716fb7a8f04b2a00f1cac779096c9e19c1c1..d252b529f62c8a70efdf69865878b09342a64f17 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);