kittykatattack / ga

The world's tiniest, cutest and funnest game engine
451 stars 85 forks source link

Fix incorrect fullscreen check and sineCubed typo #79

Closed cdrch closed 2 years ago

cdrch commented 2 years ago

Fixes a problem introduced with the addition of fullscreen. Previously, the pointer placement had been incorrectly scaled due to the scale constantly resetting, which was caused by an incorrect call to fullscreenEnabled, which checks whether or not a browser can support fullscreen, rather than if it is currently. It has been replaced in this PR with checking if there are any current elements of the page in fullscreen; if none (document.fullscreenElement != null), then it is considered not fullscreen. Otherwise, it is.

This should fix #65 and potentially help with solving #33, #45, and #78.

Also will fix #72's typo.

cdrch commented 2 years ago

Closed due to poor branching cleanliness. New PRs will be opened shortly.