소스 검색

Merge pull request #12301 from bilou84/patch-1

Fix a couple references to background in WebGLRenderer after context loss/restored
Mr.doob 7 년 전
부모
커밋
9a574c80c1
1개의 변경된 파일23개의 추가작업 그리고 4개의 파일을 삭제
  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 ) {