16086293d06b5121e8a5659efdcf11bb388ab9a0dfc6feced1bbef8d8de1c71c.json 37 KB

1
  1. {"ast":null,"code":"import { Observable } from \"../../Misc/observable.js\";\nimport { NodeGeometryBlockConnectionPointTypes } from \"./Enums/nodeGeometryConnectionPointTypes.js\";\n/**\n * Enum used to define the compatibility state between two connection points\n */\nexport var NodeGeometryConnectionPointCompatibilityStates;\n(function (NodeGeometryConnectionPointCompatibilityStates) {\n /** Points are compatibles */\n NodeGeometryConnectionPointCompatibilityStates[NodeGeometryConnectionPointCompatibilityStates[\"Compatible\"] = 0] = \"Compatible\";\n /** Points are incompatible because of their types */\n NodeGeometryConnectionPointCompatibilityStates[NodeGeometryConnectionPointCompatibilityStates[\"TypeIncompatible\"] = 1] = \"TypeIncompatible\";\n /** Points are incompatible because they are in the same hierarchy **/\n NodeGeometryConnectionPointCompatibilityStates[NodeGeometryConnectionPointCompatibilityStates[\"HierarchyIssue\"] = 2] = \"HierarchyIssue\";\n})(NodeGeometryConnectionPointCompatibilityStates || (NodeGeometryConnectionPointCompatibilityStates = {}));\n/**\n * Defines the direction of a connection point\n */\nexport var NodeGeometryConnectionPointDirection;\n(function (NodeGeometryConnectionPointDirection) {\n /** Input */\n NodeGeometryConnectionPointDirection[NodeGeometryConnectionPointDirection[\"Input\"] = 0] = \"Input\";\n /** Output */\n NodeGeometryConnectionPointDirection[NodeGeometryConnectionPointDirection[\"Output\"] = 1] = \"Output\";\n})(NodeGeometryConnectionPointDirection || (NodeGeometryConnectionPointDirection = {}));\n/**\n * Defines a connection point for a block\n */\nexport class NodeGeometryConnectionPoint {\n /** Gets the direction of the point */\n get direction() {\n return this._direction;\n }\n /**\n * Gets or sets the connection point type (default is float)\n */\n get type() {\n if (this._type === NodeGeometryBlockConnectionPointTypes.AutoDetect) {\n if (this._ownerBlock.isInput) {\n return this._ownerBlock.type;\n }\n if (this._connectedPoint) {\n return this._connectedPoint.type;\n }\n if (this._linkedConnectionSource) {\n if (this._linkedConnectionSource.isConnected) {\n return this._linkedConnectionSource.type;\n }\n if (this._linkedConnectionSource._defaultConnectionPointType) {\n return this._linkedConnectionSource._defaultConnectionPointType;\n }\n }\n if (this._defaultConnectionPointType) {\n return this._defaultConnectionPointType;\n }\n }\n if (this._type === NodeGeometryBlockConnectionPointTypes.BasedOnInput) {\n if (this._typeConnectionSource) {\n if (!this._typeConnectionSource.isConnected && this._defaultConnectionPointType) {\n return this._defaultConnectionPointType;\n }\n return this._typeConnectionSource.type;\n } else if (this._defaultConnectionPointType) {\n return this._defaultConnectionPointType;\n }\n }\n return this._type;\n }\n set type(value) {\n this._type = value;\n }\n /**\n * Gets a boolean indicating that the current point is connected to another NodeMaterialBlock\n */\n get isConnected() {\n return this.connectedPoint !== null || this.hasEndpoints;\n }\n /** Get the other side of the connection (if any) */\n get connectedPoint() {\n return this._connectedPoint;\n }\n /** Get the block that owns this connection point */\n get ownerBlock() {\n return this._ownerBlock;\n }\n /** Get the block connected on the other side of this connection (if any) */\n get sourceBlock() {\n if (!this._connectedPoint) {\n return null;\n }\n return this._connectedPoint.ownerBlock;\n }\n /** Get the block connected on the endpoints of this connection (if any) */\n get connectedBlocks() {\n if (this._endpoints.length === 0) {\n return [];\n }\n return this._endpoints.map(e => e.ownerBlock);\n }\n /** Gets the list of connected endpoints */\n get endpoints() {\n return this._endpoints;\n }\n /** Gets a boolean indicating if that output point is connected to at least one input */\n get hasEndpoints() {\n return this._endpoints && this._endpoints.length > 0;\n }\n /** Get the inner type (ie AutoDetect for instance instead of the inferred one) */\n get innerType() {\n if (this._linkedConnectionSource && this._linkedConnectionSource.isConnected) {\n return this.type;\n }\n return this._type;\n }\n /** @internal */\n _resetCounters() {\n this._callCount = 0;\n this._executionCount = 0;\n }\n /**\n * Gets the number of times this point was called\n */\n get callCount() {\n return this._callCount;\n }\n /**\n * Gets the number of times this point was executed\n */\n get executionCount() {\n return this._executionCount;\n }\n /**\n * Gets the value represented by this connection point\n * @param state current evaluation state\n * @returns the connected value or the value if nothing is connected\n */\n getConnectedValue(state) {\n if (this.isConnected) {\n var _this$_connectedPoint;\n if ((_this$_connectedPoint = this._connectedPoint) !== null && _this$_connectedPoint !== void 0 && _this$_connectedPoint._storedFunction) {\n this._connectedPoint._callCount++;\n this._connectedPoint._executionCount++;\n return this._connectedPoint._storedFunction(state);\n }\n this._connectedPoint._callCount++;\n this._connectedPoint._executionCount = 1;\n return this._connectedPoint._storedValue;\n }\n this._callCount++;\n this._executionCount = 1;\n return this.value;\n }\n /**\n * Creates a new connection point\n * @param name defines the connection point name\n * @param ownerBlock defines the block hosting this connection point\n * @param direction defines the direction of the connection point\n */\n constructor(name, ownerBlock, direction) {\n /** @internal */\n this._connectedPoint = null;\n /** @internal */\n this._storedValue = null;\n /** @internal */\n this._storedFunction = null;\n /** @internal */\n this._acceptedConnectionPointType = null;\n this._endpoints = new Array();\n this._type = NodeGeometryBlockConnectionPointTypes.Geometry;\n /** @internal */\n this._linkedConnectionSource = null;\n /** @internal */\n this._typeConnectionSource = null;\n /** @internal */\n this._defaultConnectionPointType = null;\n /**\n * Gets or sets the additional types supported by this connection point\n */\n this.acceptedConnectionPointTypes = [];\n /**\n * Gets or sets the additional types excluded by this connection point\n */\n this.excludedConnectionPointTypes = [];\n /**\n * Observable triggered when this point is connected\n */\n this.onConnectionObservable = new Observable();\n /**\n * Observable triggered when this point is disconnected\n */\n this.onDisconnectionObservable = new Observable();\n /**\n * Gets or sets a boolean indicating that this connection point is exposed on a frame\n */\n this.isExposedOnFrame = false;\n /**\n * Gets or sets number indicating the position that the port is exposed to on a frame\n */\n this.exposedPortPosition = -1;\n /**\n * Gets the default value used for this point at creation time\n */\n this.defaultValue = null;\n /**\n * Gets or sets the default value used for this point if nothing is connected\n */\n this.value = null;\n /**\n * Gets or sets the min value accepted for this point if nothing is connected\n */\n this.valueMin = null;\n /**\n * Gets or sets the max value accepted for this point if nothing is connected\n */\n this.valueMax = null;\n /** @internal */\n this._callCount = 0;\n /** @internal */\n this._executionCount = 0;\n this._ownerBlock = ownerBlock;\n this.name = name;\n this._direction = direction;\n }\n /**\n * Gets the current class name e.g. \"NodeMaterialConnectionPoint\"\n * @returns the class name\n */\n getClassName() {\n return \"NodeGeometryConnectionPoint\";\n }\n /**\n * Gets a boolean indicating if the current point can be connected to another point\n * @param connectionPoint defines the other connection point\n * @returns a boolean\n */\n canConnectTo(connectionPoint) {\n return this.checkCompatibilityState(connectionPoint) === 0 /* NodeGeometryConnectionPointCompatibilityStates.Compatible */;\n }\n /**\n * Gets a number indicating if the current point can be connected to another point\n * @param connectionPoint defines the other connection point\n * @returns a number defining the compatibility state\n */\n checkCompatibilityState(connectionPoint) {\n const ownerBlock = this._ownerBlock;\n const otherBlock = connectionPoint.ownerBlock;\n if (this.type !== connectionPoint.type && connectionPoint.innerType !== NodeGeometryBlockConnectionPointTypes.AutoDetect) {\n // Accepted types\n if (connectionPoint.acceptedConnectionPointTypes && connectionPoint.acceptedConnectionPointTypes.indexOf(this.type) !== -1) {\n return 0 /* NodeGeometryConnectionPointCompatibilityStates.Compatible */;\n } else {\n return 1 /* NodeGeometryConnectionPointCompatibilityStates.TypeIncompatible */;\n }\n }\n // Excluded\n if (connectionPoint.excludedConnectionPointTypes && connectionPoint.excludedConnectionPointTypes.indexOf(this.type) !== -1) {\n return 1 /* NodeGeometryConnectionPointCompatibilityStates.TypeIncompatible */;\n }\n // Check hierarchy\n let targetBlock = otherBlock;\n let sourceBlock = ownerBlock;\n if (this.direction === 0 /* NodeGeometryConnectionPointDirection.Input */) {\n targetBlock = ownerBlock;\n sourceBlock = otherBlock;\n }\n if (targetBlock.isAnAncestorOf(sourceBlock)) {\n return 2 /* NodeGeometryConnectionPointCompatibilityStates.HierarchyIssue */;\n }\n return 0 /* NodeGeometryConnectionPointCompatibilityStates.Compatible */;\n }\n /**\n * Connect this point to another connection point\n * @param connectionPoint defines the other connection point\n * @param ignoreConstraints defines if the system will ignore connection type constraints (default is false)\n * @returns the current connection point\n */\n connectTo(connectionPoint, ignoreConstraints = false) {\n if (!ignoreConstraints && !this.canConnectTo(connectionPoint)) {\n // eslint-disable-next-line no-throw-literal\n throw \"Cannot connect these two connectors.\";\n }\n this._endpoints.push(connectionPoint);\n connectionPoint._connectedPoint = this;\n this.onConnectionObservable.notifyObservers(connectionPoint);\n connectionPoint.onConnectionObservable.notifyObservers(this);\n return this;\n }\n /**\n * Disconnect this point from one of his endpoint\n * @param endpoint defines the other connection point\n * @returns the current connection point\n */\n disconnectFrom(endpoint) {\n const index = this._endpoints.indexOf(endpoint);\n if (index === -1) {\n return this;\n }\n this._endpoints.splice(index, 1);\n endpoint._connectedPoint = null;\n this.onDisconnectionObservable.notifyObservers(endpoint);\n endpoint.onDisconnectionObservable.notifyObservers(this);\n return this;\n }\n /**\n * Fill the list of excluded connection point types with all types other than those passed in the parameter\n * @param mask Types (ORed values of NodeMaterialBlockConnectionPointTypes) that are allowed, and thus will not be pushed to the excluded list\n */\n addExcludedConnectionPointFromAllowedTypes(mask) {\n let bitmask = 1;\n while (bitmask < NodeGeometryBlockConnectionPointTypes.All) {\n if (!(mask & bitmask)) {\n this.excludedConnectionPointTypes.push(bitmask);\n }\n bitmask = bitmask << 1;\n }\n }\n /**\n * Serializes this point in a JSON representation\n * @param isInput defines if the connection point is an input (default is true)\n * @returns the serialized point object\n */\n serialize(isInput = true) {\n const serializationObject = {};\n serializationObject.name = this.name;\n serializationObject.displayName = this.displayName;\n if (this.value !== undefined && this.value !== null) {\n if (this.value.asArray) {\n serializationObject.valueType = \"BABYLON.\" + this.value.getClassName();\n serializationObject.value = this.value.asArray();\n } else {\n serializationObject.valueType = \"number\";\n serializationObject.value = this.value;\n }\n }\n if (isInput && this.connectedPoint) {\n serializationObject.inputName = this.name;\n serializationObject.targetBlockId = this.connectedPoint.ownerBlock.uniqueId;\n serializationObject.targetConnectionName = this.connectedPoint.name;\n serializationObject.isExposedOnFrame = true;\n serializationObject.exposedPortPosition = this.exposedPortPosition;\n }\n if (this.isExposedOnFrame || this.exposedPortPosition >= 0) {\n serializationObject.isExposedOnFrame = true;\n serializationObject.exposedPortPosition = this.exposedPortPosition;\n }\n return serializationObject;\n }\n /**\n * Release resources\n */\n dispose() {\n this.onConnectionObservable.clear();\n this.onDisconnectionObservable.clear();\n }\n}","map":{"version":3,"names":["Observable","NodeGeometryBlockConnectionPointTypes","NodeGeometryConnectionPointCompatibilityStates","NodeGeometryConnectionPointDirection","NodeGeometryConnectionPoint","direction","_direction","type","_type","AutoDetect","_ownerBlock","isInput","_connectedPoint","_linkedConnectionSource","isConnected","_defaultConnectionPointType","BasedOnInput","_typeConnectionSource","value","connectedPoint","hasEndpoints","ownerBlock","sourceBlock","connectedBlocks","_endpoints","length","map","e","endpoints","innerType","_resetCounters","_callCount","_executionCount","callCount","executionCount","getConnectedValue","state","_this$_connectedPoint","_storedFunction","_storedValue","constructor","name","_acceptedConnectionPointType","Array","Geometry","acceptedConnectionPointTypes","excludedConnectionPointTypes","onConnectionObservable","onDisconnectionObservable","isExposedOnFrame","exposedPortPosition","defaultValue","valueMin","valueMax","getClassName","canConnectTo","connectionPoint","checkCompatibilityState","otherBlock","indexOf","targetBlock","isAnAncestorOf","connectTo","ignoreConstraints","push","notifyObservers","disconnectFrom","endpoint","index","splice","addExcludedConnectionPointFromAllowedTypes","mask","bitmask","All","serialize","serializationObject","displayName","undefined","asArray","valueType","inputName","targetBlockId","uniqueId","targetConnectionName","dispose","clear"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Meshes/Node/nodeGeometryBlockConnectionPoint.js"],"sourcesContent":["import { Observable } from \"../../Misc/observable.js\";\nimport { NodeGeometryBlockConnectionPointTypes } from \"./Enums/nodeGeometryConnectionPointTypes.js\";\n/**\n * Enum used to define the compatibility state between two connection points\n */\nexport var NodeGeometryConnectionPointCompatibilityStates;\n(function (NodeGeometryConnectionPointCompatibilityStates) {\n /** Points are compatibles */\n NodeGeometryConnectionPointCompatibilityStates[NodeGeometryConnectionPointCompatibilityStates[\"Compatible\"] = 0] = \"Compatible\";\n /** Points are incompatible because of their types */\n NodeGeometryConnectionPointCompatibilityStates[NodeGeometryConnectionPointCompatibilityStates[\"TypeIncompatible\"] = 1] = \"TypeIncompatible\";\n /** Points are incompatible because they are in the same hierarchy **/\n NodeGeometryConnectionPointCompatibilityStates[NodeGeometryConnectionPointCompatibilityStates[\"HierarchyIssue\"] = 2] = \"HierarchyIssue\";\n})(NodeGeometryConnectionPointCompatibilityStates || (NodeGeometryConnectionPointCompatibilityStates = {}));\n/**\n * Defines the direction of a connection point\n */\nexport var NodeGeometryConnectionPointDirection;\n(function (NodeGeometryConnectionPointDirection) {\n /** Input */\n NodeGeometryConnectionPointDirection[NodeGeometryConnectionPointDirection[\"Input\"] = 0] = \"Input\";\n /** Output */\n NodeGeometryConnectionPointDirection[NodeGeometryConnectionPointDirection[\"Output\"] = 1] = \"Output\";\n})(NodeGeometryConnectionPointDirection || (NodeGeometryConnectionPointDirection = {}));\n/**\n * Defines a connection point for a block\n */\nexport class NodeGeometryConnectionPoint {\n /** Gets the direction of the point */\n get direction() {\n return this._direction;\n }\n /**\n * Gets or sets the connection point type (default is float)\n */\n get type() {\n if (this._type === NodeGeometryBlockConnectionPointTypes.AutoDetect) {\n if (this._ownerBlock.isInput) {\n return this._ownerBlock.type;\n }\n if (this._connectedPoint) {\n return this._connectedPoint.type;\n }\n if (this._linkedConnectionSource) {\n if (this._linkedConnectionSource.isConnected) {\n return this._linkedConnectionSource.type;\n }\n if (this._linkedConnectionSource._defaultConnectionPointType) {\n return this._linkedConnectionSource._defaultConnectionPointType;\n }\n }\n if (this._defaultConnectionPointType) {\n return this._defaultConnectionPointType;\n }\n }\n if (this._type === NodeGeometryBlockConnectionPointTypes.BasedOnInput) {\n if (this._typeConnectionSource) {\n if (!this._typeConnectionSource.isConnected && this._defaultConnectionPointType) {\n return this._defaultConnectionPointType;\n }\n return this._typeConnectionSource.type;\n }\n else if (this._defaultConnectionPointType) {\n return this._defaultConnectionPointType;\n }\n }\n return this._type;\n }\n set type(value) {\n this._type = value;\n }\n /**\n * Gets a boolean indicating that the current point is connected to another NodeMaterialBlock\n */\n get isConnected() {\n return this.connectedPoint !== null || this.hasEndpoints;\n }\n /** Get the other side of the connection (if any) */\n get connectedPoint() {\n return this._connectedPoint;\n }\n /** Get the block that owns this connection point */\n get ownerBlock() {\n return this._ownerBlock;\n }\n /** Get the block connected on the other side of this connection (if any) */\n get sourceBlock() {\n if (!this._connectedPoint) {\n return null;\n }\n return this._connectedPoint.ownerBlock;\n }\n /** Get the block connected on the endpoints of this connection (if any) */\n get connectedBlocks() {\n if (this._endpoints.length === 0) {\n return [];\n }\n return this._endpoints.map((e) => e.ownerBlock);\n }\n /** Gets the list of connected endpoints */\n get endpoints() {\n return this._endpoints;\n }\n /** Gets a boolean indicating if that output point is connected to at least one input */\n get hasEndpoints() {\n return this._endpoints && this._endpoints.length > 0;\n }\n /** Get the inner type (ie AutoDetect for instance instead of the inferred one) */\n get innerType() {\n if (this._linkedConnectionSource && this._linkedConnectionSource.isConnected) {\n return this.type;\n }\n return this._type;\n }\n /** @internal */\n _resetCounters() {\n this._callCount = 0;\n this._executionCount = 0;\n }\n /**\n * Gets the number of times this point was called\n */\n get callCount() {\n return this._callCount;\n }\n /**\n * Gets the number of times this point was executed\n */\n get executionCount() {\n return this._executionCount;\n }\n /**\n * Gets the value represented by this connection point\n * @param state current evaluation state\n * @returns the connected value or the value if nothing is connected\n */\n getConnectedValue(state) {\n if (this.isConnected) {\n if (this._connectedPoint?._storedFunction) {\n this._connectedPoint._callCount++;\n this._connectedPoint._executionCount++;\n return this._connectedPoint._storedFunction(state);\n }\n this._connectedPoint._callCount++;\n this._connectedPoint._executionCount = 1;\n return this._connectedPoint._storedValue;\n }\n this._callCount++;\n this._executionCount = 1;\n return this.value;\n }\n /**\n * Creates a new connection point\n * @param name defines the connection point name\n * @param ownerBlock defines the block hosting this connection point\n * @param direction defines the direction of the connection point\n */\n constructor(name, ownerBlock, direction) {\n /** @internal */\n this._connectedPoint = null;\n /** @internal */\n this._storedValue = null;\n /** @internal */\n this._storedFunction = null;\n /** @internal */\n this._acceptedConnectionPointType = null;\n this._endpoints = new Array();\n this._type = NodeGeometryBlockConnectionPointTypes.Geometry;\n /** @internal */\n this._linkedConnectionSource = null;\n /** @internal */\n this._typeConnectionSource = null;\n /** @internal */\n this._defaultConnectionPointType = null;\n /**\n * Gets or sets the additional types supported by this connection point\n */\n this.acceptedConnectionPointTypes = [];\n /**\n * Gets or sets the additional types excluded by this connection point\n */\n this.excludedConnectionPointTypes = [];\n /**\n * Observable triggered when this point is connected\n */\n this.onConnectionObservable = new Observable();\n /**\n * Observable triggered when this point is disconnected\n */\n this.onDisconnectionObservable = new Observable();\n /**\n * Gets or sets a boolean indicating that this connection point is exposed on a frame\n */\n this.isExposedOnFrame = false;\n /**\n * Gets or sets number indicating the position that the port is exposed to on a frame\n */\n this.exposedPortPosition = -1;\n /**\n * Gets the default value used for this point at creation time\n */\n this.defaultValue = null;\n /**\n * Gets or sets the default value used for this point if nothing is connected\n */\n this.value = null;\n /**\n * Gets or sets the min value accepted for this point if nothing is connected\n */\n this.valueMin = null;\n /**\n * Gets or sets the max value accepted for this point if nothing is connected\n */\n this.valueMax = null;\n /** @internal */\n this._callCount = 0;\n /** @internal */\n this._executionCount = 0;\n this._ownerBlock = ownerBlock;\n this.name = name;\n this._direction = direction;\n }\n /**\n * Gets the current class name e.g. \"NodeMaterialConnectionPoint\"\n * @returns the class name\n */\n getClassName() {\n return \"NodeGeometryConnectionPoint\";\n }\n /**\n * Gets a boolean indicating if the current point can be connected to another point\n * @param connectionPoint defines the other connection point\n * @returns a boolean\n */\n canConnectTo(connectionPoint) {\n return this.checkCompatibilityState(connectionPoint) === 0 /* NodeGeometryConnectionPointCompatibilityStates.Compatible */;\n }\n /**\n * Gets a number indicating if the current point can be connected to another point\n * @param connectionPoint defines the other connection point\n * @returns a number defining the compatibility state\n */\n checkCompatibilityState(connectionPoint) {\n const ownerBlock = this._ownerBlock;\n const otherBlock = connectionPoint.ownerBlock;\n if (this.type !== connectionPoint.type && connectionPoint.innerType !== NodeGeometryBlockConnectionPointTypes.AutoDetect) {\n // Accepted types\n if (connectionPoint.acceptedConnectionPointTypes && connectionPoint.acceptedConnectionPointTypes.indexOf(this.type) !== -1) {\n return 0 /* NodeGeometryConnectionPointCompatibilityStates.Compatible */;\n }\n else {\n return 1 /* NodeGeometryConnectionPointCompatibilityStates.TypeIncompatible */;\n }\n }\n // Excluded\n if (connectionPoint.excludedConnectionPointTypes && connectionPoint.excludedConnectionPointTypes.indexOf(this.type) !== -1) {\n return 1 /* NodeGeometryConnectionPointCompatibilityStates.TypeIncompatible */;\n }\n // Check hierarchy\n let targetBlock = otherBlock;\n let sourceBlock = ownerBlock;\n if (this.direction === 0 /* NodeGeometryConnectionPointDirection.Input */) {\n targetBlock = ownerBlock;\n sourceBlock = otherBlock;\n }\n if (targetBlock.isAnAncestorOf(sourceBlock)) {\n return 2 /* NodeGeometryConnectionPointCompatibilityStates.HierarchyIssue */;\n }\n return 0 /* NodeGeometryConnectionPointCompatibilityStates.Compatible */;\n }\n /**\n * Connect this point to another connection point\n * @param connectionPoint defines the other connection point\n * @param ignoreConstraints defines if the system will ignore connection type constraints (default is false)\n * @returns the current connection point\n */\n connectTo(connectionPoint, ignoreConstraints = false) {\n if (!ignoreConstraints && !this.canConnectTo(connectionPoint)) {\n // eslint-disable-next-line no-throw-literal\n throw \"Cannot connect these two connectors.\";\n }\n this._endpoints.push(connectionPoint);\n connectionPoint._connectedPoint = this;\n this.onConnectionObservable.notifyObservers(connectionPoint);\n connectionPoint.onConnectionObservable.notifyObservers(this);\n return this;\n }\n /**\n * Disconnect this point from one of his endpoint\n * @param endpoint defines the other connection point\n * @returns the current connection point\n */\n disconnectFrom(endpoint) {\n const index = this._endpoints.indexOf(endpoint);\n if (index === -1) {\n return this;\n }\n this._endpoints.splice(index, 1);\n endpoint._connectedPoint = null;\n this.onDisconnectionObservable.notifyObservers(endpoint);\n endpoint.onDisconnectionObservable.notifyObservers(this);\n return this;\n }\n /**\n * Fill the list of excluded connection point types with all types other than those passed in the parameter\n * @param mask Types (ORed values of NodeMaterialBlockConnectionPointTypes) that are allowed, and thus will not be pushed to the excluded list\n */\n addExcludedConnectionPointFromAllowedTypes(mask) {\n let bitmask = 1;\n while (bitmask < NodeGeometryBlockConnectionPointTypes.All) {\n if (!(mask & bitmask)) {\n this.excludedConnectionPointTypes.push(bitmask);\n }\n bitmask = bitmask << 1;\n }\n }\n /**\n * Serializes this point in a JSON representation\n * @param isInput defines if the connection point is an input (default is true)\n * @returns the serialized point object\n */\n serialize(isInput = true) {\n const serializationObject = {};\n serializationObject.name = this.name;\n serializationObject.displayName = this.displayName;\n if (this.value !== undefined && this.value !== null) {\n if (this.value.asArray) {\n serializationObject.valueType = \"BABYLON.\" + this.value.getClassName();\n serializationObject.value = this.value.asArray();\n }\n else {\n serializationObject.valueType = \"number\";\n serializationObject.value = this.value;\n }\n }\n if (isInput && this.connectedPoint) {\n serializationObject.inputName = this.name;\n serializationObject.targetBlockId = this.connectedPoint.ownerBlock.uniqueId;\n serializationObject.targetConnectionName = this.connectedPoint.name;\n serializationObject.isExposedOnFrame = true;\n serializationObject.exposedPortPosition = this.exposedPortPosition;\n }\n if (this.isExposedOnFrame || this.exposedPortPosition >= 0) {\n serializationObject.isExposedOnFrame = true;\n serializationObject.exposedPortPosition = this.exposedPortPosition;\n }\n return serializationObject;\n }\n /**\n * Release resources\n */\n dispose() {\n this.onConnectionObservable.clear();\n this.onDisconnectionObservable.clear();\n }\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,0BAA0B;AACrD,SAASC,qCAAqC,QAAQ,6CAA6C;AACnG;AACA;AACA;AACA,OAAO,IAAIC,8CAA8C;AACzD,CAAC,UAAUA,8CAA8C,EAAE;EACvD;EACAA,8CAA8C,CAACA,8CAA8C,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,YAAY;EAC/H;EACAA,8CAA8C,CAACA,8CAA8C,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