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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user