Explorar o código

Fix a couple references to background in WebGLRenderer after context loss/restored

Nicolas Gauthier %!s(int64=7) %!d(string=hai) anos
pai
achega
f60be20072
Modificáronse 1 ficheiros con 23 adicións e 4 borrados
  1. 23 4
      src/renderers/WebGLRenderer.js

+ 23 - 4
src/renderers/WebGLRenderer.js

@@ -437,10 +437,29 @@ function WebGLRenderer( parameters ) {
 
 	// Clearing
 
-	this.getClearColor = background.getClearColor;
-	this.setClearColor = background.setClearColor;
-	this.getClearAlpha = background.getClearAlpha;
-	this.setClearAlpha = background.setClearAlpha;
+	this.getClearColor = function() {
+
+		return background.getClearColor();
+
+	};
+
+	this.setClearColor = function () {
+
+		background.setClearColor.apply( background, arguments );
+
+	};
+
+	this.getClearAlpha = function() {
+
+		return background.getClearAlpha();
+
+	};
+
+	this.setClearAlpha = function() {
+
+		background.setClearAlpha.apply( background, arguments );
+
+	};
 
 	this.clear = function ( color, depth, stencil ) {