Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ayivor
ben
Commits
f031586a
Commit
f031586a
authored
Jun 23, 2023
by
Ayivor
Browse files
Update Cube.html
parent
2a8585cd
Pipeline
#8235
passed with stage
in 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/Cube.html
View file @
f031586a
...
...
@@ -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
),
m
aterials
);
const
cube
=
new
THREE
.
Mesh
(
cubeGeometry
,
cubeM
aterials
);
cube
.
position
.
set
(
0
,
0
,
-
1
);
scene
.
add
(
cube
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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