Zoom
Zoom transition using scale transforms and opacity.
The outgoing scene zooms and fades while the incoming scene zooms in from the opposite direction. Directions: - "in": Outgoing zooms in (grows), incoming zooms in from small - "out": Outgoing zooms out (shrinks), incoming zooms out from large
Constructor
Zoom(
direction: ZoomDirection = 'in',
duration: float = 0.5,
easing: Callable[[float], float] = <function linear at 0x107ad0cc0>,
max_scale: float = 2.0,
overlapping: bool = False
) -> None
Initialize a zoom transition.
Parameters
-
direction - Zoom direction ("in" or "out")
-
duration - Duration of the transition
-
easing - Easing function applied to zoom/opacity
-
max_scale - Maximum scale factor at full zoom (default 2.0)
-
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 zoom 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 zooming scenes