fassetar / penguins-rising

Web based zombie survival game
https://fassetar.github.io/penguins-rising/
0 stars 0 forks source link

Resizing issue with Canvas #1

Closed fassetar closed 10 years ago

fassetar commented 10 years ago

This happens on mobile devices where the rotating of the screen has the canvas cropped depending on when the page how the page was rendered. This also happens when I am developing with the web tools. Don't forget that the user's gun is no longer at the center.

Possible Solution

With the Jquery call for canvas resizing, have it update the styles and Player's gun position.

fassetar commented 10 years ago

This is actually something I already corrected but kept moving the code around in places. I will have to come up with a better location but for now is located in the index.html.

fassetar commented 10 years ago

This issue repeated itself after I removed Jquery and but has been fix just so long as I use the proper variable of canvas rather than an object that is the point of reference. Later I will look at scaling this or creating it so I can update all objects positions so that they are not out of sync with the rescaling of the canvas.