Robert G. answered 05/17/22
Senior Web Javascript Developer
There isn't a lot of information to go on as far as your question goes, but in the past in order to make canvas responsive, I had to keep an eye on the window resize event.
More details:
https://developer.mozilla.org/en-US/docs/Web/API/Window/resize_event
When the window resizes, you will need to destroy the old canvas, and rebuild it with the new screen size as part of the calculations.