Raxol. Demo. TextFormation
(Raxol v2.6.0)
View Source
ASCII text particle formation for demo effects. Uses 5x7 bitmap font to create particle target positions.
Summary
Functions
Checks if all particles have arrived at their targets.
Creates particles at screen edges with targets for text formation.
Creates explosion particles from formation particles (for dispersal).
Renders formation particles to ANSI escape sequences.
Returns target {x, y} positions for all pixels in the given text. Centered at the given screen coordinates.
Updates particles toward their targets using ease-out approach.
Updates a formation particle with small jitter to create shimmer effect. Only applies to arrived particles.
Types
Functions
@spec all_arrived?([formation_particle()]) :: boolean()
Checks if all particles have arrived at their targets.
@spec create_formation_particles( String.t(), integer(), integer(), integer(), integer() ) :: [formation_particle()]
Creates particles at screen edges with targets for text formation.
@spec explode_formation([formation_particle()]) :: [Raxol.Demo.Particles.particle()]
Creates explosion particles from formation particles (for dispersal).
@spec render([formation_particle()], non_neg_integer(), non_neg_integer()) :: String.t()
Renders formation particles to ANSI escape sequences.
Returns target {x, y} positions for all pixels in the given text. Centered at the given screen coordinates.
@spec update_toward_target(formation_particle()) :: formation_particle()
Updates particles toward their targets using ease-out approach.
@spec update_with_jitter(formation_particle()) :: formation_particle()
Updates a formation particle with small jitter to create shimmer effect. Only applies to arrived particles.