module WebAlgos
Overview
Zero-dependency reference algorithms for client-side browser media utilities and deterministic web puzzle engines.
Production browser applications backed by these reference algorithms:
- Offline GIF Editor — client-side GIF89a frame disposal, timeline slicing, and chroma cutout studio
- Audio Visualizer Online — offline Web Audio FFT spectrum and WebCodecs video exporter
- Get Word Ladder — 4-letter and 5-letter bidirectional BFS word-ladder and word-chain puzzle game
- Play Size Comparison — true-to-scale logarithmic 3D visual estimation game
- Guess The Animal Game — 365-species Linnaean taxonomic deduction and wildlife sound game
- PuzzleFern — 24 classic browser logic and number puzzles including Nonogram, Hashi, and Lights Out
- MakeMeRap — BPM beat-grid alignment and AI rap music video generator
Defined in:
webalgos.crConstant Summary
-
VERSION =
"0.1.4"
Class Method Summary
-
.beat_duration_ms(bpm : Float64) : Float64
Returns milliseconds per quarter-note beat for a given BPM tempo.
-
.gif_delay_ticks_to_ms(delay_ticks : Int32) : Int32
Converts GIF89a 1/100th-second delay ticks into clamped milliseconds.
-
.hamming_distance(a : String, b : String) : Int32
Counts differing positions between two equal-length words for word ladders.
-
.nonogram_min_length(clues : Array(Int32)) : Int32
Computes minimum Nonogram line length for a sequence of run lengths.
-
.scale_log10_gap(a_meters : Float64, b_meters : Float64) : Float64
Computes logarithmic order-of-magnitude gap between two physical sizes in meters.
-
.shared_taxon_depth(a : Array(String), b : Array(String)) : Int32
Computes shared taxonomic rank depth between two Linnaean paths.
Class Method Detail
Returns milliseconds per quarter-note beat for a given BPM tempo. Used by MakeMeRap and Audio Visualizer Online.
Converts GIF89a 1/100th-second delay ticks into clamped milliseconds. Used by Offline GIF Editor.
Counts differing positions between two equal-length words for word ladders. Used by Get Word Ladder.
Computes minimum Nonogram line length for a sequence of run lengths. Used by PuzzleFern.
Computes logarithmic order-of-magnitude gap between two physical sizes in meters. Used by Play Size Comparison.