Archived
Private
Public Access
1
0

Initial commit

This commit is contained in:
2022-09-04 12:45:01 +02:00
commit f4a01d6a69
11601 changed files with 4206660 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
( function () {
class ClearPass extends THREE.Pass {
constructor( clearColor, clearAlpha ) {
super();
this.needsSwap = false;
this.clearColor = clearColor !== undefined ? clearColor : 0x000000;
this.clearAlpha = clearAlpha !== undefined ? clearAlpha : 0;
this._oldClearColor = new THREE.Color();
}
render( renderer, writeBuffer, readBuffer
/*, deltaTime, maskActive */
) {
let oldClearAlpha;
if ( this.clearColor ) {
renderer.getClearColor( this._oldClearColor );
oldClearAlpha = renderer.getClearAlpha();
renderer.setClearColor( this.clearColor, this.clearAlpha );
}
renderer.setRenderTarget( this.renderToScreen ? null : readBuffer );
renderer.clear();
if ( this.clearColor ) {
renderer.setClearColor( this._oldClearColor, oldClearAlpha );
}
}
}
THREE.ClearPass = ClearPass;
} )();