canvas general.js file