1 |
- {"ast":null,"code":"import { FlowGraphExecutionBlock } from \"../../../flowGraphExecutionBlock.js\";\nimport { RichTypeBoolean } from \"../../../flowGraphRichTypes.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\n/**\n * @experimental\n * This block flip flops between two outputs.\n */\nexport class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {\n constructor(config) {\n super(config);\n this.onOn = this._registerSignalOutput(\"onOn\");\n this.onOff = this._registerSignalOutput(\"onOff\");\n this.isOn = this.registerDataOutput(\"isOn\", RichTypeBoolean);\n }\n _execute(context, _callingSignal) {\n let value = context._getExecutionVariable(this, \"value\", false);\n value = !value;\n context._setExecutionVariable(this, \"value\", value);\n this.isOn.setValue(value, context);\n if (value) {\n this.onOn._activateSignal(context);\n } else {\n this.onOff._activateSignal(context);\n }\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return \"FGFlipFlopBlock\";\n }\n}\nRegisterClass(\"FGFlipFlopBlock\", FlowGraphFlipFlopBlock);","map":{"version":3,"names":["FlowGraphExecutionBlock","RichTypeBoolean","RegisterClass","FlowGraphFlipFlopBlock","constructor","config","onOn","_registerSignalOutput","onOff","isOn","registerDataOutput","_execute","context","_callingSignal","value","_getExecutionVariable","_setExecutionVariable","setValue","_activateSignal","getClassName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js"],"sourcesContent":["import { FlowGraphExecutionBlock } from \"../../../flowGraphExecutionBlock.js\";\nimport { RichTypeBoolean } from \"../../../flowGraphRichTypes.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\n/**\n * @experimental\n * This block flip flops between two outputs.\n */\nexport class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {\n constructor(config) {\n super(config);\n this.onOn = this._registerSignalOutput(\"onOn\");\n this.onOff = this._registerSignalOutput(\"onOff\");\n this.isOn = this.registerDataOutput(\"isOn\", RichTypeBoolean);\n }\n _execute(context, _callingSignal) {\n let value = context._getExecutionVariable(this, \"value\", false);\n value = !value;\n context._setExecutionVariable(this, \"value\", value);\n this.isOn.setValue(value, context);\n if (value) {\n this.onOn._activateSignal(context);\n }\n else {\n this.onOff._activateSignal(context);\n }\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return \"FGFlipFlopBlock\";\n }\n}\nRegisterClass(\"FGFlipFlopBlock\", FlowGraphFlipFlopBlock);\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,qCAAqC;AAC7E,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,aAAa,QAAQ,+BAA+B;AAC7D;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,SAASH,uBAAuB,CAAC;EAChEI,WAAWA,CAACC,MAAM,EAAE;IAChB,KAAK,CAACA,MAAM,CAAC;IACb,IAAI,CAACC,IAAI,GAAG,IAAI,CAACC,qBAAqB,CAAC,MAAM,CAAC;IAC9C,IAAI,CAACC,KAAK,GAAG,IAAI,CAACD,qBAAqB,CAAC,OAAO,CAAC;IAChD,IAAI,CAACE,IAAI,GAAG,IAAI,CAACC,kBAAkB,CAAC,MAAM,EAAET,eAAe,CAAC;EAChE;EACAU,QAAQA,CAACC,OAAO,EAAEC,cAAc,EAAE;IAC9B,IAAIC,KAAK,GAAGF,OAAO,CAACG,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC;IAC/DD,KAAK,GAAG,CAACA,KAAK;IACdF,OAAO,CAACI,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAEF,KAAK,CAAC;IACnD,IAAI,CAACL,IAAI,CAACQ,QAAQ,CAACH,KAAK,EAAEF,OAAO,CAAC;IAClC,IAAIE,KAAK,EAAE;MACP,IAAI,CAACR,IAAI,CAACY,eAAe,CAACN,OAAO,CAAC;IACtC,CAAC,MACI;MACD,IAAI,CAACJ,KAAK,CAACU,eAAe,CAACN,OAAO,CAAC;IACvC;EACJ;EACA;AACJ;AACA;EACIO,YAAYA,CAAA,EAAG;IACX,OAAO,iBAAiB;EAC5B;AACJ;AACAjB,aAAa,CAAC,iBAAiB,EAAEC,sBAAsB,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|