Capítulo 752 de 859

Chapter 752: NodeFunction

Core Idea

Base class for node functions. A derived module must be implemented for each supported native shader language. Similar to other Node* modules, this class is only relevant during the building process and not used in user-level code.

Key Concepts

  • inputs : Array.<NodeFunctionInput>: The function's inputs.
  • name : string: The name of the uniform.
  • precision : string: The precision qualifier.
  • type : string: The node type. This type is the return type of the node function.

Reference Tables

Constructor

Signature
new NodeFunction( type : string, inputs : Array.<NodeFunctionInput>, name : string, precision : string )

Properties

PropertyDescription
.inputs : Array.<NodeFunctionInput>The function's inputs.
.name : stringThe name of the uniform.
.precision : stringThe precision qualifier.
.type : stringThe node type. This type is the return type of the node function.

Methods

MethodDescription
.getCode( name : string ) : string (abstract)This method returns the native code of the node function.

Key Takeaways

  1. Most relevant properties: inputs, name, precision, type.
  2. Key methods: getCode.

Connects To