Skip to content

Why I created this project

Mithi Sevilla edited this page Sep 2, 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 3d. 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 straight forward api. However, its unpacked size is 3.72MB (minified is still 1.4MB) and that does not even include react-plotly .
  • And now we're left with gl-vis/plot3d which is smaller than plotly but 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.

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 the best available option!

Clone this wiki locally