Procházet zdrojové kódy

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

Nicolas Gauthier před 7 roky
rodič
revize
f60be20072
1 změnil soubory, kde provedl 23 přidání a 4 odebrání
  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 ) {