Compare commits

..

No commits in common. "263e8ba53555b4cc3635c9e93b1f5de5ae5c9c4d" and "0f31f2556cc2d40c030e5b1fb51416e9bd33756e" have entirely different histories.

View File

@ -81,19 +81,10 @@
store.renderer.ctx = store.renderer.canvas.getContext("2d", {
willReadFrequently: true,
});
if (typeof OffscreenCanvas != "undefined") {
store.renderer.workCanvas = new OffscreenCanvas(
canvas.parentElement.clientWidth,
canvas.parentElement.clientHeight
);
}
// https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas/OffscreenCanvas#Browser_compatibility
// Fallback for when offscreenCanvas is unsupported or disabled (Firefox < 44, default for Firefox?)
else {
store.renderer.workCanvas = document.createElement("canvas");
store.renderer.workCanvas.width = canvas.parentElement.clientWidth;
store.renderer.workCanvas.height = canvas.parentElement.clientHeight;
}
store.renderer.workCanvas = new OffscreenCanvas(
canvas.parentElement.clientWidth,
canvas.parentElement.clientHeight
);
store.renderer.workCtx = store.renderer.workCanvas.getContext("2d", {
willReadFrequently: true,
});