bb287d57e3b76dae5fde2cf99286995c86a1e555eab8121455d0cc703eb74f1a.json 3.7 KB

1
  1. {"ast":null,"code":"import { FlowGraphBlock } from \"../../flowGraphBlock.js\";\nimport { RichTypeBoolean, RichTypeAny } from \"../../flowGraphRichTypes.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * @experimental\n * Block that returns a value based on a condition.\n */\nexport class FlowGraphConditionalDataBlock extends FlowGraphBlock {\n constructor(config) {\n super(config);\n this.condition = this.registerDataInput(\"condition\", RichTypeBoolean);\n this.trueValue = this.registerDataInput(\"trueValue\", RichTypeAny);\n this.falseValue = this.registerDataInput(\"falseValue\", RichTypeAny);\n this.output = this.registerDataOutput(\"output\", RichTypeAny);\n }\n /**\n * @internal\n */\n _updateOutputs(context) {\n this.output.setValue(this.condition.getValue(context) ? this.trueValue.getValue(context) : this.falseValue.getValue(context), context);\n }\n /**\n * Gets the class name of this block\n * @returns the class name\n */\n getClassName() {\n return \"FGConditionalDataBlock\";\n }\n}\nRegisterClass(\"FGConditionalDataBlock\", FlowGraphConditionalDataBlock);","map":{"version":3,"names":["FlowGraphBlock","RichTypeBoolean","RichTypeAny","RegisterClass","FlowGraphConditionalDataBlock","constructor","config","condition","registerDataInput","trueValue","falseValue","output","registerDataOutput","_updateOutputs","context","setValue","getValue","getClassName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js"],"sourcesContent":["import { FlowGraphBlock } from \"../../flowGraphBlock.js\";\nimport { RichTypeBoolean, RichTypeAny } from \"../../flowGraphRichTypes.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * @experimental\n * Block that returns a value based on a condition.\n */\nexport class FlowGraphConditionalDataBlock extends FlowGraphBlock {\n constructor(config) {\n super(config);\n this.condition = this.registerDataInput(\"condition\", RichTypeBoolean);\n this.trueValue = this.registerDataInput(\"trueValue\", RichTypeAny);\n this.falseValue = this.registerDataInput(\"falseValue\", RichTypeAny);\n this.output = this.registerDataOutput(\"output\", RichTypeAny);\n }\n /**\n * @internal\n */\n _updateOutputs(context) {\n this.output.setValue(this.condition.getValue(context) ? this.trueValue.getValue(context) : this.falseValue.getValue(context), context);\n }\n /**\n * Gets the class name of this block\n * @returns the class name\n */\n getClassName() {\n return \"FGConditionalDataBlock\";\n }\n}\nRegisterClass(\"FGConditionalDataBlock\", FlowGraphConditionalDataBlock);\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,yBAAyB;AACxD,SAASC,eAAe,EAAEC,WAAW,QAAQ,6BAA6B;AAC1E,SAASC,aAAa,QAAQ,4BAA4B;AAC1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,6BAA6B,SAASJ,cAAc,CAAC;EAC9DK,WAAWA,CAACC,MAAM,EAAE;IAChB,KAAK,CAACA,MAAM,CAAC;IACb,IAAI,CAACC,SAAS,GAAG,IAAI,CAACC,iBAAiB,CAAC,WAAW,EAAEP,eAAe,CAAC;IACrE,IAAI,CAACQ,SAAS,GAAG,IAAI,CAACD,iBAAiB,CAAC,WAAW,EAAEN,WAAW,CAAC;IACjE,IAAI,CAACQ,UAAU,GAAG,IAAI,CAACF,iBAAiB,CAAC,YAAY,EAAEN,WAAW,CAAC;IACnE,IAAI,CAACS,MAAM,GAAG,IAAI,CAACC,kBAAkB,CAAC,QAAQ,EAAEV,WAAW,CAAC;EAChE;EACA;AACJ;AACA;EACIW,cAAcA,CAACC,OAAO,EAAE;IACpB,IAAI,CAACH,MAAM,CAACI,QAAQ,CAAC,IAAI,CAACR,SAAS,CAACS,QAAQ,CAACF,OAAO,CAAC,GAAG,IAAI,CAACL,SAAS,CAACO,QAAQ,CAACF,OAAO,CAAC,GAAG,IAAI,CAACJ,UAAU,CAACM,QAAQ,CAACF,OAAO,CAAC,EAAEA,OAAO,CAAC;EAC1I;EACA;AACJ;AACA;AACA;EACIG,YAAYA,CAAA,EAAG;IACX,OAAO,wBAAwB;EACnC;AACJ;AACAd,aAAa,CAAC,wBAAwB,EAAEC,6BAA6B,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}