@principal-ai/file-city-react 0.5.36 → 0.5.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1398,7 +1398,7 @@ function CityScene({ cityData, onBuildingHover, onBuildingClick, hoveredBuilding
|
|
|
1398
1398
|
x: (cityData.bounds.minX + cityData.bounds.maxX) / 2,
|
|
1399
1399
|
z: (cityData.bounds.minZ + cityData.bounds.maxZ) / 2,
|
|
1400
1400
|
}), [cityData.bounds]);
|
|
1401
|
-
const citySize = Math.
|
|
1401
|
+
const citySize = Math.max(cityData.bounds.maxX - cityData.bounds.minX, cityData.bounds.maxZ - cityData.bounds.minZ);
|
|
1402
1402
|
// Calculate max building height for camera positioning (when adaptCameraToBuildings is true)
|
|
1403
1403
|
const maxBuildingHeight = useMemo(() => {
|
|
1404
1404
|
if (!adaptCameraToBuildings)
|
|
@@ -1522,7 +1522,7 @@ function CityScene({ cityData, onBuildingHover, onBuildingClick, hoveredBuilding
|
|
|
1522
1522
|
}
|
|
1523
1523
|
const centerX = (minX + maxX) / 2;
|
|
1524
1524
|
const centerZ = (minZ + maxZ) / 2;
|
|
1525
|
-
const size = Math.
|
|
1525
|
+
const size = Math.max(maxX - minX, maxZ - minZ);
|
|
1526
1526
|
return { x: centerX, z: centerZ, size };
|
|
1527
1527
|
}
|
|
1528
1528
|
// No auto-focus on highlights - camera only moves with explicit focusDirectory
|
package/package.json
CHANGED
|
@@ -2172,7 +2172,7 @@ function CityScene({
|
|
|
2172
2172
|
[cityData.bounds],
|
|
2173
2173
|
);
|
|
2174
2174
|
|
|
2175
|
-
const citySize = Math.
|
|
2175
|
+
const citySize = Math.max(
|
|
2176
2176
|
cityData.bounds.maxX - cityData.bounds.minX,
|
|
2177
2177
|
cityData.bounds.maxZ - cityData.bounds.minZ,
|
|
2178
2178
|
);
|
|
@@ -2329,7 +2329,7 @@ function CityScene({
|
|
|
2329
2329
|
|
|
2330
2330
|
const centerX = (minX + maxX) / 2;
|
|
2331
2331
|
const centerZ = (minZ + maxZ) / 2;
|
|
2332
|
-
const size = Math.
|
|
2332
|
+
const size = Math.max(maxX - minX, maxZ - minZ);
|
|
2333
2333
|
|
|
2334
2334
|
return { x: centerX, z: centerZ, size };
|
|
2335
2335
|
}
|