Comment by gpvos
1 year ago
Okay, now you have the frames as glyphs in the font, but how are they going to animate? The most interesting part of the explanation is missing.
1 year ago
Okay, now you have the frames as glyphs in the font, but how are they going to animate? The most interesting part of the explanation is missing.
The glyph corresponds to how many (e.g.) dots you have in a row and the author set key-repeat at 30/s and held down the . key.
...okay, that is less automatic than I was led to expect. I mean, it's still cool, I guess.
In the middle of the article you see a line "RUST Full code for character replacement". If you click on that, it will show you the Wasm code.
It looks like it uses Wasm to replace a sequence of dots with a glyph from the font, which shows a frame from the animation, similar to ligatures, but using Wasm. You could do the same with storing the svg paths for each animation frame in an array and then using Javascript iterate over and display these paths, but this uses Wasm, HarfBuzz and a font.
More importantly, seeing the other comments, it uses those and a keyboard.
I came here to ask the same thing, then saw interroboink's guess in another comment and it seems plausible: https://news.ycombinator.com/item?id=37317687