lnvis

nanovg lightning network visualizer
git clone git://jb55.com/lnvis
Log | Files | Refs | README | LICENSE

commit 30c347a2acf41879c15277e1ce9d91132f5d84a9
parent 2cfcd269767b2694e35841b549612c4c1e8b8ce9
Author: William Casarin <jb55@jb55.com>
Date:   Sat,  4 Aug 2018 16:21:36 -0700

shrink graph force scale

Diffstat:
Mupdate.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/update.c b/update.c @@ -26,7 +26,8 @@ struct node *hit_node(struct ln *ln) { void update(struct ln *ln, double dt) { u32 i; - static const double friction = 0.97; + static const double friction_coeff = 0.03; + static const double friction = 1.0 - friction_coeff; // click detection if (ln->clicked) { @@ -58,7 +59,7 @@ void update(struct ln *ln, double dt) /* double d = sqrt(dx*dx + dy*dy); */ - const double scale = 0.01; + const double scale = 0.001; n1->vx += dx * scale; n1->vy += dy * scale;