Skip to content

Commit

Permalink
orbit controls
Browse files Browse the repository at this point in the history
  • Loading branch information
bailey authored Mar 3, 2024
1 parent 8fb0db4 commit 9f76567
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

import * as THREE from 'three';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { PointerLockControls } from 'three/addons/controls/PointerLockControls.js';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import { VRButton } from 'three/addons/webxr/VRButton.js';

let camera, scene, renderer, controls;
Expand Down Expand Up @@ -98,9 +98,9 @@

let vrButton = VRButton.createButton( renderer );
document.body.appendChild( vrButton );
vrButton.addEventListener('click', function () {
controls.lock();
}, false);
// vrButton.addEventListener('click', function () {
// controls.lock();
// }, false);

// Lighting
const ambientLight = new THREE.AmbientLight(0xcccccc, 0.4);
Expand Down Expand Up @@ -131,7 +131,7 @@
createRoom();

// Controls
controls = new PointerLockControls(camera, renderer.domElement);
controls = new OrbitControls(camera, renderer.domElement);

const blocker = document.getElementById('blocker');
const instructions = document.getElementById('instructions');
Expand Down

0 comments on commit 9f76567

Please sign in to comment.