Skip to main content
Helios provides lightweight transition utilities for creating smooth fades, crossfades, and custom transitions between scenes or states.

transition()

Calculates transition progress over a specified duration with optional easing.

Parameters

number
required
Current frame number
number
required
Frame to start the transition
number
required
Duration of the transition in frames
TransitionOptions
Optional transition configuration

Returns

number - Progress value:
  • 0 before start frame
  • 0 to 1 during transition
  • 1 after transition completes

Examples

Basic fade in

With easing

Delayed transition

Scale transition

crossfade()

Calculates opacity values for crossfading between two elements.

Parameters

number
required
Current frame number
number
required
Frame to start the crossfade
number
required
Duration of the crossfade in frames
TransitionOptions
Optional transition configuration

Returns

CrossfadeResult object with:
number
Opacity for the incoming element (0 to 1)
number
Opacity for the outgoing element (1 to 0)

Examples

Basic crossfade between scenes

Smooth crossfade with easing

Multiple overlapping scenes

Common patterns

Scene manager with transitions

Custom transition effects

Transition with blur

Wipe transition

State-based transitions

Combining with spring physics