b5e05e22599167748873408c5ee77fb2e76d5e19e6dc0f055632e6898c37c235.json 62 KB

1
  1. {"ast":null,"code":"import { NodeMaterialBlockConnectionPointTypes } from \"./Enums/nodeMaterialBlockConnectionPointTypes.js\";\nimport { NodeMaterialBlockTargets } from \"./Enums/nodeMaterialBlockTargets.js\";\nimport { Observable } from \"../../Misc/observable.js\";\n/**\n * Enum used to define the compatibility state between two connection points\n */\nexport var NodeMaterialConnectionPointCompatibilityStates;\n(function (NodeMaterialConnectionPointCompatibilityStates) {\n /** Points are compatibles */\n NodeMaterialConnectionPointCompatibilityStates[NodeMaterialConnectionPointCompatibilityStates[\"Compatible\"] = 0] = \"Compatible\";\n /** Points are incompatible because of their types */\n NodeMaterialConnectionPointCompatibilityStates[NodeMaterialConnectionPointCompatibilityStates[\"TypeIncompatible\"] = 1] = \"TypeIncompatible\";\n /** Points are incompatible because of their targets (vertex vs fragment) */\n NodeMaterialConnectionPointCompatibilityStates[NodeMaterialConnectionPointCompatibilityStates[\"TargetIncompatible\"] = 2] = \"TargetIncompatible\";\n /** Points are incompatible because they are in the same hierarchy **/\n NodeMaterialConnectionPointCompatibilityStates[NodeMaterialConnectionPointCompatibilityStates[\"HierarchyIssue\"] = 3] = \"HierarchyIssue\";\n})(NodeMaterialConnectionPointCompatibilityStates || (NodeMaterialConnectionPointCompatibilityStates = {}));\n/**\n * Defines the direction of a connection point\n */\nexport var NodeMaterialConnectionPointDirection;\n(function (NodeMaterialConnectionPointDirection) {\n /** Input */\n NodeMaterialConnectionPointDirection[NodeMaterialConnectionPointDirection[\"Input\"] = 0] = \"Input\";\n /** Output */\n NodeMaterialConnectionPointDirection[NodeMaterialConnectionPointDirection[\"Output\"] = 1] = \"Output\";\n})(NodeMaterialConnectionPointDirection || (NodeMaterialConnectionPointDirection = {}));\n/**\n * Defines a connection point for a block\n */\nexport class NodeMaterialConnectionPoint {\n /**\n * Checks if two types are equivalent\n * @param type1 type 1 to check\n * @param type2 type 2 to check\n * @returns true if both types are equivalent, else false\n */\n static AreEquivalentTypes(type1, type2) {\n switch (type1) {\n case NodeMaterialBlockConnectionPointTypes.Vector3:\n {\n if (type2 === NodeMaterialBlockConnectionPointTypes.Color3) {\n return true;\n }\n break;\n }\n case NodeMaterialBlockConnectionPointTypes.Vector4:\n {\n if (type2 === NodeMaterialBlockConnectionPointTypes.Color4) {\n return true;\n }\n break;\n }\n case NodeMaterialBlockConnectionPointTypes.Color3:\n {\n if (type2 === NodeMaterialBlockConnectionPointTypes.Vector3) {\n return true;\n }\n break;\n }\n case NodeMaterialBlockConnectionPointTypes.Color4:\n {\n if (type2 === NodeMaterialBlockConnectionPointTypes.Vector4) {\n return true;\n }\n break;\n }\n }\n return false;\n }\n get _connectedPoint() {\n return this._connectedPointBackingField;\n }\n set _connectedPoint(value) {\n var _this$_connectedPoint;\n if (this._connectedPointBackingField === value) {\n return;\n }\n (_this$_connectedPoint = this._connectedPointTypeChangedObserver) === null || _this$_connectedPoint === void 0 || _this$_connectedPoint.remove();\n this._updateTypeDependentState(() => this._connectedPointBackingField = value);\n if (this._connectedPointBackingField) {\n this._connectedPointTypeChangedObserver = this._connectedPointBackingField.onTypeChangedObservable.add(() => {\n this._notifyTypeChanged();\n });\n }\n }\n /** @internal */\n get _typeConnectionSource() {\n return this._typeConnectionSourceBackingField;\n }\n /** @internal */\n set _typeConnectionSource(value) {\n var _this$_typeConnection;\n if (this._typeConnectionSourceBackingField === value) {\n return;\n }\n (_this$_typeConnection = this._typeConnectionSourceTypeChangedObserver) === null || _this$_typeConnection === void 0 || _this$_typeConnection.remove();\n this._updateTypeDependentState(() => this._typeConnectionSourceBackingField = value);\n if (this._typeConnectionSourceBackingField) {\n this._typeConnectionSourceTypeChangedObserver = this._typeConnectionSourceBackingField.onTypeChangedObservable.add(() => {\n this._notifyTypeChanged();\n });\n }\n }\n /** @internal */\n get _defaultConnectionPointType() {\n return this._defaultConnectionPointTypeBackingField;\n }\n /** @internal */\n set _defaultConnectionPointType(value) {\n this._updateTypeDependentState(() => this._defaultConnectionPointTypeBackingField = value);\n }\n /** @internal */\n get _linkedConnectionSource() {\n return this._linkedConnectionSourceBackingField;\n }\n /** @internal */\n set _linkedConnectionSource(value) {\n var _this$_linkedConnecti;\n if (this._linkedConnectionSourceBackingField === value) {\n return;\n }\n (_this$_linkedConnecti = this._linkedConnectionSourceTypeChangedObserver) === null || _this$_linkedConnecti === void 0 || _this$_linkedConnecti.remove();\n this._updateTypeDependentState(() => this._linkedConnectionSourceBackingField = value);\n if (this._linkedConnectionSourceBackingField) {\n this._linkedConnectionSourceTypeChangedObserver = this._linkedConnectionSourceBackingField.onTypeChangedObservable.add(() => {\n this._notifyTypeChanged();\n });\n }\n }\n /** Gets the direction of the point */\n get direction() {\n return this._direction;\n }\n /**\n * Gets the declaration variable name in the shader\n */\n get declarationVariableName() {\n if (this._ownerBlock.isInput) {\n return this._ownerBlock.declarationVariableName;\n }\n if ((!this._enforceAssociatedVariableName || !this._associatedVariableName) && this._connectedPoint) {\n return this._connectedPoint.declarationVariableName;\n }\n return this._associatedVariableName;\n }\n /**\n * Gets or sets the associated variable name in the shader\n */\n get associatedVariableName() {\n if (this._ownerBlock.isInput) {\n return this._ownerBlock.associatedVariableName;\n }\n if ((!this._enforceAssociatedVariableName || !this._associatedVariableName) && this._connectedPoint) {\n return this._connectedPoint.associatedVariableName;\n }\n return this._associatedVariableName;\n }\n set associatedVariableName(value) {\n this._associatedVariableName = value;\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 /**\n * Gets or sets the connection point type (default is float)\n */\n get type() {\n if (this._type === NodeMaterialBlockConnectionPointTypes.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 if (this._linkedConnectionSource.connectedPoint._redirectedSource && this._linkedConnectionSource.connectedPoint._redirectedSource.isConnected) {\n return this._linkedConnectionSource.connectedPoint._redirectedSource.type;\n }\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 === NodeMaterialBlockConnectionPointTypes.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._updateTypeDependentState(() => this._type = value);\n }\n /** Gets or sets the target of that connection point */\n get target() {\n if (!this._prioritizeVertex || !this._ownerBlock) {\n return this._target;\n }\n if (this._target !== NodeMaterialBlockTargets.VertexAndFragment) {\n return this._target;\n }\n if (this._ownerBlock.target === NodeMaterialBlockTargets.Fragment) {\n return NodeMaterialBlockTargets.Fragment;\n }\n return NodeMaterialBlockTargets.Vertex;\n }\n set target(value) {\n this._target = 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 /**\n * Gets a boolean indicating that the current point is connected to an input block\n */\n get isConnectedToInputBlock() {\n return this.connectedPoint !== null && this.connectedPoint.ownerBlock.isInput;\n }\n /**\n * Gets a the connected input block (if any)\n */\n get connectInputBlock() {\n if (!this.isConnectedToInputBlock) {\n return null;\n }\n return this.connectedPoint.ownerBlock;\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 /** Gets a boolean indicating that this connection has a path to the vertex output*/\n get isDirectlyConnectedToVertexOutput() {\n if (!this.hasEndpoints) {\n return false;\n }\n for (const endpoint of this._endpoints) {\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Vertex) {\n return true;\n }\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Neutral || endpoint.ownerBlock.target === NodeMaterialBlockTargets.VertexAndFragment) {\n if (endpoint.ownerBlock.outputs.some(o => o.isDirectlyConnectedToVertexOutput)) {\n return true;\n }\n }\n }\n return false;\n }\n /** Gets a boolean indicating that this connection will be used in the vertex shader */\n get isConnectedInVertexShader() {\n if (this.target === NodeMaterialBlockTargets.Vertex) {\n return true;\n }\n if (!this.hasEndpoints) {\n return false;\n }\n for (const endpoint of this._endpoints) {\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Vertex) {\n return true;\n }\n if (endpoint.target === NodeMaterialBlockTargets.Vertex) {\n return true;\n }\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Neutral || endpoint.ownerBlock.target === NodeMaterialBlockTargets.VertexAndFragment) {\n if (endpoint.ownerBlock.outputs.some(o => o.isConnectedInVertexShader)) {\n return true;\n }\n }\n }\n return false;\n }\n /** Gets a boolean indicating that this connection will be used in the fragment shader */\n get isConnectedInFragmentShader() {\n if (this.target === NodeMaterialBlockTargets.Fragment) {\n return true;\n }\n if (!this.hasEndpoints) {\n return false;\n }\n for (const endpoint of this._endpoints) {\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Fragment) {\n return true;\n }\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Neutral || endpoint.ownerBlock.target === NodeMaterialBlockTargets.VertexAndFragment) {\n if (endpoint.ownerBlock.isConnectedInFragmentShader()) {\n return true;\n }\n }\n }\n return false;\n }\n /**\n * Creates a block suitable to be used as an input for this input point.\n * If null is returned, a block based on the point type will be created.\n * @returns The returned string parameter is the name of the output point of NodeMaterialBlock (first parameter of the returned array) that can be connected to the input\n */\n createCustomInputBlock() {\n return null;\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._preventBubbleUp = false;\n this._connectedPointBackingField = null;\n this._endpoints = new Array();\n /** @internal */\n this._redirectedSource = null;\n this._typeConnectionSourceBackingField = null;\n this._defaultConnectionPointTypeBackingField = null;\n this._linkedConnectionSourceBackingField = null;\n /** @internal */\n this._acceptedConnectionPointType = null;\n this._type = NodeMaterialBlockConnectionPointTypes.Float;\n /** @internal */\n this._enforceAssociatedVariableName = false;\n /** @internal */\n this._forPostBuild = false;\n /** Indicates that this connection point needs dual validation before being connected to another point */\n this.needDualDirectionValidation = false;\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 * Observable triggered when the type of the connection point is changed\n */\n this.onTypeChangedObservable = new Observable();\n this._isTypeChangeObservableNotifying = false;\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 /** @internal */\n this._prioritizeVertex = false;\n this._target = NodeMaterialBlockTargets.VertexAndFragment;\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 \"NodeMaterialConnectionPoint\";\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 /* NodeMaterialConnectionPointCompatibilityStates.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 (ownerBlock.target === NodeMaterialBlockTargets.Fragment) {\n // Let's check we are not going reverse\n if (otherBlock.target === NodeMaterialBlockTargets.Vertex) {\n return 2 /* NodeMaterialConnectionPointCompatibilityStates.TargetIncompatible */;\n }\n for (const output of otherBlock.outputs) {\n if (output.ownerBlock.target != NodeMaterialBlockTargets.Neutral && output.isConnectedInVertexShader) {\n return 2 /* NodeMaterialConnectionPointCompatibilityStates.TargetIncompatible */;\n }\n }\n }\n if (this.type !== connectionPoint.type && connectionPoint.innerType !== NodeMaterialBlockConnectionPointTypes.AutoDetect) {\n // Equivalents\n if (NodeMaterialConnectionPoint.AreEquivalentTypes(this.type, connectionPoint.type)) {\n return 0 /* NodeMaterialConnectionPointCompatibilityStates.Compatible */;\n }\n // Accepted types\n if (connectionPoint.acceptedConnectionPointTypes && connectionPoint.acceptedConnectionPointTypes.indexOf(this.type) !== -1 || connectionPoint._acceptedConnectionPointType && NodeMaterialConnectionPoint.AreEquivalentTypes(connectionPoint._acceptedConnectionPointType.type, this.type)) {\n return 0 /* NodeMaterialConnectionPointCompatibilityStates.Compatible */;\n } else {\n return 1 /* NodeMaterialConnectionPointCompatibilityStates.TypeIncompatible */;\n }\n }\n // Excluded\n if (connectionPoint.excludedConnectionPointTypes && connectionPoint.excludedConnectionPointTypes.indexOf(this.type) !== -1) {\n return 1 /* NodeMaterialConnectionPointCompatibilityStates.TypeIncompatible */;\n }\n // Check hierarchy\n let targetBlock = otherBlock;\n let sourceBlock = ownerBlock;\n if (this.direction === 0 /* NodeMaterialConnectionPointDirection.Input */) {\n targetBlock = ownerBlock;\n sourceBlock = otherBlock;\n }\n if (targetBlock.isAnAncestorOf(sourceBlock)) {\n return 3 /* NodeMaterialConnectionPointCompatibilityStates.HierarchyIssue */;\n }\n return 0 /* NodeMaterialConnectionPointCompatibilityStates.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._enforceAssociatedVariableName = false;\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._enforceAssociatedVariableName = false;\n endpoint._enforceAssociatedVariableName = false;\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 < NodeMaterialBlockConnectionPointTypes.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 if (this.displayName) {\n serializationObject.displayName = this.displayName;\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 this.onTypeChangedObservable.clear();\n this._connectedPoint = null;\n this._typeConnectionSource = null;\n this._linkedConnectionSource = null;\n }\n _updateTypeDependentState(update) {\n const previousType = this.type;\n update();\n if (this.type !== previousType) {\n this._notifyTypeChanged();\n }\n }\n _notifyTypeChanged() {\n // Disallow re-entrancy\n if (this._isTypeChangeObservableNotifying) {\n return;\n }\n this._isTypeChangeObservableNotifying = true;\n this.onTypeChangedObservable.notifyObservers(this.type);\n this._isTypeChangeObservableNotifying = false;\n }\n}","map":{"version":3,"names":["NodeMaterialBlockConnectionPointTypes","NodeMaterialBlockTargets","Observable","NodeMaterialConnectionPointCompatibilityStates","NodeMaterialConnectionPointDirection","NodeMaterialConnectionPoint","AreEquivalentTypes","type1","type2","Vector3","Color3","Vector4","Color4","_connectedPoint","_connectedPointBackingField","value","_this$_connectedPoint","_connectedPointTypeChangedObserver","remove","_updateTypeDependentState","onTypeChangedObservable","add","_notifyTypeChanged","_typeConnectionSource","_typeConnectionSourceBackingField","_this$_typeConnection","_typeConnectionSourceTypeChangedObserver","_defaultConnectionPointType","_defaultConnectionPointTypeBackingField","_linkedConnectionSource","_linkedConnectionSourceBackingField","_this$_linkedConnecti","_linkedConnectionSourceTypeChangedObserver","direction","_direction","declarationVariableName","_ownerBlock","isInput","_enforceAssociatedVariableName","_associatedVariableName","associatedVariableName","innerType","isConnected","type","_type","AutoDetect","connectedPoint","_redirectedSource","BasedOnInput","target","_prioritizeVertex","_target","VertexAndFragment","Fragment","Vertex","hasEndpoints","isConnectedToInputBlock","ownerBlock","connectInputBlock","sourceBlock","connectedBlocks","_endpoints","length","map","e","endpoints","isDirectlyConnectedToVertexOutput","endpoint","Neutral","outputs","some","o","isConnectedInVertexShader","isConnectedInFragmentShader","createCustomInputBlock","constructor","name","_preventBubbleUp","Array","_acceptedConnectionPointType","Float","_forPostBuild","needDualDirectionValidation","acceptedConnectionPointTypes","excludedConnectionPointTypes","onConnectionObservable","onDisconnectionObservable","_isTypeChangeObservableNotifying","isExposedOnFrame","exposedPortPosition","getClassName","canConnectTo","connectionPoint","checkCompatibilityState","otherBlock","output","indexOf","targetBlock","isAnAncestorOf","connectTo","ignoreConstraints","push","notifyObservers","disconnectFrom","index","splice","addExcludedConnectionPointFromAllowedTypes","mask","bitmask","All","serialize","serializationObject","displayName","inputName","targetBlockId","uniqueId","targetConnectionName","dispose","clear","update","previousType"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Node/nodeMaterialBlockConnectionPoint.js"],"sourcesContent":["import { NodeMaterialBlockConnectionPointTypes } from \"./Enums/nodeMaterialBlockConnectionPointTypes.js\";\nimport { NodeMaterialBlockTargets } from \"./Enums/nodeMaterialBlockTargets.js\";\nimport { Observable } from \"../../Misc/observable.js\";\n/**\n * Enum used to define the compatibility state between two connection points\n */\nexport var NodeMaterialConnectionPointCompatibilityStates;\n(function (NodeMaterialConnectionPointCompatibilityStates) {\n /** Points are compatibles */\n NodeMaterialConnectionPointCompatibilityStates[NodeMaterialConnectionPointCompatibilityStates[\"Compatible\"] = 0] = \"Compatible\";\n /** Points are incompatible because of their types */\n NodeMaterialConnectionPointCompatibilityStates[NodeMaterialConnectionPointCompatibilityStates[\"TypeIncompatible\"] = 1] = \"TypeIncompatible\";\n /** Points are incompatible because of their targets (vertex vs fragment) */\n NodeMaterialConnectionPointCompatibilityStates[NodeMaterialConnectionPointCompatibilityStates[\"TargetIncompatible\"] = 2] = \"TargetIncompatible\";\n /** Points are incompatible because they are in the same hierarchy **/\n NodeMaterialConnectionPointCompatibilityStates[NodeMaterialConnectionPointCompatibilityStates[\"HierarchyIssue\"] = 3] = \"HierarchyIssue\";\n})(NodeMaterialConnectionPointCompatibilityStates || (NodeMaterialConnectionPointCompatibilityStates = {}));\n/**\n * Defines the direction of a connection point\n */\nexport var NodeMaterialConnectionPointDirection;\n(function (NodeMaterialConnectionPointDirection) {\n /** Input */\n NodeMaterialConnectionPointDirection[NodeMaterialConnectionPointDirection[\"Input\"] = 0] = \"Input\";\n /** Output */\n NodeMaterialConnectionPointDirection[NodeMaterialConnectionPointDirection[\"Output\"] = 1] = \"Output\";\n})(NodeMaterialConnectionPointDirection || (NodeMaterialConnectionPointDirection = {}));\n/**\n * Defines a connection point for a block\n */\nexport class NodeMaterialConnectionPoint {\n /**\n * Checks if two types are equivalent\n * @param type1 type 1 to check\n * @param type2 type 2 to check\n * @returns true if both types are equivalent, else false\n */\n static AreEquivalentTypes(type1, type2) {\n switch (type1) {\n case NodeMaterialBlockConnectionPointTypes.Vector3: {\n if (type2 === NodeMaterialBlockConnectionPointTypes.Color3) {\n return true;\n }\n break;\n }\n case NodeMaterialBlockConnectionPointTypes.Vector4: {\n if (type2 === NodeMaterialBlockConnectionPointTypes.Color4) {\n return true;\n }\n break;\n }\n case NodeMaterialBlockConnectionPointTypes.Color3: {\n if (type2 === NodeMaterialBlockConnectionPointTypes.Vector3) {\n return true;\n }\n break;\n }\n case NodeMaterialBlockConnectionPointTypes.Color4: {\n if (type2 === NodeMaterialBlockConnectionPointTypes.Vector4) {\n return true;\n }\n break;\n }\n }\n return false;\n }\n get _connectedPoint() {\n return this._connectedPointBackingField;\n }\n set _connectedPoint(value) {\n if (this._connectedPointBackingField === value) {\n return;\n }\n this._connectedPointTypeChangedObserver?.remove();\n this._updateTypeDependentState(() => (this._connectedPointBackingField = value));\n if (this._connectedPointBackingField) {\n this._connectedPointTypeChangedObserver = this._connectedPointBackingField.onTypeChangedObservable.add(() => {\n this._notifyTypeChanged();\n });\n }\n }\n /** @internal */\n get _typeConnectionSource() {\n return this._typeConnectionSourceBackingField;\n }\n /** @internal */\n set _typeConnectionSource(value) {\n if (this._typeConnectionSourceBackingField === value) {\n return;\n }\n this._typeConnectionSourceTypeChangedObserver?.remove();\n this._updateTypeDependentState(() => (this._typeConnectionSourceBackingField = value));\n if (this._typeConnectionSourceBackingField) {\n this._typeConnectionSourceTypeChangedObserver = this._typeConnectionSourceBackingField.onTypeChangedObservable.add(() => {\n this._notifyTypeChanged();\n });\n }\n }\n /** @internal */\n get _defaultConnectionPointType() {\n return this._defaultConnectionPointTypeBackingField;\n }\n /** @internal */\n set _defaultConnectionPointType(value) {\n this._updateTypeDependentState(() => (this._defaultConnectionPointTypeBackingField = value));\n }\n /** @internal */\n get _linkedConnectionSource() {\n return this._linkedConnectionSourceBackingField;\n }\n /** @internal */\n set _linkedConnectionSource(value) {\n if (this._linkedConnectionSourceBackingField === value) {\n return;\n }\n this._linkedConnectionSourceTypeChangedObserver?.remove();\n this._updateTypeDependentState(() => (this._linkedConnectionSourceBackingField = value));\n if (this._linkedConnectionSourceBackingField) {\n this._linkedConnectionSourceTypeChangedObserver = this._linkedConnectionSourceBackingField.onTypeChangedObservable.add(() => {\n this._notifyTypeChanged();\n });\n }\n }\n /** Gets the direction of the point */\n get direction() {\n return this._direction;\n }\n /**\n * Gets the declaration variable name in the shader\n */\n get declarationVariableName() {\n if (this._ownerBlock.isInput) {\n return this._ownerBlock.declarationVariableName;\n }\n if ((!this._enforceAssociatedVariableName || !this._associatedVariableName) && this._connectedPoint) {\n return this._connectedPoint.declarationVariableName;\n }\n return this._associatedVariableName;\n }\n /**\n * Gets or sets the associated variable name in the shader\n */\n get associatedVariableName() {\n if (this._ownerBlock.isInput) {\n return this._ownerBlock.associatedVariableName;\n }\n if ((!this._enforceAssociatedVariableName || !this._associatedVariableName) && this._connectedPoint) {\n return this._connectedPoint.associatedVariableName;\n }\n return this._associatedVariableName;\n }\n set associatedVariableName(value) {\n this._associatedVariableName = value;\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 /**\n * Gets or sets the connection point type (default is float)\n */\n get type() {\n if (this._type === NodeMaterialBlockConnectionPointTypes.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 if (this._linkedConnectionSource.connectedPoint._redirectedSource && this._linkedConnectionSource.connectedPoint._redirectedSource.isConnected) {\n return this._linkedConnectionSource.connectedPoint._redirectedSource.type;\n }\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 === NodeMaterialBlockConnectionPointTypes.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._updateTypeDependentState(() => (this._type = value));\n }\n /** Gets or sets the target of that connection point */\n get target() {\n if (!this._prioritizeVertex || !this._ownerBlock) {\n return this._target;\n }\n if (this._target !== NodeMaterialBlockTargets.VertexAndFragment) {\n return this._target;\n }\n if (this._ownerBlock.target === NodeMaterialBlockTargets.Fragment) {\n return NodeMaterialBlockTargets.Fragment;\n }\n return NodeMaterialBlockTargets.Vertex;\n }\n set target(value) {\n this._target = 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 /**\n * Gets a boolean indicating that the current point is connected to an input block\n */\n get isConnectedToInputBlock() {\n return this.connectedPoint !== null && this.connectedPoint.ownerBlock.isInput;\n }\n /**\n * Gets a the connected input block (if any)\n */\n get connectInputBlock() {\n if (!this.isConnectedToInputBlock) {\n return null;\n }\n return this.connectedPoint.ownerBlock;\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 /** Gets a boolean indicating that this connection has a path to the vertex output*/\n get isDirectlyConnectedToVertexOutput() {\n if (!this.hasEndpoints) {\n return false;\n }\n for (const endpoint of this._endpoints) {\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Vertex) {\n return true;\n }\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Neutral || endpoint.ownerBlock.target === NodeMaterialBlockTargets.VertexAndFragment) {\n if (endpoint.ownerBlock.outputs.some((o) => o.isDirectlyConnectedToVertexOutput)) {\n return true;\n }\n }\n }\n return false;\n }\n /** Gets a boolean indicating that this connection will be used in the vertex shader */\n get isConnectedInVertexShader() {\n if (this.target === NodeMaterialBlockTargets.Vertex) {\n return true;\n }\n if (!this.hasEndpoints) {\n return false;\n }\n for (const endpoint of this._endpoints) {\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Vertex) {\n return true;\n }\n if (endpoint.target === NodeMaterialBlockTargets.Vertex) {\n return true;\n }\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Neutral || endpoint.ownerBlock.target === NodeMaterialBlockTargets.VertexAndFragment) {\n if (endpoint.ownerBlock.outputs.some((o) => o.isConnectedInVertexShader)) {\n return true;\n }\n }\n }\n return false;\n }\n /** Gets a boolean indicating that this connection will be used in the fragment shader */\n get isConnectedInFragmentShader() {\n if (this.target === NodeMaterialBlockTargets.Fragment) {\n return true;\n }\n if (!this.hasEndpoints) {\n return false;\n }\n for (const endpoint of this._endpoints) {\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Fragment) {\n return true;\n }\n if (endpoint.ownerBlock.target === NodeMaterialBlockTargets.Neutral || endpoint.ownerBlock.target === NodeMaterialBlockTargets.VertexAndFragment) {\n if (endpoint.ownerBlock.isConnectedInFragmentShader()) {\n return true;\n }\n }\n }\n return false;\n }\n /**\n * Creates a block suitable to be used as an input for this input point.\n * If null is returned, a block based on the point type will be created.\n * @returns The returned string parameter is the name of the output point of NodeMaterialBlock (first parameter of the returned array) that can be connected to the input\n */\n createCustomInputBlock() {\n return null;\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._preventBubbleUp = false;\n this._connectedPointBackingField = null;\n this._endpoints = new Array();\n /** @internal */\n this._redirectedSource = null;\n this._typeConnectionSourceBackingField = null;\n this._defaultConnectionPointTypeBackingField = null;\n this._linkedConnectionSourceBackingField = null;\n /** @internal */\n this._acceptedConnectionPointType = null;\n this._type = NodeMaterialBlockConnectionPointTypes.Float;\n /** @internal */\n this._enforceAssociatedVariableName = false;\n /** @internal */\n this._forPostBuild = false;\n /** Indicates that this connection point needs dual validation before being connected to another point */\n this.needDualDirectionValidation = false;\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 * Observable triggered when the type of the connection point is changed\n */\n this.onTypeChangedObservable = new Observable();\n this._isTypeChangeObservableNotifying = false;\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 /** @internal */\n this._prioritizeVertex = false;\n this._target = NodeMaterialBlockTargets.VertexAndFragment;\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 \"NodeMaterialConnectionPoint\";\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 /* NodeMaterialConnectionPointCompatibilityStates.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 (ownerBlock.target === NodeMaterialBlockTargets.Fragment) {\n // Let's check we are not going reverse\n if (otherBlock.target === NodeMaterialBlockTargets.Vertex) {\n return 2 /* NodeMaterialConnectionPointCompatibilityStates.TargetIncompatible */;\n }\n for (const output of otherBlock.outputs) {\n if (output.ownerBlock.target != NodeMaterialBlockTargets.Neutral && output.isConnectedInVertexShader) {\n return 2 /* NodeMaterialConnectionPointCompatibilityStates.TargetIncompatible */;\n }\n }\n }\n if (this.type !== connectionPoint.type && connectionPoint.innerType !== NodeMaterialBlockConnectionPointTypes.AutoDetect) {\n // Equivalents\n if (NodeMaterialConnectionPoint.AreEquivalentTypes(this.type, connectionPoint.type)) {\n return 0 /* NodeMaterialConnectionPointCompatibilityStates.Compatible */;\n }\n // Accepted types\n if ((connectionPoint.acceptedConnectionPointTypes && connectionPoint.acceptedConnectionPointTypes.indexOf(this.type) !== -1) ||\n (connectionPoint._acceptedConnectionPointType && NodeMaterialConnectionPoint.AreEquivalentTypes(connectionPoint._acceptedConnectionPointType.type, this.type))) {\n return 0 /* NodeMaterialConnectionPointCompatibilityStates.Compatible */;\n }\n else {\n return 1 /* NodeMaterialConnectionPointCompatibilityStates.TypeIncompatible */;\n }\n }\n // Excluded\n if (connectionPoint.excludedConnectionPointTypes && connectionPoint.excludedConnectionPointTypes.indexOf(this.type) !== -1) {\n return 1 /* NodeMaterialConnectionPointCompatibilityStates.TypeIncompatible */;\n }\n // Check hierarchy\n let targetBlock = otherBlock;\n let sourceBlock = ownerBlock;\n if (this.direction === 0 /* NodeMaterialConnectionPointDirection.Input */) {\n targetBlock = ownerBlock;\n sourceBlock = otherBlock;\n }\n if (targetBlock.isAnAncestorOf(sourceBlock)) {\n return 3 /* NodeMaterialConnectionPointCompatibilityStates.HierarchyIssue */;\n }\n return 0 /* NodeMaterialConnectionPointCompatibilityStates.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._enforceAssociatedVariableName = false;\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._enforceAssociatedVariableName = false;\n endpoint._enforceAssociatedVariableName = false;\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 < NodeMaterialBlockConnectionPointTypes.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 if (this.displayName) {\n serializationObject.displayName = this.displayName;\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 this.onTypeChangedObservable.clear();\n this._connectedPoint = null;\n this._typeConnectionSource = null;\n this._linkedConnectionSource = null;\n }\n _updateTypeDependentState(update) {\n const previousType = this.type;\n update();\n if (this.type !== previousType) {\n this._notifyTypeChanged();\n }\n }\n _notifyTypeChanged() {\n // Disallow re-entrancy\n if (this._isTypeChangeObservableNotifying) {\n return;\n }\n this._isTypeChangeObservableNotifying = true;\n this.onTypeChangedObservable.notifyObservers(this.type);\n this._isTypeChangeObservableNotifying = false;\n }\n}\n"],"mappings":"AAAA,SAASA,qCAAqC,QAAQ,kDAAkD;AACxG,SAASC,wBAAwB,QAAQ,qCAAqC;AAC9E,SAASC,UAAU,QAAQ,0BAA0B;AACrD;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,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,GAAG,kBAAkB;EAC3I;EACAA,8CAA8C,CAACA,8CAA8C,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,oBAAoB;EAC/I;EACAA,8CAA8C,CAACA,8CAA8C,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,gBAAgB;AAC3I,CAAC,EAAEA,8CAA8C,KAAKA,8CAA8C,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3G;AACA;AACA;AACA,OAAO,IAAIC,oCAAoC;AAC/C,CAAC,UAAUA,oCAAoC,EAAE;EAC7C;EACAA,oCAAoC,CAACA,oCAAoC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO;EACjG;EACAA,oCAAoC,CAACA,oCAAoC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ;AACvG,CAAC,EAAEA,oCAAoC,KAAKA,oCAAoC,GAAG,CAAC,CAAC,CAAC,CAAC;AACvF;AACA;AACA;AACA,OAAO,MAAMC,2BAA2B,CAAC;EACrC;AACJ;AACA;AACA;AACA;AACA;EACI,OAAOC,kBAAk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