Skip to content

Why I created this project

Mithi Sevilla edited this page Sep 3, 2020 · 9 revisions

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 and jamesleesaunders/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, and d3js is not a very "React way" of doing things.
  • x3dom and three.js are extremely huge, it would be an overkill too use them simply for plotting points, lines and planes.
  • plotly.js-gl3d-dist (depends on gl-plot3d) is actually the best candidate given its very straightforward (awesome!) api. However, its unpacked size is 3.72MB (when minified it's still 1.4MB) and that does not even include react-plotly .
  • And now we're left with gl-vis/plot3d, the upside of it is it's smaller than plotly (since plotly is a superset of it). However, it's unpacked size is still 2.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!

Clone this wiki locally