Camera manipulation and point projection in javascript (coffeescript)