dz
v0.0.3
Published
provides 3D for D3
Downloads
8
Readme
DZ A simple library for making 3D fun with D3
WARNING: this is a very new (and likely unstable) project. use as your own risk.
checkout this live demo
Installation
just download dz.js and include it into your HTML
<script src="dz.js"></script>
or, install via npm
npm install dz
Example
Here's a quick sample. Checkout the example/example2.html for a working demo.
// create a new projection
var p = dz.projection.perspective()
// and configure the camera (aka, the "eyeball")
.camera().position([0, 0, f / 1]).lookAt([0, 0, 0]).focalLength(f)
// create some 3d data
var data = [0, -1, 0.5] // a point at (0, -1, 0.5)
p.x(data) // provides the x coordinate of the 3D -> 2D projection
p.y(data) // provides the y coordinate of the 3D -> 2D projection
No documentation yet so for now have a look at the code