Buckets:
ktongue/docker_container / simsite /frontend /node_modules /three /examples /jsm /postprocessing /ClearPass.js
| import { | |
| Color | |
| } from 'three'; | |
| import { Pass } from './Pass.js'; | |
| class ClearPass extends Pass { | |
| constructor( clearColor, clearAlpha ) { | |
| super(); | |
| this.needsSwap = false; | |
| this.clearColor = ( clearColor !== undefined ) ? clearColor : 0x000000; | |
| this.clearAlpha = ( clearAlpha !== undefined ) ? clearAlpha : 0; | |
| this._oldClearColor = new 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 ); | |
| } | |
| } | |
| } | |
| export { ClearPass }; | |
Xet Storage Details
- Size:
- 875 Bytes
- Xet hash:
- 6d92010db1f10552ce01caea7dda4465ddd269c6010a26cb1335581c0f983ff7
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.