Javascript library for 2d geometry