File tree Expand file tree Collapse file tree 2 files changed +16
-21
lines changed Expand file tree Collapse file tree 2 files changed +16
-21
lines changed Original file line number Diff line number Diff line change @@ -1683,20 +1683,6 @@ Object.defineProperties( WebGLRenderTarget.prototype, {
16831683
16841684//
16851685
1686- Object . defineProperties ( WebVRManager . prototype , {
1687-
1688- standing : {
1689- set : function ( /* value */ ) {
1690-
1691- console . warn ( 'THREE.WebVRManager: .standing has been removed.' ) ;
1692-
1693- }
1694- }
1695-
1696- } ) ;
1697-
1698- //
1699-
17001686Audio . prototype . load = function ( file ) {
17011687
17021688 console . warn ( 'THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.' ) ;
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ function WebVRManager( renderer ) {
174174
175175 this . enabled = false ;
176176 this . userHeight = 1.6 ;
177+ this . standing = false ;
177178
178179 this . getController = function ( id ) {
179180
@@ -229,15 +230,19 @@ function WebVRManager( renderer ) {
229230
230231 //
231232
232- var stageParameters = device . stageParameters ;
233+ if ( this . standing ) {
233234
234- if ( stageParameters ) {
235+ var stageParameters = device . stageParameters ;
235236
236- standingMatrix . fromArray ( stageParameters . sittingToStandingTransform ) ;
237+ if ( stageParameters ) {
237238
238- } else {
239+ standingMatrix . fromArray ( stageParameters . sittingToStandingTransform ) ;
240+
241+ } else {
242+
243+ standingMatrix . makeTranslation ( 0 , scope . userHeight , 0 ) ;
239244
240- standingMatrix . makeTranslation ( 0 , scope . userHeight , 0 ) ;
245+ }
241246
242247 }
243248
@@ -287,8 +292,12 @@ function WebVRManager( renderer ) {
287292
288293 standingMatrixInverse . getInverse ( standingMatrix ) ;
289294
290- cameraL . matrixWorldInverse . multiply ( standingMatrixInverse ) ;
291- cameraR . matrixWorldInverse . multiply ( standingMatrixInverse ) ;
295+ if ( this . standing ) {
296+
297+ cameraL . matrixWorldInverse . multiply ( standingMatrixInverse ) ;
298+ cameraR . matrixWorldInverse . multiply ( standingMatrixInverse ) ;
299+
300+ }
292301
293302 var parent = poseObject . parent ;
294303
You can’t perform that action at this time.
0 commit comments