2016-11-23 75 views
0

我真的很喜欢http://whois.domaintools.com/的影响,并希望将其整合到一个项目中。在互联网上进行了一些挖掘后,我发现了一个codepen! [www.codepen.io]/thewistedtaste /笔/ GgrWLp。移动节点在悬停的背景

我一直在玩它一段时间,通过改变值我能够调整圆的半径,动画的速度,圈数等。但是,我似乎无法找到如何调整节点可见的鼠标周围的半径。这难道不可能,还是我忽略了正确的价值? 请给我一些建议或有用的链接。谢谢。

回答

1

半径取决于在JS中从196行开始的if/else语句。增加值(200020000等)以增加移动光标时突出显示的节点的范围。

for (var i in points) { 
    // detect points in range 
    if (Math.abs(getDistance(target, points[ i ])) < 2000) { 
     points[ i ].active = 0.2; 
     points[ i ].circle.active = 0.5; 
    } else if (Math.abs(getDistance(target, points[ i ])) < 20000) { 
     points[ i ].active = 0.1; 
     points[ i ].circle.active = 0.3; 
    } else... 
+0

我怎么可能错过了!非常感谢,这就是诀窍。 – Sander