1 |
- {"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 to step a value\n */\nexport class StepBlock extends NodeMaterialBlock {\n /**\n * Creates a new StepBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Neutral);\n this.registerInput(\"value\", NodeMaterialBlockConnectionPointTypes.Float);\n this.registerInput(\"edge\", NodeMaterialBlockConnectionPointTypes.Float);\n this.registerOutput(\"output\", NodeMaterialBlockConnectionPointTypes.Float);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"StepBlock\";\n }\n /**\n * Gets the value operand input component\n */\n get value() {\n return this._inputs[0];\n }\n /**\n * Gets the edge operand input component\n */\n get edge() {\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 const output = this._outputs[0];\n state.compilationString += state._declareOutput(output) + ` = step(${this.edge.associatedVariableName}, ${this.value.associatedVariableName});\\n`;\n return this;\n }\n}\nRegisterClass(\"BABYLON.StepBlock\", StepBlock);","map":{"version":3,"names":["NodeMaterialBlock","NodeMaterialBlockConnectionPointTypes","NodeMaterialBlockTargets","RegisterClass","StepBlock","constructor","name","Neutral","registerInput","Float","registerOutput","getClassName","value","_inputs","edge","output","_outputs","_buildBlock","state","compilationString","_declareOutput","associatedVariableName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Node/Blocks/stepBlock.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 to step a value\n */\nexport class StepBlock extends NodeMaterialBlock {\n /**\n * Creates a new StepBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name, NodeMaterialBlockTargets.Neutral);\n this.registerInput(\"value\", NodeMaterialBlockConnectionPointTypes.Float);\n this.registerInput(\"edge\", NodeMaterialBlockConnectionPointTypes.Float);\n this.registerOutput(\"output\", NodeMaterialBlockConnectionPointTypes.Float);\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"StepBlock\";\n }\n /**\n * Gets the value operand input component\n */\n get value() {\n return this._inputs[0];\n }\n /**\n * Gets the edge operand input component\n */\n get edge() {\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 const output = this._outputs[0];\n state.compilationString += state._declareOutput(output) + ` = step(${this.edge.associatedVariableName}, ${this.value.associatedVariableName});\\n`;\n return this;\n }\n}\nRegisterClass(\"BABYLON.StepBlock\", StepBlock);\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,qCAAqC,QAAQ,mDAAmD;AACzG,SAASC,wBAAwB,QAAQ,sCAAsC;AAC/E,SAASC,aAAa,QAAQ,4BAA4B;AAC1D;AACA;AACA;AACA,OAAO,MAAMC,SAAS,SAASJ,iBAAiB,CAAC;EAC7C;AACJ;AACA;AACA;EACIK,WAAWA,CAACC,IAAI,EAAE;IACd,KAAK,CAACA,IAAI,EAAEJ,wBAAwB,CAACK,OAAO,CAAC;IAC7C,IAAI,CAACC,aAAa,CAAC,OAAO,EAAEP,qCAAqC,CAACQ,KAAK,CAAC;IACxE,IAAI,CAACD,aAAa,CAAC,MAAM,EAAEP,qCAAqC,CAACQ,KAAK,CAAC;IACvE,IAAI,CAACC,cAAc,CAAC,QAAQ,EAAET,qCAAqC,CAACQ,KAAK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