Skip to content

iris

iris(opts?): SceneTransition

Defined in: renderer/src/transitions/iris.ts:46

Iris-out → swap → iris-in. A circular cut-out of the screen shrinks to zero over the first half (covering everything in color), then grows back over the second half to reveal the destination. Symmetric to fade() but with a circular shape — useful for retro-style transitions (Zelda overworld→cave, classic Mario level intros).

Implementation: a fullscreen color overlay carries an inverse circular mask so the area inside the circle stays transparent (revealing the scene below) while the outside fills with color. The mask is redrawn each frame to animate the radius.

  • push/replace: incoming scene stays hidden until the half-way mark, then is revealed underneath the opening iris.
  • pop: outgoing scene stays visible through the closing iris, then is hidden at the half-way mark so the destination shows through during the opening half.

IrisOptions = {}

SceneTransition