Closed ghost closed 4 years ago
This is a great improvement, thanks for making this.
I'll soon be updating the airmash.online frontend with this and other recent changes, so I'm taking a second look at the code after playing it for a while. One thing I'm unclear on: why does UI.setScalingFactor
set a 100ms delay before Graphics.resizeRenderer
is called?
IIRC "bad things happen" if you pump resizeRenderer() too quickly. Really stretching, but IIRC either something becomes extremely laggy (on Chrome / intel gfx / ubuntu 19.04 / non-composited WM) or there are permanent artefacts or similar.
Aah, it's also a leftover from the original code. It was originally a 250ms debounce timer for people dragging window resize with their mouse.
btw I inlined the SVG basically because I was bored. It definitely doesn't fit the rest of the codebase
Thanks, sounds good! It's live on airmash.online now. I've added a keybind for quickly returning to the default zoom as well.
Adds a scalingFactor slider and alternate mode quick toggle.
Normal mode:
Alternate:
3 new hotkeys (backspace is lame but 0 felt worse, I rebind it locally to Z since my fire key is \ and drop box key is X):
Overall UI impact:
Normal+alt scaling factor + alt mode toggle state is persisted to settings