Iris
Iris transition using circular clip paths.
Creates a circular reveal/hide effect, similar to the classic film iris wipe. Directions: - "open": Circle expands from center to reveal incoming scene - "close": Circle shrinks to hide outgoing scene
Constructor
Iris(
direction: IrisDirection = 'open',
duration: float = 0.5,
easing: Callable[[float], float] = <function linear at 0x107ad0cc0>,
center: tuple[float, float] | None = None,
overlapping: bool = False
) -> None
Initialize an iris transition.
Parameters
-
direction - "open" (expand) or "close" (shrink)
-
duration - Duration of the transition
-
easing - Easing function applied to the circle radius
-
center - Optional (x, y) center point in scene coordinates. If None, uses scene center (0,0 for center origin).
-
overlapping - If True, scenes continue animating during transition
Methods
composite
composite(
scene_out: 'VScene',
scene_in: 'VScene',
progress: float,
time_out: float,
time_in: float,
ctx: RenderContext
) -> Drawing
Composite scenes with iris circle effect.
Parameters
-
scene_out - The outgoing scene
-
scene_in - The incoming scene
-
progress - Progress through transition (0.0-1.0), already eased
-
time_out - Current time within outgoing scene (0.0-1.0)
-
time_in - Current time within incoming scene (0.0-1.0)
-
ctx - Render context
Returns
Drawing with iris effect