kaleidoscope

Fold the child into mirrored pie slices around center.

kaleidoscope(slots: {center: ArgSpec; segments: ArgSpec; angle: ArgSpec}): UvMapSource

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

segments is the number of slices (2 or more). angle rotates the whole pattern, in degrees. Pair it with an edges prop that defaults to 'mirror'.

Parameters

NameTypeNotes
slots{center: ArgSpec; segments: ArgSpec; angle: ArgSpec}

Example

map: warps.kaleidoscope({center: p('center'), segments: p('segments'), angle: p('angle')})

See also

  • mirrorLine — Mirror the child across a line through center at angle.
  • toPolar — Unroll the child around center, so angle becomes x and distance becomes y.

Used by

Kaleidoscope