bda925eb38da127a530c3d1521d5786d3ae3bf652c2925028ce1ca0dd50f3e81.json 9.6 KB

1
  1. {"ast":null,"code":"import { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { NodeGeometryBlockConnectionPointTypes } from \"../../Enums/nodeGeometryConnectionPointTypes.js\";\nimport { NodeGeometryBlock } from \"../../nodeGeometryBlock.js\";\n/**\n * Defines a block used to receive a value from a teleport entry point\n */\nexport class TeleportOutBlock extends NodeGeometryBlock {\n /**\n * Create a new TeleportOutBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name);\n /** @internal */\n this._entryPoint = null;\n /** @internal */\n this._tempEntryPointUniqueId = null;\n this._isTeleportOut = true;\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\n }\n /**\n * Gets the entry point\n */\n get entryPoint() {\n return this._entryPoint;\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"TeleportOutBlock\";\n }\n /**\n * Gets the output component\n */\n get output() {\n return this._outputs[0];\n }\n /** Detach from entry point */\n detach() {\n if (!this._entryPoint) {\n return;\n }\n this._entryPoint.detachFromEndpoint(this);\n }\n _buildBlock() {\n // Do nothing\n // All work done by the emitter\n }\n _customBuildStep(state) {\n if (this.entryPoint) {\n this.entryPoint.build(state);\n }\n }\n _dumpCode(uniqueNames, alreadyDumped) {\n let codeString = \"\";\n if (this.entryPoint) {\n if (alreadyDumped.indexOf(this.entryPoint) === -1) {\n codeString += this.entryPoint._dumpCode(uniqueNames, alreadyDumped);\n }\n }\n return codeString + super._dumpCode(uniqueNames, alreadyDumped);\n }\n _dumpCodeForOutputConnections(alreadyDumped) {\n let codeString = super._dumpCodeForOutputConnections(alreadyDumped);\n if (this.entryPoint) {\n codeString += this.entryPoint._dumpCodeForOutputConnections(alreadyDumped);\n }\n return codeString;\n }\n /**\n * Clone the current block to a new identical block\n * @returns a copy of the current block\n */\n clone() {\n const clone = super.clone();\n if (this.entryPoint) {\n this.entryPoint.attachToEndpoint(clone);\n }\n return clone;\n }\n _dumpPropertiesCode() {\n let codeString = super._dumpPropertiesCode();\n if (this.entryPoint) {\n codeString += `${this.entryPoint._codeVariableName}.attachToEndpoint(${this._codeVariableName});\\n`;\n }\n return codeString;\n }\n /**\n * Serializes this block in a JSON representation\n * @returns the serialized block object\n */\n serialize() {\n var _this$entryPoint$uniq, _this$entryPoint;\n const serializationObject = super.serialize();\n serializationObject.entryPoint = (_this$entryPoint$uniq = (_this$entryPoint = this.entryPoint) === null || _this$entryPoint === void 0 ? void 0 : _this$entryPoint.uniqueId) !== null && _this$entryPoint$uniq !== void 0 ? _this$entryPoint$uniq : \"\";\n return serializationObject;\n }\n _deserialize(serializationObject) {\n super._deserialize(serializationObject);\n this._tempEntryPointUniqueId = serializationObject.entryPoint;\n }\n}\nRegisterClass(\"BABYLON.TeleportOutBlock\", TeleportOutBlock);","map":{"version":3,"names":["RegisterClass","NodeGeometryBlockConnectionPointTypes","NodeGeometryBlock","TeleportOutBlock","constructor","name","_entryPoint","_tempEntryPointUniqueId","_isTeleportOut","registerOutput","BasedOnInput","entryPoint","getClassName","output","_outputs","detach","detachFromEndpoint","_buildBlock","_customBuildStep","state","build","_dumpCode","uniqueNames","alreadyDumped","codeString","indexOf","_dumpCodeForOutputConnections","clone","attachToEndpoint","_dumpPropertiesCode","_codeVariableName","serialize","_this$entryPoint$uniq","_this$entryPoint","serializationObject","uniqueId","_deserialize"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Meshes/Node/Blocks/Teleport/teleportOutBlock.js"],"sourcesContent":["import { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { NodeGeometryBlockConnectionPointTypes } from \"../../Enums/nodeGeometryConnectionPointTypes.js\";\nimport { NodeGeometryBlock } from \"../../nodeGeometryBlock.js\";\n/**\n * Defines a block used to receive a value from a teleport entry point\n */\nexport class TeleportOutBlock extends NodeGeometryBlock {\n /**\n * Create a new TeleportOutBlock\n * @param name defines the block name\n */\n constructor(name) {\n super(name);\n /** @internal */\n this._entryPoint = null;\n /** @internal */\n this._tempEntryPointUniqueId = null;\n this._isTeleportOut = true;\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\n }\n /**\n * Gets the entry point\n */\n get entryPoint() {\n return this._entryPoint;\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"TeleportOutBlock\";\n }\n /**\n * Gets the output component\n */\n get output() {\n return this._outputs[0];\n }\n /** Detach from entry point */\n detach() {\n if (!this._entryPoint) {\n return;\n }\n this._entryPoint.detachFromEndpoint(this);\n }\n _buildBlock() {\n // Do nothing\n // All work done by the emitter\n }\n _customBuildStep(state) {\n if (this.entryPoint) {\n this.entryPoint.build(state);\n }\n }\n _dumpCode(uniqueNames, alreadyDumped) {\n let codeString = \"\";\n if (this.entryPoint) {\n if (alreadyDumped.indexOf(this.entryPoint) === -1) {\n codeString += this.entryPoint._dumpCode(uniqueNames, alreadyDumped);\n }\n }\n return codeString + super._dumpCode(uniqueNames, alreadyDumped);\n }\n _dumpCodeForOutputConnections(alreadyDumped) {\n let codeString = super._dumpCodeForOutputConnections(alreadyDumped);\n if (this.entryPoint) {\n codeString += this.entryPoint._dumpCodeForOutputConnections(alreadyDumped);\n }\n return codeString;\n }\n /**\n * Clone the current block to a new identical block\n * @returns a copy of the current block\n */\n clone() {\n const clone = super.clone();\n if (this.entryPoint) {\n this.entryPoint.attachToEndpoint(clone);\n }\n return clone;\n }\n _dumpPropertiesCode() {\n let codeString = super._dumpPropertiesCode();\n if (this.entryPoint) {\n codeString += `${this.entryPoint._codeVariableName}.attachToEndpoint(${this._codeVariableName});\\n`;\n }\n return codeString;\n }\n /**\n * Serializes this block in a JSON representation\n * @returns the serialized block object\n */\n serialize() {\n const serializationObject = super.serialize();\n serializationObject.entryPoint = this.entryPoint?.uniqueId ?? \"\";\n return serializationObject;\n }\n _deserialize(serializationObject) {\n super._deserialize(serializationObject);\n this._tempEntryPointUniqueId = serializationObject.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