hacktober-race
hacktober-race copied to clipboard
Error when window resize
When resizing browser window the app doesn't display correctly.
Mhmm that is a little strange, mine doesn't resize like that, it looks like:
I was investigating this issue a little and it appears that when the window resize, canvas is not resizing with it. That is the canvas width and height remain the same as when first setted. Fortunatly p5 has the resizeCanvas
method.
I could make the PR with just that change but when window shrinks after some threshold the game just doesnt look good anymore.
See image below
Tried to fix all this in #35 The terminal now resize automaticly with the window and so do the text inside of it. Also made the player circle resize with the window, the lines still a problem since they are drawn only when receiving data from the server from what i saw, so is not possible for now to make them draw again, it would be necessary save the players position when received from the server and use this saved data to redraw the lines at every window resize.