Browse Source

CanvasRenderer: Removed unneeded Vector2 instances.

Mr.doob 11 years ago
parent
commit
bf7755d30c
1 changed files with 6 additions and 12 deletions
  1. 6 12
      src/renderers/CanvasRenderer.js

+ 6 - 12
src/renderers/CanvasRenderer.js

@@ -163,15 +163,11 @@ THREE.CanvasRenderer = function ( parameters ) {
 
 
 		}
 		}
 
 
-		_clipBox.set(
-			new THREE.Vector2( - _canvasWidthHalf, - _canvasHeightHalf ),
-			new THREE.Vector2( _canvasWidthHalf, _canvasHeightHalf )
-		);
+		_clipBox.min.set( - _canvasWidthHalf, - _canvasHeightHalf ),
+		_clipBox.max.set(   _canvasWidthHalf,   _canvasHeightHalf );
 
 
-		_clearBox.set(
-			new THREE.Vector2( - _canvasWidthHalf, - _canvasHeightHalf ),
-			new THREE.Vector2( _canvasWidthHalf, _canvasHeightHalf )
-		);
+		_clearBox.min.set( - _canvasWidthHalf, - _canvasHeightHalf );
+		_clearBox.max.set(   _canvasWidthHalf,   _canvasHeightHalf );
 
 
 		_contextGlobalAlpha = 1;
 		_contextGlobalAlpha = 1;
 		_contextGlobalCompositeOperation = 0;
 		_contextGlobalCompositeOperation = 0;
@@ -188,10 +184,8 @@ THREE.CanvasRenderer = function ( parameters ) {
 		_clearColor.set( color );
 		_clearColor.set( color );
 		_clearAlpha = alpha !== undefined ? alpha : 1;
 		_clearAlpha = alpha !== undefined ? alpha : 1;
 
 
-		_clearBox.set(
-			new THREE.Vector2( - _canvasWidthHalf, - _canvasHeightHalf ),
-			new THREE.Vector2( _canvasWidthHalf, _canvasHeightHalf )
-		);
+		_clearBox.min.set( - _canvasWidthHalf, - _canvasHeightHalf );
+		_clearBox.max.set(   _canvasWidthHalf,   _canvasHeightHalf );
 
 
 	};
 	};