MCPcopy Create free account
hub / github.com/microsoft/SandDance / simulation

Function simulation

docs/app/js/sanddance-app.js:135654–135661  ·  view source on GitHub ↗
(nodes, _)

Source from the content-addressed store, hash-verified

135652 return ()=>df.touch(op).run();
135653}
135654function simulation(nodes, _) {
135655 const sim = (0, _d3Force.forceSimulation)(nodes), stop = sim.stop, restart = sim.restart;
135656 let stopped = false;
135657 sim.stopped = ()=>stopped;
135658 sim.restart = ()=>(stopped = false, restart());
135659 sim.stop = ()=>(stopped = true, stop());
135660 return setup(sim, _, true).on("end", ()=>stopped = true);
135661}
135662function setup(sim, _, init, pulse) {
135663 var f = (0, _vegaUtil.array)(_.forces), i, n, p, name;
135664 for(i = 0, n = ForceParams.length; i < n; ++i){

Callers 1

transformFunction · 0.70

Calls 3

stopFunction · 0.70
setupFunction · 0.70
onMethod · 0.45

Tested by

no test coverage detected