Commit f436b808 authored by Rushdi's avatar Rushdi
Browse files

Update index.html

parent 9172d0bb
Pipeline #7731 passed with stage
in 5 seconds
...@@ -22,22 +22,22 @@ async function activateXR() { ...@@ -22,22 +22,22 @@ async function activateXR() {
const gl = canvas.getContext("webgl", {xrCompatible: true}); const gl = canvas.getContext("webgl", {xrCompatible: true});
// To be continued in upcoming steps. // To be continued in upcoming steps.
const scene = new THREE.Scene(); const scene = new THREE.Scene();
// The cube will have a different color on each side. // The cube will have a different color on each side.
const materials = [ const materials = [
new THREE.MeshBasicMaterial({color: 0xff0000}), new THREE.MeshBasicMaterial({color: 0xff0000}),
new THREE.MeshBasicMaterial({color: 0x0000ff}), new THREE.MeshBasicMaterial({color: 0x0000ff}),
new THREE.MeshBasicMaterial({color: 0x00ff00}), new THREE.MeshBasicMaterial({color: 0x00ff00}),
new THREE.MeshBasicMaterial({color: 0xff00ff}), new THREE.MeshBasicMaterial({color: 0xff00ff}),
new THREE.MeshBasicMaterial({color: 0x00ffff}), new THREE.MeshBasicMaterial({color: 0x00ffff}),
new THREE.MeshBasicMaterial({color: 0xffff00}) new THREE.MeshBasicMaterial({color: 0xffff00})
]; ];
// Create the cube and add it to the demo scene. // Create the cube and add it to the demo scene.
const cube = new THREE.Mesh(new THREE.BoxBufferGeometry(0.2, 0.2, 0.2), materials); const cube = new THREE.Mesh(new THREE.BoxBufferGeometry(0.2, 0.2, 0.2), materials);
cube.position.set(1, 1, 1); cube.position.set(1, 1, 1);
scene.add(cube); scene.add(cube);
} }
</script> </script>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment