Explorar el Código

CanvasRenderer::setSize didn't clear _contextGlobalAlpha et al

timk hace 15 años
padre
commit
1fbe2bfdbf
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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 ) {

粤ICP备19079148号