File: SpriteSheetUVNode.md | Updated: 11/15/2025
Can be used to compute texture coordinates for animated sprite sheets.
const uvNode = spritesheetUV( vec2( 6, 6 ), uv(), time.mul( animationSpeed ) );
material.colorNode = texture( spriteSheet, uvNode );
Constructs a new sprite sheet uv node.
countNode | The node that defines the number of sprites in the x and y direction (e.g 6x6).
---|---
uvNode | The uv node. Default is uv().
frameNode | The node that defines the current frame/sprite. Default is float().
The node that defines the number of sprites in the x and y direction (e.g 6x6).
The node that defines the current frame/sprite.
The uv node.