Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Rafiei
Ar_test
Commits
86ad8f5d
Commit
86ad8f5d
authored
11 months ago
by
Rafiei
Browse files
Options
Download
Email Patches
Plain Diff
Update index.html
parent
c80299e4
Pipeline
#9667
passed with stage
in 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/index.html
+15
-10
public/index.html
with
15 additions
and
10 deletions
+15
-10
public/index.html
+
15
-
10
View file @
86ad8f5d
...
...
@@ -23,19 +23,24 @@ async function activateXR() {
const
scene
=
new
THREE
.
Scene
();
// The cube will have a different color on each side.
const
materials
=
[
new
THREE
.
MeshBasicMaterial
({
color
:
0xff0000
}),
new
THREE
.
MeshBasicMaterial
({
color
:
0x0000ff
}),
new
THREE
.
MeshBasicMaterial
({
color
:
0x00ff00
}),
new
THREE
.
MeshBasicMaterial
({
color
:
0xff00ff
}),
new
THREE
.
MeshBasicMaterial
({
color
:
0x00ffff
}),
new
THREE
.
MeshBasicMaterial
({
color
:
0xffff00
})
];
// Enable shadows in the renderer.
renderer
.
shadowMap
.
enabled
=
true
;
// 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
cubeGeometry
=
new
THREE
.
BoxBufferGeometry
(
0.5
,
0.5
,
0.5
);
const
cubeMaterials
=
[
new
THREE
.
MeshLambertMaterial
({
color
:
0xff0000
}),
// Red
new
THREE
.
MeshLambertMaterial
({
color
:
0x0000ff
}),
// Blue
new
THREE
.
MeshLambertMaterial
({
color
:
0x00ff00
}),
// Green
new
THREE
.
MeshLambertMaterial
({
color
:
0xff00ff
}),
// Magenta
new
THREE
.
MeshLambertMaterial
({
color
:
0x00ffff
}),
// Cyan
new
THREE
.
MeshLambertMaterial
({
color
:
0xffff00
})
// Yellow
];
const
cube
=
new
THREE
.
Mesh
(
cubeGeometry
,
cubeMaterials
);
cube
.
position
.
set
(
0
,
0
,
-
1
);
cube
.
castShadow
=
true
;
// Enable shadow casting
scene
.
add
(
cube
);
...
...
This diff is collapsed.
Click to expand it.
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