Live data from Hacker News

An SVG is all you need

jon.recoil.org

151–155 of 155 posts

Re: An SVG is all you need

#151
post #148

Earlier quoted context omitted.

Can you describe what you think is sub-optimal? Is it just the performance or is there something else? I've been using SVG for years for various purposes (though, admittedly, mostly static graphics) and I can't complain.

It's sub-optimal in that browser developers have - for a number of legitimate reasons - chosen not to spend their time building SVG engines into their browsers that are efficient, robust and fast. I think its more a story of benign neglect rather than active discouragement. Compared to the Javascript and CSS engines, which have improved massively over the past decade, SVG remains ... serviceable for basic requirement…

I don't know anything about the browser internals or the development process/plans, but I've used requestAnimationFrame to animate SVG graphics from JavaScript and it has been super smooth for me even without a modern graphics card (only on-board graphics). The only time I've seen a performance degradation was with a complex filter involving blurs and specular reflection.

Re: An SVG is all you need

#152
post #54
post #53

Earlier quoted context omitted.

Interactive and SVGs don't really mix, although intuitively it would seem that they do. Rendering remotely complex SVGs tale multiple seconds, while any kind of interactivity demands ~30+ frames per seconds. Without interactivity, postscript is vector graphics too.

How complex are you talking about? I've done animations with hundreds of elements and it's fine.

A typical scene graph for a visually interesting 2D game has more than 5000 elements and works on a 15 year old computer without issues.

Re: An SVG is all you need

#153
This was delightful. I would greatly enjoy seeing more use cases, as well as new editors, and new ways of working with SVG while keeping with it's capabilities and capacities.

Once I happened upon carto.net namely this: https://old.carto.net/papers/svg/samples/index.shtml#iact

I was absolutely sold on SVG.

now I find this: https://cartosvg.com/ which is mind blowing the capability and capacity, just the first example from link, really makes my day https://cartosvg.com/italia then the 2nd! It's compelling. I wish I could have built what i was trying to conceive building using OSC (Open Sound Control), but what i was setting out to do was ultimately brought into the world by Hexler's TouchOSC, i just wish somehow someone could have took VST to a unified front, and made it random controller populatable. impossible back then, yes. Today, different.

Re: An SVG is all you need

#154

I love SVG! Recently I needed to render markdown in SVG and found no library existed for that yet so I released one: github: https://github.com/davefowler/markdown-svg playground: https://markdown-svg-production.up.railway.app

I assume the goal is to get rid of all foreignObject uses eventually? (Otherwise it would be easier yo render one big foreignObject and convert everything to HTML) Anyways, impressive, but what I’d really love to see is flexbox for SVG ;)

Yeah, my use case would have required a heavy node or playwright import to convert the SVGs to other formats or show them correctly outside of browsers. This keeps it all SVG and it looks and feels good and lighter.

Re: An SVG is all you need

#155

Earlier quoted context omitted.

SVG was once hailed as the Flash-killer. With SVG + CSS + JavaScript you could do anything you could do with Flash, including those fancy Flash websites or complex applications. There just weren't any good authoring tools, while Flash had an amazing one. Then Flash just died without being replaced by anything

Steve jobs killed it when said it would work on the iPhone because if the "huge" memory and battery resources. He said Javascript and HTML was everything you needed. Here is the original memo: https://www.editionmultimedia.fr/wp-content/uploads/2020/12/...

actually, that memo says Jobs did it for proprietary competitive reasons
Post reply on HN