fix loading
This commit is contained in:
parent
255c9b4fc6
commit
bb53defd92
|
|
@ -265,9 +265,9 @@ elements.plasma.tick = function(pixel) {
|
||||||
lightmap[y][x] = { color: plasmaColor };
|
lightmap[y][x] = { color: plasmaColor };
|
||||||
};
|
};
|
||||||
|
|
||||||
// Wait for loading
|
window.addEventListener('load', function() {
|
||||||
// if it loads too soon then width will be undefined
|
initializeLightmap(width, height);
|
||||||
setTimeout(() => { initializeLightmap(width, height); }, 700);
|
});
|
||||||
|
|
||||||
// Add code to functions instead of replacing them
|
// Add code to functions instead of replacing them
|
||||||
let originalTick = tick;
|
let originalTick = tick;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue