6664b50c15ad4e6c17f8d920b81a7af0e185a6a3ba763bf22558bfbe684b690c.json 7.9 KB

1
  1. {"ast":null,"code":"import { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes.js\";\nimport { FrameGraphCopyToTextureTask } from \"../../../Tasks/Texture/copyToTextureTask.js\";\n/**\n * Block used to copy a texture\n */\nexport class NodeRenderGraphCopyTextureBlock extends NodeRenderGraphBlock {\n /**\n * Gets the frame graph task associated with this block\n */\n get task() {\n return this._frameGraphTask;\n }\n /**\n * Create a new NodeRenderGraphCopyTextureBlock\n * @param name defines the block name\n * @param frameGraph defines the hosting frame graph\n * @param scene defines the hosting scene\n */\n constructor(name, frameGraph, scene) {\n super(name, frameGraph, scene);\n this.registerInput(\"source\", NodeRenderGraphBlockConnectionPointTypes.Texture);\n this.registerInput(\"destination\", NodeRenderGraphBlockConnectionPointTypes.Texture);\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\n this.source.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\n this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAll);\n this.output._typeConnectionSource = this.destination;\n this._frameGraphTask = new FrameGraphCopyToTextureTask(name, frameGraph);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphCopyTextureBlock\";\n }\n /**\n * Gets the source input component\n */\n get source() {\n return this._inputs[0];\n }\n /**\n * Gets the destination input component\n */\n get destination() {\n return this._inputs[1];\n }\n /**\n * Gets the output component\n */\n get output() {\n return this._outputs[0];\n }\n _buildBlock(state) {\n super._buildBlock(state);\n this._frameGraphTask.name = this.name;\n this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the \"output\" texture of the task\n const sourceConnectedPoint = this.source.connectedPoint;\n if (sourceConnectedPoint) {\n this._frameGraphTask.sourceTexture = sourceConnectedPoint.value;\n }\n const destinationConnectedPoint = this.destination.connectedPoint;\n if (destinationConnectedPoint) {\n this._frameGraphTask.destinationTexture = destinationConnectedPoint.value;\n }\n }\n}\nRegisterClass(\"BABYLON.NodeRenderGraphCopyTextureBlock\", NodeRenderGraphCopyTextureBlock);","map":{"version":3,"names":["NodeRenderGraphBlock","RegisterClass","NodeRenderGraphBlockConnectionPointTypes","FrameGraphCopyToTextureTask","NodeRenderGraphCopyTextureBlock","task","_frameGraphTask","constructor","name","frameGraph","scene","registerInput","Texture","registerOutput","BasedOnInput","source","addAcceptedConnectionPointTypes","TextureAllButBackBuffer","destination","TextureAll","output","_typeConnectionSource","getClassName","_inputs","_outputs","_buildBlock","state","value","outputTexture","sourceConnectedPoint","connectedPoint","sourceTexture","destinationConnectedPoint","destinationTexture"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js"],"sourcesContent":["import { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes.js\";\nimport { FrameGraphCopyToTextureTask } from \"../../../Tasks/Texture/copyToTextureTask.js\";\n/**\n * Block used to copy a texture\n */\nexport class NodeRenderGraphCopyTextureBlock extends NodeRenderGraphBlock {\n /**\n * Gets the frame graph task associated with this block\n */\n get task() {\n return this._frameGraphTask;\n }\n /**\n * Create a new NodeRenderGraphCopyTextureBlock\n * @param name defines the block name\n * @param frameGraph defines the hosting frame graph\n * @param scene defines the hosting scene\n */\n constructor(name, frameGraph, scene) {\n super(name, frameGraph, scene);\n this.registerInput(\"source\", NodeRenderGraphBlockConnectionPointTypes.Texture);\n this.registerInput(\"destination\", NodeRenderGraphBlockConnectionPointTypes.Texture);\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\n this.source.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\n this.destination.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAll);\n this.output._typeConnectionSource = this.destination;\n this._frameGraphTask = new FrameGraphCopyToTextureTask(name, frameGraph);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphCopyTextureBlock\";\n }\n /**\n * Gets the source input component\n */\n get source() {\n return this._inputs[0];\n }\n /**\n * Gets the destination input component\n */\n get destination() {\n return this._inputs[1];\n }\n /**\n * Gets the output component\n */\n get output() {\n return this._outputs[0];\n }\n _buildBlock(state) {\n super._buildBlock(state);\n this._frameGraphTask.name = this.name;\n this.output.value = this._frameGraphTask.outputTexture; // the value of the output connection point is the \"output\" texture of the task\n const sourceConnectedPoint = this.source.connectedPoint;\n if (sourceConnectedPoint) {\n this._frameGraphTask.sourceTexture = sourceConnectedPoint.value;\n }\n const destinationConnectedPoint = this.destination.connectedPoint;\n if (destinationConnectedPoint) {\n this._frameGraphTask.destinationTexture = destinationConnectedPoint.value;\n }\n }\n}\nRegisterClass(\"BABYLON.NodeRenderGraphCopyTextureBlock\", NodeRenderGraphCopyTextureBlock);\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,wCAAwC,QAAQ,qCAAqC;AAC9F,SAASC,2BAA2B,QAAQ,6CAA6C;AACzF;AACA;AACA;AACA,OAAO,MAAMC,+BAA+B,SAASJ,oBAAoB,CAAC;EACtE;AACJ;AACA;EACI,IAAIK,IAAIA,CAAA,EAAG;IACP,OAAO,IAAI,CAACC,eAAe;EAC/B;EACA;AACJ;AACA;AACA;AACA;AACA;EACIC,WAAWA,CAACC,IAAI,EAAEC,UAAU,EAAEC,KAAK,EAAE;IACjC,KAAK,CAACF,IAAI,EAAEC,UAAU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e,CAACyB,aAAa,GAAGF,oBAAoB,CAACF,KAAK;IACnE;IACA,MAAMK,yBAAyB,GAAG,IAAI,CAACd,WAAW,CAACY,cAAc;IACjE,IAAIE,yBAAyB,EAAE;MAC3B,IAAI,CAAC1B,eAAe,CAAC2B,kBAAkB,GAAGD,yBAAyB,CAACL,KAAK;IAC7E;EACJ;AACJ;AACA1B,aAAa,CAAC,yCAAyC,EAAEG,+BAA+B,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}