1 |
- {"ast":null,"code":"import { RichTypeBoolean } from \"../../../flowGraphRichTypes.js\";\nimport { FlowGraphExecutionBlock } from \"../../../flowGraphExecutionBlock.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\n/**\n * @experimental\n * A block that evaluates a condition and executes one of two branches.\n */\nexport class FlowGraphBranchBlock extends FlowGraphExecutionBlock {\n constructor(config) {\n super(config);\n this.condition = this.registerDataInput(\"condition\", RichTypeBoolean);\n this.onTrue = this._registerSignalOutput(\"onTrue\");\n this.onFalse = this._registerSignalOutput(\"onFalse\");\n }\n _execute(context) {\n if (this.condition.getValue(context)) {\n this.onTrue._activateSignal(context);\n } else {\n this.onFalse._activateSignal(context);\n }\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return \"FGBranchBlock\";\n }\n}\nRegisterClass(\"FGBranchBlock\", FlowGraphBranchBlock);","map":{"version":3,"names":["RichTypeBoolean","FlowGraphExecutionBlock","RegisterClass","FlowGraphBranchBlock","constructor","config","condition","registerDataInput","onTrue","_registerSignalOutput","onFalse","_execute","context","getValue","_activateSignal","getClassName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js"],"sourcesContent":["import { RichTypeBoolean } from \"../../../flowGraphRichTypes.js\";\nimport { FlowGraphExecutionBlock } from \"../../../flowGraphExecutionBlock.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\n/**\n * @experimental\n * A block that evaluates a condition and executes one of two branches.\n */\nexport class FlowGraphBranchBlock extends FlowGraphExecutionBlock {\n constructor(config) {\n super(config);\n this.condition = this.registerDataInput(\"condition\", RichTypeBoolean);\n this.onTrue = this._registerSignalOutput(\"onTrue\");\n this.onFalse = this._registerSignalOutput(\"onFalse\");\n }\n _execute(context) {\n if (this.condition.getValue(context)) {\n this.onTrue._activateSignal(context);\n }\n else {\n this.onFalse._activateSignal(context);\n }\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return \"FGBranchBlock\";\n }\n}\nRegisterClass(\"FGBranchBlock\", FlowGraphBranchBlock);\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,gCAAgC;AAChE,SAASC,uBAAuB,QAAQ,qCAAqC;AAC7E,SAASC,aAAa,QAAQ,+BAA+B;AAC7D;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,SAASF,uBAAuB,CAAC;EAC9DG,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,MAAM,GAAG,IAAI,CAACC,qBAAqB,CAAC,QAAQ,CAAC;IAClD,IAAI,CAACC,OAAO,GAAG,IAAI,CAACD,qBAAqB,CAAC,SAAS,CAAC;EACxD;EACAE,QAAQA,CAACC,OAAO,EAAE;IACd,IAAI,IAAI,CAACN,SAAS,CAACO,QAAQ,CAACD,OAAO,CAAC,EAAE;MAClC,IAAI,CAACJ,MAAM,CAACM,eAAe,CAACF,OAAO,CAAC;IACxC,CAAC,MACI;MACD,IAAI,CAACF,OAAO,CAACI,eAAe,CAACF,OAAO,CAAC;IACzC;EACJ;EACA;AACJ;AACA;EACIG,YAAYA,CAAA,EAAG;IACX,OAAO,eAAe;EAC1B;AACJ;AACAb,aAAa,CAAC,eAAe,EAAEC,oBAAoB,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|