Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pixi.js vs Konva.js vs D3.js

I'm a graphics noobie and need help understanding the capabilities of the various javascript 2D libraries. . .

  • What do I get out of Pixi.js that I don't get out of a canvas-based library such as Konva?
  • What do I get out of Konva.js that I don't get out of an HTML/SVG/CSS library such as D3.js?

All I understand at this point is that Pixi is a WebGL library, and so you get faster rendering via GPU. But, I don't know how to describe what Konva does / how it works.

Any help with lingo etc would be immensely appreciated!

like image 614
user2132190 Avatar asked Sep 15 '19 21:09

user2132190


People also ask

What is Pixi JS used for?

Pixi. js is a free open-source 2D engine used to make animated websites and HTML5 games.It can be used on all modern browsers - on both desktop and mobile.

Is Pixi JS fast?

Pixi. js is a fast, lightweight, open source 2D library with full support for webGL with a very fast rendering speed. It is great to use as a UI in combination with Babylon.

Is Pixi a WebGL js?

At its heart, PixiJS is a rendering system that uses WebGL (or optionally Canvas) to display images and other 2D visual content. It provides a full scene graph (a hierarchy of objects to render), and provides interaction support to enable handling click and touch events.


1 Answers

It all depends on your use case. What exactly do you want to draw?

  • A game like canvas application with a lot of graphics, images, filters, etc? http://pixijs.com/ will do the work.

  • Data visualizations or charts? Take https://d3js.org/

  • CAD-like applications for drawing some shapes and image manipulations? Take https://konvajs.org/ or http://fabricjs.com/

There are many other similar libraries for every use case. If you are not sure - just make a small prototype with each framework. You will see what works better for you.

like image 191
lavrton Avatar answered Oct 01 '22 05:10

lavrton