{"ast":null,"code":"import { NodeMaterialBlock } from \"../nodeMaterialBlock.js\";\nimport { NodeMaterialBlockConnectionPointTypes } from \"../Enums/nodeMaterialBlockConnectionPointTypes.js\";\nimport { NodeMaterialBlockTargets } from \"../Enums/nodeMaterialBlockTargets.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * Block used as a pass through\n */\nexport class ElbowBlock extends NodeMaterialBlock {\n /**\n * Creates a new ElbowBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Neutral);\n this.registerInput(\"input\", NodeMaterialBlockConnectionPointTypes.AutoDetect);\n this.registerOutput(\"output\", NodeMaterialBlockConnectionPointTypes.BasedOnInput);\n this._outputs[0]._typeConnectionSource = this._inputs[0];\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"ElbowBlock\";\n }\n /**\n * Gets the input component\n */\n get input() {\n return this._inputs[0];\n }\n /**\n * Gets the output component\n */\n get output() {\n return this._outputs[0];\n }\n /**\n * Gets or sets the target of the block\n */\n get target() {\n const input = this._inputs[0];\n if (input.isConnected) {\n const block = input.connectedPoint.ownerBlock;\n if (block.target !== NodeMaterialBlockTargets.VertexAndFragment) {\n return block.target;\n }\n if (input.connectedPoint.target !== NodeMaterialBlockTargets.VertexAndFragment) {\n return input.connectedPoint.target;\n }\n }\n return this._target;\n }\n set target(value) {\n if ((this._target & value) !== 0) {\n return;\n }\n this._target = value;\n }\n _buildBlock(state) {\n super._buildBlock(state);\n const output = this._outputs[0];\n const input = this._inputs[0];\n state.compilationString += state._declareOutput(output) + ` = ${input.associatedVariableName};\\n`;\n return this;\n }\n}\nRegisterClass(\"BABYLON.ElbowBlock\", ElbowBlock);","map":{"version":3,"names":["NodeMaterialBlock","NodeMaterialBlockConnectionPointTypes","NodeMaterialBlockTargets","RegisterClass","ElbowBlock","constructor","name","Neutral","registerInput","AutoDetect","registerOutput","BasedOnInput","_outputs","_typeConnectionSource","_inputs","getClassName","input","output","target","isConnected","block","connectedPoint","ownerBlock","VertexAndFragment","_target","value","_buildBlock","state","compilationString","_declareOutput","associatedVariableName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Node/Blocks/elbowBlock.js"],"sourcesContent":["import { NodeMaterialBlock } from \"../nodeMaterialBlock.js\";\nimport { NodeMaterialBlockConnectionPointTypes } from \"../Enums/nodeMaterialBlockConnectionPointTypes.js\";\nimport { NodeMaterialBlockTargets } from \"../Enums/nodeMaterialBlockTargets.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * Block used as a pass through\n */\nexport class ElbowBlock extends NodeMaterialBlock {\n /**\n * Creates a new ElbowBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Neutral);\n this.registerInput(\"input\", NodeMaterialBlockConnectionPointTypes.AutoDetect);\n this.registerOutput(\"output\", NodeMaterialBlockConnectionPointTypes.BasedOnInput);\n this._outputs[0]._typeConnectionSource = this._inputs[0];\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"ElbowBlock\";\n }\n /**\n * Gets the input component\n */\n get input() {\n return this._inputs[0];\n }\n /**\n * Gets the output component\n */\n get output() {\n return this._outputs[0];\n }\n /**\n * Gets or sets the target of the block\n */\n get target() {\n const input = this._inputs[0];\n if (input.isConnected) {\n const block = input.connectedPoint.ownerBlock;\n if (block.target !== NodeMaterialBlockTargets.VertexAndFragment) {\n return block.target;\n }\n if (input.connectedPoint.target !== NodeMaterialBlockTargets.VertexAndFragment) {\n return input.connectedPoint.target;\n }\n }\n return this._target;\n }\n set target(value) {\n if ((this._target & value) !== 0) {\n return;\n }\n this._target = value;\n }\n _buildBlock(state) {\n super._buildBlock(state);\n const output = this._outputs[0];\n const input = this._inputs[0];\n state.compilationString += state._declareOutput(output) + ` = ${input.associatedVariableName};\\n`;\n return this;\n }\n}\nRegisterClass(\"BABYLON.ElbowBlock\", ElbowBlock);\n"],"mappings":"AAAA,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