Class NodeParticleConnectionPoint
Constructors
constructor
-
new NodeParticleConnectionPoint(
name: string,
ownerBlock: NodeParticleBlock,
direction: NodeParticleConnectionPointDirection,
): NodeParticleConnectionPointCreates a new connection point
Parameters
- name: string
defines the connection point name
- ownerBlock: NodeParticleBlock
defines the block hosting this connection point
- direction: NodeParticleConnectionPointDirection
defines the direction of the connection point
Returns NodeParticleConnectionPoint
- name: string
Properties
accepted Connection Point Types
Gets or sets the additional types supported by this connection point
default Value
Gets the default value used for this point at creation time
display Name
Gets or sets the connection point display name
excluded Connection Point Types
Gets or sets the additional types excluded by this connection point
exposed Port Position
Gets or sets number indicating the position that the port is exposed to on a frame
is Exposed On Frame
Gets or sets a boolean indicating that this connection point is exposed on a frame
is Optional
Gets or sets a boolean indicating that this connection point can be omitted
name
Gets or sets the connection point name
on Connection Observable
Observable triggered when this point is connected
on Disconnection Observable
Observable triggered when this point is disconnected
value
Gets or sets the default value used for this point if nothing is connected
value Max
Gets or sets the max value accepted for this point if nothing is connected
value Min
Gets or sets the min value accepted for this point if nothing is connected
Accessors
connected Blocks
-
Get the block connected on the endpoints of this connection (if any)
Returns NodeParticleBlock[]
connected Point
-
Get the other side of the connection (if any)
Returns Nullable<NodeParticleConnectionPoint>
direction
-
Gets the direction of the point
Returns NodeParticleConnectionPointDirection
endpoints
-
Gets the list of connected endpoints
Returns NodeParticleConnectionPoint[]
has Endpoints
-
get hasEndpoints(): boolean
Gets a boolean indicating if that output point is connected to at least one input
Returns boolean
inner Type
-
Get the inner type (ie AutoDetect for instance instead of the inferred one)
Returns NodeParticleBlockConnectionPointTypes
is Connected
-
get isConnected(): boolean
Gets a boolean indicating that the current point is connected to another NodeMaterialBlock
Returns boolean
owner Block
-
Get the block that owns this connection point
Returns NodeParticleBlock
source Block
-
Get the block connected on the other side of this connection (if any)
Returns Nullable<NodeParticleBlock>
type
-
Gets or sets the connection point type (default is float)
Returns NodeParticleBlockConnectionPointTypes
-
Parameters
Returns void
Methods
add Excluded Connection Point From Allowed Types
-
Fill the list of excluded connection point types with all types other than those passed in the parameter
Parameters
- mask: number
Types (ORed values of NodeMaterialBlockConnectionPointTypes) that are allowed, and thus will not be pushed to the excluded list
Returns void
- mask: number
can Connect To
-
Gets a boolean indicating if the current point can be connected to another point
Parameters
- connectionPoint: NodeParticleConnectionPoint
defines the other connection point
Returns boolean
a boolean
- connectionPoint: NodeParticleConnectionPoint
check Compatibility State
-
checkCompatibilityState(
connectionPoint: NodeParticleConnectionPoint,
): NodeParticleConnectionPointCompatibilityStatesGets a number indicating if the current point can be connected to another point
Parameters
- connectionPoint: NodeParticleConnectionPoint
defines the other connection point
Returns NodeParticleConnectionPointCompatibilityStates
a number defining the compatibility state
- connectionPoint: NodeParticleConnectionPoint
connect To
-
connectTo(
connectionPoint: NodeParticleConnectionPoint,
ignoreConstraints?: boolean,
): NodeParticleConnectionPointConnect this point to another connection point
Parameters
- connectionPoint: NodeParticleConnectionPoint
defines the other connection point
- ignoreConstraints: boolean = false
defines if the system will ignore connection type constraints (default is false)
Returns NodeParticleConnectionPoint
the current connection point
- connectionPoint: NodeParticleConnectionPoint
disconnect From
-
Disconnect this point from one of his endpoint
Parameters
- endpoint: NodeParticleConnectionPoint
defines the other connection point
Returns NodeParticleConnectionPoint
the current connection point
- endpoint: NodeParticleConnectionPoint
dispose
-
Release resources
Returns void
get Class Name
-
Gets the current class name e.g. "NodeMaterialConnectionPoint"
Returns string
the class name
get Connected Value
-
Gets the value represented by this connection point
Parameters
- state: NodeParticleBuildState
current evaluation state
Returns any
the connected value or the value if nothing is connected
- state: NodeParticleBuildState
serialize
-
Serializes this point in a JSON representation
Parameters
- isInput: boolean = true
defines if the connection point is an input (default is true)
Returns any
the serialized point object
- isInput: boolean = true
Defines a connection point for a block