Neighbour change api

This commit is contained in:
Pitchaya Boonsarngsuk
2018-02-05 16:33:46 +00:00
parent e7dc79d97e
commit cf813a58c8
4 changed files with 13 additions and 12 deletions

View File

@@ -15,7 +15,7 @@ import {takeSampleFrom} from "./interpolation/helpers";
* clean up the model.
* @param {object} sim - D3 Simulation object
* @param {object} forceS - Pre-configured D3 force object for the sample set.
The ending condition will be re-configured.
The ending handler will be re-configured.
Neighbour sampling force is expected, but other D3
forces may also work.
* @param {object} forceF - Pre-configured D3 force object for the simultion ran
@@ -60,10 +60,8 @@ export default function (sim, forceS, forceF) {
}
function initForces(){
if (forceSample.stableVelocity && forceSample.stableVeloHandler) {
forceSample
.stableVelocity(0) //TODO
.stableVeloHandler(sampleEnded);
if (forceSample.onStableVelo) {
forceSample.onStableVelo(sampleEnded);
}
// Set default value for interpDistanceFn if not been specified yet