Update index.js

add click event for canvas