twirl
Twist the child around center, turning more the farther a pixel is from it.
twirl(slots: {center: ArgSpec; intensity: ArgSpec}): UvMapSource
Import warps from shaders/std and use warps.twirl.
intensity is the twist in radians per unit of distance, so the canvas edge turns by about intensity radians. Negative values twist the other way. The library uses −5 to 5.
Parameters
| Name | Type | Notes |
|---|---|---|
slots | {center: ArgSpec; intensity: ArgSpec} |
Example
map: warps.twirl({center: p('center'), intensity: p('intensity')})
See also
bulge— Magnify or pinch the child inside a disc aroundcenter.concentricRings— Cut the child into rings aroundcenterand spin each ring by its own amount.