fromPolar
Wrap the child into a circle around center, reading its x as angle and its y as distance.
fromPolar(slots: {center: ArgSpec; scale: ArgSpec; intensity: ArgSpec}): UvMapSource
Import warps from shaders/std and use warps.fromPolar.
The reverse of toPolar. scale sets how large the circle is. intensity runs 0 (no change) to 1 (the full wrap).
Parameters
| Name | Type | Notes |
|---|---|---|
slots | {center: ArgSpec; scale: ArgSpec; intensity: ArgSpec} |
Example
map: warps.fromPolar({center: p('center'), scale: p('scale'), intensity: p('intensity')})
See also
toPolar— Unroll the child aroundcenter, so angle becomes x and distance becomes y.