3 ms·
Thanks for the hint about the device pixel ratio, I haven't thought of that (although it's 'accidentally alright' if on HighDPI devices rendering doesn't happen
by flohofwoe 10y ago
Thanks for the hint about the device pixel ratio, I haven't thought of that (although it's 'accidentally alright' if on HighDPI devices rendering doesn't happen at full resolution since the GPUs often don't have enough fillrate).
The function implementations are fairly easy to find in the emscripten SDK, e.g.:
emscripten_get_element_css_size(): [1]
emscripten_hide_mouse(): [2]
It's also very easy to inject your own JS 'inline' into C/C++ in case the standard functions don't quite do the right thing with EM_ASM: [3]
[1] https://github.com/kripken/emscripten/blob/6dc4ac5f9e4d8484e273e4dcc554f809738cedd6/src/library_html5.js#L1905 https://github.com/kripken/emscripten/blob/6dc4ac5f9e4d8484e...
[2] https://github.com/kripken/emscripten/blob/6dc4ac5f9e4d8484e273e4dcc554f809738cedd6/src/library_browser.js#L1300 https://github.com/kripken/emscripten/blob/6dc4ac5f9e4d8484e...
[3] https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#calling-javascript-from-c-c https://kripken.github.io/emscripten-site/docs/porting/conne...