1 |
- {"ast":null,"code":"import { RichTypeAny } from \"../../flowGraphRichTypes.js\";\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../flowGraphExecutionBlockWithOutSignal.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * @experimental\n */\nexport class FlowGraphSendCustomEventBlock extends FlowGraphExecutionBlockWithOutSignal {\n constructor(\n /**\n * the configuration of the block\n */\n config) {\n super(config);\n this.config = config;\n for (let i = 0; i < this.config.eventData.length; i++) {\n const dataName = this.config.eventData[i];\n this.registerDataInput(dataName, RichTypeAny);\n }\n }\n _execute(context) {\n const eventId = this.config.eventId;\n const eventDatas = this.dataInputs.map(port => port.getValue(context));\n context.configuration.coordinator.notifyCustomEvent(eventId, eventDatas);\n this.out._activateSignal(context);\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return FlowGraphSendCustomEventBlock.ClassName;\n }\n}\n/**\n * the class name of the block.\n */\nFlowGraphSendCustomEventBlock.ClassName = \"FGSendCustomEventBlock\";\nRegisterClass(\"FGSendCustomEventBlock\", FlowGraphSendCustomEventBlock);","map":{"version":3,"names":["RichTypeAny","FlowGraphExecutionBlockWithOutSignal","RegisterClass","FlowGraphSendCustomEventBlock","constructor","config","i","eventData","length","dataName","registerDataInput","_execute","context","eventId","eventDatas","dataInputs","map","port","getValue","configuration","coordinator","notifyCustomEvent","out","_activateSignal","getClassName","ClassName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js"],"sourcesContent":["import { RichTypeAny } from \"../../flowGraphRichTypes.js\";\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../flowGraphExecutionBlockWithOutSignal.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * @experimental\n */\nexport class FlowGraphSendCustomEventBlock extends FlowGraphExecutionBlockWithOutSignal {\n constructor(\n /**\n * the configuration of the block\n */\n config) {\n super(config);\n this.config = config;\n for (let i = 0; i < this.config.eventData.length; i++) {\n const dataName = this.config.eventData[i];\n this.registerDataInput(dataName, RichTypeAny);\n }\n }\n _execute(context) {\n const eventId = this.config.eventId;\n const eventDatas = this.dataInputs.map((port) => port.getValue(context));\n context.configuration.coordinator.notifyCustomEvent(eventId, eventDatas);\n this.out._activateSignal(context);\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return FlowGraphSendCustomEventBlock.ClassName;\n }\n}\n/**\n * the class name of the block.\n */\nFlowGraphSendCustomEventBlock.ClassName = \"FGSendCustomEventBlock\";\nRegisterClass(\"FGSendCustomEventBlock\", FlowGraphSendCustomEventBlock);\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,6BAA6B;AACzD,SAASC,oCAAoC,QAAQ,+CAA+C;AACpG,SAASC,aAAa,QAAQ,4BAA4B;AAC1D;AACA;AACA;AACA,OAAO,MAAMC,6BAA6B,SAASF,oCAAoC,CAAC;EACpFG,WAAWA;EACX;AACJ;AACA;EACIC,MAAM,EAAE;IACJ,KAAK,CAACA,MAAM,CAAC;IACb,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAG,IAAI,CAACD,MAAM,CAACE,SAAS,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;MACnD,MAAMG,QAAQ,GAAG,IAAI,CAACJ,MAAM,CAACE,SAAS,CAACD,CAAC,CAAC;MACzC,IAAI,CAACI,iBAAiB,CAACD,QAAQ,EAAET,WAAW,CAAC;IACjD;EACJ;EACAW,QAAQA,CAACC,OAAO,EAAE;IACd,MAAMC,OAAO,GAAG,IAAI,CAACR,MAAM,CAACQ,OAAO;IACnC,MAAMC,UAAU,GAAG,IAAI,CAACC,UAAU,CAACC,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACC,QAAQ,CAACN,OAAO,CAAC,CAAC;IACxEA,OAAO,CAACO,aAAa,CAACC,WAAW,CAACC,iBAAiB,CAACR,OAAO,EAAEC,UAAU,CAAC;IACxE,IAAI,CAACQ,GAAG,CAACC,eAAe,CAACX,OAAO,CAAC;EACrC;EACA;AACJ;AACA;EACIY,YAAYA,CAAA,EAAG;IACX,OAAOrB,6BAA6B,CAACsB,SAAS;EAClD;AACJ;AACA;AACA;AACA;AACAtB,6BAA6B,CAACsB,SAAS,GAAG,wBAAwB;AAClEvB,aAAa,CAAC,wBAAwB,EAAEC,6BAA6B,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|