js file for canvas