fix loading

This commit is contained in:
redbirdly 2024-06-16 17:24:37 +08:00 committed by GitHub
parent 255c9b4fc6
commit bb53defd92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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;