Navigation Menu

Skip to content

Commit

Permalink
make drag force ~ d^2
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Oct 10, 2011
1 parent 51df97c commit 8618da2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/graphPhysics.js
Expand Up @@ -115,6 +115,7 @@ goog.scope(function() {
p.prototype._calcDrag = function(point) {
if (point == this._draggingPoint) {
var delta = goog.math.Vec2.difference(this._draggingCoordinate, point.position);
delta.scale(delta.magnitude() * 0.1);
point.force.add(delta);
}
};
Expand Down

0 comments on commit 8618da2

Please sign in to comment.