-
Notifications
You must be signed in to change notification settings - Fork 1
Why I created this project
I was looking for a simple charting library for the web where I could declaratively plot a tiny amount of points, lines and planes in three dimenstions. I couldn't find one that suited my needs. I needed this so that I can create robot simulators and 3d geometry demonstrations.
The current options that I found were: Plotly
, x3dom
, niekes/d3-3d
, jamesleesaunders/d3-x3d
, gl-vis/plot3d
and three.js
.
-
niekes/d3-3d
andjamesleesaunders/d3-x3d
(unpacked size: 13.2MB) require using d3js for dom manipulation which I think would bloat the project using it. I also plan in using React, andd3js
is not a very "React way" of doing things. -
x3dom
andthree.js
are extremely huge, it would be an overkill too use them simply for plotting points, lines and planes. -
plotly.js-gl3d-dist
(depends ongl-plot3d
) is actually the best candidate given its very straightforward (awesome!) api. However, its unpacked size is3.72MB
(when minified it's still1.4MB
) and that does not even includereact-plotly
. - And now we're left with
gl-vis/plot3d
, the upside of it is it's smaller thanplotly
(sinceplotly is a superset of it
). However, it's unpacked size is still2.74MB
, and it actually has 16 dependencies! But the real problem here is that it has a relatively poor documentation and almost zero sample codes. - Of course I could always try using
webgl
, but it has a relatively steep learning curve, and it hard to be productive and get things done quickly.
I needed something with an easy declarative API that is extremely lightweight and just works.
That's why I created bare-minimum-2d
and bare-minimum3d
. bare-minimum-3d
has zero dependencies. bare-minimum-2d
also has zero dependencies (Note: React
is naturally its peer dependency as it is a React component). bare-minimum-3d
has an install size of only about 50KB
while bare-minimum-2d
is about 28KB
. With a combined install size of about 80KB
, it's between fifteen to twenty times smaller than what's out there!