News for hackers. Stuff that matters.
Re:Show HN: Unity like game editor running in pure WASM by Matheus28 on Tuesday September 26, 2023 @05:39PM (#37666138)
To OP:

The fix is setting canvas width to window.innerWidth * window.devicePixelRatio, and height to window.innerHeight * window.devicePixelRatio. Then use CSS to maximize the canvas on the screen.

Re:Show HN: Unity like game editor running in pure WASM by TrevorSundberg on Tuesday September 26, 2023 @05:54PM (#37666287)
Thanks, I’ll make the fix!
Re:Show HN: Unity like game editor running in pure WASM by TrevorSundberg on Wednesday September 27, 2023 @05:58PM (#37681937)
Fixed: https://github.com/raverie-us/raverie-engine/commit/aa7e1b6c...

Had to take into account the mouse coordinates too since they were not scaled.