Sunday, June 4, 2017

Abiathar Online - Graphics fixed on Chrome

The last time I worked on Abiathar Online, I found that its graphics were messed up on Chrome - the first time a tile was requested, it wouldn't necessarily display until the level was refreshed. I'm still not sure why it was doing that, or why it worked before, but today I made a change that fixed the problem. This Stack Overflow answer taught me that I don't have to make an Image out of the temporary canvas before using it to draw on the main one. Canvases can be drawn on other canvases just fine. So I switched to caching canvases, only converting them to Base64 URLs when displaying them in the selected tile bay. Abiathar Online now appears as it should in both Chrome and Edge.

No comments:

Post a Comment