File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 11
11
12
12
< div id ="info ">
13
13
< a href ="https://threejs.org " target ="_blank " rel ="noopener "> three.js</ a > - shadowmap - models by < a href ="https://mirada.com/ " target ="_blank " rel ="noopener "> mirada</ a > from < a href ="http://www.ro.me " target ="_blank " rel ="noopener "> rome</ a > < br />
14
- move camera with WASD / RF + mouse< br />
15
14
t: toggle HUD
16
15
</ div >
17
16
30
29
31
30
import Stats from 'three/addons/libs/stats.module.js' ;
32
31
33
- import { FirstPersonControls } from 'three/addons/controls/FirstPersonControls .js' ;
32
+ import { OrbitControls } from 'three/addons/controls/OrbitControls .js' ;
34
33
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js' ;
35
34
import { FontLoader } from 'three/addons/loaders/FontLoader.js' ;
36
35
import { TextGeometry } from 'three/addons/geometries/TextGeometry.js' ;
124
123
125
124
// CONTROLS
126
125
127
- controls = new FirstPersonControls ( camera , renderer . domElement ) ;
126
+ controls = new OrbitControls ( camera , renderer . domElement ) ;
127
+ controls . enablePan = false ;
128
+ controls . maxPolarAngle = Math . PI / 2 ;
129
+ controls . minDistance = 200 ;
130
+ controls . maxDistance = 2200 ;
128
131
129
- controls . lookSpeed = 0.0125 ;
130
- controls . movementSpeed = 500 ;
131
- controls . lookVertical = true ;
132
-
133
- controls . lookAt ( scene . position ) ;
132
+ controls . target . set ( 0 , - 75 , 25 ) ;
133
+ controls . update ( ) ;
134
134
135
135
// STATS
136
136
You can’t perform that action at this time.
0 commit comments