Skip to content

uvScale(inputUV, scale, pivot?): Node <"vec2">

Defined in: packages/nodes/src/sprite/uvScale.ts:21

Scale UV coordinates around a pivot point.

Node <"vec2">

The UV coordinates to transform

Vec2Input

Scale factor as [x, y] or vec2 node

Vec2Input = ...

Pivot point for scaling (default: [0.5, 0.5] = center)

Node <"vec2">

Scaled UV coordinates

// Scale UV by 2x around center
uvScale(uv(), [2, 2])
// Scale with uniform for animation
uvScale(uv(), scaleUniform, [0.5, 0.5])