Hacker News new | past | comments | ask | show | jobs | submit login

Is this the successor library for KineticJS and ConcreteJS?

Kinetic was amazing back in it's day, but lacked SVG export. I wonder if that's built-in now




SVG export feels like it would be borderline impossible. Raster graphics to vector?


The underlying shapes are defined by geometries (so vectors) and then rasterized to canvas. So the SVG export could happen before the rasterization.

There are other libs that are native SVG though, so why even use Konva? The benefit of Canvas is that it can be a lot, LOT faster than having multiple complex SVGs. SVG is especially slow on Firefox IIRC.


SVG purely for image export, I'm not talking about animation features.

Konva to set the scene, SVG for final touches before you publish the image somewhere


Seems like you could just use Figma if you want to build a static SVG for export. Konva is more for building interactive apps.


I make a canvas-based diagramming library (GoJS) and implemented SVG export, and then a whole SVG renderer if you want the same scene in real-time. Generally if you're using HTML Canvas commands, you can engineer a perfect SVG equivalent. There are some really really really annoying edge cases with transforms, clipping, gradients, etc. But nothing is impossible :D


It is a fork of KineticJS. SVG export isn't implemented and I don't think it will be. I, personally, see it as out of the focus of the project.


We used Kinetic a lot for a specific type of visual analysis we had, but when it came to creating publish-worthy figures, working with PNG screenshots was less than desirable.

Would it be so difficult to crawl over a snapshot of the object hierarchy and render to a cairo-like library?

At one point I started implementing that myself using my own object representation that I had running parallel to Kinetic's internal one, but never finished it.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: