Capítulo 412 de 859

Chapter 412: FlipNode

Core Idea

This module is part of the TSL core and usually not used in app level code. It represents a flip operation during the shader generation process meaning it flips normalized values with the following formula:

x = 1 - x;

FlipNode is internally used to implement any flipXYZW(), flipRGBA() and flipSTPQ() method invocations on node objects. For example:

uvNode = uvNode.flipY();

Key Concepts

  • components : string: The components that should be flipped e.g. 'x' or 'xy'.
  • sourceNode : Node: The node which component(s) should be flipped.

Reference Tables

Constructor

Signature
new FlipNode( sourceNode : Node, components : string )

Properties

PropertyDescription
.components : stringThe components that should be flipped e.g. 'x' or 'xy'.
.sourceNode : NodeThe node which component(s) should be flipped.

Methods

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

Key Takeaways

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

Connects To