Skip to content

D3 plugin extending d3.layout.force to the third dimention in a proper way

Notifications You must be signed in to change notification settings

Darren-Li/D3.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

##d3.layout.force3D with a proper third dimension

Import it to your project after d3.js and replace: d3.layout.force() with d3.layout.force3D() into your code.

Original API is unchanged except for:

  • size() that now takes an array of length 3 instead of 2. Default is now .size([1, 1, 1]) .
  • force.drag is not really supported because of the third dimention. You have to implement it yourself with unprojection techniques. The current minimal-dirty-example.html demo drag only on the x and y axes and ignore the z axis.

Demo

cljs-gravity, implemented in ClojureScript with d3.layout.force3D running in a distinct webworker.

Example

You can find dirty but working minimal code here.

###Credits

Adapted from:

I just extracted it, rewrote it, and exported it as a d3 plugin. So please give him the credits ;)

About

D3 plugin extending d3.layout.force to the third dimention in a proper way

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 52.8%
  • HTML 47.2%