Raxol.Demo.Effects (Raxol v2.6.0)

View Source

Reusable visual effect helpers for demo animations.

Provides particle burst, screen flash, scene transition, spiral force, and color conversion utilities.

Summary

Functions

Applies spiral convergence force to a particle.

Creates a cascading rocket explosion at the given position.

Fills the screen with a solid color for N frames (flash effect).

Converts HSL to RGB tuple {r, g, b} with values 0-255.

Maps a hue value (0-360) to an ANSI 256-color index.

Writes data to a target device (IO, PID, or web tuple).

Runs a burst animation for the given particles over N frames.

Gradually dims the screen before a scene transition.

Functions

apply_spiral_force(particle, center_x, center_y, strength)

Applies spiral convergence force to a particle.

create_rocket_explosion(x, y)

Creates a cascading rocket explosion at the given position.

flash_screen(target, color, frames, width, height)

Fills the screen with a solid color for N frames (flash effect).

hsl_to_rgb(h, s, l)

Converts HSL to RGB tuple {r, g, b} with values 0-255.

hue_to_256(hue)

Maps a hue value (0-360) to an ANSI 256-color index.

out(device, data)

Writes data to a target device (IO, PID, or web tuple).

run_particle_burst(target, particles, frames, width, height, opts)

Runs a burst animation for the given particles over N frames.

transition_fade(target, frames)

Gradually dims the screen before a scene transition.