Live data from Hacker News

SVG can do that?

slides.com

81–90 of 202 posts

Re: SVG can do that?

#81

Earlier quoted context omitted.

Inkscape is what I always use for editing static SVGs. Not using it enough to become familiar with it myself, the interface is usually intuitive enough for me to guess my way to success.

My biggest gripe with inkscape is that it suffers from some sort of floating point precision error, when you do certain copy/paste/transformation operations it mercilessly outputs more digits of significance than are necessary, which bloats the text and peeves off someone who must obsessively keep their ml clean

I would guess it's just outputting the 16 or so (decimal) digits of a IEEE float using one of the round-tripable representations. Not sure what else would be reasonable. Could you round the output with some specialized tool?

Also what does "ml" mean?

Re: SVG can do that?

#83
post #77

By "SVG can do that?", it appears they actually just meant "JavaScript can do that?", as all the cool animations and stuff are all just JS-driven. Unless I misread it?

Driven by JS and rendered using SVG.

Re: SVG can do that?

#84

SVG has the opposite performance profile of Canvas. SVG hits a performance ceiling as number of elements increases. Canvas, since it's rasterized image can handle a rasterized representation of millions of SVG elements. However as Canvas dimension increase, it will hit a performance ceiling.

In my experience, canvas 2D also has a number-of-elements performance ceiling if you're drawing things rather than using images, which feels like it defeats the purpose. For example, try drawing hundreds of coloured rectangles per frame. Easy, right? If you're using WebGL, or any sensible graphics API, yes. If you're using canvas, the web-browser will parse and re-parse your colour expression CSS n times per frame. E…

[deleted]

Re: SVG can do that?

#85

This talk was one of the highlights of Develop Denver 2017 for me. Glad to see it getting some more traction.

Thanks for the conference name. Were the talks videoed? If so, did they say when they'll be uploaded?

Re: SVG can do that?

#86

Wow, svg sits there and does mostly nothing on my phone. Just like Flash! Can't pinch to zoom to read the text that was too small, just like Flash! Half the supposedly neat interactive gewgaws like "turn this gear" didn't react to any presses or gestures at all. Just like Flash!

Events can be attached to SVG elements just like any other element in the dom. Pinch to zoom / pan etc can all be implemented fine. Your complaints might hold true with certain demos, but they're not limitations of SVG

Re: SVG can do that?

#87
I wonder if we should encourage print designers to switch to svg (that is, if they don't already... it's not a world I know much).

I have in mind all those concerts or various events' png/jpeg files that are dropped on the web here and there. If they were svg files, it would be made easier for search engines to index their content.

Even without that, svg totally rocks. About a decade ago, I played with SVGWeb and made a showcase carousel presenting screenshots of projets with automated reflection on them (like it was common back then, a reverse image on bottom of actual image with a gradient from transparency to white to make an effect like if the ground was a mirror). I just had to upload a plain screenshot and everything was automated, I was mind blown, and surprised we seemed to go the canvas way instead (not so much, in retrospect).

Nowadays, I often make my icons as svg react components. It makes it so much easier to change their color or saturation on hover, this is very cool. We probably still have a long way to go to exploit all of svg potential.

Re: SVG can do that?

#89
post #77

By "SVG can do that?", it appears they actually just meant "JavaScript can do that?", as all the cool animations and stuff are all just JS-driven. Unless I misread it?

If only there were a widely installed runtime where SVG and JavaScript could be used together

Re: SVG can do that?

#90

Shameless plug: ImageTracer is a simple raster image tracer and vectorizer that outputs SVG, 100% free, Public Domain. Available in JavaScript (works both in the browser and with Node.js), "desktop" Java and "Android" Java: https://github.com/jankovicsandras/imagetracerjs https://github.com/jankovicsandras/imagetracerjava https://github.com/jankovicsandras/imagetracerandroid

Wow, this is cool. It looks like an API capable of things that Vector Magic[1] can do, but FOSS. Vector Magic has been excellent for some occasions where you have a rasterized clipart, but need it as a vector. [1] https://vectormagic.com/

Inkscape does have such a feature too. While importing a bitmap image, you can specifically "convert" it to vector graphic. Works fairly well.
Post reply on HN