distortBarrel
distortBarrel(
uv,strength?,zoom?):Node<"vec2">
Defined in: packages/nodes/src/distortion/distort.ts:124
Barrel distortion - simulates lens distortion. Commonly used for CRT screen curvature simulation.
Parameters
Section titled “Parameters”Node <"vec2">
Input UV coordinates (should be 0-1)
strength?
Section titled “strength?”FloatInput = 0.1
Distortion strength (positive = barrel, negative = pincushion)
FloatInput = 1
Zoom adjustment to compensate for distortion (default: 1)
Returns
Section titled “Returns”Node <"vec2">
Distorted UV coordinates
Example
Section titled “Example”// CRT-like barrel distortionconst curved = distortBarrel(uv, 0.2)