Skip to content

Commit e09503c

Browse files
committed
Clean up
1 parent 4505b86 commit e09503c

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

src/renderers/common/XRManager.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ class XRManager extends EventDispatcher {
11521152

11531153
} else {
11541154

1155-
// assume single camera setup (AR)
1155+
// view frustum culling will be performed per camera, but assign this anyway
11561156

11571157
cameraXR.projectionMatrix.copy( cameraL.projectionMatrix );
11581158

@@ -1575,16 +1575,7 @@ function onAnimationFrame( time, frame ) {
15751575

15761576
cameraXR.cameras.length = 0;
15771577
cameraXRNeedsUpdate = true;
1578-
1579-
if ( views.length === 2 ) {
1580-
1581-
cameraXR.perCameraCulling = false;
1582-
1583-
} else {
1584-
1585-
cameraXR.perCameraCulling = true;
1586-
1587-
}
1578+
cameraXR.perCameraCulling = views.length !== 2;
15881579

15891580
}
15901581

src/renderers/webxr/WebXRManager.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ class WebXRManager extends EventDispatcher {
770770

771771
} else {
772772

773-
// assume single camera setup (AR)
773+
// view frustum culling will be performed per camera, but assign this anyway
774774

775775
cameraXR.projectionMatrix.copy( cameraL.projectionMatrix );
776776

@@ -936,16 +936,7 @@ class WebXRManager extends EventDispatcher {
936936

937937
cameraXR.cameras.length = 0;
938938
cameraXRNeedsUpdate = true;
939-
940-
if ( views.length === 2 ) {
941-
942-
cameraXR.perCameraCulling = false;
943-
944-
} else {
945-
946-
cameraXR.perCameraCulling = true;
947-
948-
}
939+
cameraXR.perCameraCulling = views.length !== 2;
949940

950941
}
951942

0 commit comments

Comments
 (0)