refactor: update ice data handling and rendering for improved performance

This commit is contained in:
StempunkDev 2026-01-13 18:45:45 +01:00
parent b1a8c042e6
commit a2139f1aee
3 changed files with 9 additions and 52 deletions

View file

@ -1,7 +1,7 @@
"use strict";
// Ice layer data model - separates ice data from SVG rendering
const Ice = (() => {
window.Ice = (function () {
// Initialize ice data structure
function initialize() {
pack.ice = {
@ -60,8 +60,7 @@ const Ice = (() => {
pack.ice.icebergs.push({
cellId,
size,
points,
offset: null
points
});
}
}
@ -77,8 +76,7 @@ const Ice = (() => {
pack.ice.icebergs.push({
cellId,
size,
points,
offset: null
points
});
return pack.ice.icebergs.length - 1; // return index