warped
Makes a field flow like liquid by bending its coordinate with moving noise.
warped(
field: Field,
opts: {amount: FieldScalar; amountScale?: number; timeScale?: number},
): Field
Import paint from shaders/std and use paint.warped.
amount sets how far the coordinate is pushed (0 is off), amountScale multiplies it so a 0–1 slider can reach further. The motion runs on the layer's clock times timeScale, so declare animatedTime: {speed: 'speed'}. Needs a 3D coordinate: put it inside scaledVolume.
Parameters
| Name | Type | Notes |
|---|---|---|
field | Field | |
opts | {amount: FieldScalar; amountScale?: number; timeScale?: number} |
Example
scaledVolume(warped(noiseField('mx3'), {amount: p('warp'), amountScale: 4, timeScale: 0.125}), {scale: p('scale')})
See also
noiseField— A field of smooth noise in the chosen flavor.scaledVolume— Gives a noise field a zoomable, aspect-correct coordinate.warpedPoint— A 3D position pushed around by moving noise, for reading several fields at one warped spot.