1 |
- {"ast":null,"code":"import { backbufferColorTextureHandle } from \"../../frameGraphTypes.js\";\nimport { FrameGraphTask } from \"../../frameGraphTask.js\";\n/**\n * Task which copies a texture to the backbuffer color texture.\n */\nexport class FrameGraphCopyToBackbufferColorTask extends FrameGraphTask {\n record() {\n if (this.sourceTexture === undefined) {\n throw new Error(`FrameGraphCopyToBackbufferColorTask \"${this.name}\": sourceTexture is required`);\n }\n const pass = this._frameGraph.addRenderPass(this.name);\n pass.setRenderTarget(backbufferColorTextureHandle);\n pass.setExecuteFunc(context => {\n if (!context.isBackbuffer(this.sourceTexture)) {\n context.copyTexture(this.sourceTexture);\n }\n });\n const passDisabled = this._frameGraph.addRenderPass(this.name + \"_disabled\", true);\n passDisabled.setRenderTarget(backbufferColorTextureHandle);\n passDisabled.setExecuteFunc(_context => {});\n }\n}","map":{"version":3,"names":["backbufferColorTextureHandle","FrameGraphTask","FrameGraphCopyToBackbufferColorTask","record","sourceTexture","undefined","Error","name","pass","_frameGraph","addRenderPass","setRenderTarget","setExecuteFunc","context","isBackbuffer","copyTexture","passDisabled","_context"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.js"],"sourcesContent":["import { backbufferColorTextureHandle } from \"../../frameGraphTypes.js\";\nimport { FrameGraphTask } from \"../../frameGraphTask.js\";\n/**\n * Task which copies a texture to the backbuffer color texture.\n */\nexport class FrameGraphCopyToBackbufferColorTask extends FrameGraphTask {\n record() {\n if (this.sourceTexture === undefined) {\n throw new Error(`FrameGraphCopyToBackbufferColorTask \"${this.name}\": sourceTexture is required`);\n }\n const pass = this._frameGraph.addRenderPass(this.name);\n pass.setRenderTarget(backbufferColorTextureHandle);\n pass.setExecuteFunc((context) => {\n if (!context.isBackbuffer(this.sourceTexture)) {\n context.copyTexture(this.sourceTexture);\n }\n });\n const passDisabled = this._frameGraph.addRenderPass(this.name + \"_disabled\", true);\n passDisabled.setRenderTarget(backbufferColorTextureHandle);\n passDisabled.setExecuteFunc((_context) => { });\n }\n}\n"],"mappings":"AAAA,SAASA,4BAA4B,QAAQ,0BAA0B;AACvE,SAASC,cAAc,QAAQ,yBAAyB;AACxD;AACA;AACA;AACA,OAAO,MAAMC,mCAAmC,SAASD,cAAc,CAAC;EACpEE,MAAMA,CAAA,EAAG;IACL,IAAI,IAAI,CAACC,aAAa,KAAKC,SAAS,EAAE;MAClC,MAAM,IAAIC,KAAK,CAAC,wCAAwC,IAAI,CAACC,IAAI,8BAA8B,CAAC;IACpG;IACA,MAAMC,IAAI,GAAG,IAAI,CAACC,WAAW,CAACC,aAAa,CAAC,IAAI,CAACH,IAAI,CAAC;IACtDC,IAAI,CAACG,eAAe,CAACX,4BAA4B,CAAC;IAClDQ,IAAI,CAACI,cAAc,CAAEC,OAAO,IAAK;MAC7B,IAAI,CAACA,OAAO,CAACC,YAAY,CAAC,IAAI,CAACV,aAAa,CAAC,EAAE;QAC3CS,OAAO,CAACE,WAAW,CAAC,IAAI,CAACX,aAAa,CAAC;MAC3C;IACJ,CAAC,CAAC;IACF,MAAMY,YAAY,GAAG,IAAI,CAACP,WAAW,CAACC,aAAa,CAAC,IAAI,CAACH,IAAI,GAAG,WAAW,EAAE,IAAI,CAAC;IAClFS,YAAY,CAACL,eAAe,CAACX,4BAA4B,CAAC;IAC1DgB,YAAY,CAACJ,cAAc,CAAEK,QAAQ,IAAK,CAAE,CAAC,CAAC;EAClD;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|