Neighbor stop on little velocity changes
This commit is contained in:
@@ -34,13 +34,16 @@ export default function (nodes, config) {
|
||||
})
|
||||
.on("end", ended);
|
||||
|
||||
sampleSimulation.force("forces", neighbourSamplingDistance()
|
||||
sampleSimulation
|
||||
.force("forces", neighbourSamplingDistance()
|
||||
.neighbourSize(neighbourSize)
|
||||
.sampleSize(sampleSize)
|
||||
.distanceRange(distanceRange)
|
||||
.distance(distanceFn)
|
||||
);
|
||||
sampleSimulation.alpha(1).restart();
|
||||
.stableVelocity(60)
|
||||
.stableVeloHandler(function(){sampleSimulation.stop(); ended();})
|
||||
)
|
||||
.alpha(1).restart();
|
||||
|
||||
function ended() {
|
||||
event.call("startFull");
|
||||
|
||||
Reference in New Issue
Block a user