textUV
const textUV : Node<vec2> = varyingProperty( 'vec4', 'vTextPacked0' ).xyUV coordinates across the entire text block (0-1 range). This is useful for effects that span the whole text.
Example
import { Text, textUV } from '@three-blocks/core';
import { positionLocal, sin, time, mix, color, Fn } from 'three/tsl';
const text = new Text();
text.text = 'TEXT BLOCK\nGRADIENT\nACROSS ALL';
// Wave effect across entire text block
text.material.positionNode = Fn(() => {
const pos = positionLocal.toVar();
const diagonal = textUV.x.add(textUV.y);
pos.z.addAssign(sin(time.add(diagonal.mul(10))));
return pos;
})();
// Horizontal gradient spanning entire text
text.material.colorNode = mix(
color(0xff0066),
color(0x00ffff),
textUV.x
);