slab panel

This commit is contained in:
wass08
2026-02-02 11:17:47 +09:00
parent 0613f846ef
commit 72a0e3952a
6 changed files with 200 additions and 19 deletions
@@ -435,7 +435,7 @@ export class SpatialGridManager {
const slabMap = this.slabsByLevel.get(levelId)
if (!slabMap) return 0
let maxElevation = 0
let maxElevation = -Infinity
for (const slab of slabMap.values()) {
if (slab.polygon.length >= 3 && itemOverlapsPolygon(position, dimensions, rotation, slab.polygon, 0.01)) {
const elevation = slab.elevation ?? 0.05
@@ -444,7 +444,7 @@ export class SpatialGridManager {
}
}
}
return maxElevation
return maxElevation === -Infinity ? 0 : maxElevation
}
/**