![]() ![]() As you can see I have set a max width and height. It goes off center, and is far too large. If I scale the canvas like this, it has undesired results. WidthToHeight = screenWidth / screenHeight // ASPECT RATIO Is there an easy and efficient way to do it? I have tried to do the following: var maxWidth = 1920 Ĭ.width = screenWidth = window.innerWidth Ĭ.height = screenHeight = window.innerHeight And when someone has a really small screen, they can barely see anything. he problem I am having currently is that when people with a 4k screen play the game, they can easily see the whole map. Basically I want the game to look the same on every device. I understand how to resize the canvas based on screensize, but I want to resize the contents as well. ![]() I am attempting to scale my canvas game dynamically based on screensize. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |