From f031586a7c4dd2164635a16939b4cace8b35488c Mon Sep 17 00:00:00 2001
From: Ayivor <bennard.ayivor1@gmail.com>
Date: Fri, 23 Jun 2023 06:45:51 +0000
Subject: [PATCH] Update Cube.html

---
 public/Cube.html | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/public/Cube.html b/public/Cube.html
index adc70a0..5688208 100644
--- a/public/Cube.html
+++ b/public/Cube.html
@@ -24,7 +24,8 @@ async function activateXR() {
   const scene = new THREE.Scene();
 
 // The cube will have a different color on each side.
-const materials = [
+const cubeGeometry = new THREE.BoxBufferGeometry(0.5, 0.5, 0.5);
+const cubeMaterials = [
   new THREE.MeshBasicMaterial({color: 0x003366}),
   new THREE.MeshBasicMaterial({color: 0x66ccff}),
   new THREE.MeshBasicMaterial({color: 0xff6666}),
@@ -34,7 +35,7 @@ const materials = [
 ];
 
 // Create the cube and add it to the demo scene.
-const cube = new THREE.Mesh(new THREE.BoxBufferGeometry(0.5, 0.5, 0.5), materials);
+const cube = new THREE.Mesh(cubeGeometry, cubeMaterials);
 cube.position.set(0, 0, -1);
 scene.add(cube);
 
-- 
GitLab