35e17ceee5991fe2ef6880daca2216c8df457945241c776b7f671d2565e6d16b.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 { FrameGraphCullObjectsTask } from \"../../../Tasks/Rendering/cullObjectsTask.js\";\n/**\n * Block that culls a list of objects\n */\nexport class NodeRenderGraphCullObjectsBlock 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 NodeRenderGraphCullObjectsBlock\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(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\n this.registerInput(\"objects\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\n this._frameGraphTask = new FrameGraphCullObjectsTask(this.name, frameGraph, scene);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphCullObjectsBlock\";\n }\n /**\n * Gets the camera input component\n */\n get camera() {\n return this._inputs[0];\n }\n /**\n * Gets the objects input component\n */\n get objects() {\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.outputObjectList;\n const cameraConnectedPoint = this.camera.connectedPoint;\n if (cameraConnectedPoint) {\n this._frameGraphTask.camera = cameraConnectedPoint.value;\n }\n const objectsConnectedPoint = this.objects.connectedPoint;\n if (objectsConnectedPoint) {\n this._frameGraphTask.objectList = objectsConnectedPoint.value;\n }\n }\n _dumpPropertiesCode() {\n const codes = [];\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\n }\n serialize() {\n const serializationObject = super.serialize();\n return serializationObject;\n }\n _deserialize(serializationObject) {\n super._deserialize(serializationObject);\n }\n}\nRegisterClass(\"BABYLON.NodeRenderGraphCullObjectsBlock\", NodeRenderGraphCullObjectsBlock);","map":{"version":3,"names":["NodeRenderGraphBlock","RegisterClass","NodeRenderGraphBlockConnectionPointTypes","FrameGraphCullObjectsTask","NodeRenderGraphCullObjectsBlock","task","_frameGraphTask","constructor","name","frameGraph","scene","registerInput","Camera","ObjectList","registerOutput","getClassName","camera","_inputs","objects","output","_outputs","_buildBlock","state","value","outputObjectList","cameraConnectedPoint","connectedPoint","objectsConnectedPoint","objectList","_dumpPropertiesCode","codes","join","serialize","serializationObject","_deserialize"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.js"],"sourcesContent":["import { NodeRenderGraphBlock } from \"../../nodeRenderGraphBlock.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { NodeRenderGraphBlockConnectionPointTypes } from \"../../Types/nodeRenderGraphTypes.js\";\nimport { FrameGraphCullObjectsTask } from \"../../../Tasks/Rendering/cullObjectsTask.js\";\n/**\n * Block that culls a list of objects\n */\nexport class NodeRenderGraphCullObjectsBlock 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 NodeRenderGraphCullObjectsBlock\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(\"camera\", NodeRenderGraphBlockConnectionPointTypes.Camera);\n this.registerInput(\"objects\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\n this.registerOutput(\"output\", NodeRenderGraphBlockConnectionPointTypes.ObjectList);\n this._frameGraphTask = new FrameGraphCullObjectsTask(this.name, frameGraph, scene);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphCullObjectsBlock\";\n }\n /**\n * Gets the camera input component\n */\n get camera() {\n return this._inputs[0];\n }\n /**\n * Gets the objects input component\n */\n get objects() {\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.outputObjectList;\n const cameraConnectedPoint = this.camera.connectedPoint;\n if (cameraConnectedPoint) {\n this._frameGraphTask.camera = cameraConnectedPoint.value;\n }\n const objectsConnectedPoint = this.objects.connectedPoint;\n if (objectsConnectedPoint) {\n this._frameGraphTask.objectList = objectsConnectedPoint.value;\n }\n }\n _dumpPropertiesCode() {\n const codes = [];\n return super._dumpPropertiesCode() + codes.join(\"\\n\");\n }\n serialize() {\n const serializationObject = super.serialize();\n return serializationObject;\n }\n _deserialize(serializationObject) {\n super._deserialize(serializationObject);\n }\n}\nRegisterClass(\"BABYLON.NodeRenderGraphCullObjectsBlock\", NodeRenderGraphCullObjectsBlock);\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,wCAAwC,QAAQ,qCAAqC;AAC9F,SAASC,yBAAyB,QAAQ,6CAA6C;AACvF;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,EAAEC,KAAK,CAAC;IAC9B,IAAI,CAACC,aAAa,CAAC,QAAQ,EAAET,wCAAwC,CAACU,MAAM,CAA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