Fade

Crossfade transition using opacity blending.

The outgoing scene fades out while the incoming scene fades in, creating a smooth dissolve effect.

Constructor

Fade(
    duration: float = 0.5,
    easing: Callable[[float], float] = <function linear at 0x107ad0cc0>,
    overlapping: bool = False
) -> None

Initialize a fade transition.

Parameters

duration
Duration of the transition (0.0-1.0 of total sequence time)
easing
Easing function applied to the opacity interpolation
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 opacity crossfade.

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 crossfaded scenes