Browse Source

Merge pull request #21331 from linbingquan/dev-cleanup-cubecamera

CubeCamera: Clean up.
Mr.doob 4 years ago
parent
commit
39b50b1dc4
1 changed files with 1 additions and 6 deletions
  1. 1 6
      src/cameras/CubeCamera.js

+ 1 - 6
src/cameras/CubeCamera.js

@@ -65,12 +65,7 @@ class CubeCamera extends Object3D {
 
 
 		const renderTarget = this.renderTarget;
 		const renderTarget = this.renderTarget;
 
 
-		const cameraPX = this.children[ 0 ];
-		const cameraNX = this.children[ 1 ];
-		const cameraPY = this.children[ 2 ];
-		const cameraNY = this.children[ 3 ];
-		const cameraPZ = this.children[ 4 ];
-		const cameraNZ = this.children[ 5 ];
+		const [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = this.children;
 
 
 		const currentXrEnabled = renderer.xr.enabled;
 		const currentXrEnabled = renderer.xr.enabled;
 		const currentRenderTarget = renderer.getRenderTarget();
 		const currentRenderTarget = renderer.getRenderTarget();