Edited comments
This commit is contained in:
@@ -48,14 +48,13 @@ export default function (sim, forceS, forceF) {
|
||||
// Performed on first run
|
||||
function initialize() {
|
||||
initAlready = true;
|
||||
console.log("Initializing Hybrid");
|
||||
alreadyRanIterations = 0;
|
||||
simulation
|
||||
.on("tick", sampleTick)
|
||||
.on("end", sampleEnded)
|
||||
.nodes(sample)
|
||||
.force("Sample force", forceSample);
|
||||
console.log("Initialized Hybrid");
|
||||
console.log("Initialized Simulation for Hybrid");
|
||||
}
|
||||
|
||||
function initForces(){
|
||||
@@ -91,7 +90,7 @@ export default function (sim, forceS, forceF) {
|
||||
// Sample simulation ticked 1 frame, keep track of number of iterations here.
|
||||
function sampleTick() {
|
||||
event.call("sampleTick");
|
||||
if(++alreadyRanIterations >= SAMPLE_ITERATIONS){
|
||||
if(alreadyRanIterations++ >= SAMPLE_ITERATIONS){
|
||||
sampleEnded();
|
||||
}
|
||||
}
|
||||
@@ -99,7 +98,7 @@ export default function (sim, forceS, forceF) {
|
||||
// Full simulation ticked 1 frame, keep track of number of iterations here.
|
||||
function fullTick() {
|
||||
event.call("fullTick");
|
||||
if(++alreadyRanIterations >= FULL_ITERATIONS){
|
||||
if(alreadyRanIterations++ >= FULL_ITERATIONS){
|
||||
fullEnded();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ export default function() {
|
||||
node.oldvy = node.vy;
|
||||
}
|
||||
}
|
||||
|
||||
// Each iteration in a tick
|
||||
for (var k = 0, source, target, i, j, x, y, l; k < iterations; ++k) {
|
||||
// For each link
|
||||
|
||||
Reference in New Issue
Block a user