Simple raycasting HTML5 canvas