Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Esguerra Montana
Web AR
Commits
93d7c073
Commit
93d7c073
authored
Jun 09, 2024
by
Esguerra Montana
Browse files
Update index.html
parent
fafb2ce0
Pipeline
#9358
passed with stage
in 6 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
public/index.html
View file @
93d7c073
...
...
@@ -13,7 +13,7 @@
<!-- Starting an immersive WebXR session requires user interaction.
We start this one with a simple button. -->
<button
onclick=
"activateXR()"
>
Start
Cube Demo
</button>
<button
onclick=
"activateXR()"
>
Start
Torus
</button>
<script>
async
function
activateXR
()
{
// Add a canvas element and initialize a WebGL context that is compatible with WebXR.
...
...
@@ -23,10 +23,10 @@ async function activateXR() {
const
scene
=
new
THREE
.
Scene
();
//
The cube will have a different color on each side
.
//
Color of the torus geometry
.
const
material
=
new
THREE
.
MeshLambertMaterial
({
color
:
0xce1256
});
// Create the
cube
and add it to the demo scene.
// Create the
torus
and add it to the demo scene.
const
torus
=
new
THREE
.
Mesh
(
new
THREE
.
TorusKnotGeometry
(
0.3
,
0.2
,
80
,
8
),
material
);
//position the next geometry (sphere)
torus
.
position
.
x
=
-
2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment