Code Monkey home page Code Monkey logo

Comments (2)

vasturiano avatar vasturiano commented on May 18, 2024

Hi @cloudtracer, currently the only way to restart the animation engine after it's been stopped with stopAnimation() is to re-initialize the graph which is triggered when you bind a DOM element to it. So, you can try re-binding the same DOM element via myGraph(<domElement>) to get the desired effect.

However, if what you're seeking is actually to temporarily stop the force engine instead of the animation cycle, you can do so with cooldownTicks(0), and then re-ignite with cooldownTicks(Infinity). This will keep the animation ticks running throughout.

Hope that helps.

from 3d-force-graph.

cloudtracer avatar cloudtracer commented on May 18, 2024

Cool thanks! Good tips. Re-binding is just want I needed.

It would be neat if you could wrap the functionality into stopAnimation so that it could be called with true/false. I've got what I need working, thanks again.

from 3d-force-graph.

Related Issues (20)

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.