bend
Curve the child like a bent sheet seen in perspective, so its ends swell or shrink.
bend(slots: {strength: ArgSpec; falloff: ArgSpec; angle: ArgSpec}): UvMapSource
Import warps from shaders/std and use warps.bend.
strength runs −1 to 1 and its sign picks the bend direction. angle is the bend axis in degrees. falloff (0–1) keeps more of the middle flat and pushes the bend toward the ends. Where the sheet leaves the frame there is nothing to show, so pair it with an edges prop that defaults to 'transparent'.
Parameters
| Name | Type | Notes |
|---|---|---|
slots | {strength: ArgSpec; falloff: ArgSpec; angle: ArgSpec} |
Example
map: warps.bend({strength: p('strength'), falloff: p('falloff'), angle: p('angle')})
See also
perspective— Tilt the child in 3D, as if it were a card turned away from the camera.cornerPin— Pin the four corners of the child to new positions, with true perspective between them.