from Hacker News

ThorVG: Super Lightweight Vector Graphics Engine

by elcritch on 6/2/25, 10:31 AM with 47 comments

  • by chriswarbo on 6/2/25, 5:00 PM

    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?

  • by Fraterkes on 6/2/25, 5:24 PM

    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…
  • by elcritch on 6/2/25, 8:31 PM

    I discovered ThorVG recently and started experimenting with using it in Nim for a GUI backend: https://forum.nim-lang.org/t/13072
  • by jitl on 6/2/25, 3:16 PM

    Is this in the same space as Skia? I wonder what the differences in code size and performance are.
  • by MintPaw on 6/2/25, 3:44 PM

    Does it have antialiased masks? That's what's always prevented me from leaving Skia.
  • by mindbrix on 6/3/25, 7:35 AM

    The WebGL antialiasing quality looks poor compared to the software renderer. It could be using MSAA instead of full analytical AA.

    I had to use Chrome to test it, as the viewer doesn't play on Safari.

    https://thorvg.github.io/thorvg.viewer/

  • by jazzcomputer on 6/3/25, 8:50 PM

    I'm keen to make a vector game and want something fast. I was excited to read about this thing but when I saw Lottie it made me think that the animations would be quite closed data-wise, whereas the game design I have in mind has dynamic animation that would happen on the fly, or be a mixture of preset animations with elements that react dynamically.

    I'm an almost complete code novice so I was wondering if anyone can tell me if this solution would allow animations that are constructed in code rather than just play start to finish etc as a preset thing that can't be easily augmented.

  • by DidYaWipe on 6/3/25, 6:21 AM

    I thought this was interesting: "the implementation maintains a lightweight profile, rendering it particularly advantageous for embedded systems."

    But then it goes on to say that "interactivity" is unsupported. Embedded UI would be the first thing I'd be interested in using this for; wouldn't that be hampered by the lack of support for interactivity? I don't know what SVG "interactivity" consists of.

  • by 0x0203 on 6/2/25, 9:17 PM

    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.
  • by Riskofrain on 6/3/25, 4:58 AM

    The next step for thorvg for me would be to prove itself as useful at runtime as rive. I would really like to see a real implementation of this in game engines like Godot Engine. Just like there’s a Rive renderer for Defold. But I mean actually being able to render vectors, not that thing where you’re forced to rasterize a sprite sheet, lol.
  • by wiradikusuma on 6/3/25, 4:05 AM

    I can't find it on the website. What does it compare to? And what's the memory/disk footprint, let's say, for using it in a Flutter project?
  • by __grob on 6/3/25, 3:41 AM

    Using Devin's DeepWiki for the docs page gives me an uneasy feeling. I would rather have real docs.
  • by tapirl on 6/3/25, 7:14 AM

    pros and cons vs. skia?

    Does it has a stable c API?

  • by cantalopes on 6/2/25, 9:25 PM

    Are we seriously going to reinvent Macromedia Flash now
  • by somethingsome on 6/2/25, 6:55 PM

    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