Clear out WebGL context when the page is closed?

This seems to make Firefox a bit happier, at least
This commit is contained in:
RedEnchilada 2016-05-14 17:52:19 -05:00
parent fc98c8f3af
commit 8a84157d24

View file

@ -10,6 +10,10 @@ Renderer = (function() {
resolution: 1
});
document.addEventListener("unload", function() {
renderer.destroy(true);
});
PIXI.SCALE_MODES.DEFAULT = PIXI.SCALE_MODES.NEAREST;
document.body.appendChild(renderer.view);