1 |
- {"ast":null,"code":"import { NodeRenderGraphBlock } from \"../nodeRenderGraphBlock.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../Types/nodeRenderGraphTypes.js\";\nimport { FrameGraphCopyToBackbufferColorTask } from \"../../Tasks/Texture/copyToBackbufferColorTask.js\";\n/**\n * Block used to generate the final graph\n */\nexport class NodeRenderGraphOutputBlock 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 NodeRenderGraphOutputBlock\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._isUnique = true;\n this.registerInput(\"texture\", NodeRenderGraphBlockConnectionPointTypes.Texture);\n this.texture.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAll);\n this._frameGraphTask = new FrameGraphCopyToBackbufferColorTask(name, frameGraph);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphOutputBlock\";\n }\n /**\n * Gets the texture input component\n */\n get texture() {\n return this._inputs[0];\n }\n _buildBlock(state) {\n super._buildBlock(state);\n this._frameGraphTask.name = this.name;\n const textureConnectedPoint = this.texture.connectedPoint;\n if (textureConnectedPoint) {\n this._frameGraphTask.sourceTexture = textureConnectedPoint.value;\n }\n }\n}\nRegisterClass(\"BABYLON.NodeRenderGraphOutputBlock\", NodeRenderGraphOutputBlock);","map":{"version":3,"names":["NodeRenderGraphBlock","RegisterClass","NodeRenderGraphBlockConnectionPointTypes","FrameGraphCopyToBackbufferColorTask","NodeRenderGraphOutputBlock","task","_frameGraphTask","constructor","name","frameGraph","scene","_isUnique","registerInput","Texture","texture","addAcceptedConnectionPointTypes","TextureAll","getClassName","_inputs","_buildBlock","state","textureConnectedPoint","connectedPoint","sourceTexture","value"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FrameGraph/Node/Blocks/outputBlock.js"],"sourcesContent":["import { NodeRenderGraphBlock } from \"../nodeRenderGraphBlock.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../Types/nodeRenderGraphTypes.js\";\nimport { FrameGraphCopyToBackbufferColorTask } from \"../../Tasks/Texture/copyToBackbufferColorTask.js\";\n/**\n * Block used to generate the final graph\n */\nexport class NodeRenderGraphOutputBlock 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 NodeRenderGraphOutputBlock\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._isUnique = true;\n this.registerInput(\"texture\", NodeRenderGraphBlockConnectionPointTypes.Texture);\n this.texture.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAll);\n this._frameGraphTask = new FrameGraphCopyToBackbufferColorTask(name, frameGraph);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphOutputBlock\";\n }\n /**\n * Gets the texture input component\n */\n get texture() {\n return this._inputs[0];\n }\n _buildBlock(state) {\n super._buildBlock(state);\n this._frameGraphTask.name = this.name;\n const textureConnectedPoint = this.texture.connectedPoint;\n if (textureConnectedPoint) {\n this._frameGraphTask.sourceTexture = textureConnectedPoint.value;\n }\n }\n}\nRegisterClass(\"BABYLON.NodeRenderGraphOutputBlock\", NodeRenderGraphOutputBlock);\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,4BAA4B;AACjE,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,wCAAwC,QAAQ,kCAAkC;AAC3F,SAASC,mCAAmC,QAAQ,kDAAkD;AACtG;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,SAASJ,oBAAoB,CAAC;EACjE;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,EAAEC,KAAK,CAAC;IAC9B,IAAI,CAACC,SAAS,GAAG,IAAI;IACrB,IAAI,CAACC,aAAa,CAAC,SAAS,EAAEV,wCAAwC,CAACW,OAAO,CAAC;IAC/E,IAAI,CAACC,OAAO,CAACC,+BAA+B,CAACb,wCAAwC,CAACc,UAAU,CAAC;IACjG,IAAI,CAACV,eAAe,GAAG,IAAIH,mCAAmC,CAACK,IAAI,EAAEC,UAAU,CAAC;EACpF;EACA;AACJ;AACA;AACA;EACIQ,YAAYA,CAAA,EAAG;IACX,OAAO,4BAA4B;EACvC;EACA;AACJ;AACA;EACI,IAAIH,OAAOA,CAAA,EAAG;IACV,OAAO,IAAI,CAACI,OAAO,CAAC,CAAC,CAAC;EAC1B;EACAC,WAAWA,CAACC,KAAK,EAAE;IACf,KAAK,CAACD,WAAW,CAACC,KAAK,CAAC;IACxB,IAAI,CAACd,eAAe,CAACE,IAAI,GAAG,IAAI,CAACA,IAAI;IACrC,MAAMa,qBAAqB,GAAG,IAAI,CAACP,OAAO,CAACQ,cAAc;IACzD,IAAID,qBAAqB,EAAE;MACvB,IAAI,CAACf,eAAe,CAACiB,aAAa,GAAGF,qBAAqB,CAACG,KAAK;IACpE;EACJ;AACJ;AACAvB,aAAa,CAAC,oCAAoC,EAAEG,0BAA0B,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|