Update main.js

Fixed wrong bit-mask for need for rendering check and self-nulling of canvas with .lineTo() .