mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-04 17:41:23 +01:00
refactor: update ice data handling and rendering for improved performance
This commit is contained in:
parent
b1a8c042e6
commit
a2139f1aee
3 changed files with 9 additions and 52 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue