[HN Gopher] ThorVG: Super Lightweight Vector Graphics Engine
___________________________________________________________________
ThorVG: Super Lightweight Vector Graphics Engine
Author : elcritch
Score : 80 points
Date : 2025-06-02 10:31 UTC (12 hours ago)
(HTM) web link (www.thorvg.org)
(TXT) w3m dump (www.thorvg.org)
| jitl wrote:
| Is this in the same space as Skia? I wonder what the differences
| in code size and performance are.
| ratatoskrt wrote:
| Interested in this as well. I'm currenlty using Skia (through
| skia-safe) but I'd be quite open to try another renderer if
| there are performance improvments.
| paufernandez wrote:
| As far as I see, Skia is the full-blown thing, whereas ThorVG
| goes the other route, being as small and simple as possible.
| MintPaw wrote:
| Does it have antialiased masks? That's what's always prevented me
| from leaving Skia.
| chriswarbo wrote:
| This is the second time I've seen Lottie mentioned this week,
| without hearing about it before.
|
| Maybe it's targeting a different use-case, but these things (at
| least on the Web) appear to be more-heavyweight and less-capable
| than the things people were doing 20 years ago with
| Macromedia/Adobe Flash, e.g. compare the animated-GIF-like
| examples linked from TFA ( https://thorvg-perf-test.vercel.app/ )
| to the animations and games found on sites like Newgrounds. Last
| I checked, the latter make heavy use of emulators like Ruffle, or
| (based on loading screens) 3D game engines like Unity etc.
|
| As someone who's been out of that scene for a long time: what's
| the overall state of things, if I want to make long, complex, 2D
| vector animations? (i.e. not using a 3D engine; and not rendering
| to video). SVG seems pretty established; but for animation, how
| capable is Lottie? Does anyone still use SMIL (outside of DVD
| menus)? Am I better off "rendering" to a big pile of JS + CSS
| transitions?
| teucris wrote:
| Lottie is quickly becoming the de-facto standard for UI
| animations, but live, long running vector animations aren't
| really something I've seen much of - at this point, video
| compresses well enough that people will simply use an mp4 or
| webp for that use case. I know that's not what you're looking
| for but since it isn't a common use case, I haven't seen much
| support for it. Lottie is perfectly capable for this use case,
| provided you don't want audio.
| segphault wrote:
| An alternative to Lottie that's seriously worth considering is
| Rive. This is personally what I'd choose for non-trivial use
| cases. https://rive.app
| Fraterkes wrote:
| The godot svg implementation runs on this. Ive been working on a
| little font editing tool for a week, but apparently the current
| build of Thor has a bug with rendering text...
| iFire wrote:
| Godot Engine maintainer here: What version and do you have a
| minimal recreation project for thorvg or godot engine? Hope we
| didn't cause you too much trouble. Post a github issue and we
| can look into it. Thanks for using Godot Engine / Thorvg.
| somethingsome wrote:
| I find that gradient are really badly handled usually in svg
| softwares, I hope this can improve it.
|
| In inkscape you can make only a one direction gradient, never a
| gradient with more than 2 points, I don't know if it is a
| limitation of the format itself.
|
| Also when you have multiple gradients in one file, the software
| becomes extremely slow. And they don't mix correctly when
| overlapped with transparency.
|
| It seems a low hanging fruit to optimize that, but I guess there
| is little traction
| cycomanic wrote:
| I don't quite understand what you mean. Are you talking about
| color points, you can add many different ones in inks ape (the
| UI of the gradient tool is admittedly quite bad though). Or do
| you mean a sort of double gradient, i.e. if goes from red to
| blue from left to right, but from opaque to transparent from
| top to bottom? I never had to use such a gradient, so not sure
| if it's possible.
| somethingsome wrote:
| Take a triangle, put a different color on each vertex, tri-
| interpolate
| brulard wrote:
| This is not supported in SVG. There was a Mesh Gradient
| feature planned for SVG v2.0, but AFAIK that was removed
| from the draft. It's a shame. Here is an article discussing
| that. (2018, mind you)
|
| https://librearts.org/2018/05/gradient-meshes-and-
| hatching-t...
|
| EDIT: I assumed this is SVG renderer, but now i think it
| may not be bound by SVG limitations.
| KeplerBoy wrote:
| Do you mean a curved gradient as in a rainbow?
| somethingsome wrote:
| Oh that could be useful as well!
| LegionMammal978 wrote:
| At least that can be done in SVG with a radial gradient (I
| don't know whether Inkscape exposes it). But for anything
| more complex than an ellipse, you're out of luck, short of
| something like a filter effect, which will be very
| heavyweight and also inconsistent across browsers.
| elcritch wrote:
| I discovered ThorVG recently and started experimenting with using
| it in Nim for a GUI backend: https://forum.nim-lang.org/t/13072
| 0x0203 wrote:
| Has anyone recently compared thorvg to blend2D? There's a project
| I want to use vector drawing for and at one point I was leaning
| more towards blend2d based on performance and multi threaded
| capabilities, but ThorVG has had a lot of active development
| since I last looked. Curious if they've made any significant
| improvements in the last couple years.
| cantalopes wrote:
| Are we seriously going to reinvent Macromedia Flash now
___________________________________________________________________
(page generated 2025-06-02 23:00 UTC)