virtualx-engine/platform/javascript/js/libs
Jamie Pate c2e3971013 Improve performance of screen_get_dpi() in Javascript
Replace a bisect with a single multiplication when calling
screen_get_dpi() in Javascript

Tested the value of
window.matchMedia(`(resolution:${(window.devicePixelRatio*96).toFixed(100)}dpi)`).matches
which is true except for values that cause a lot of rounding errors
(e.g. dpr : 0.3  => resolution: 28.799999999999997dpi)

Even in these cases the value matches the result of the previous
`findDPI()` method.

See also:

6cff589b5b (r81273660)
2022-08-15 21:12:19 -07:00
..
audio.worklet.js Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
library_godot_audio.js Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
library_godot_display.js Improve performance of screen_get_dpi() in Javascript 2022-08-15 21:12:19 -07:00
library_godot_fetch.js Revert "[HTML5] Fetch API now passes credentials." 2022-03-07 12:52:26 +01:00
library_godot_input.js HTML5: Add support for Input.vibrate_handheld() 2022-07-27 22:54:41 +03:00
library_godot_javascript_singleton.js Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
library_godot_os.js [HTML5] Limit the returned OS cpu count to 2. 2022-05-11 00:26:02 +02:00
library_godot_runtime.js Update copyright statements to 2022 2022-01-03 21:27:34 +01:00