Refactor asset handling in MainScene and improve zone data processing in Outline; clean up console logs in ZoneProperties and List components

This commit is contained in:
2025-08-13 17:54:04 +05:30
parent 4d97bc1ef7
commit 79b11ad2ca
4 changed files with 18 additions and 14 deletions

View File

@@ -24,12 +24,11 @@ const Outline: React.FC = () => {
useEffect(() => {
const updatedZoneList: ZoneData[] = zones?.map((zone: any) => {
const polygon2D = zone.points.map((p: [number, number, number]) => [p[0], p[2],]);
const polygon2D = zone.points.map((p: any) => [p.position[0], p.position[2]]);
const assetsInZone = assets.filter((item: any) => {
const [x, , z] = item.position;
return isPointInsidePolygon([x, z], polygon2D as [number, number][]);
})
const [x, , z] = item.position;
return isPointInsidePolygon([x, z], polygon2D as [number, number][]);
})
.map((item: any) => ({
id: item.modelUuid,
name: item.modelName,
@@ -37,6 +36,7 @@ const Outline: React.FC = () => {
rotation: item.rotation,
}));
return {
id: zone.zoneUuid,
name: zone.zoneName,