1 comment
It started as some internal SVG manipulation around Vivus and gradually became its own little library.
The interesting part for me was handling SVGs that contain more than just paths. The library draws strokes first, then reveals fills and text, and exposes setProgress() so the animation can be controlled by a timeline, scroll position, video editor, etc.
It can also record the result to WebM directly in the browser using the canvas/MediaRecorder APIs.
React is supported, but the core API doesn't depend on React.
It's very early and probably has plenty of SVGs that will break it. That's partly why I decided to open-source it.
GitHub: https://github.com/penwell-app/draw-on
npm: https://www.npmjs.com/package/@penwell/draw-on
I'd especially appreciate feedback from people who have dealt with messy real-world SVGs.
Read the full thread on Hacker News →
Related stories
- Hacker News · 1 points · 3 days ago
- The Library After Dark – a walkable 3D library of 600 public-domain bookslibraryafterdark.spaceHacker News · 2 points · 5 days ago
- Hacker News · 1 points · 5 days ago
- Hacker News · 5 points · 8 days ago
- Hacker News · 1 points · 7 days ago
- Hacker News · 1 points · 9 days ago