Skip to content

Commit 1d5dc70

Browse files
committed
Updated builds.
1 parent c4c439c commit 1d5dc70

File tree

5 files changed

+44
-92
lines changed

5 files changed

+44
-92
lines changed

build/three.cjs

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26222,8 +26222,6 @@ class WebXRManager extends EventDispatcher {
2622226222

2622326223
//
2622426224

26225-
let userCamera = null;
26226-
2622726225
const cameraL = new PerspectiveCamera();
2622826226
cameraL.layers.enable( 1 );
2622926227
cameraL.viewport = new Vector4();
@@ -26243,19 +26241,11 @@ class WebXRManager extends EventDispatcher {
2624326241

2624426242
//
2624526243

26246-
this.cameraAutoUpdate = true; // @deprecated, r153
26244+
this.cameraAutoUpdate = true;
2624726245
this.enabled = false;
2624826246

2624926247
this.isPresenting = false;
2625026248

26251-
this.getCamera = function () {}; // @deprecated, r153
26252-
26253-
this.setUserCamera = function ( value ) {
26254-
26255-
userCamera = value;
26256-
26257-
};
26258-
2625926249
this.getController = function ( index ) {
2626026250

2626126251
let controller = controllers[ index ];
@@ -26692,15 +26682,9 @@ class WebXRManager extends EventDispatcher {
2669226682

2669326683
}
2669426684

26695-
this.updateCameraXR = function ( camera ) {
26685+
this.updateCamera = function ( camera ) {
2669626686

26697-
if ( session === null ) return camera;
26698-
26699-
if ( userCamera ) {
26700-
26701-
camera = userCamera;
26702-
26703-
}
26687+
if ( session === null ) return;
2670426688

2670526689
cameraXR.near = cameraR.near = cameraL.near = camera.near;
2670626690
cameraXR.far = cameraR.far = cameraL.far = camera.far;
@@ -26746,19 +26730,11 @@ class WebXRManager extends EventDispatcher {
2674626730

2674726731
// update user camera and its children
2674826732

26749-
if ( userCamera ) {
26750-
26751-
updateUserCamera( cameraXR, parent );
26752-
26753-
}
26754-
26755-
return cameraXR;
26733+
updateUserCamera( camera, cameraXR, parent );
2675626734

2675726735
};
2675826736

26759-
function updateUserCamera( cameraXR, parent ) {
26760-
26761-
const camera = userCamera;
26737+
function updateUserCamera( camera, cameraXR, parent ) {
2676226738

2676326739
if ( parent === null ) {
2676426740

@@ -26795,6 +26771,12 @@ class WebXRManager extends EventDispatcher {
2679526771

2679626772
}
2679726773

26774+
this.getCamera = function () {
26775+
26776+
return cameraXR;
26777+
26778+
};
26779+
2679826780
this.getFoveation = function () {
2679926781

2680026782
if ( glProjLayer === null && glBaseLayer === null ) {
@@ -28933,7 +28915,9 @@ class WebGLRenderer {
2893328915

2893428916
if ( xr.enabled === true && xr.isPresenting === true ) {
2893528917

28936-
camera = xr.updateCameraXR( camera ); // use XR camera for rendering
28918+
if ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera );
28919+
28920+
camera = xr.getCamera(); // use XR camera for rendering
2893728921

2893828922
}
2893928923

build/three.js

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26227,8 +26227,6 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
2622726227

2622826228
//
2622926229

26230-
let userCamera = null;
26231-
2623226230
const cameraL = new PerspectiveCamera();
2623326231
cameraL.layers.enable( 1 );
2623426232
cameraL.viewport = new Vector4();
@@ -26248,19 +26246,11 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
2624826246

2624926247
//
2625026248

26251-
this.cameraAutoUpdate = true; // @deprecated, r153
26249+
this.cameraAutoUpdate = true;
2625226250
this.enabled = false;
2625326251

2625426252
this.isPresenting = false;
2625526253

26256-
this.getCamera = function () {}; // @deprecated, r153
26257-
26258-
this.setUserCamera = function ( value ) {
26259-
26260-
userCamera = value;
26261-
26262-
};
26263-
2626426254
this.getController = function ( index ) {
2626526255

2626626256
let controller = controllers[ index ];
@@ -26697,15 +26687,9 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
2669726687

2669826688
}
2669926689

26700-
this.updateCameraXR = function ( camera ) {
26690+
this.updateCamera = function ( camera ) {
2670126691

26702-
if ( session === null ) return camera;
26703-
26704-
if ( userCamera ) {
26705-
26706-
camera = userCamera;
26707-
26708-
}
26692+
if ( session === null ) return;
2670926693

2671026694
cameraXR.near = cameraR.near = cameraL.near = camera.near;
2671126695
cameraXR.far = cameraR.far = cameraL.far = camera.far;
@@ -26751,19 +26735,11 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
2675126735

2675226736
// update user camera and its children
2675326737

26754-
if ( userCamera ) {
26755-
26756-
updateUserCamera( cameraXR, parent );
26757-
26758-
}
26759-
26760-
return cameraXR;
26738+
updateUserCamera( camera, cameraXR, parent );
2676126739

2676226740
};
2676326741

26764-
function updateUserCamera( cameraXR, parent ) {
26765-
26766-
const camera = userCamera;
26742+
function updateUserCamera( camera, cameraXR, parent ) {
2676726743

2676826744
if ( parent === null ) {
2676926745

@@ -26800,6 +26776,12 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
2680026776

2680126777
}
2680226778

26779+
this.getCamera = function () {
26780+
26781+
return cameraXR;
26782+
26783+
};
26784+
2680326785
this.getFoveation = function () {
2680426786

2680526787
if ( glProjLayer === null && glBaseLayer === null ) {
@@ -28938,7 +28920,9 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
2893828920

2893928921
if ( xr.enabled === true && xr.isPresenting === true ) {
2894028922

28941-
camera = xr.updateCameraXR( camera ); // use XR camera for rendering
28923+
if ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera );
28924+
28925+
camera = xr.getCamera(); // use XR camera for rendering
2894228926

2894328927
}
2894428928

build/three.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/three.module.js

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26220,8 +26220,6 @@ class WebXRManager extends EventDispatcher {
2622026220

2622126221
//
2622226222

26223-
let userCamera = null;
26224-
2622526223
const cameraL = new PerspectiveCamera();
2622626224
cameraL.layers.enable( 1 );
2622726225
cameraL.viewport = new Vector4();
@@ -26241,19 +26239,11 @@ class WebXRManager extends EventDispatcher {
2624126239

2624226240
//
2624326241

26244-
this.cameraAutoUpdate = true; // @deprecated, r153
26242+
this.cameraAutoUpdate = true;
2624526243
this.enabled = false;
2624626244

2624726245
this.isPresenting = false;
2624826246

26249-
this.getCamera = function () {}; // @deprecated, r153
26250-
26251-
this.setUserCamera = function ( value ) {
26252-
26253-
userCamera = value;
26254-
26255-
};
26256-
2625726247
this.getController = function ( index ) {
2625826248

2625926249
let controller = controllers[ index ];
@@ -26690,15 +26680,9 @@ class WebXRManager extends EventDispatcher {
2669026680

2669126681
}
2669226682

26693-
this.updateCameraXR = function ( camera ) {
26683+
this.updateCamera = function ( camera ) {
2669426684

26695-
if ( session === null ) return camera;
26696-
26697-
if ( userCamera ) {
26698-
26699-
camera = userCamera;
26700-
26701-
}
26685+
if ( session === null ) return;
2670226686

2670326687
cameraXR.near = cameraR.near = cameraL.near = camera.near;
2670426688
cameraXR.far = cameraR.far = cameraL.far = camera.far;
@@ -26744,19 +26728,11 @@ class WebXRManager extends EventDispatcher {
2674426728

2674526729
// update user camera and its children
2674626730

26747-
if ( userCamera ) {
26748-
26749-
updateUserCamera( cameraXR, parent );
26750-
26751-
}
26752-
26753-
return cameraXR;
26731+
updateUserCamera( camera, cameraXR, parent );
2675426732

2675526733
};
2675626734

26757-
function updateUserCamera( cameraXR, parent ) {
26758-
26759-
const camera = userCamera;
26735+
function updateUserCamera( camera, cameraXR, parent ) {
2676026736

2676126737
if ( parent === null ) {
2676226738

@@ -26793,6 +26769,12 @@ class WebXRManager extends EventDispatcher {
2679326769

2679426770
}
2679526771

26772+
this.getCamera = function () {
26773+
26774+
return cameraXR;
26775+
26776+
};
26777+
2679626778
this.getFoveation = function () {
2679726779

2679826780
if ( glProjLayer === null && glBaseLayer === null ) {
@@ -28931,7 +28913,9 @@ class WebGLRenderer {
2893128913

2893228914
if ( xr.enabled === true && xr.isPresenting === true ) {
2893328915

28934-
camera = xr.updateCameraXR( camera ); // use XR camera for rendering
28916+
if ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera );
28917+
28918+
camera = xr.getCamera(); // use XR camera for rendering
2893528919

2893628920
}
2893728921

build/three.module.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)