New course! Every coder should learn Generative AI!
Try a free lesson+ 4
Html button cannot directly control canvas objects. The better way would be using canvas object to create buttons, use it to control any other canvas objects.
Check out this code here, using canvas buttons to control movement of a canvas object.
https://code.sololearn.com/W5Dw5pU0yjxn/?ref=app