Capítulo 471 de 859

Chapter 471: SetNode

Core Idea

This module is part of the TSL core and usually not used in app level code. SetNode represents a set operation which means it is used to implement any setXYZW(), setRGBA() and setSTPQ() method invocations on node objects. For example:

Key Concepts

  • components : string: The components that should be updated.
  • sourceNode : Node: The node that should be updated.
  • targetNode : Node: The value node.

Code Examples

materialLine.colorNode = color( 0, 0, 0 ).setR( float( 1 ) );
  • What it demonstrates: Typical usage of SetNode.

Reference Tables

Constructor

Signature
new SetNode( sourceNode : Node, components : string, targetNode : Node )

Properties

PropertyDescription
.components : stringThe components that should be updated.
.sourceNode : NodeThe node that should be updated.
.targetNode : NodeThe value node.

Methods

MethodDescription
.generateNodeType( builder : NodeBuilder ) : stringThis method is overwritten since the node type is inferred from SetNode#sourceNode.

Key Takeaways

  1. SetNode extends: EventDispatcher → Node → TempNode
  2. Most relevant properties: components, sourceNode, targetNode.
  3. Key methods: generateNodeType.

Connects To