GithubHelp home page GithubHelp logo

vasturiano / d3-force-cluster-3d Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 3.0 62 KB

A clustering force type for the d3-force-3d simulation engine

License: MIT License

JavaScript 100.00%
clustering d3js force physics-simulation

d3-force-cluster-3d's People

Contributors

vasturiano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

d3-force-cluster-3d's Issues

example of d3-force-cluster-3d?

Hi vasturiano.
thank you for your page. really helpful to me.

If it's okay, could you show me a basic example of how it works? (about d3-force-cluster-3d)
I tried it, but failed.
sorry to ask it.

Unstable z values

When using the library I often have the z dimension reaching unexpected high values (and not recovering from it). I had a peek at the source and changing line 19 in cluster.js seems to fix it.

Original:

l = Math.sqrt(x * x + y * y);

Updated:

l = Math.sqrt(x * x + y * y + z * z);

Example Usage

Issue

I'm trying to integrate d3-force-cluster-3d with d3-force-3d in a library I'm building. I hooked up the library and have it rendering but clustering is not working.

I think my problem is its not entirely clear what the centers method should return. I attempted https://github.com/reaviz/reagraph/blob/clusters/src/layout/forceDirected.ts#L62-L80 but it doesn't seem to be correct. I was wondering if you had an idea what I could be doing wrong or a better example I could lean on.

If you want, you can clone this branch https://github.com/reaviz/reagraph/tree/clusters and do yarn install + yarn start and goto Clustering storybook story that opens.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.