File: SampleNode.md | Updated: 11/15/2025
Class representing a node that samples a value using a provided callback function.
Creates an instance of SampleNode.
callback | The function to be called when sampling. Should accept a UV node and return a value.
---|---
uvNode | The UV node to be used in the texture sampling. Default is null.
This flag can be used for type testing.
Default is true.
Represents the texture coordinates.
Default is null.
Returns the type of the node.
Calls the callback function with the provided UV node.
uv | The UV node or value to be passed to the callback.
---|---
Returns: The result of the callback function.
Sets up the node by sampling with the default UV accessor.
Overrides: Node#setup
Returns: The result of the callback function when called with the UV node.