1 |
- {"ast":null,"code":"import { RichTypeAny } from \"../../flowGraphRichTypes.js\";\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../flowGraphExecutionBlockWithOutSignal.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\nimport { FlowGraphPathConverterComponent } from \"../../flowGraphPathConverterComponent.js\";\n/**\n * @experimental\n * Block that sets a property on a target object.\n */\nexport class FlowGraphSetPropertyBlock extends FlowGraphExecutionBlockWithOutSignal {\n constructor(\n /**\n * the configuration of the block\n */\n config) {\n super(config);\n this.config = config;\n this.a = this.registerDataInput(\"a\", RichTypeAny);\n this.templateComponent = new FlowGraphPathConverterComponent(config.path, this);\n }\n _execute(context) {\n const value = this.a.getValue(context);\n const accessor = this.templateComponent.getAccessor(this.config.pathConverter, context);\n accessor.info.set(value, accessor.object);\n this.out._activateSignal(context);\n }\n /**\n * Serializes the block to a JSON object.\n * @param serializationObject the object to serialize to.\n */\n serialize(serializationObject = {}) {\n super.serialize(serializationObject);\n serializationObject.config.path = this.config.path;\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return FlowGraphSetPropertyBlock.ClassName;\n }\n}\n/**\n * Class name of the block.\n */\nFlowGraphSetPropertyBlock.ClassName = \"FGSetPropertyBlock\";\nRegisterClass(\"FGSetPropertyBlock\", FlowGraphSetPropertyBlock);","map":{"version":3,"names":["RichTypeAny","FlowGraphExecutionBlockWithOutSignal","RegisterClass","FlowGraphPathConverterComponent","FlowGraphSetPropertyBlock","constructor","config","a","registerDataInput","templateComponent","path","_execute","context","value","getValue","accessor","getAccessor","pathConverter","info","set","object","out","_activateSignal","serialize","serializationObject","getClassName","ClassName"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js"],"sourcesContent":["import { RichTypeAny } from \"../../flowGraphRichTypes.js\";\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../flowGraphExecutionBlockWithOutSignal.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\nimport { FlowGraphPathConverterComponent } from \"../../flowGraphPathConverterComponent.js\";\n/**\n * @experimental\n * Block that sets a property on a target object.\n */\nexport class FlowGraphSetPropertyBlock extends FlowGraphExecutionBlockWithOutSignal {\n constructor(\n /**\n * the configuration of the block\n */\n config) {\n super(config);\n this.config = config;\n this.a = this.registerDataInput(\"a\", RichTypeAny);\n this.templateComponent = new FlowGraphPathConverterComponent(config.path, this);\n }\n _execute(context) {\n const value = this.a.getValue(context);\n const accessor = this.templateComponent.getAccessor(this.config.pathConverter, context);\n accessor.info.set(value, accessor.object);\n this.out._activateSignal(context);\n }\n /**\n * Serializes the block to a JSON object.\n * @param serializationObject the object to serialize to.\n */\n serialize(serializationObject = {}) {\n super.serialize(serializationObject);\n serializationObject.config.path = this.config.path;\n }\n /**\n * @returns class name of the block.\n */\n getClassName() {\n return FlowGraphSetPropertyBlock.ClassName;\n }\n}\n/**\n * Class name of the block.\n */\nFlowGraphSetPropertyBlock.ClassName = \"FGSetPropertyBlock\";\nRegisterClass(\"FGSetPropertyBlock\", FlowGraphSetPropertyBlock);\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,6BAA6B;AACzD,SAASC,oCAAoC,QAAQ,+CAA+C;AACpG,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,+BAA+B,QAAQ,0CAA0C;AAC1F;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,SAASH,oCAAoC,CAAC;EAChFI,WAAWA;EACX;AACJ;AACA;EACIC,MAAM,EAAE;IACJ,KAAK,CAACA,MAAM,CAAC;IACb,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,CAAC,GAAG,IAAI,CAACC,iBAAiB,CAAC,GAAG,EAAER,WAAW,CAAC;IACjD,IAAI,CAACS,iBAAiB,GAAG,IAAIN,+BAA+B,CAACG,MAAM,CAACI,IAAI,EAAE,IAAI,CAAC;EACnF;EACAC,QAAQA,CAACC,OAAO,EAAE;IACd,MAAMC,KAAK,GAAG,IAAI,CAACN,CAAC,CAACO,QAAQ,CAACF,OAAO,CAAC;IACtC,MAAMG,QAAQ,GAAG,IAAI,CAACN,iBAAiB,CAACO,WAAW,CAAC,IAAI,CAACV,MAAM,CAACW,aAAa,EAAEL,OAAO,CAAC;IACvFG,QAAQ,CAACG,IAAI,CAACC,GAAG,CAACN,KAAK,EAAEE,QAAQ,CAACK,MAAM,CAAC;IACzC,IAAI,CAACC,GAAG,CAACC,eAAe,CAACV,OAAO,CAAC;EACrC;EACA;AACJ;AACA;AACA;EACIW,SAASA,CAACC,mBAAmB,GAAG,CAAC,CAAC,EAAE;IAChC,KAAK,CAACD,SAAS,CAACC,mBAAmB,CAAC;IACpCA,mBAAmB,CAAClB,MAAM,CAACI,IAAI,GAAG,IAAI,CAACJ,MAAM,CAACI,IAAI;EACtD;EACA;AACJ;AACA;EACIe,YAAYA,CAAA,EAAG;IACX,OAAOrB,yBAAyB,CAACsB,SAAS;EAC9C;AACJ;AACA;AACA;AACA;AACAtB,yBAAyB,CAACsB,SAAS,GAAG,oBAAoB;AAC1DxB,aAAa,CAAC,oBAAoB,EAAEE,yBAAyB,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|