Browse Source

CanvasRenderer::setSize didn't clear _contextGlobalAlpha et al

timk 14 years ago
parent
commit
1fbe2bfdbf
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/renderers/CanvasRenderer.js

+ 5 - 0
src/renderers/CanvasRenderer.js

@@ -87,6 +87,11 @@ THREE.CanvasRenderer = function () {
 
 		_clipRect.set( - _canvasWidthHalf, - _canvasHeightHalf, _canvasWidthHalf, _canvasHeightHalf );
 
+		_contextGlobalAlpha = 1;
+		_contextGlobalCompositeOperation = 0;
+		_contextStrokeStyle = null;
+		_contextFillStyle = null;
+		_contextLineWidth = 1;
 	};
 
 	this.setClearColor = function( hex, opacity ) {