1 |
- {"ast":null,"code":"import { FrameGraphTask } from \"../../frameGraphTask.js\";\n/**\n * Task used to copy a texture to another texture.\n */\nexport class FrameGraphCopyToTextureTask extends FrameGraphTask {\n /**\n * Constructs a new FrameGraphCopyToTextureTask.\n * @param name The name of the task.\n * @param frameGraph The frame graph the task belongs to.\n */\n constructor(name, frameGraph) {\n super(name, frameGraph);\n this.outputTexture = this._frameGraph.textureManager.createDanglingHandle();\n }\n record() {\n if (this.sourceTexture === undefined || this.destinationTexture === undefined) {\n throw new Error(`FrameGraphCopyToTextureTask \"${this.name}\": sourceTexture and destinationTexture are required`);\n }\n this._frameGraph.textureManager.resolveDanglingHandle(this.outputTexture, this.destinationTexture);\n const pass = this._frameGraph.addRenderPass(this.name);\n pass.useTexture(this.sourceTexture);\n pass.setRenderTarget(this.outputTexture);\n pass.setExecuteFunc(context => {\n context.copyTexture(this.sourceTexture);\n });\n const passDisabled = this._frameGraph.addRenderPass(this.name + \"_disabled\", true);\n passDisabled.setRenderTarget(this.outputTexture);\n passDisabled.setExecuteFunc(_context => {});\n }\n}","map":{"version":3,"names":["FrameGraphTask","FrameGraphCopyToTextureTask","constructor","name","frameGraph","outputTexture","_frameGraph","textureManager","createDanglingHandle","record","sourceTexture","undefined","destinationTexture","Error","resolveDanglingHandle","pass","addRenderPass","useTexture","setRenderTarget","setExecuteFunc","context","copyTexture","passDisabled","_context"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FrameGraph/Tasks/Texture/copyToTextureTask.js"],"sourcesContent":["import { FrameGraphTask } from \"../../frameGraphTask.js\";\n/**\n * Task used to copy a texture to another texture.\n */\nexport class FrameGraphCopyToTextureTask extends FrameGraphTask {\n /**\n * Constructs a new FrameGraphCopyToTextureTask.\n * @param name The name of the task.\n * @param frameGraph The frame graph the task belongs to.\n */\n constructor(name, frameGraph) {\n super(name, frameGraph);\n this.outputTexture = this._frameGraph.textureManager.createDanglingHandle();\n }\n record() {\n if (this.sourceTexture === undefined || this.destinationTexture === undefined) {\n throw new Error(`FrameGraphCopyToTextureTask \"${this.name}\": sourceTexture and destinationTexture are required`);\n }\n this._frameGraph.textureManager.resolveDanglingHandle(this.outputTexture, this.destinationTexture);\n const pass = this._frameGraph.addRenderPass(this.name);\n pass.useTexture(this.sourceTexture);\n pass.setRenderTarget(this.outputTexture);\n pass.setExecuteFunc((context) => {\n context.copyTexture(this.sourceTexture);\n });\n const passDisabled = this._frameGraph.addRenderPass(this.name + \"_disabled\", true);\n passDisabled.setRenderTarget(this.outputTexture);\n passDisabled.setExecuteFunc((_context) => { });\n }\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,yBAAyB;AACxD;AACA;AACA;AACA,OAAO,MAAMC,2BAA2B,SAASD,cAAc,CAAC;EAC5D;AACJ;AACA;AACA;AACA;EACIE,WAAWA,CAACC,IAAI,EAAEC,UAAU,EAAE;IAC1B,KAAK,CAACD,IAAI,EAAEC,UAAU,CAAC;IACvB,IAAI,CAACC,aAAa,GAAG,IAAI,CAACC,WAAW,CAACC,cAAc,CAACC,oBAAoB,CAAC,CAAC;EAC/E;EACAC,MAAMA,CAAA,EAAG;IACL,IAAI,IAAI,CAACC,aAAa,KAAKC,SAAS,IAAI,IAAI,CAACC,kBAAkB,KAAKD,SAAS,EAAE;MAC3E,MAAM,IAAIE,KAAK,CAAC,gCAAgC,IAAI,CAACV,IAAI,sDAAsD,CAAC;IACpH;IACA,IAAI,CAACG,WAAW,CAACC,cAAc,CAACO,qBAAqB,CAAC,IAAI,CAACT,aAAa,EAAE,IAAI,CAACO,kBAAkB,CAAC;IAClG,MAAMG,IAAI,GAAG,IAAI,CAACT,WAAW,CAACU,aAAa,CAAC,IAAI,CAACb,IAAI,CAAC;IACtDY,IAAI,CAACE,UAAU,CAAC,IAAI,CAACP,aAAa,CAAC;IACnCK,IAAI,CAACG,eAAe,CAAC,IAAI,CAACb,aAAa,CAAC;IACxCU,IAAI,CAACI,cAAc,CAAEC,OAAO,IAAK;MAC7BA,OAAO,CAACC,WAAW,CAAC,IAAI,CAACX,aAAa,CAAC;IAC3C,CAAC,CAAC;IACF,MAAMY,YAAY,GAAG,IAAI,CAAChB,WAAW,CAACU,aAAa,CAAC,IAAI,CAACb,IAAI,GAAG,WAAW,EAAE,IAAI,CAAC;IAClFmB,YAAY,CAACJ,eAAe,CAAC,IAAI,CAACb,aAAa,CAAC;IAChDiB,YAAY,CAACH,cAAc,CAAEI,QAAQ,IAAK,CAAE,CAAC,CAAC;EAClD;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|