diff options
author | David Robillard <d@drobilla.net> | 2013-12-31 03:11:02 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-12-31 03:11:02 +0000 |
commit | 334a0f6e487e0a39e3329e339c8750ae91ac03f9 (patch) | |
tree | 7f64d5853ed112bb8b21a364055a3d6ef11a97cc /src | |
parent | 01833010ea5ef7e87a96aa7169ed828dfb1442e7 (diff) | |
download | ganv-334a0f6e487e0a39e3329e339c8750ae91ac03f9.tar.gz ganv-334a0f6e487e0a39e3329e339c8750ae91ac03f9.tar.bz2 ganv-334a0f6e487e0a39e3329e339c8750ae91ac03f9.zip |
FDGL: Tweak variables for better directional layout.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5235 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/Canvas.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 45835e0..ca71017 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -765,10 +765,10 @@ GanvCanvasImpl::layout_iteration() gboolean GanvCanvasImpl::layout_calculate(double dur, bool update) { - static const double SPRING_K = 28.0; + static const double SPRING_K = 48.0; // A light directional force to push sources to the top left - static const double DIR_MAGNITUDE = -1200.0; + static const double DIR_MAGNITUDE = -2800.0; Vector dir = { 0.0, 0.0 }; switch (_gcanvas->direction) { case GANV_DIRECTION_RIGHT: dir.x = DIR_MAGNITUDE; break; @@ -798,7 +798,7 @@ GanvCanvasImpl::layout_calculate(double dur, bool update) const Vector tpos = { coords.x1, coords.y1 }; const Vector hpos = { coords.x2, coords.y2 }; - apply_force(tail, head, edge_force(dir, hpos, tpos, 0.0001, SPRING_K)); + apply_force(tail, head, edge_force(dir, hpos, tpos, 0.000000000001, SPRING_K)); } // Calculate repelling forces between nodes @@ -838,7 +838,7 @@ GanvCanvasImpl::layout_calculate(double dur, bool update) const Vector mouth = { -100000.0, -100000.0 }; node->impl->force = vec_add( node->impl->force, - tide_force(mouth, reg.pos, 10000000000000.0)); + tide_force(mouth, reg.pos, 1000000000000.0)); FOREACH_ITEM(_items, j) { if (i == j || (!GANV_IS_MODULE(*i) && !GANV_IS_CIRCLE(*i))) { |