stretch

Stretch the child along one direction, starting at center.

stretch(slots: {center: ArgSpec; strength: ArgSpec; angle: ArgSpec; falloff: ArgSpec}): UvMapSource

Import warps from shaders/std and use warps.stretch.

angle is the direction in degrees. Content on the side angle points to is pulled out; the other side is left alone. strength (0–1) sets how far. falloff (0–1) softens the start of the stretch, from a hard line at 0 to a long ramp at 1.

Parameters

NameTypeNotes
slots{center: ArgSpec; strength: ArgSpec; angle: ArgSpec; falloff: ArgSpec}

Example

map: warps.stretch({center: p('center'), strength: p('strength'), angle: p('angle'), falloff: p('falloff')})

See also

  • bulge — Magnify or pinch the child inside a disc around center.
  • bend — Curve the child like a bent sheet seen in perspective, so its ends swell or shrink.

Used by

Stretch