I resized canvas to keep a 16:9 aspect ratio but I'm not sure how to unstretch it

Question: I resized canvas to keep a 16:9 aspect ratio but I’m not sure how to unstretch it. My idea is that a little of the canvas will be offscreen to keep a flush, unstretched look with users with any screen size.

Repl link: https://replit.com/@ColoredHue/BulletPartyio

(Replit Ask took too long so i’m asking here)

1 Like

I am not great in Js, but in other languages there usually is a few lines of code that will resize. Also, I love your projects like the Wendy’s one.

3 Likes

Hi hue
(I have no clue)

2 Likes

Still more helpful than Replit Ask :skull:

1 Like

wdym “unstretch it”, so you want the canvas to fill the screen?

2 Likes

Try using css width and height rather than the html properties…

@hue, you here?

1 Like

necroposter, stop it. get some help.

/j, of course