Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LAU
AR
Commits
8d5277bf
Commit
8d5277bf
authored
Jun 19, 2023
by
LAU
Browse files
Update index.html
parent
1ee2a265
Pipeline
#7893
passed with stage
in 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/index.html
View file @
8d5277bf
...
@@ -63,11 +63,12 @@ const camera = new THREE.PerspectiveCamera();
...
@@ -63,11 +63,12 @@ const camera = new THREE.PerspectiveCamera();
camera
.
matrixAutoUpdate
=
false
;
camera
.
matrixAutoUpdate
=
false
;
// Initialize a WebXR session using "immersive-ar".
// Initialize a WebXR session using "immersive-ar".
const
session
=
await
navigator
.
xr
.
requestSession
(
"
immersive-ar
"
);
const
session
=
await
navigator
.
xr
.
requestSession
(
"
immersive-ar
"
,
{
requiredFeatures
:
[
'
hit-test
'
]}
);
session
.
updateRenderState
({
session
.
updateRenderState
({
baseLayer
:
new
XRWebGLLayer
(
session
,
gl
)
baseLayer
:
new
XRWebGLLayer
(
session
,
gl
)
});
});
// A 'local' reference space has a native origin that is located
// A 'local' reference space has a native origin that is located
// near the viewer's position at the time the session was created.
// near the viewer's position at the time the session was created.
const
referenceSpace
=
await
session
.
requestReferenceSpace
(
'
local
'
);
const
referenceSpace
=
await
session
.
requestReferenceSpace
(
'
local
'
);
...
...
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