Class NodeMaterialConnectionPointCustomObject<T>
Type Parameters
- T extends NodeMaterialBlock
Hierarchy (View Summary)
- NodeMaterialConnectionPoint
- NodeMaterialConnectionPointCustomObject
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
new NodeMaterialConnectionPointCustomObject<T extends NodeMaterialBlock>(
name: string,
ownerBlock: NodeMaterialBlock,
direction: NodeMaterialConnectionPointDirection,
_blockType: new (...args: any[]) => T,
_blockName: string,
): NodeMaterialConnectionPointCustomObject<T>Creates a new connection point
Type Parameters
- T extends NodeMaterialBlock
Parameters
- name: string
defines the connection point name
- ownerBlock: NodeMaterialBlock
defines the block hosting this connection point
- direction: NodeMaterialConnectionPointDirection
defines the direction of the connection point
- _blockType: new (...args: any[]) => T
- _blockName: string
Returns NodeMaterialConnectionPointCustomObject<T>
Properties
_ block Type
accepted Connection Point Types
Gets or sets the additional types supported by this connection point
define
Gets or sets a string indicating that this uniform must be defined under a #ifdef
display Name
Gets or sets the connection point 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
Readonlyname
Gets or sets the connection point name
need Dual Direction Validation
Indicates that this connection point needs dual validation before being connected to another point
Readonlyon Connection Observable
Observable triggered when this point is connected
Readonlyon Disconnection Observable
Observable triggered when this point is disconnected
Readonlyon Type Changed Observable
Observable triggered when the type of the connection point is changed
Accessors
associated Variable Name
-
get associatedVariableName(): string
Gets or sets the associated variable name in the shader
Returns string
-
set associatedVariableName(value: string): void
Parameters
- value: string
Returns void
connected Blocks
-
Get the block connected on the endpoints of this connection (if any)
Returns NodeMaterialBlock[]
connected Point
-
Get the other side of the connection (if any)
Returns Nullable<NodeMaterialConnectionPoint>
connect Input Block
-
Gets a the connected input block (if any)
Returns Nullable<InputBlock>
declaration Variable Name
-
get declarationVariableName(): string
Gets the declaration variable name in the shader
Returns string
direction
-
Gets the direction of the point
Returns NodeMaterialConnectionPointDirection
endpoints
-
Gets the list of connected endpoints
Returns NodeMaterialConnectionPoint[]
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 NodeMaterialBlockConnectionPointTypes
is Connected
-
get isConnected(): boolean
Gets a boolean indicating that the current point is connected to another NodeMaterialBlock
Returns boolean
is Connected In Fragment Shader
-
get isConnectedInFragmentShader(): boolean
Gets a boolean indicating that this connection will be used in the fragment shader
Returns boolean
is Connected In Vertex Shader
-
get isConnectedInVertexShader(): boolean
Gets a boolean indicating that this connection will be used in the vertex shader
Returns boolean
is Connected To Input Block
-
get isConnectedToInputBlock(): boolean
Gets a boolean indicating that the current point is connected to an input block
Returns boolean
is Directly Connected To Vertex Output
-
get isDirectlyConnectedToVertexOutput(): boolean
Gets a boolean indicating that this connection has a path to the vertex output
Returns boolean
is Inactive
-
get isInactive(): boolean
Boolean used to provide visual clue to users when some ports are not active in the current block configuration
Returns boolean
owner Block
-
Get the block that owns this connection point
Returns NodeMaterialBlock
source Block
-
Get the block connected on the other side of this connection (if any)
Returns Nullable<NodeMaterialBlock>
target
-
Gets or sets the target of that connection point
Returns NodeMaterialBlockTargets
-
Parameters
- value: NodeMaterialBlockTargets
Returns void
type
-
Gets or sets the connection point type (default is float)
Returns NodeMaterialBlockConnectionPointTypes
-
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: NodeMaterialConnectionPoint
defines the other connection point
Returns boolean
a boolean
- connectionPoint: NodeMaterialConnectionPoint
check Compatibility State
-
checkCompatibilityState(
connectionPoint: NodeMaterialConnectionPoint,
): NodeMaterialConnectionPointCompatibilityStatesGets a number indicating if the current point can be connected to another point
Parameters
- connectionPoint: NodeMaterialConnectionPoint
defines the other connection point
Returns NodeMaterialConnectionPointCompatibilityStates
a number defining the compatibility state
- connectionPoint: NodeMaterialConnectionPoint
connect To
-
connectTo(
connectionPoint: NodeMaterialConnectionPoint,
ignoreConstraints?: boolean,
): NodeMaterialConnectionPointConnect this point to another connection point
Parameters
- connectionPoint: NodeMaterialConnectionPoint
defines the other connection point
- ignoreConstraints: boolean = false
defines if the system will ignore connection type constraints (default is false)
Returns NodeMaterialConnectionPoint
the current connection point
- connectionPoint: NodeMaterialConnectionPoint
create Custom Input Block
-
Creates a block suitable to be used as an input for this input point. If null is returned, a block based on the point type will be created.
Returns Nullable<[NodeMaterialBlock, string]>
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
disconnect From
-
Disconnect this point from one of his endpoint
Parameters
- endpoint: NodeMaterialConnectionPoint
defines the other connection point
Returns NodeMaterialConnectionPoint
the current connection point
- endpoint: NodeMaterialConnectionPoint
dispose
-
Release resources
Returns void
get Class Name
-
Gets the current class name e.g. "NodeMaterialConnectionPoint"
Returns string
the class name
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
StaticAre Equivalent Types
-
Checks if two types are equivalent
Parameters
- type1: number
type 1 to check
- type2: number
type 2 to check
Returns boolean
true if both types are equivalent, else false
- type1: number
Defines a connection point to be used for points with a custom object type