NodeMaterialConnectionPoint

Defines a connection point for a block

Hierarchy

  • NodeMaterialConnectionPoint

Index

Constructors

constructor

Find examples in Playground

Properties

associatedVariableName

Find examples in Playground
associatedVariableName: string

Gets or sets the associated variable name in the shader

connectedBlocks

Find examples in Playground
connectedBlocks: Array<NodeMaterialBlock>

Get the block connected on the endpoints of this connection (if any)

connectedPoint

Find examples in Playground

Get the other side of the connection (if any)

define

Find examples in Playground
define: string

Gets or sets a string indicating that this uniform must be defined under a #ifdef

isAttribute

Find examples in Playground
isAttribute: boolean

Gets or sets a boolean indicating that this connection point is coming from an attribute. In this case the connection point name must be the name of the attribute to use Can only be set on inputs

isOptional

Find examples in Playground
isOptional: boolean

Gets or sets a boolean indicating that this connection point can be omitted

isUniform

Find examples in Playground
isUniform: boolean

Gets or sets a boolean indicating that this connection point is coming from an uniform. In this case the connection point name must be the name of the uniform to use. Can only be set on inputs

isVarying

Find examples in Playground
isVarying: boolean

Gets or sets a boolean indicating that this connection point is generating a varying variable. Can only be set on exit points

isWellKnownValue

Find examples in Playground
isWellKnownValue: boolean

Gets a boolean indicating that the current connection point is a well known value

name

Find examples in Playground
name: string

Gets or sets the connection point name

ownerBlock

Find examples in Playground
ownerBlock: NodeMaterialBlock

Get the block that owns this connection point

sourceBlock

Find examples in Playground

Get the block connected on the other side of this connection (if any)

swizzle

Find examples in Playground
swizzle: string

Gets or sets the swizzle to apply to this connection point when reading or writing

target

Find examples in Playground

Gets or sets the target of that connection point

type

Find examples in Playground

Gets or sets the connection point type (default is float)

value

Find examples in Playground
value: any

Gets or sets the value of that point. Please note that this value will be ignored if valueCallback is defined

valueCallback

Find examples in Playground
valueCallback: function

Gets or sets a callback used to get the value of that point. Please note that setting this value will force the connection point to ignore the value property

Type declaration

    • (): any
    • Returns any

wellKnownValue

Find examples in Playground

Gets or sets the current well known value or null if not defined as well know value

Methods

connectTo

Find examples in Playground

disconnectFrom

Find examples in Playground

getClassName

Find examples in Playground
  • getClassName(): string
  • Gets the current class name e.g. "NodeMaterialConnectionPoint"

    Returns string

    the class name

setAsAttribute

Find examples in Playground
  • Set the source of this connection point to a vertex attribute

    Parameters

    • Optional attributeName: string

      defines the attribute name (position, uv, normal, etc...). If not specified it will take the connection point name

    Returns NodeMaterialConnectionPoint

    the current connection point

setAsWellKnownValue

Find examples in Playground

transmit

Find examples in Playground
  • When connection point is an uniform, this function will send its value to the effect

    Parameters

    • effect: Effect

      defines the effect to transmit value to

    • scene: Scene

      defines the hosting scene

    Returns void

transmitWorld

Find examples in Playground
  • When connection point is an uniform, this function will send its value to the effect

    Parameters

    • effect: Effect

      defines the effect to transmit value to

    • world: Matrix

      defines the world matrix

    • worldView: Matrix

      defines the worldxview matrix

    • worldViewProjection: Matrix

      defines the worldxviewxprojection matrix

    Returns void

Generated using TypeDoc