CNC milling with HTML5 canvas