Javascript Vector for Canvas