fbf9ec7d7a8b80688068b3b96d49a4421d5f259948b1fa0785e2da209824ef8a.json 6.5 KB

1
  1. {"ast":null,"code":"import { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes.js\";\nimport { FrameGraphGenerateMipMapsTask } from \"../../../Tasks/Texture/generateMipMapsTask.js\";\n/**\n * Block used to generate mipmaps for a texture\n */\nexport class NodeRenderGraphGenerateMipmapsBlock 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 NodeRenderGraphGenerateMipmapsBlock\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(\"texture\", NodeRenderGraphBlockConnectionPointTypes.Texture);\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\n this.texture.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\n this.output._typeConnectionSource = this.texture;\n this._frameGraphTask = new FrameGraphGenerateMipMapsTask(name, frameGraph);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphGenerateMipmapsBlock\";\n }\n /**\n * Gets the texture input component\n */\n get texture() {\n return this._inputs[0];\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._propagateInputValueToOutput(this.texture, this.output);\n const textureConnectedPoint = this.texture.connectedPoint;\n if (textureConnectedPoint) {\n this._frameGraphTask.destinationTexture = textureConnectedPoint.value;\n }\n }\n}\nRegisterClass(\"BABYLON.NodeRenderGraphGenerateMipmapsBlock\", NodeRenderGraphGenerateMipmapsBlock);","map":{"version":3,"names":["NodeRenderGraphBlock","RegisterClass","NodeRenderGraphBlockConnectionPointTypes","FrameGraphGenerateMipMapsTask","NodeRenderGraphGenerateMipmapsBlock","task","_frameGraphTask","constructor","name","frameGraph","scene","registerInput","Texture","registerOutput","BasedOnInput","texture","addAcceptedConnectionPointTypes","TextureAllButBackBuffer","output","_typeConnectionSource","getClassName","_inputs","_outputs","_buildBlock","state","_propagateInputValueToOutput","textureConnectedPoint","connectedPoint","destinationTexture","value"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js"],"sourcesContent":["import { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes.js\";\nimport { FrameGraphGenerateMipMapsTask } from \"../../../Tasks/Texture/generateMipMapsTask.js\";\n/**\n * Block used to generate mipmaps for a texture\n */\nexport class NodeRenderGraphGenerateMipmapsBlock 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 NodeRenderGraphGenerateMipmapsBlock\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(\"texture\", NodeRenderGraphBlockConnectionPointTypes.Texture);\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.BasedOnInput);\n this.texture.addAcceptedConnectionPointTypes(NodeRenderGraphBlockConnectionPointTypes.TextureAllButBackBuffer);\n this.output._typeConnectionSource = this.texture;\n this._frameGraphTask = new FrameGraphGenerateMipMapsTask(name, frameGraph);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphGenerateMipmapsBlock\";\n }\n /**\n * Gets the texture input component\n */\n get texture() {\n return this._inputs[0];\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._propagateInputValueToOutput(this.texture, this.output);\n const textureConnectedPoint = this.texture.connectedPoint;\n if (textureConnectedPoint) {\n this._frameGraphTask.destinationTexture = textureConnectedPoint.value;\n }\n }\n}\nRegisterClass(\"BABYLON.NodeRenderGraphGenerateMipmapsBlock\", NodeRenderGraphGenerateMipmapsBlock);\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,wCAAwC,QAAQ,qCAAqC;AAC9F,SAASC,6BAA6B,QAAQ,+CAA+C;AAC7F;AACA;AACA;AACA,OAAO,MAAMC,mCAAmC,SAASJ,oBAAoB,CAAC;EAC1E;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,aAAa,CAAC,SAAS,EAAET,wCAAwC,CAACU,OAAO,CAAC;IAC/E,IAAI,CAACC,cAAc,CAAC,QAAQ,EAAEX,wCAAwC,CAACY,YAAY,CAAC;IACpF,IAAI,CAACC,OAAO,CAACC,+BAA+B,CAACd,wCAAwC,CAACe,uBAAuB,CAAC;IAC9G,IAAI,CAACC,MAAM,CAACC,qBAAqB,GAAG,IAAI,CAACJ,OAAO;IAChD,IAAI,CAACT,eAAe,GAAG,IAAIH,6BAA6B,CAACK,IAAI,EAAEC,UAAU,CAAC;EAC9E;EACA;AACJ;AACA;AACA;EACIW,YAAYA,CAAA,EAAG;IACX,OAAO,qCAAqC;EAChD;EACA;AACJ;AACA;EACI,IAAIL,OAAOA,CAA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