For folks who have used this, why would you choose this instead of SVG inside React, Svelte, etc?
I wish the performance issue were either fixed or dispelled. I think I recall some SVG performance work being done couple of years back.
31–40 of 76 posts
For folks who have used this, why would you choose this instead of SVG inside React, Svelte, etc?
I wish the performance issue were either fixed or dispelled. I think I recall some SVG performance work being done couple of years back.
I've used PixiJS and react-pixi-fiber to write a declarative 2D WebGL renderer in React with excellent results. PixiJS also has a Canvas2D fallback when WebGL isn't available. I wonder how this compares.
Pixi is lower level. It takes more scaffolding to get to the same level of functionality. But it can be more performant for some draw intensive operations. Not that Konva is particularly slow though.
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?
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.
For folks who have used this, why would you choose this instead of SVG inside React, Svelte, etc?
For folks who have used this, why would you choose this instead of SVG inside React, Svelte, etc?
it is not that people would chose svg inside react/vue but that people want react/vue to manage svg for the same reason as we use react/vue to maange html
What is the purpose? React for Canvas tag?
Instead of worrying about pixels you just mix and match vector shapes and imported rasters and turn them into declarative components that you pass props and handlers to, same as any other. Makes your Canvas a much more integrated part of your UI code than it otherwise would be.
For folks who have used this, why would you choose this instead of SVG inside React, Svelte, etc?
Take react / svelte/ etc out of the equation. The important question is why would you use canvas vs svg? As a sibling comment noted, number of elements can be a big performance drag, since they all add weight in the DOM. Other considerations are animations- it's been a few years, but I recall a number of animations in SVG that would utterly destroy browser performance (I think it was animating a stroke with CSS but I…