3 ms·
I'm always interested in projects like this, since my Iron Arachne project dynamically builds several types of image with SVG and I currently rely on xmlbuilder
by bovermyer 5y ago
I'm always interested in projects like this, since my Iron Arachne project dynamically builds several types of image with SVG and I currently rely on xmlbuilder2 as my primary method of creation.
To see the results, here are two pieces of the site that use SVG:
https://ironarachne.com/#/starsystem https://ironarachne.com/#/starsystem - the planet and star images are SVG
https://ironarachne.com/#/heraldry https://ironarachne.com/#/heraldry - the coat of arms is SVG
It's kind of painful to work with xmlbuilder2 for these things, though. I've been considering moving away from SVG and just using pure WebGL for all generated images.
Pablo looks like it's meant as an animation library more than anything else; the commentary about Flash drives home that point for me. I don't think it would help me, at least not at a glance.
- jitl 5y agoI would use React or a similar library with renderToStaticMarkup to produce SVG, because the JSX syntax basically gives you an XML literal. You can compose XML expression and write functions that take and return XML fragments. Those features significantly reduced the XML/HTML boilerplate for a document export system I migrated to React/JSX. The big annoyance is that it requires a build step to transform the JSX into regular JS, but if you’re using Typescript already (I was) then it’s a single flag to enable. Or go WebGL. That also sounds like a fun learning project.