mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 02:14:01 +00:00
fix(intro): keep restricted volumes to areas that fit the scene
Fort Bragg's reservation polygon is larger than the scene, which turned every road into a convoy and floated curtain walls past the ground edge. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KqP857pippaUs6konSDfe8
This commit is contained in:
1 file changed
+2
-1
@@ -564,7 +564,8 @@ export function buildCity(d, opts = {}) {
|
||||
const pts = [];
|
||||
for (let i = 1; i < m.length - 1; i += 2) pts.push([m[i], m[i + 1]]);
|
||||
return { name: m[0], pts };
|
||||
});
|
||||
}).filter((p) => p.pts.length > 2 && p.pts.every(([x, y]) => Math.abs(x) < half * 1.35 && Math.abs(y) < half * 1.35));
|
||||
// the reservation itself is bigger than the scene: keep what fits
|
||||
out.milPolys = polys;
|
||||
insideMil = (x, y) => polys.some((p) => pip(x, y, p.pts));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user