traer-js is a particle-based physics engine for JavaScript ported from Jeff Traer's Processing library. This version is intended for use with the HTML5 canvas element.
Cloth example: http://atoi.cc/pub/traer-js/cloth.html
Attraction example: http://atoi.cc/pub/traer-js/attract.html
You should probably be using this more modern version instead: