Every algorithm is written as a JavaScript generator that sorts a real array and yields each comparison, swap and write as it happens. The visualiser just replays those operations, a few per frame. Nothing is faked: the counters show what the algorithm actually did.
yellow = comparing,pink = writing,green = final verification sweep. Turn sound on to hear each value as a pitch. Merge sort sounds best.