{"version":3,"sources":["jsdelivr-header.js","/npm/three@0.160.0/examples/jsm/postprocessing/Pass.js","/npm/three@0.160.0/examples/jsm/postprocessing/RenderPass.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,wHCCA,MAAM,CAAK,CAEV,aAAc,CAEb,KAAK,OAAS,GAGd,KAAK,QAAU,GAGf,KAAK,UAAY,GAGjB,KAAK,MAAQ,GAGb,KAAK,eAAiB,EAEvB,CAEA,SAA+B,CAAC,CAEhC,QAAyE,CAExE,QAAQ,MAAO,4DAA4D,CAE5E,CAEA,SAAU,CAAC,CAEZ,CAIgB,IAAI,EAAoB,GAAK,EAAG,EAAG,GAAK,EAAG,CAAC,EAI5D,MAAM,UAAmC,CAAe,CAEvD,aAAc,CAEb,MAAK,EAEL,KAAK,aAAc,WAAY,IAAI,EAAwB,CAAE,GAAK,EAAG,EAAG,GAAK,GAAK,EAAG,EAAG,GAAK,CAAC,EAAI,CAAC,CAAE,EACrG,KAAK,aAAc,KAAM,IAAI,EAAwB,CAAE,EAAG,EAAG,EAAG,EAAG,EAAG,CAAC,EAAI,CAAC,CAAE,CAE/E,CAED,CAEkB,IAAI,ECrDtB,MAAM,UAAmB,CAAK,CAE7B,YAAa,EAAO,EAAQ,EAAmB,KAAM,EAAa,KAAM,EAAa,KAAO,CAE3F,MAAK,EAEL,KAAK,MAAQ,EACb,KAAK,OAAS,EAEd,KAAK,iBAAmB,EAExB,KAAK,WAAa,EAClB,KAAK,WAAa,EAElB,KAAK,MAAQ,GACb,KAAK,WAAa,GAClB,KAAK,UAAY,GACjB,KAAK,eAAiB,IAAI,CAE3B,CAEA,OAAQ,EAAU,EAAa,EAA0C,CAExE,MAAM,EAAe,EAAS,UAC9B,EAAS,UAAY,GAErB,IAAI,EAAe,EAEd,KAAK,mBAAqB,OAE9B,EAAsB,KAAK,MAAM,iBAEjC,KAAK,MAAM,iBAAmB,KAAK,kBAI/B,KAAK,aAAe,OAExB,EAAS,cAAe,KAAK,cAAc,EAC3C,EAAS,cAAe,KAAK,UAAU,GAInC,KAAK,aAAe,OAExB,EAAgB,EAAS,cAAa,EACtC,EAAS,cAAe,KAAK,UAAU,GAInC,KAAK,YAAc,IAEvB,EAAS,WAAU,EAIpB,EAAS,gBAAiB,KAAK,eAAiB,KAAO,CAAU,EAE5D,KAAK,QAAU,IAGnB,EAAS,MAAO,EAAS,eAAgB,EAAS,eAAgB,EAAS,gBAAgB,EAI5F,EAAS,OAAQ,KAAK,MAAO,KAAK,MAAM,EAInC,KAAK,aAAe,MAExB,EAAS,cAAe,KAAK,cAAc,EAIvC,KAAK,aAAe,MAExB,EAAS,cAAe,CAAa,EAIjC,KAAK,mBAAqB,OAE9B,KAAK,MAAM,iBAAmB,GAI/B,EAAS,UAAY,CAEtB,CAED","file":"/npm/three@0.160.0/examples/jsm/postprocessing/RenderPass.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v4.62.2 and esbuild v0.28.1.\n * Original file: /npm/three@0.160.0/examples/jsm/postprocessing/RenderPass.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import {\n\tBufferGeometry,\n\tFloat32BufferAttribute,\n\tOrthographicCamera,\n\tMesh\n} from 'three';\n\nclass Pass {\n\n\tconstructor() {\n\n\t\tthis.isPass = true;\n\n\t\t// if set to true, the pass is processed by the composer\n\t\tthis.enabled = true;\n\n\t\t// if set to true, the pass indicates to swap read and write buffer after rendering\n\t\tthis.needsSwap = true;\n\n\t\t// if set to true, the pass clears its buffer before rendering\n\t\tthis.clear = false;\n\n\t\t// if set to true, the result of the pass is rendered to screen. This is set automatically by EffectComposer.\n\t\tthis.renderToScreen = false;\n\n\t}\n\n\tsetSize( /* width, height */ ) {}\n\n\trender( /* renderer, writeBuffer, readBuffer, deltaTime, maskActive */ ) {\n\n\t\tconsole.error( 'THREE.Pass: .render() must be implemented in derived pass.' );\n\n\t}\n\n\tdispose() {}\n\n}\n\n// Helper for passes that need to fill the viewport with a single quad.\n\nconst _camera = new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );\n\n// https://github.com/mrdoob/three.js/pull/21358\n\nclass FullscreenTriangleGeometry extends BufferGeometry {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( [ - 1, 3, 0, - 1, - 1, 0, 3, - 1, 0 ], 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( [ 0, 2, 0, 0, 2, 0 ], 2 ) );\n\n\t}\n\n}\n\nconst _geometry = new FullscreenTriangleGeometry();\n\nclass FullScreenQuad {\n\n\tconstructor( material ) {\n\n\t\tthis._mesh = new Mesh( _geometry, material );\n\n\t}\n\n\tdispose() {\n\n\t\tthis._mesh.geometry.dispose();\n\n\t}\n\n\trender( renderer ) {\n\n\t\trenderer.render( this._mesh, _camera );\n\n\t}\n\n\tget material() {\n\n\t\treturn this._mesh.material;\n\n\t}\n\n\tset material( value ) {\n\n\t\tthis._mesh.material = value;\n\n\t}\n\n}\n\nexport { Pass, FullScreenQuad };\n","import {\n\tColor\n} from 'three';\nimport { Pass } from './Pass.js';\n\nclass RenderPass extends Pass {\n\n\tconstructor( scene, camera, overrideMaterial = null, clearColor = null, clearAlpha = null ) {\n\n\t\tsuper();\n\n\t\tthis.scene = scene;\n\t\tthis.camera = camera;\n\n\t\tthis.overrideMaterial = overrideMaterial;\n\n\t\tthis.clearColor = clearColor;\n\t\tthis.clearAlpha = clearAlpha;\n\n\t\tthis.clear = true;\n\t\tthis.clearDepth = false;\n\t\tthis.needsSwap = false;\n\t\tthis._oldClearColor = new Color();\n\n\t}\n\n\trender( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) {\n\n\t\tconst oldAutoClear = renderer.autoClear;\n\t\trenderer.autoClear = false;\n\n\t\tlet oldClearAlpha, oldOverrideMaterial;\n\n\t\tif ( this.overrideMaterial !== null ) {\n\n\t\t\toldOverrideMaterial = this.scene.overrideMaterial;\n\n\t\t\tthis.scene.overrideMaterial = this.overrideMaterial;\n\n\t\t}\n\n\t\tif ( this.clearColor !== null ) {\n\n\t\t\trenderer.getClearColor( this._oldClearColor );\n\t\t\trenderer.setClearColor( this.clearColor );\n\n\t\t}\n\n\t\tif ( this.clearAlpha !== null ) {\n\n\t\t\toldClearAlpha = renderer.getClearAlpha();\n\t\t\trenderer.setClearAlpha( this.clearAlpha );\n\n\t\t}\n\n\t\tif ( this.clearDepth == true ) {\n\n\t\t\trenderer.clearDepth();\n\n\t\t}\n\n\t\trenderer.setRenderTarget( this.renderToScreen ? null : readBuffer );\n\n\t\tif ( this.clear === true ) {\n\n\t\t\t// TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600\n\t\t\trenderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );\n\n\t\t}\n\n\t\trenderer.render( this.scene, this.camera );\n\n\t\t// restore\n\n\t\tif ( this.clearColor !== null ) {\n\n\t\t\trenderer.setClearColor( this._oldClearColor );\n\n\t\t}\n\n\t\tif ( this.clearAlpha !== null ) {\n\n\t\t\trenderer.setClearAlpha( oldClearAlpha );\n\n\t\t}\n\n\t\tif ( this.overrideMaterial !== null ) {\n\n\t\t\tthis.scene.overrideMaterial = oldOverrideMaterial;\n\n\t\t}\n\n\t\trenderer.autoClear = oldAutoClear;\n\n\t}\n\n}\n\nexport { RenderPass };\n"]}