Update readme for the new API
This commit is contained in:
16
README.md
16
README.md
@@ -87,6 +87,18 @@ The resulting number is then stored internally, such that the distance of each l
|
||||
|
||||
If *iterations* is specified, sets the number of iterations per application to the specified number and returns this force. If *iterations* is not specified, returns the current iteration count which defaults to 1. Increasing the number of iterations greatly increases the rigidity of the constraint, but also increases the runtime cost to evaluate the force.
|
||||
|
||||
<a name="springLink_latestAccel" href="#springLink_latestAccel">#</a> *springLink*.**latestAccel**()
|
||||
|
||||
Returns the average velocity changes of the latest iteration.
|
||||
|
||||
<a name="springLink_stableVelocity" href="#springLink_stableVelocity">#</a> *springLink*.**stableVelocity**([*threshold*])
|
||||
|
||||
If *threshold* is specified, sets a threshold and returns this force. When the average velocity changes of the system goes below the threshold, the function [onStableVelo's handler](#springLink_onStableVelo) will be called. Set it to 0 or less or remove the [handler](#neighbourSampling_latestForce) to disable the threshold checking. If *threshold* is not specified, returns the current value, which defaults to 0.
|
||||
|
||||
<a name="springLink_onStableVelo" href="#springLink_onStableVelo">#</a> *springLink*.**onStableVelo**([*handler*])
|
||||
|
||||
If *handler* is specified, sets a handler function which will be called at the end of each iteration if the average velocity changes of the system goes below the [threshold](#neighbourSampling_stableVelocity), and returns this force. To remove the handler, change it to null. If *threshold* is not specified, returns the current value, which defaults to null.
|
||||
|
||||
### Neighbour and Sampling
|
||||
|
||||
The neighbour and sampling algorithm simplifies the model by only calculating the spring force of each node against several nearby and random nodes, at the cost of providing less accurate layout. In order for it to work properly, a distance function should be specified.
|
||||
@@ -125,11 +137,11 @@ Returns the average velocity changes of the latest iteration.
|
||||
|
||||
<a name="neighbourSampling_stableVelocity" href="#neighbourSampling_stableVelocity">#</a> *neighbourSampling*.**stableVelocity**([*threshold*])
|
||||
|
||||
If *threshold* is specified, sets a threshold and returns this force. When the average velocity changes of the system goes below the threshold, the function [onStableVelo's handler](#neighbourSampling_latestForce) will be called. Set it to a number less than 0 or remove the [handler](#neighbourSampling_latestForce) to disable the threshold checking. If *threshold* is not specified, returns the current value, which defaults to 0.
|
||||
If *threshold* is specified, sets a threshold and returns this force. When the average velocity changes of the system goes below the threshold, the function [onStableVelo's handler](#neighbourSampling_latestForce) will be called. Set it to 0 or less or remove the [handler](#neighbourSampling_latestForce) to disable the threshold checking. If *threshold* is not specified, returns the current value, which defaults to 0.
|
||||
|
||||
<a name="neighbourSampling_onStableVelo" href="#neighbourSampling_onStableVelo">#</a> *neighbourSampling*.**onStableVelo**([*handler*])
|
||||
|
||||
If *handler* is specified, sets the handler function which will be called at the end of each iteration if the average velocity changes of the system goes below the [threshold](#neighbourSampling_stableVelocity). To remove the handler, change it to null. If *threshold* is not specified, returns the current value, which defaults to null.
|
||||
If *handler* is specified, sets a handler function which will be called at the end of each iteration if the average velocity changes of the system goes below the [threshold](#neighbourSampling_stableVelocity), and returns this force. To remove the handler, change it to null. If *threshold* is not specified, returns the current value, which defaults to null.
|
||||
|
||||
### Hybrid Layout Simulation - TO WRITE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user