|
@@ -522,13 +522,13 @@ function WebGLRenderer( parameters = {} ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
- this.clear = function ( color, depth, stencil ) {
|
|
|
+ this.clear = function ( color = true, depth = true, stencil = true ) {
|
|
|
|
|
|
let bits = 0;
|
|
|
|
|
|
- if ( color === undefined || color ) bits |= _gl.COLOR_BUFFER_BIT;
|
|
|
- if ( depth === undefined || depth ) bits |= _gl.DEPTH_BUFFER_BIT;
|
|
|
- if ( stencil === undefined || stencil ) bits |= _gl.STENCIL_BUFFER_BIT;
|
|
|
+ if ( color ) bits |= _gl.COLOR_BUFFER_BIT;
|
|
|
+ if ( depth ) bits |= _gl.DEPTH_BUFFER_BIT;
|
|
|
+ if ( stencil ) bits |= _gl.STENCIL_BUFFER_BIT;
|
|
|
|
|
|
_gl.clear( bits );
|
|
|
|