File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -158,12 +158,12 @@ class Renderer {
158
158
return this . camera . position ;
159
159
}
160
160
161
- set cameraUp ( position : THREE . Vector3 ) {
162
- this . camera . up . set ( position . x , position . y , position . z ) ;
161
+ set cameraRotation ( rotation : THREE . Quaternion ) {
162
+ this . camera . quaternion . set ( rotation . x , rotation . y , rotation . z , rotation . w ) ;
163
163
}
164
164
165
- get cameraUp ( ) {
166
- return this . camera . up ;
165
+ get cameraRotation ( ) : THREE . Quaternion {
166
+ return this . camera . quaternion ;
167
167
}
168
168
169
169
set cameraTarget ( position : THREE . Vector3 ) {
@@ -174,6 +174,14 @@ class Renderer {
174
174
return this . controls . target ;
175
175
}
176
176
177
+ set cameraUp ( up : THREE . Vector3 ) {
178
+ this . camera . up . set ( up . x , up . y , up . z ) ;
179
+ }
180
+
181
+ get cameraUp ( ) {
182
+ return this . camera . up ;
183
+ }
184
+
177
185
/**
178
186
* Animation
179
187
*/
@@ -199,7 +207,7 @@ class Renderer {
199
207
}
200
208
201
209
handleCameraMove ( ) {
202
- this . scene . handleCameraMove ( this . camera . position , this . cameraTarget ) ;
210
+ this . scene . handleCameraMove ( this . camera . position , this . controls . target ) ;
203
211
}
204
212
205
213
handleCameraMoveEnd ( ) {
You can’t perform that action at this time.
0 commit comments