4 ms·
I've been using html2canvas for a long time in https://play.basketball-gm.com/ https://play.basketball-gm.com/ so I gave your library a try. It was much slower
by streptomycin 1y ago
I've been using html2canvas for a long time in https://play.basketball-gm.com/ https://play.basketball-gm.com/ so I gave your library a try. It was much slower (I know your README has benchmarks saying the opposite so idk) and the result looked a lot worse.
html2canvas: https://i.imgur.com/zfSwNR1.png https://i.imgur.com/zfSwNR1.png
snapdom: https://i.imgur.com/FxowTzp.png https://i.imgur.com/FxowTzp.png
Also I recommend putting the npm package name clearly in your README. I guess I don't really know what other people are doing these days, but I think most people are like me and consume packages like this from npm rather than a <script> tag.
- tinchox6 1y agoThank you for testing it out and sharing the screenshots! I’ve run some performance tests using Vitest Bench, and SnapDOM was faster. I also created a few manual demos, and SnapDOM won in both speed and accuracy. That said, I still need to run more real-world tests. So, thanks again for your help!
- hirako2000 1y agoHow can svg be faster, and especially more accurate (lets throw some IMG or CSS shadows for fun) than canvas?
- kaoD 1y agoYou can embed HTML in an SVG via foreignObject. Seems like that's exactly what the library is doing[0]. Whether that's faster or more reliable, I don't know. Seems likely to render different depending on where you view the SVG (especially out of browsers). [0]: https://github.com/search?q=repo%3Azumerlab%2Fsnapdom%20foreignObject&type=code https://github.com/search?q=repo%3Azumerlab%2Fsnapdom%20fore...
- tinchox6 1y agoI'm working on enabling a special full mode for those who don't mind the final size: https://github.com/zumerlab/snapdom/issues/1 https://github.com/zumerlab/snapdom/issues/1
- tinchox6 1y agoI added to README the npm / yarn reference. Thanks!
- tinchox6 1y agoIf interested I solved almost all issues you pointed out (speedy and accuracy). https://github.com/zumerlab/snapdom/issues/3 https://github.com/zumerlab/snapdom/issues/3