Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Virnirr committed Dec 5, 2023
1 parent dc656c2 commit 826d45f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions VRLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const material = new THREE.MeshPhysicalMaterial({
})


// load a resource
// load a resource
loader.load(
// resource URL
"./SaMo_topo_14_downScaled.obj",
Expand Down Expand Up @@ -116,13 +116,15 @@ function onWindowResize() {
// give stats
const stats = new Stats();
document.body.appendChild(stats.dom);

document.body.appendChild( VRButton.createButton( renderer ) );
renderer.xr.enabled = true;
renderer.xr.setReferenceSpaceType( 'local-floor' );
document.body.appendChild( VRButton.createButton( renderer ) );
// renderer.xr.enabled = true;

// animates everything every time
function animate() {
requestAnimationFrame(animate);
renderer.setAnimationLoop(animate);
controls.update();
camera.lookAt(cameraTarget);
render();
Expand Down

0 comments on commit 826d45f

Please sign in to comment.