Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is the purpose of simulator.getTotalMovement()? #67

Open
Joscha95 opened this issue Mar 25, 2024 · 3 comments
Open

what is the purpose of simulator.getTotalMovement()? #67

Joscha95 opened this issue Mar 25, 2024 · 3 comments

Comments

@Joscha95
Copy link

Hi & first of all thank you for this great library!
I am trying to find out when the simulation has reached a certain "heat" to stop the rendering and save performance. I thought simulation.getTotalMovement() could help me there but that always returns 0. Is that intended or am i using it wrong?
I am calling getTotalMovement() directly after step(). I can see the simulation is working because i am rendering the nodes as threejs objects.

( I guess this line is somehow related? You can also see the totalMovement var never being set to anything different than 0... )

@Joscha95
Copy link
Author

moments after writing this i found layout.getForceVectorLength() which helps me with the heat issue, ill leave this open since the initial question about getTotalMovement() might be interesting for someone else.

@apowers313
Copy link

Is it just me, or after pinning a node getForceVectorLength() seems to increase forever and never settle back down -- making it impossible to detect when the heat has settled again?

@apowers313
Copy link

Btw, the .step() function returns true when the graph has stabilized. Code is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants