Hacker News new | past | comments | ask | show | jobs | submit login

The source code is really small and quite readable. From the source:

      var homeDX=this.homeX-this.x;
      var homeDY=this.homeY-this.y;
      var homeDistance=Math.sqrt(Math.pow(homeDX,2) + Math.pow(homeDY,2));
      var homeForce=homeDistance*0.01;
      var homeAngle=Math.atan2(homeDY,homeDX);

It seems it is just using gravitational like force, where a point is attracted to its original position. So I guess it is a more common effect for particles.



Springs?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: