6240740b8ffe5795b9269e782c29e2bb8d598166666d447f01616f18f4224642.json 4.5 KB

1
  1. {"ast":null,"code":"import { FlowGraphBlock } from \"../../flowGraphBlock.js\";\nimport { RichTypeAny } from \"../../flowGraphRichTypes.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * A block that gets the value of a variable.\n * @experimental\n */\nexport class FlowGraphGetVariableBlock extends FlowGraphBlock {\n /**\n * Construct a FlowGraphGetVariableBlock.\n * @param config construction parameters\n */\n constructor(config) {\n super(config);\n this.config = config;\n // The output connection has to have the name of the variable.\n this.output = this.registerDataOutput(config.variableName, RichTypeAny);\n }\n /**\n * @internal\n */\n _updateOutputs(context) {\n const variableNameValue = this.config.variableName;\n if (context.hasVariable(variableNameValue)) {\n this.output.setValue(context.getVariable(variableNameValue), context);\n }\n }\n /**\n * Gets the class name of this block\n * @returns the class name\n */\n getClassName() {\n return FlowGraphGetVariableBlock.ClassName;\n }\n /**\n * Serializes this block\n * @param serializationObject the object to serialize to\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n serializationObject.config.variableName = this.config.variableName;\n }\n}\n/**\n * Class name of the block.\n */\nFlowGraphGetVariableBlock.ClassName = \"FGGetVariableBlock\";\nRegisterClass(FlowGraphGetVariableBlock.ClassName, FlowGraphGetVariableBlock);","map":{"version":3,"names":["FlowGraphBlock","RichTypeAny","RegisterClass","FlowGraphGetVariableBlock","constructor","config","output","registerDataOutput","variableName","_updateOutputs","context","variableNameValue","hasVariable","setValue","getVariable","getClassName","ClassName","serialize","serializationObject"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js"],"sourcesContent":["import { FlowGraphBlock } from \"../../flowGraphBlock.js\";\nimport { RichTypeAny } from \"../../flowGraphRichTypes.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\n/**\n * A block that gets the value of a variable.\n * @experimental\n */\nexport class FlowGraphGetVariableBlock extends FlowGraphBlock {\n /**\n * Construct a FlowGraphGetVariableBlock.\n * @param config construction parameters\n */\n constructor(config) {\n super(config);\n this.config = config;\n // The output connection has to have the name of the variable.\n this.output = this.registerDataOutput(config.variableName, RichTypeAny);\n }\n /**\n * @internal\n */\n _updateOutputs(context) {\n const variableNameValue = this.config.variableName;\n if (context.hasVariable(variableNameValue)) {\n this.output.setValue(context.getVariable(variableNameValue), context);\n }\n }\n /**\n * Gets the class name of this block\n * @returns the class name\n */\n getClassName() {\n return FlowGraphGetVariableBlock.ClassName;\n }\n /**\n * Serializes this block\n * @param serializationObject the object to serialize to\n */\n serialize(serializationObject) {\n super.serialize(serializationObject);\n serializationObject.config.variableName = this.config.variableName;\n }\n}\n/**\n * Class name of the block.\n */\nFlowGraphGetVariableBlock.ClassName = \"FGGetVariableBlock\";\nRegisterClass(FlowGraphGetVariableBlock.ClassName, FlowGraphGetVariableBlock);\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,yBAAyB;AACxD,SAASC,WAAW,QAAQ,6BAA6B;AACzD,SAASC,aAAa,QAAQ,4BAA4B;AAC1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,SAASH,cAAc,CAAC;EAC1D;AACJ;AACA;AACA;EACII,WAAWA,CAACC,MAAM,EAAE;IAChB,KAAK,CAACA,MAAM,CAAC;IACb,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB;IACA,IAAI,CAACC,MAAM,GAAG,IAAI,CAACC,kBAAkB,CAACF,MAAM,CAACG,YAAY,EAAEP,WAAW,CAAC;EAC3E;EACA;AACJ;AACA;EACIQ,cAAcA,CAACC,OAAO,EAAE;IACpB,MAAMC,iBAAiB,GAAG,IAAI,CAACN,MAAM,CAACG,YAAY;IAClD,IAAIE,OAAO,CAACE,WAAW,CAACD,iBAAiB,CAAC,EAAE;MACxC,IAAI,CAACL,MAAM,CAACO,QAAQ,CAACH,OAAO,CAACI,WAAW,CAACH,iBAAiB,CAAC,EAAED,OAAO,CAAC;IACzE;EACJ;EACA;AACJ;AACA;AACA;EACIK,YAAYA,CAAA,EAAG;IACX,OAAOZ,yBAAyB,CAACa,SAAS;EAC9C;EACA;AACJ;AACA;AACA;EACIC,SAASA,CAACC,mBAAmB,EAAE;IAC3B,KAAK,CAACD,SAAS,CAACC,mBAAmB,CAAC;IACpCA,mBAAmB,CAACb,MAAM,CAACG,YAAY,GAAG,IAAI,CAACH,MAAM,CAACG,YAAY;EACtE;AACJ;AACA;AACA;AACA;AACAL,yBAAyB,CAACa,SAAS,GAAG,oBAAoB;AAC1Dd,aAAa,CAACC,yBAAyB,CAACa,SAAS,EAAEb,yBAAyB,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}