btco / qx82

Tiny Javascript engine for retro games
MIT License
421 stars 19 forks source link

Issues rendering on first initial load in Firefox #3

Closed HoofedEar closed 10 months ago

HoofedEar commented 10 months ago

Hi there, not sure if this is a known issue, but I noticed when loading the examples "Overworld" and "Menu" in Firefox, below is how they first render until a key is pressed. I noticed that this issue only happens on very first render/load, so if you refresh the page it's fine, but if you clear all site data and then refresh, this bug happens again. Nothing appeared in the Inspect console so not sure what could be causing this. Love this project btw! firefox_2p4YWfvvRL firefox_aJcsKEtSQd

btco commented 10 months ago

Ah yes! I saw this happen once and I just confirmed it again. I suspect it's the font not rendering on the first frame due to a race condition of some sort. I will look into it, thanks for reporting!