JavaScript 2D vector