浏览代码

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

Nicolas Gauthier 7 年之前
父节点
当前提交
f60be20072
共有 1 个文件被更改,包括 23 次插入4 次删除
  1. 23 4
      src/renderers/WebGLRenderer.js

+ 23 - 4
src/renderers/WebGLRenderer.js

@@ -437,10 +437,29 @@ function WebGLRenderer( parameters ) {
 
 
 	// Clearing
 	// 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 ) {
 	this.clear = function ( color, depth, stencil ) {