Capítulo 469 de 859

Chapter 469: SampleNode

Core Idea

Class representing a node that samples a value using a provided callback function.

Key Concepts

  • isSampleNode : boolean (readonly): This flag can be used for type testing.
  • uvNode : Node.<(vec2|vec3)>: Represents the texture coordinates.
  • type : string (readonly): Returns the type of the node.

Reference Tables

Constructor

Signature
new SampleNode( callback : function, uvNode : Node.<vec2> )

Properties

PropertyDescription
.isSampleNode : boolean (readonly)This flag can be used for type testing.
`.uvNode : Node.<(vec2vec3)>`
.type : string (readonly)Returns the type of the node.

Methods

MethodDescription
.sample( uv : Node.<vec2> ) : NodeCalls the callback function with the provided UV node.
.setup() : NodeSets up the node by sampling with the default UV accessor.

Key Takeaways

  1. SampleNode extends: EventDispatcher → Node
  2. Most relevant properties: isSampleNode, uvNode, type.
  3. Key methods: sample, setup.

Connects To