提交 ec602c18 编写于 作者: M Mr.doob

WebGLRenderer: setClear* clean up.

上级 2edfb133
......@@ -524,39 +524,32 @@ THREE.WebGLRenderer = function ( parameters ) {
// Clearing
this.setClearColor = function ( color, alpha ) {
_clearColor.set( color );
_clearAlpha = alpha !== undefined ? alpha : 1;
this.getClearColor = function () {
_gl.clearColor( _clearColor.r, _clearColor.g, _clearColor.b, _clearAlpha );
return _clearColor;
};
this.setClearAlpha = function ( alpha ) {
this.setClearColor = function ( color, alpha ) {
_clearAlpha = alpha;
_clearColor.set( color );
_clearAlpha = alpha !== undefined ? alpha : 1;
_gl.clearColor( _clearColor.r, _clearColor.g, _clearColor.b, _clearAlpha );
};
this.setClearColorHex = function ( hex, alpha ) {
this.getClearAlpha = function () {
console.warn( 'THREE.WebGLRenderer: .setClearColorHex() is being removed. Use .setClearColor() instead.' );
this.setClearColor( hex, alpha );
return _clearAlpha;
};
this.getClearColor = function () {
return _clearColor;
};
this.setClearAlpha = function ( alpha ) {
this.getClearAlpha = function () {
_clearAlpha = alpha;
return _clearAlpha;
_gl.clearColor( _clearColor.r, _clearColor.g, _clearColor.b, _clearAlpha );
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册