4 ms·
Cool! The text printing time felt pretty long to wait for the whole paragraph. Also another simpler approach might be to use SVG animations like this: https:/
by Evidlo 1y ago
Cool!
The text printing time felt pretty long to wait for the whole paragraph.
Also another simpler approach might be to use SVG animations like this: https://codepen.io/mikemjharris/post/svg-toggling https://codepen.io/mikemjharris/post/svg-toggling
- lemoing 1y agoThanks for the feedback! I think the text speed might be an issue with my implementation: it adds a single character on each animation frame with a WPM speed limit, but this would cause problems if a device isn't able to animate very quickly. A better approach would probably be to use the wall clock time to figure out how many characters to add on each animation frame. As for SVG, I've used that in other projects but since I was working with pixelated drawings instead of vectors, I chose canvas instead. The downside is having to do a lot more of the work on animations yourself (but this ended up being an upside for me since it was a lot of fun :) )
- hamdingers 1y agoWhat's the WPM limit you're using? It seems to be significantly slower than my silent reading speed.
- lemoing 1y agoIt's set to 3600 characters per minute here, so 60/second: https://github.com/nlemoing/bici/blob/main/bike.ts#L451 https://github.com/nlemoing/bici/blob/main/bike.ts#L451
- Evidlo 1y agoYou can still embed bitmaps inside SVGs