From dc1101db535d906a4d50b28fd6f1f55af21e042d Mon Sep 17 00:00:00 2001 From: Poovizhi99 Date: Wed, 26 Mar 2025 18:28:14 +0530 Subject: [PATCH 1/9] added Navmesh Details --- app/package-lock.json | 2080 +++++++++-------- app/package.json | 4 +- app/src/modules/builder/agv/agv.tsx | 1577 +++++++++++++ .../modules/builder/agv/navMeshDetails.tsx | 166 ++ app/src/modules/builder/agv/pathNavigator.tsx | 140 ++ .../modules/builder/agv/polygonGenerator.tsx | 159 ++ app/src/modules/scene/scene.tsx | 3 + app/src/modules/scene/world/world.tsx | 144 +- 8 files changed, 3217 insertions(+), 1056 deletions(-) create mode 100644 app/src/modules/builder/agv/agv.tsx create mode 100644 app/src/modules/builder/agv/navMeshDetails.tsx create mode 100644 app/src/modules/builder/agv/pathNavigator.tsx create mode 100644 app/src/modules/builder/agv/polygonGenerator.tsx diff --git a/app/package-lock.json b/app/package-lock.json index dbeaf5c..c8d940e 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -14,10 +14,12 @@ "@react-three/drei": "^9.113.0", "@react-three/fiber": "^8.17.7", "@react-three/postprocessing": "^2.16.3", + "@recast-navigation/three": "^0.39.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", - "@turf/turf": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/turf": "^7.2.0", "@types/jest": "^27.5.2", "@types/react": "^18.3.5", "@types/react-dom": "^18.3.0", @@ -2014,7 +2016,7 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, + "devOptional": true, "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, @@ -2026,7 +2028,7 @@ "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, + "devOptional": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -3753,6 +3755,41 @@ "three": ">=0.144.0" } }, + "node_modules/@recast-navigation/core": { + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@recast-navigation/core/-/core-0.39.0.tgz", + "integrity": "sha512-l48GHrimIUR+9ugAsjIecdUh5ohHULrFYUn5EqClafV5HJB/cPFBbN4n9HV2jDamCjGRGEhtSpId7NpkhoF0qQ==", + "dependencies": { + "@recast-navigation/wasm": "0.39.0" + } + }, + "node_modules/@recast-navigation/generators": { + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@recast-navigation/generators/-/generators-0.39.0.tgz", + "integrity": "sha512-ymiacmEWK4SGY/FUlr6/n9/FgvA9NikPR57JyCGbteScEG10UYByrPGXJQU/UXuzUhUbmtKlPJAk2KP+MLgxJA==", + "dependencies": { + "@recast-navigation/core": "0.39.0", + "@recast-navigation/wasm": "0.39.0" + } + }, + "node_modules/@recast-navigation/three": { + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@recast-navigation/three/-/three-0.39.0.tgz", + "integrity": "sha512-zk2EnZSoMY1P2uYexGFnfoOG92kUD94B1R+7pz4MMOjcryqCKzGhTSalThyY8SbNi9r4MrKe7Xd50W4vS/1k8A==", + "dependencies": { + "@recast-navigation/core": "0.39.0", + "@recast-navigation/generators": "0.39.0" + }, + "peerDependencies": { + "@types/three": "0.x.x", + "three": "0.x.x" + } + }, + "node_modules/@recast-navigation/wasm": { + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@recast-navigation/wasm/-/wasm-0.39.0.tgz", + "integrity": "sha512-1P/8pqXtwJSVseLBtO0AOdqQe1XnhPFTVvG9FMORFVFunYqkKXxULgni8x3fsutkQisyY+X7YQoIMLvZR4lKFA==" + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -4090,6 +4127,25 @@ "url": "https://github.com/sponsors/gregberge" } }, + "node_modules/@testing-library/dom": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", + "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@testing-library/jest-dom": { "version": "5.17.0", "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.17.0.tgz", @@ -4201,381 +4257,381 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true + "devOptional": true }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true + "devOptional": true }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true + "devOptional": true }, "node_modules/@tsconfig/node16": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true + "devOptional": true }, "node_modules/@turf/along": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/along/-/along-7.1.0.tgz", - "integrity": "sha512-WLgBZJ/B6CcASF6WL7M+COtHlVP0hBrMbrtKyF7KBlicwRuijJZXDtEQA5oLgr+k1b2HqGN+UqH2A0/E719enQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/along/-/along-7.2.0.tgz", + "integrity": "sha512-Cf+d2LozABdb0TJoIcJwFKB+qisJY4nMUW9z6PAuZ9UCH7AR//hy2Z06vwYCKFZKP4a7DRPkOMBadQABCyoYuw==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/bearing": "^7.2.0", + "@turf/destination": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/angle": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/angle/-/angle-7.1.0.tgz", - "integrity": "sha512-YMHEV/YrARsWgWoQuXEWrQMsvB8z67nTMw2eiLZ883V7jwkhWQGvCW6W+/mGgsWQdHppjCZNcKryryhD2GRWVA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/angle/-/angle-7.2.0.tgz", + "integrity": "sha512-b28rs1NO8Dt/MXadFhnpqH7GnEWRsl+xF5JeFtg9+eM/+l/zGrdliPYMZtAj12xn33w22J1X4TRprAI0rruvVQ==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", + "@turf/bearing": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/area": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/area/-/area-7.1.0.tgz", - "integrity": "sha512-w91FEe02/mQfMPRX2pXua48scFuKJ2dSVMF2XmJ6+BJfFiCPxp95I3+Org8+ZsYv93CDNKbf0oLNEPnuQdgs2g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/area/-/area-7.2.0.tgz", + "integrity": "sha512-zuTTdQ4eoTI9nSSjerIy4QwgvxqwJVciQJ8tOPuMHbXJ9N/dNjI7bU8tasjhxas/Cx3NE9NxVHtNpYHL0FSzoA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/bbox": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-7.1.0.tgz", - "integrity": "sha512-PdWPz9tW86PD78vSZj2fiRaB8JhUHy6piSa/QXb83lucxPK+HTAdzlDQMTKj5okRCU8Ox/25IR2ep9T8NdopRA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-7.2.0.tgz", + "integrity": "sha512-wzHEjCXlYZiDludDbXkpBSmv8Zu6tPGLmJ1sXQ6qDwpLE1Ew3mcWqt8AaxfTP5QwDNQa3sf2vvgTEzNbPQkCiA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/bbox-clip": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/bbox-clip/-/bbox-clip-7.1.0.tgz", - "integrity": "sha512-PhZubKCzF/afwStUzODqOJluiCbCw244lCtVhXA9F+Pgkhvk8KvbFdgpPquOZ45OwuktrchSB28BrBkSBiadHw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/bbox-clip/-/bbox-clip-7.2.0.tgz", + "integrity": "sha512-q6RXTpqeUQAYLAieUL1n3J6ukRGsNVDOqcYtfzaJbPW+0VsAf+1cI16sN700t0sekbeU1DH/RRVAHhpf8+36wA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/bbox-polygon": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/bbox-polygon/-/bbox-polygon-7.1.0.tgz", - "integrity": "sha512-fvZB09ErCZOVlWVDop836hmpKaGUmfXnR9naMhS73A/8nn4M3hELbQtMv2R8gXj7UakXCuxS/i9erdpDFZ2O+g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/bbox-polygon/-/bbox-polygon-7.2.0.tgz", + "integrity": "sha512-Aj4G1GAAy26fmOqMjUk0Z+Lcax5VQ9g1xYDbHLQWXvfTsaueBT+RzdH6XPnZ/seEEnZkio2IxE8V5af/osupgA==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/bearing": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-7.1.0.tgz", - "integrity": "sha512-X5lackrZ6FW+YhgjWxwVFRgWD1j4xm4t5VvE6EE6v/1PVaHQ5OCjf6u1oaLx5LSG+gaHUhjTlAHrn9MYPFaeTA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-7.2.0.tgz", + "integrity": "sha512-Jm0Xt3GgHjRrWvBtAGvgfnADLm+4exud2pRlmCYx8zfiKuNXQFkrcTZcOiJOgTfG20Agq28iSh15uta47jSIbg==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/bezier-spline": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/bezier-spline/-/bezier-spline-7.1.0.tgz", - "integrity": "sha512-bhBY70bcVYJEosuW7B/TFtnE5rmPTTpxmJvljhGC0eyM84oNVv7apDBuseb5KdlTOOBIvdD9nIE4qV8lmplp6w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/bezier-spline/-/bezier-spline-7.2.0.tgz", + "integrity": "sha512-7BPkc3ufYB9KLvcaTpTsnpXzh9DZoENxCS0Ms9XUwuRXw45TpevwUpOsa3atO76iKQ5puHntqFO4zs8IUxBaaA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-clockwise": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-7.1.0.tgz", - "integrity": "sha512-H5DYno+gHwZx+VaiC8DUBZXZQlxYecdSvqCfCACWi1uMsKvlht/O+xy65hz2P57lk2smlcV+1ETFVxJlEZduYg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-7.2.0.tgz", + "integrity": "sha512-0fJeFSARxy6ealGBM4Gmgpa1o8msQF87p2Dx5V6uSqzT8VPDegX1NSWl4b7QgXczYa9qv7IAABttdWP0K7Q7eQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-concave": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-concave/-/boolean-concave-7.1.0.tgz", - "integrity": "sha512-IFCN25DI+hvngxIsv4+MPuRJQRl/Lz/xnZgpH82leCn4Jqn5wW7KqKFMz7G4GoKK+93cK5/6ioAxY7hVWBXxJw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-concave/-/boolean-concave-7.2.0.tgz", + "integrity": "sha512-v3dTN04dfO6VqctQj1a+pjDHb6+/Ev90oAR2QjJuAntY4ubhhr7vKeJdk/w+tWNSMKULnYwfe65Du3EOu3/TeA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-contains": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-contains/-/boolean-contains-7.1.0.tgz", - "integrity": "sha512-ldy4j1/RVChYTYjEb4wWaE/JyF1jA87WpsB4eVLic6OcAYJGs7POF1kfKbcdkJJiRBmhI3CXNA+u+m9y4Z/j3g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-contains/-/boolean-contains-7.2.0.tgz", + "integrity": "sha512-dgRQm4uVO5XuLee4PLVH7CFQZKdefUBMIXTPITm2oRIDmPLJKHDOFKQTNkGJ73mDKKBR2lmt6eVH3br6OYrEYg==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-crosses": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-crosses/-/boolean-crosses-7.1.0.tgz", - "integrity": "sha512-LK8UM3AENycuGinLCDaL0QSznGMnD0XsjFDGnY4KehshiL5Zd8ZsPyKmHOPygUJT9DWeH69iLx459lOc+5Vj2w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-crosses/-/boolean-crosses-7.2.0.tgz", + "integrity": "sha512-9GyM4UUWFKQOoNhHVSfJBf5XbPy8Fxfz9djjJNAnm/IOl8NmFUSwFPAjKlpiMcr6yuaAoc9R/1KokS9/eLqPvA==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/polygon-to-line": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-intersect": "^7.2.0", + "@turf/polygon-to-line": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-disjoint": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-disjoint/-/boolean-disjoint-7.1.0.tgz", - "integrity": "sha512-JapOG03kOCoGeYMWgTQjEifhr1nUoK4Os2cX0iC5X9kvZF4qCHeruX8/rffBQDx7PDKQKusSTXq8B1ISFi0hOw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-disjoint/-/boolean-disjoint-7.2.0.tgz", + "integrity": "sha512-xdz+pYKkLMuqkNeJ6EF/3OdAiJdiHhcHCV0ykX33NIuALKIEpKik0+NdxxNsZsivOW6keKwr61SI+gcVtHYcnQ==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/polygon-to-line": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/line-intersect": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/polygon-to-line": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-equal": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-equal/-/boolean-equal-7.1.0.tgz", - "integrity": "sha512-deghtFMApc7fNsdXtZdgYR4gsU+TVfowcv666nrvZbPPsXL6NTYGBhDFmYXsJ8gPTCGT9uT0WXppdgT8diWOxA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-equal/-/boolean-equal-7.2.0.tgz", + "integrity": "sha512-TmjKYLsxXqEmdDtFq3QgX4aSogiISp3/doeEtDOs3NNSR8susOtBEZkmvwO6DLW+g/rgoQJIBR6iVoWiRqkBxw==", "dependencies": { - "@turf/clean-coords": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/clean-coords": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", "geojson-equality-ts": "^1.0.2", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-intersects": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-intersects/-/boolean-intersects-7.1.0.tgz", - "integrity": "sha512-gpksWbb0RT+Z3nfqRfoACY3KEFyv2BPaxJ3L76PH67DhHZviq3Nfg85KYbpuhS64FSm+9tXe4IaKn6EjbHo20g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-intersects/-/boolean-intersects-7.2.0.tgz", + "integrity": "sha512-GLRyLQgK3F14drkK5Qi9Mv7Z9VT1bgQUd9a3DB3DACTZWDSwfh8YZUFn/HBwRkK8dDdgNEXaavggQHcPi1k9ow==", "dependencies": { - "@turf/boolean-disjoint": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/boolean-disjoint": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-overlap": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-overlap/-/boolean-overlap-7.1.0.tgz", - "integrity": "sha512-mJRN0X8JiPm8eDZk5sLvIrsP03A2GId6ijx4VgSE1AvHwV6qB561KlUbWxga2AScocIfv/y/qd2OCs+/TQSZcg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-overlap/-/boolean-overlap-7.2.0.tgz", + "integrity": "sha512-ieM5qIE4anO+gUHIOvEN7CjyowF+kQ6v20/oNYJCp63TVS6eGMkwgd+I4uMzBXfVW66nVHIXjODdUelU+Xyctw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/line-overlap": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-intersect": "^7.2.0", + "@turf/line-overlap": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "geojson-equality-ts": "^1.0.2", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-parallel": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-parallel/-/boolean-parallel-7.1.0.tgz", - "integrity": "sha512-tA84Oux0X91CxUc6c/lZph5W9wUZGNT4fxFOg5Gp1IMTSwtxSYL1LMvKsr/VmMnwdOUkNcqAgU06+t4wBLtDfg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-parallel/-/boolean-parallel-7.2.0.tgz", + "integrity": "sha512-iOtuzzff8nmwv05ROkSvyeGLMrfdGkIi+3hyQ+DH4IVyV37vQbqR5oOJ0Nt3Qq1Tjrq9fvF8G3OMdAv3W2kY9w==", "dependencies": { - "@turf/clean-coords": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/line-segment": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", + "@turf/clean-coords": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/line-segment": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-point-in-polygon": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-7.1.0.tgz", - "integrity": "sha512-mprVsyIQ+ijWTZwbnO4Jhxu94ZW2M2CheqLiRTsGJy0Ooay9v6Av5/Nl3/Gst7ZVXxPqMeMaFYkSzcTc87AKew==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-7.2.0.tgz", + "integrity": "sha512-lvEOjxeXIp+wPXgl9kJA97dqzMfNexjqHou+XHVcfxQgolctoJiRYmcVCWGpiZ9CBf/CJha1KmD1qQoRIsjLaA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", "point-in-polygon-hao": "^1.1.0", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-point-on-line": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-point-on-line/-/boolean-point-on-line-7.1.0.tgz", - "integrity": "sha512-Kd83EjeTyY4kVMAhcW3Lb8aChwh24BUIhmpE9Or8M+ETNsFGzn9M7qtIySJHLRzKAL3letvWSKXKQPuK1AhAzg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-point-on-line/-/boolean-point-on-line-7.2.0.tgz", + "integrity": "sha512-H/bXX8+2VYeSyH8JWrOsu8OGmeA9KVZfM7M6U5/fSqGsRHXo9MyYJ94k39A9kcKSwI0aWiMXVD2UFmiWy8423Q==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-touches": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-touches/-/boolean-touches-7.1.0.tgz", - "integrity": "sha512-qN4LCs3RfVtNAAdn5GpsUFBqoZyAaK9UzSnGSh67GP9sy5M8MEHwM/HAJ5zGWJqQADrczI3U6BRWGLcGfGSz3Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-touches/-/boolean-touches-7.2.0.tgz", + "integrity": "sha512-8qb1CO+cwFATGRGFgTRjzL9aibfsbI91pdiRl7KIEkVdeN/H9k8FDrUA1neY7Yq48IaciuwqjbbojQ16FD9b0w==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-valid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-valid/-/boolean-valid-7.1.0.tgz", - "integrity": "sha512-zq1QCfQEyn+piHlvxxDifjmsJn2xl53i4mnKFYdMQI/i09XiX+Fi/MVM3i2hf3D5AsEPsud8Tk7C7rWNCm4nVw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-valid/-/boolean-valid-7.2.0.tgz", + "integrity": "sha512-xb7gdHN8VV6ivPJh6rPpgxmAEGReiRxqY+QZoEZVGpW2dXcmU1BdY6FA6G/cwvggXAXxJBREoANtEDgp/0ySbA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/boolean-crosses": "^7.1.0", - "@turf/boolean-disjoint": "^7.1.0", - "@turf/boolean-overlap": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-intersect": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-crosses": "^7.2.0", + "@turf/boolean-disjoint": "^7.2.0", + "@turf/boolean-overlap": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-intersect": "^7.2.0", "@types/geojson": "^7946.0.10", "geojson-polygon-self-intersections": "^1.2.1", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/boolean-within": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/boolean-within/-/boolean-within-7.1.0.tgz", - "integrity": "sha512-pgXgKCzYHssADQ1nClB1Q9aWI/dE1elm2jy3B5X59XdoFXKrKDZA+gCHYOYgp2NGO/txzVfl3UKvnxIj54Fa4w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/boolean-within/-/boolean-within-7.2.0.tgz", + "integrity": "sha512-zB3AiF59zQZ27Dp1iyhp9mVAKOFHat8RDH45TZhLY8EaqdEPdmLGvwMFCKfLryQcUDQvmzP8xWbtUR82QM5C4g==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/buffer": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/buffer/-/buffer-7.1.0.tgz", - "integrity": "sha512-QM3JiCMYA19k5ouO8wJtvICX3Y8XntxVpDfHSKhFFidZcCkMTR2PWWOpwS6EoL3t75rSKw/FOLIPLZGtIu963w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/buffer/-/buffer-7.2.0.tgz", + "integrity": "sha512-QH1FTr5Mk4z1kpQNztMD8XBOZfpOXPOtlsxaSAj2kDIf5+LquA6HtJjZrjUngnGtzG5+XwcfyRL4ImvLnFjm5Q==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/center": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/center": "^7.2.0", + "@turf/helpers": "^7.2.0", "@turf/jsts": "^2.7.1", - "@turf/meta": "^7.1.0", - "@turf/projection": "^7.1.0", + "@turf/meta": "^7.2.0", + "@turf/projection": "^7.2.0", "@types/geojson": "^7946.0.10", "d3-geo": "1.7.1" }, @@ -4584,394 +4640,394 @@ } }, "node_modules/@turf/center": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/center/-/center-7.1.0.tgz", - "integrity": "sha512-p9AvBMwNZmRg65kU27cGKHAUQnEcdz8Y7f/i5DvaMfm4e8zmawr+hzPKXaUpUfiTyLs8Xt2W9vlOmNGyH+6X3w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/center/-/center-7.2.0.tgz", + "integrity": "sha512-UTNp9abQ2kuyRg5gCIGDNwwEQeF3NbpYsd1Q0KW9lwWuzbLVNn0sOwbxjpNF4J2HtMOs5YVOcqNvYyuoa2XrXw==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/center-mean": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/center-mean/-/center-mean-7.1.0.tgz", - "integrity": "sha512-NQZB1LUVsyAD+p0+D4huzX2XVnfVx1yEEI9EX602THmi+g+nkge4SK9OMV11ov/Tv8JJ6aVNVPo/cy1vm/LCIQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/center-mean/-/center-mean-7.2.0.tgz", + "integrity": "sha512-NaW6IowAooTJ35O198Jw3U4diZ6UZCCeJY+4E+WMLpks3FCxMDSHEfO2QjyOXQMGWZnVxVelqI5x9DdniDbQ+A==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/center-median": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/center-median/-/center-median-7.1.0.tgz", - "integrity": "sha512-jx4/Ql5+v41Cd0J/gseNCUbLTzWUT2LUaiXn8eFWDrvmEgqHIx7KJcGcJd5HzV+9zJwng4AXxyh5NMvUR0NjwA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/center-median/-/center-median-7.2.0.tgz", + "integrity": "sha512-/CgVyHNG4zAoZpvkl7qBCe4w7giWNVtLyTU5PoIfg1vWM4VpYw+N7kcBBH46bbzvVBn0vhmZr586r543EwdC/A==", "dependencies": { - "@turf/center-mean": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/center-mean": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/center-of-mass": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/center-of-mass/-/center-of-mass-7.1.0.tgz", - "integrity": "sha512-j38oBlj7LBoCjZbrIo8EoHVGhk7UQmMLQ1fe8ZPAF9pd05XEL1qxyHKZKdQ/deGISiaEhXCyfLNrKAHAuy25RA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/center-of-mass/-/center-of-mass-7.2.0.tgz", + "integrity": "sha512-ij3pmG61WQPHGTQvOziPOdIgwTMegkYTwIc71Gl7xn4C0vWH6KLDSshCphds9xdWSXt2GbHpUs3tr4XGntHkEQ==", "dependencies": { - "@turf/centroid": "^7.1.0", - "@turf/convex": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/centroid": "^7.2.0", + "@turf/convex": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/centroid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/centroid/-/centroid-7.1.0.tgz", - "integrity": "sha512-1Y1b2l+ZB1CZ+ITjUCsGqC4/tSjwm/R4OUfDztVqyyCq/VvezkLmTNqvXTGXgfP0GXkpv68iCfxF5M7QdM5pJQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/centroid/-/centroid-7.2.0.tgz", + "integrity": "sha512-yJqDSw25T7P48au5KjvYqbDVZ7qVnipziVfZ9aSo7P2/jTE7d4BP21w0/XLi3T/9bry/t9PR1GDDDQljN4KfDw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/circle": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/circle/-/circle-7.1.0.tgz", - "integrity": "sha512-6qhF1drjwH0Dg3ZB9om1JkWTJfAqBcbtIrAj5UPlrAeHP87hGoCO2ZEsFEAL9Q18vntpivT89Uho/nqQUjJhYw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/circle/-/circle-7.2.0.tgz", + "integrity": "sha512-1AbqBYtXhstrHmnW6jhLwsv7TtmT0mW58Hvl1uZXEDM1NCVXIR50yDipIeQPjrCuJ/Zdg/91gU8+4GuDCAxBGA==", "dependencies": { - "@turf/destination": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/destination": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/clean-coords": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/clean-coords/-/clean-coords-7.1.0.tgz", - "integrity": "sha512-q1U8UbRVL5cRdwOlNjD8mad8pWjFGe0s4ihg1pSiVNq7i47WASJ3k20yZiUFvuAkyNjV0rZ/A7Jd7WzjcierFg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/clean-coords/-/clean-coords-7.2.0.tgz", + "integrity": "sha512-+5+J1+D7wW7O/RDXn46IfCHuX1gIV1pIAQNSA7lcDbr3HQITZj334C4mOGZLEcGbsiXtlHWZiBtm785Vg8i+QQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/clone": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-7.1.0.tgz", - "integrity": "sha512-5R9qeWvL7FDdBIbEemd0eCzOStr09oburDvJ1hRiPCFX6rPgzcZBQ0gDmZzoF4AFcNLb5IwknbLZjVLaUGWtFA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-7.2.0.tgz", + "integrity": "sha512-JlGUT+/5qoU5jqZmf6NMFIoLDY3O7jKd53Up+zbpJ2vzUp6QdwdNzwrsCeONhynWM13F0MVtPXH4AtdkrgFk4g==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/clusters": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/clusters/-/clusters-7.1.0.tgz", - "integrity": "sha512-7CY3Ai+5V6q2O9/IgqLpJQrmrTy7aUJjTW1iRan8Tz3WixvxyJHeS3iyRy8Oc0046chQIaHLtyTgKVt2QdsPSA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/clusters/-/clusters-7.2.0.tgz", + "integrity": "sha512-sKOrIKHHtXAuTKNm2USnEct+6/MrgyzMW42deZ2YG2RRKWGaaxHMFU2Yw71Yk4DqStOqTIBQpIOdrRuSOwbuQw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/clusters-dbscan": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/clusters-dbscan/-/clusters-dbscan-7.1.0.tgz", - "integrity": "sha512-BmrBTOEaKN5FIED6b3yb3V3ejfK0A2Q3pT9/ji3mcRLJiBaRGeiN5V6gtGXe7PeMYdoqhHykU5Ye2uUtREWRdQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/clusters-dbscan/-/clusters-dbscan-7.2.0.tgz", + "integrity": "sha512-VWVUuDreev56g3/BMlnq/81yzczqaz+NVTypN5CigGgP67e+u/CnijphiuhKjtjDd/MzGjXgEWBJc26Y6LYKAw==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "rbush": "^3.0.1", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/clusters-kmeans": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/clusters-kmeans/-/clusters-kmeans-7.1.0.tgz", - "integrity": "sha512-M8cCqR6iE1jDSUF/UU9QdPUFrobZS2fo59TfF1IRHZ2G1EjbcK4GzZcUfmQS6DZraGudYutpMYIuNdm1dPMqdQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/clusters-kmeans/-/clusters-kmeans-7.2.0.tgz", + "integrity": "sha512-BxQdK8jc8Mwm9yoClCYkktm4W004uiQGqb/i/6Y7a8xqgJITWDgTu/cy//wOxAWPk4xfe6MThjnqkszWW8JdyQ==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "skmeans": "0.9.7", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/collect": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/collect/-/collect-7.1.0.tgz", - "integrity": "sha512-6indMWLiKeBh4AsioNeFeFnO0k9U5CBsWAFEje6tOEFI4c+P7LF9mNA9z91H8KkrhegR9XNO5Vm2rmdY63aYXw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/collect/-/collect-7.2.0.tgz", + "integrity": "sha512-zRVGDlYS8Bx/Zz4vnEUyRg4dmqHhkDbW/nIUIJh657YqaMj1SFi4Iv2i9NbcurlUBDJFkpuOhCvvEvAdskJ8UA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", "rbush": "^3.0.1", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/combine": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/combine/-/combine-7.1.0.tgz", - "integrity": "sha512-Xl7bGKKjgzIq2T/IemS6qnIykyuxU6cMxKtz+qLeWJGoNww/BllwxXePSV+dWRPXZTFFj96KIhBXAW0aUjAQKQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/combine/-/combine-7.2.0.tgz", + "integrity": "sha512-VEjm3IvnbMt3IgeRIhCDhhQDbLqCU1/5uN1+j1u6fyA095pCizPThGp4f/COSzC3t1s/iiV+fHuDsB6DihHffQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/concave": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/concave/-/concave-7.1.0.tgz", - "integrity": "sha512-aSid53gYRee4Tjc4pfeI3KI+RoBUnL/hRMilxIPduagTgZZS+cvvk01OQWBKm5UTVfHRGuy0XIqnK8y9RFinDQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/concave/-/concave-7.2.0.tgz", + "integrity": "sha512-cpaDDlumK762kdadexw5ZAB6g/h2pJdihZ+e65lbQVe3WukJHAANnIEeKsdFCuIyNKrwTz2gWu5ws+OpjP48Yw==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/tin": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/tin": "^7.2.0", "@types/geojson": "^7946.0.10", "topojson-client": "3.x", "topojson-server": "3.x", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/convex": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/convex/-/convex-7.1.0.tgz", - "integrity": "sha512-w9fUMZYE36bLrEWEj7L7aVMCB7NBtr2o8G+avRvUIwF4DPqbtcjlcZE9EEBfq44uYdn+/Pke6Iq42T/zyD/cpg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/convex/-/convex-7.2.0.tgz", + "integrity": "sha512-HsgHm+zHRE8yPCE/jBUtWFyaaBmpXcSlyHd5/xsMhSZRImFzRzBibaONWQo7xbKZMISC3Nc6BtUjDi/jEVbqyA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "concaveman": "^1.2.1", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/destination": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-7.1.0.tgz", - "integrity": "sha512-97XuvB0iaAiMg86hrnZ529WwP44TQAA9mmI5PMlchACiA4LFrEtWjjDzvO6234coieoqhrw6dZYcJvd5O2PwrQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-7.2.0.tgz", + "integrity": "sha512-8DUxtOO0Fvrh1xclIUj3d9C5WS20D21F5E+j+X9Q+ju6fcM4huOqTg5ckV1DN2Pg8caABEc5HEZJnGch/5YnYQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/difference": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-7.1.0.tgz", - "integrity": "sha512-+JVzdskICQ8ULKQ9CpWUM5kBvoXxN4CO78Ez/Ki3/7NXl7+HM/nb12B0OyM8hkJchpb8TsOi0YwyJiKMqEpTBA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-7.2.0.tgz", + "integrity": "sha512-NHKD1v3s8RX+9lOpvHJg6xRuJOKiY3qxHhz5/FmE0VgGqnCkE7OObqWZ5SsXG+Ckh0aafs5qKhmDdDV/gGi6JA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "polygon-clipping": "^0.15.3", - "tslib": "^2.6.2" + "polyclip-ts": "^0.16.8", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/dissolve": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/dissolve/-/dissolve-7.1.0.tgz", - "integrity": "sha512-fyOnCSYVUZ8SF9kt9ROnQYlkJTE0hpWSoWwbMZQCAR7oVZVPiuPq7eIbzTP+k5jzEAnofsqoGs5qVDTjHcWMiw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/dissolve/-/dissolve-7.2.0.tgz", + "integrity": "sha512-gPG5TE3mAYuZqBut8tPYCKwi4hhx5Cq0ALoQMB9X0hrVtFIKrihrsj98XQM/5pL/UIpAxQfwisQvy6XaOFaoPA==", "dependencies": { - "@turf/flatten": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/flatten": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "polygon-clipping": "^0.15.3", - "tslib": "^2.6.2" + "polyclip-ts": "^0.16.8", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/distance": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-7.1.0.tgz", - "integrity": "sha512-hhNHhxCHB3ddzAGCNY4BtE29OZh+DAJPvUapQz+wOjISnlwvMcwLKvslgHWSYF536QDVe/93FEU2q67+CsZTPA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-7.2.0.tgz", + "integrity": "sha512-HBjjXIgEcD/wJYjv7/6OZj5yoky2oUvTtVeIAqO3lL80XRvoYmVg6vkOIu6NswkerwLDDNT9kl7+BFLJoHbh6Q==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/distance-weight": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/distance-weight/-/distance-weight-7.1.0.tgz", - "integrity": "sha512-8m6s4y8Yyt6r3itf44yAJjXC+62UkrkhOpskIfaE0lHcBcvZz9wjboHoBf3bS4l/42E4StcanbFZdjOpODAdZw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/distance-weight/-/distance-weight-7.2.0.tgz", + "integrity": "sha512-NeoyV0fXDH+7nIoNtLjAoH9XL0AS1pmTIyDxEE6LryoDTsqjnuR0YQxIkLCCWDqECoqaOmmBqpeWONjX5BwWCg==", "dependencies": { - "@turf/centroid": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/centroid": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/ellipse": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/ellipse/-/ellipse-7.1.0.tgz", - "integrity": "sha512-AfOahUmStDExWGPg8ZWxxkgom+fdJs7Mn9DzZH+fV/uZ+je1bLQpbPCUu9/ev6u/HhbYGl4VAL/CeQzjOyy6LQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/ellipse/-/ellipse-7.2.0.tgz", + "integrity": "sha512-/Y75S5hE2+xjnTw4dXpQ5r/Y2HPM4xrwkPRCCQRpuuboKdEvm42azYmh7isPnMnBTVcmGb9UmGKj0HHAbiwt1g==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/rhumb-destination": "^7.1.0", - "@turf/transform-rotate": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/rhumb-destination": "^7.2.0", + "@turf/transform-rotate": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/envelope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/envelope/-/envelope-7.1.0.tgz", - "integrity": "sha512-WeLQse9wuxsxhzSqrJA6Ha7rLWnLKgdKY9cfxmJKHSpgqcJyNk60m7+T3UpI/nkGwpfbpeyB3EGC1EWPbxiDUg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/envelope/-/envelope-7.2.0.tgz", + "integrity": "sha512-xOMtDeNKHwUuDfzQeoSNmdabsP0/IgVDeyzitDe/8j9wTeW+MrKzVbGz7627PT3h6gsO+2nUv5asfKtUbmTyHA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/bbox-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/bbox-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/explode": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/explode/-/explode-7.1.0.tgz", - "integrity": "sha512-To+GUbU6HtcHZ8S0w/dw1EbdQIOCXALTr6Ug5/IFg8hIBMJelDpVr3Smwy8uqhDRFinY2eprBwQnDPcd10eCqA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/explode/-/explode-7.2.0.tgz", + "integrity": "sha512-jyMXg93J1OI7/65SsLE1k9dfQD3JbcPNMi4/O3QR2Qb3BAs2039oFaSjtW+YqhMqVC4V3ZeKebMcJ8h9sK1n+A==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/flatten": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/flatten/-/flatten-7.1.0.tgz", - "integrity": "sha512-Kb23pqEarcLsdBqnQcK0qTrSMiWNTVb9tOFrNlZc66DIhDLAdpOKG4eqk00CMoUzWTixlnawDgJRqcStRrR4WA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/flatten/-/flatten-7.2.0.tgz", + "integrity": "sha512-q38Qsqr4l7mxp780zSdn0gp/WLBX+sa+gV6qIbDQ1HKCrrPK8QQJmNx7gk1xxEXVot6tq/WyAPysCQdX+kLmMA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/flip": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/flip/-/flip-7.1.0.tgz", - "integrity": "sha512-vac73W8WblzzNFanzWYLBzWDIcqc5xczOrtEO07RDEiKEI3Heo0471Jed3v9W506uuOX6/HAiCjXbRjTLjiLfw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/flip/-/flip-7.2.0.tgz", + "integrity": "sha512-X0TQ0U/UYh4tyXdLO5itP1sO2HOvfrZC0fYSWmTfLDM14jEPkEK8PblofznfBygL+pIFtOS2is8FuVcp5XxYpQ==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/geojson-rbush": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/geojson-rbush/-/geojson-rbush-7.1.0.tgz", - "integrity": "sha512-j1C7Ohlxa1z644bNOpgibcFGaDLgLXGLOzwF1tfQaP5y7E4PJQUXL0DWIgNb3Ke7gZC05LPHM25a5TRReUfFBQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/geojson-rbush/-/geojson-rbush-7.2.0.tgz", + "integrity": "sha512-ST8fLv+EwxVkDgsmhHggM0sPk2SfOHTZJkdgMXVFT7gB9o4lF8qk4y4lwvCCGIfFQAp2yv/PN5EaGMEKutk6xw==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "rbush": "^3.0.1" }, @@ -4980,12 +5036,12 @@ } }, "node_modules/@turf/great-circle": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/great-circle/-/great-circle-7.1.0.tgz", - "integrity": "sha512-92q5fqUp5oW+FYekUIrUVR5PZBWbOV6NHKHPIiNahiPvtkpZItbbjoO+tGn5+2i8mxZP9FGOthayJe4V0a1xkg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/great-circle/-/great-circle-7.2.0.tgz", + "integrity": "sha512-n30OiADyOKHhor0aXNgYfXQYXO3UtsOKmhQsY1D89/Oh1nCIXG/1ZPlLL9ZoaRXXBTUBjh99a+K8029NQbGDhw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -4993,49 +5049,49 @@ } }, "node_modules/@turf/helpers": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.1.0.tgz", - "integrity": "sha512-dTeILEUVeNbaEeoZUOhxH5auv7WWlOShbx7QSd4s0T4Z0/iz90z9yaVCtZOLbU89umKotwKaJQltBNO9CzVgaQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.2.0.tgz", + "integrity": "sha512-cXo7bKNZoa7aC7ydLmUR02oB3IgDe7MxiPuRz3cCtYQHn+BJ6h1tihmamYDWWUlPHgSNF0i3ATc4WmDECZafKw==", "dependencies": { "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/hex-grid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/hex-grid/-/hex-grid-7.1.0.tgz", - "integrity": "sha512-I+Apx0smOPkMzaS5HHL44YOxSkSUvrz+wtSIETsDFWWLT2xKNkaaEcYU5MkgSoEfQsj082M7EkOIIpocXlA3kg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/hex-grid/-/hex-grid-7.2.0.tgz", + "integrity": "sha512-Yo2yUGxrTCQfmcVsSjDt0G3Veg8YD26WRd7etVPD9eirNNgXrIyZkbYA7zVV/qLeRWVmYIKRXg1USWl7ORQOGA==", "dependencies": { - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/intersect": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/intersect": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/interpolate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/interpolate/-/interpolate-7.1.0.tgz", - "integrity": "sha512-VWec1OW9gHZLPS3yYkUXAHKMGQuYO4aqh8WCltT7Ym4efrKqkSOE5T+mBqO68QgcL8nY4kiNa8lxwXd0SfXDSA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/interpolate/-/interpolate-7.2.0.tgz", + "integrity": "sha512-Ifgjm1SEo6XujuSAU6lpRMvoJ1SYTreil1Rf5WsaXj16BQJCedht/4FtWCTNhSWTwEz2motQ1WNrjTCuPG94xA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/hex-grid": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/point-grid": "^7.1.0", - "@turf/square-grid": "^7.1.0", - "@turf/triangle-grid": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/hex-grid": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/point-grid": "^7.2.0", + "@turf/square-grid": "^7.2.0", + "@turf/triangle-grid": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5043,130 +5099,130 @@ } }, "node_modules/@turf/intersect": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/intersect/-/intersect-7.1.0.tgz", - "integrity": "sha512-T0VhI6yhptX9EoMsuuBETyqV+edyq31SUC8bfuM6kdJ5WwJ0EvUfQoC+3bhMtCOn60lHawrUuGBgW+vCO8KGMg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/intersect/-/intersect-7.2.0.tgz", + "integrity": "sha512-81GMzKS9pKqLPa61qSlFxLFeAC8XbwyCQ9Qv4z6o5skWk1qmMUbEHeMqaGUTEzk+q2XyhZ0sju1FV4iLevQ/aw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "polygon-clipping": "^0.15.3", - "tslib": "^2.6.2" + "polyclip-ts": "^0.16.8", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/invariant": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-7.1.0.tgz", - "integrity": "sha512-OCLNqkItBYIP1nE9lJGuIUatWGtQ4rhBKAyTfFu0z8npVzGEYzvguEeof8/6LkKmTTEHW53tCjoEhSSzdRh08Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-7.2.0.tgz", + "integrity": "sha512-kV4u8e7Gkpq+kPbAKNC21CmyrXzlbBgFjO1PhrHPgEdNqXqDawoZ3i6ivE3ULJj2rSesCjduUaC/wyvH/sNr2Q==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/isobands": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/isobands/-/isobands-7.1.0.tgz", - "integrity": "sha512-iMLTOP/K5C05AttF4N1WeV+KrY4O5VWW/abO0N86XCWh1OeqmIUgqIBKEmhDzttAqC0UK2YrUfj0lI1Ez1fYZQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/isobands/-/isobands-7.2.0.tgz", + "integrity": "sha512-lYoHeRieFzpBp29Jh19QcDIb0E+dzo/K5uwZuNga4wxr6heNU0AfkD4ByAHYIXHtvmp4m/JpSKq/2N6h/zvBkg==", "dependencies": { - "@turf/area": "^7.1.0", - "@turf/bbox": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/explode": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/area": "^7.2.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/explode": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "marchingsquares": "^1.3.3", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/isolines": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/isolines/-/isolines-7.1.0.tgz", - "integrity": "sha512-V6QTHXBT5ZsL3s9ZVBJgHYtz3gCFKqNnQLysNE02LE0fVVqaSao3sFrcpghmdDxf0hBCDK8lZVvyRGO6o32LHQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/isolines/-/isolines-7.2.0.tgz", + "integrity": "sha512-4ZXKxvA/JKkxAXixXhN3UVza5FABsdYgOWXyYm3L5ryTPJVOYTVSSd9A+CAVlv9dZc3YdlsqMqLTXNOOre/kwg==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "marchingsquares": "^1.3.3", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/jsts": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@turf/jsts/-/jsts-2.7.1.tgz", - "integrity": "sha512-+nwOKme/aUprsxnLSfr2LylV6eL6T1Tuln+4Hl92uwZ8FrmjDRCH5Bi1LJNVfWCiYgk8+5K+t2zDphWNTsIFDA==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@turf/jsts/-/jsts-2.7.2.tgz", + "integrity": "sha512-zAezGlwWHPyU0zxwcX2wQY3RkRpwuoBmhhNE9HY9kWhFDkCxZ3aWK5URKwa/SWKJbj9aztO+8vtdiBA28KVJFg==", "dependencies": { "jsts": "2.7.1" } }, "node_modules/@turf/kinks": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/kinks/-/kinks-7.1.0.tgz", - "integrity": "sha512-KKLYUsyJPU17fODwA81mhHzFYGQYocdbk9NxDPCcdRHvxzM8t95lptkGx/2k/9rXBs1DK7NmyzI4m7zDO0DK7g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/kinks/-/kinks-7.2.0.tgz", + "integrity": "sha512-BtxDxGewJR0Q5WR9HKBSxZhirFX+GEH1rD7/EvgDsHS8e1Y5/vNQQUmXdURjdPa4StzaUBsWRU5T3A356gLbPA==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/length": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/length/-/length-7.1.0.tgz", - "integrity": "sha512-wUJj9WLKEudG1ngNao2ZwD+Dt6UkvWIbubuJ6lR6FndFDL3iezFhNGy0IXS+0xH9kXi2apiTnM9Vk5+i8BTEvQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/length/-/length-7.2.0.tgz", + "integrity": "sha512-LBmYN+iCgVtWNLsckVnpQIJENqIIPO63mogazMp23lrDGfWXu07zZQ9ZinJVO5xYurXNhc/QI2xxoqt2Xw90Ig==", "dependencies": { - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/line-arc": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-arc/-/line-arc-7.1.0.tgz", - "integrity": "sha512-9/bM34PozTyJ5FXXPAzl/j0RpcTImgMFJZ0WhH0pZZEZRum6P0rJnENt2E2qI441zeozQ9H6X5DCiJogDmRUEw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-arc/-/line-arc-7.2.0.tgz", + "integrity": "sha512-kfWzA5oYrTpslTg5fN50G04zSypiYQzjZv3FLjbZkk6kta5fo4JkERKjTeA8x4XNojb+pfmjMBB0yIh2w2dDRw==", "dependencies": { - "@turf/circle": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/circle": "^7.2.0", + "@turf/destination": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/line-chunk": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-chunk/-/line-chunk-7.1.0.tgz", - "integrity": "sha512-1lIUfqAQvCWAuUNC2ip8UYmM5kDltXOidLPW45Ee1OAIKYGBeFNtjwnxc0mQ40tnfTXclTYLDdOOP9LShspT9w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-chunk/-/line-chunk-7.2.0.tgz", + "integrity": "sha512-1ODyL5gETtWSL85MPI0lgp/78vl95M39gpeBxePXyDIqx8geDP9kXfAzctuKdxBoR4JmOVM3NT7Fz7h+IEkC+g==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/length": "^7.1.0", - "@turf/line-slice-along": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/length": "^7.2.0", + "@turf/line-slice-along": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5174,27 +5230,27 @@ } }, "node_modules/@turf/line-intersect": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-7.1.0.tgz", - "integrity": "sha512-JI3dvOsAoCqd4vUJ134FIzgcC42QpC/tBs+b4OJoxWmwDek3REv4qGaZY6wCg9X4hFSlCKFcnhMIQQZ/n720Qg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-7.2.0.tgz", + "integrity": "sha512-GhCJVEkc8EmggNi85EuVLoXF5T5jNVxmhIetwppiVyJzMrwkYAkZSYB3IBFYGUUB9qiNFnTwungVSsBV/S8ZiA==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", "sweepline-intersections": "^1.5.0", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/line-offset": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-offset/-/line-offset-7.1.0.tgz", - "integrity": "sha512-pz6irzhiQlJurU7DoXada6k3ei7PzY+VpsE/Wotm0D2KEAnoxqum2WK0rqqrhKPHKn+xpUGsHN9W/6K+qtmaHg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-offset/-/line-offset-7.2.0.tgz", + "integrity": "sha512-1+OkYueDCbnEWzbfBh3taVr+3SyM2bal5jfnSEuDiLA6jnlScgr8tn3INo+zwrUkPFZPPAejL1swVyO5TjUahw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5202,48 +5258,48 @@ } }, "node_modules/@turf/line-overlap": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-overlap/-/line-overlap-7.1.0.tgz", - "integrity": "sha512-BdHuEoFAtqvVw3LkjCdivG035nfuwZuxji2ijst+mkmDnlv7uwSBudJqcDGjU6up2r8P1mXChS4im4xjUz+lwg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-overlap/-/line-overlap-7.2.0.tgz", + "integrity": "sha512-NNn7/jg53+N10q2Kyt66bEDqN3101iW/1zA5FW7J6UbKApDFkByh+18YZq1of71kS6oUYplP86WkDp16LFpqqw==", "dependencies": { - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/geojson-rbush": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-segment": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/nearest-point-on-line": "^7.1.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/geojson-rbush": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-segment": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/nearest-point-on-line": "^7.2.0", "@types/geojson": "^7946.0.10", "fast-deep-equal": "^3.1.3", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/line-segment": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-7.1.0.tgz", - "integrity": "sha512-9rgIIH6ZzC3IiWxDQtKsq+j6eu8fRinMkJeusfI9HqOTm4vO02Ll4F/FigjOMOO/6X3TJ+Pqe3gS99TUaBINkw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-7.2.0.tgz", + "integrity": "sha512-E162rmTF9XjVN4rINJCd15AdQGCBlNqeWN3V0YI1vOUpZFNT2ii4SqEMCcH2d+5EheHLL8BWVwZoOsvHZbvaWA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/line-slice": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-slice/-/line-slice-7.1.0.tgz", - "integrity": "sha512-44xcjgMQxTa7tTAZlSD3t1cFjHi5SCfAqjg1ONv45EYKsQSonPaxD7LGzCbU5pR2RJjx3R7QRJx2G88hnGcXjQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-slice/-/line-slice-7.2.0.tgz", + "integrity": "sha512-bHotzZIaU1GPV3RMwttYpDrmcvb3X2i1g/WUttPZWtKrEo2VVAkoYdeZ2aFwtogERYS4quFdJ/TDzAtquBC8WQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/nearest-point-on-line": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/nearest-point-on-line": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5251,14 +5307,14 @@ } }, "node_modules/@turf/line-slice-along": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-slice-along/-/line-slice-along-7.1.0.tgz", - "integrity": "sha512-UwfnFORZnu4xdnuRXiQM3ODa8f9Q0FBjQF/XHNsPEI/xxmnwgQj3MZiULbAeHUbtU/7psTC7gEjfE3Lf0tcKQw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-slice-along/-/line-slice-along-7.2.0.tgz", + "integrity": "sha512-4/gPgP0j5Rp+1prbhXqn7kIH/uZTmSgiubUnn67F8nb9zE+MhbRglhSlRYEZxAVkB7VrGwjyolCwvrROhjHp2A==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bearing": "^7.2.0", + "@turf/destination": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5266,20 +5322,20 @@ } }, "node_modules/@turf/line-split": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-split/-/line-split-7.1.0.tgz", - "integrity": "sha512-QqUAmtlrnEu75cpLOmpEuiYU63BeVwpSKOBllBbu5gkP+7H/WBM/9fh7J0VgHNFHzqZCKiu8v4158k+CZr0QAg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-split/-/line-split-7.2.0.tgz", + "integrity": "sha512-yJTZR+c8CwoKqdW/aIs+iLbuFwAa3Yan+EOADFQuXXIUGps3bJUXx/38rmowNoZbHyP1np1+OtrotyHu5uBsfQ==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/geojson-rbush": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/line-segment": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/nearest-point-on-line": "^7.1.0", - "@turf/square": "^7.1.0", - "@turf/truncate": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/geojson-rbush": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-intersect": "^7.2.0", + "@turf/line-segment": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/nearest-point-on-line": "^7.2.0", + "@turf/square": "^7.2.0", + "@turf/truncate": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5287,42 +5343,42 @@ } }, "node_modules/@turf/line-to-polygon": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/line-to-polygon/-/line-to-polygon-7.1.0.tgz", - "integrity": "sha512-n/IWBRbo+l4XDTz4sfQsQm5bU9xex8KrthK397jQasd7a9PiOKGon9Z1t/lddTJhND6ajVyJ3hl+eZMtpQaghQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/line-to-polygon/-/line-to-polygon-7.2.0.tgz", + "integrity": "sha512-iKpJqc7EYc5NvlD4KaqrKKO6mXR7YWO/YwtW60E2FnsF/blnsy9OfAOcilYHgH3S/V/TT0VedC7DW7Kgjy2EIA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/mask": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/mask/-/mask-7.1.0.tgz", - "integrity": "sha512-d+u3IIiRhe17TDfP/+UMn9qRlJYPJpK7sj6WorsssluGi0yIG/Z24uWpcLskWKSI8NNgkIbDrp+GIYkJi2t7SA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/mask/-/mask-7.2.0.tgz", + "integrity": "sha512-ulJ6dQqXC0wrjIoqFViXuMUdIPX5Q6GPViZ3kGfeVijvlLM7kTFBsZiPQwALSr5nTQg4Ppf3FD0Jmg8IErPrgA==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "polygon-clipping": "^0.15.3", - "tslib": "^2.6.2" + "polyclip-ts": "^0.16.8", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/meta": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-7.1.0.tgz", - "integrity": "sha512-ZgGpWWiKz797Fe8lfRj7HKCkGR+nSJ/5aKXMyofCvLSc2PuYJs/qyyifDPWjASQQCzseJ7AlF2Pc/XQ/3XkkuA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-7.2.0.tgz", + "integrity": "sha512-igzTdHsQc8TV1RhPuOLVo74Px/hyPrVgVOTgjWQZzt3J9BVseCdpfY/0cJBdlSRI4S/yTmmHl7gAqjhpYH5Yaw==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10" }, "funding": { @@ -5330,787 +5386,804 @@ } }, "node_modules/@turf/midpoint": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/midpoint/-/midpoint-7.1.0.tgz", - "integrity": "sha512-uiUU9TwRZOCeiTUn8+7oE6MJUvclfq+n6KQ5VCMTZXiRUJjPu7nDLpBle1t2WSv7/w7O0kSQ4FfKXh0gHnkJOw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/midpoint/-/midpoint-7.2.0.tgz", + "integrity": "sha512-AMn5S9aSrbXdE+Q4Rj+T5nLdpfpn+mfzqIaEKkYI021HC0vb22HyhQHsQbSeX+AWcS4CjD1hFsYVcgKI+5qCfw==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/bearing": "^7.2.0", + "@turf/destination": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/moran-index": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/moran-index/-/moran-index-7.1.0.tgz", - "integrity": "sha512-xsvAr3IRF/C6PlRMoN/ANrRx6c3QFUJgBCIVfI7re+Lkdprrzgw1HZA48ZjP4F91xbhgA1scnRgQdHFi2vO2SA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/moran-index/-/moran-index-7.2.0.tgz", + "integrity": "sha512-Aexh1EmXVPJhApr9grrd120vbalIthcIsQ3OAN2Tqwf+eExHXArJEJqGBo9IZiQbIpFJeftt/OvUvlI8BeO1bA==", "dependencies": { - "@turf/distance-weight": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/distance-weight": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/nearest-neighbor-analysis": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-neighbor-analysis/-/nearest-neighbor-analysis-7.1.0.tgz", - "integrity": "sha512-FAhT8/op3DuvqH0XFhv055JhYq/FC4aaIxEZ4hj8c7W6sYhUHAQgdRZ0tJ1RLe5/h+eXhCTbQ+DFfnfv3klu8g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/nearest-neighbor-analysis/-/nearest-neighbor-analysis-7.2.0.tgz", + "integrity": "sha512-LmP/crXb7gilgsL0wL9hsygqc537W/a1W5r9XBKJT4SKdqjoXX5APJatJfd3nwXbRIqwDH0cDA9/YyFjBPlKnA==", "dependencies": { - "@turf/area": "^7.1.0", - "@turf/bbox": "^7.1.0", - "@turf/bbox-polygon": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/nearest-point": "^7.1.0", + "@turf/area": "^7.2.0", + "@turf/bbox": "^7.2.0", + "@turf/bbox-polygon": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/nearest-point": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/nearest-point": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-point/-/nearest-point-7.1.0.tgz", - "integrity": "sha512-VyInmhqfVWp+jE7sCK95o46qc4tDjAgzbRfRjr+rTgfFS1Sndyy1PdwyNn6TjBFDxiM6e+mjMEeGPjb1smJlEg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/nearest-point/-/nearest-point-7.2.0.tgz", + "integrity": "sha512-0wmsqXZ8CGw4QKeZmS+NdjYTqCMC+HXZvM3XAQIU6k6laNLqjad2oS4nDrtcRs/nWDvcj1CR+Io7OiQ6sbpn5Q==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/nearest-point-on-line": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-point-on-line/-/nearest-point-on-line-7.1.0.tgz", - "integrity": "sha512-aTjAOm7ab0tl5JoxGYRx/J/IbRL1DY1ZCIYQDMEQjK5gOllhclgeBC0wDXDkEZFGaVftjw0W2RtE2I0jX7RG4A==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/nearest-point-on-line/-/nearest-point-on-line-7.2.0.tgz", + "integrity": "sha512-UOhAeoDPVewBQV+PWg1YTMQcYpJsIqfW5+EuZ5vJl60XwUa0+kqB/eVfSLNXmHENjKKIlEt9Oy9HIDF4VeWmXA==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/nearest-point-to-line": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/nearest-point-to-line/-/nearest-point-to-line-7.1.0.tgz", - "integrity": "sha512-rY2F/iY4S6U8H0hIoOI25xMWYEiKywxeTvTvn5GP8KCu+2oemfZROWa7n2+hQDRwO2/uaegrGEpxO7zlFarvzg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/nearest-point-to-line/-/nearest-point-to-line-7.2.0.tgz", + "integrity": "sha512-EorU7Qj30A7nAjh++KF/eTPDlzwuuV4neBz7tmSTB21HKuXZAR0upJsx6M2X1CSyGEgNsbFB0ivNKIvymRTKBw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/point-to-line-distance": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/point-to-line-distance": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/planepoint": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/planepoint/-/planepoint-7.1.0.tgz", - "integrity": "sha512-hFORBkCd7Q0kNUzLqksT4XglLgTQF9tCjG+dbnZ1VehpZu+w+vlHdoW/mY7XCX3Kj1ObiyzVmXffmVYgwXwF6Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/planepoint/-/planepoint-7.2.0.tgz", + "integrity": "sha512-8Vno01tvi5gThUEKBQ46CmlEKDAwVpkl7stOPFvJYlA1oywjAL4PsmgwjXgleZuFtXQUPBNgv5a42Pf438XP4g==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/point-grid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/point-grid/-/point-grid-7.1.0.tgz", - "integrity": "sha512-ihuuUcWuCu4Z1+34UYCM5NGsU2DJaB4uE8cS3jDQoUqlc+8ii2ng8kcGEtTwVn0HdPsoKA7bgvSZcisJO0v6Ww==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/point-grid/-/point-grid-7.2.0.tgz", + "integrity": "sha512-ai7lwBV2FREPW3XiUNohT4opC1hd6+F56qZe20xYhCTkTD9diWjXHiNudQPSmVAUjgMzQGasblQQqvOdL+bJ3Q==", "dependencies": { - "@turf/boolean-within": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/boolean-within": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/point-on-feature": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/point-on-feature/-/point-on-feature-7.1.0.tgz", - "integrity": "sha512-lOO5J9I0diuGbN+r6jViEKRH3qfymsBvv25b7U0MuP8g/YC19ncUXZ86dmKfJx1++Rb485DS9h0nFvPmJpaOdg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/point-on-feature/-/point-on-feature-7.2.0.tgz", + "integrity": "sha512-ksoYoLO9WtJ/qI8VI9ltF+2ZjLWrAjZNsCsu8F7nyGeCh4I8opjf4qVLytFG44XA2qI5yc6iXDpyv0sshvP82Q==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/center": "^7.1.0", - "@turf/explode": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/nearest-point": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/center": "^7.2.0", + "@turf/explode": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/nearest-point": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/point-to-line-distance": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/point-to-line-distance/-/point-to-line-distance-7.1.0.tgz", - "integrity": "sha512-Ps9eTOCaiNgxDaSNQux0wAcSLcrI0y0zYFaD9HnVm+yCMRliQXneFti2XXotS+gR7TpgnLRAAzyx4VzJMSN2tw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/point-to-line-distance/-/point-to-line-distance-7.2.0.tgz", + "integrity": "sha512-fB9Rdnb5w5+t76Gho2dYDkGe20eRrFk8CXi4v1+l1PC8YyLXO+x+l3TrtT8HzL/dVaZeepO6WUIsIw3ditTOPg==", "dependencies": { - "@turf/bearing": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/projection": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", - "@turf/rhumb-distance": "^7.1.0", + "@turf/bearing": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/nearest-point-on-line": "^7.2.0", + "@turf/projection": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", + "@turf/rhumb-distance": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" + }, + "funding": { + "url": "https://opencollective.com/turf" + } + }, + "node_modules/@turf/point-to-polygon-distance": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/point-to-polygon-distance/-/point-to-polygon-distance-7.2.0.tgz", + "integrity": "sha512-w+WYuINgTiFjoZemQwOaQSje/8Kq+uqJOynvx7+gleQPHyWQ3VtTodtV4LwzVzXz8Sf7Mngx1Jcp2SNai5CJYA==", + "dependencies": { + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/point-to-line-distance": "^7.2.0", + "@turf/polygon-to-line": "^7.2.0", + "@types/geojson": "^7946.0.10", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/points-within-polygon": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/points-within-polygon/-/points-within-polygon-7.1.0.tgz", - "integrity": "sha512-SzqeD9Gcp11rEya+rCVMy6IPuYMrphNEkCiQ39W6ec9hsaqKlruqmtudKhhckMGVLVUUBCQAu5f55yjcDfVW2w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/points-within-polygon/-/points-within-polygon-7.2.0.tgz", + "integrity": "sha512-jRKp8/mWNMzA+hKlQhxci97H5nOio9tp14R2SzpvkOt+cswxl+NqTEi1hDd2XetA7tjU0TSoNjEgVY8FfA0S6w==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/polygon-smooth": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/polygon-smooth/-/polygon-smooth-7.1.0.tgz", - "integrity": "sha512-mTlmg4XUP5rKgCP/73N91owkAXIc3t1ZKLuwsJGQM1/Op48T3rJmDwVR/WZIMnVlxl5tFbssWCCB3blj4ivx9g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/polygon-smooth/-/polygon-smooth-7.2.0.tgz", + "integrity": "sha512-KCp9wF2IEynvGXVhySR8oQ2razKP0zwg99K+fuClP21pSKCFjAPaihPEYq6e8uI/1J7ibjL5++6EMl+LrUTrLg==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/polygon-tangents": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/polygon-tangents/-/polygon-tangents-7.1.0.tgz", - "integrity": "sha512-ffBgHXtkrpgkNs8E6s9sVLSKG4lPGH3WBk294FNKBt9NS+rbhNCv8yTuOMeP0bOm/WizaCq/SUtVryJpUSoI/g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/polygon-tangents/-/polygon-tangents-7.2.0.tgz", + "integrity": "sha512-AHUUPmOjiQDrtP/ODXukHBlUG0C/9I1je7zz50OTfl2ZDOdEqFJQC3RyNELwq07grTXZvg5TS5wYx/Y7nsm47g==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/boolean-within": "^7.1.0", - "@turf/explode": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/nearest-point": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/boolean-within": "^7.2.0", + "@turf/explode": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/nearest-point": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/polygon-to-line": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/polygon-to-line/-/polygon-to-line-7.1.0.tgz", - "integrity": "sha512-FBlfyBWNQZCTVGqlJH7LR2VXmvj8AydxrA8zegqek/5oPGtQDeUgIppKmvmuNClqbglhv59QtCUVaDK4bOuCTA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/polygon-to-line/-/polygon-to-line-7.2.0.tgz", + "integrity": "sha512-9jeTN3LiJ933I5sd4K0kwkcivOYXXm1emk0dHorwXeSFSHF+nlYesEW3Hd889wb9lZd7/SVLMUeX/h39mX+vCA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/polygonize": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/polygonize/-/polygonize-7.1.0.tgz", - "integrity": "sha512-FBjxnOzO29MbE7MWnMPHHYtOo93cQopT5pXhkuPyoKgcTUCntR1+iVFpl5YFbMkYup0j5Oexjo/pbY38lVSZGw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/polygonize/-/polygonize-7.2.0.tgz", + "integrity": "sha512-U9v+lBhUPDv+nsg/VcScdiqCB59afO6CHDGrwIl2+5i6Ve+/KQKjpTV/R+NqoC1iMXAEq3brY6HY8Ukp/pUWng==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/envelope": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/envelope": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/projection": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-7.1.0.tgz", - "integrity": "sha512-3wHluMoOvXnTe7dfi0kcluTyLNG5MwGsSsK5OA98vkkLH6a1xvItn8e9GcesuT07oB2km/bgefxYEIvjQG5JCA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-7.2.0.tgz", + "integrity": "sha512-/qke5vJScv8Mu7a+fU3RSChBRijE6EVuFHU3RYihMuYm04Vw8dBMIs0enEpoq0ke/IjSbleIrGQNZIMRX9EwZQ==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/quadrat-analysis": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/quadrat-analysis/-/quadrat-analysis-7.1.0.tgz", - "integrity": "sha512-4O5h9PyWgpqYXja9O+kzr+qk5MUz0IkJqPtt5oWWX5s4jRcLNqiEUf+zi/GDBQkVV8jH3S5klT5CLrF1fxK3hQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/quadrat-analysis/-/quadrat-analysis-7.2.0.tgz", + "integrity": "sha512-fDQh3+ldYNxUqS6QYlvJ7GZLlCeDZR6tD3ikdYtOsSemwW1n/4gm2xcgWJqy3Y0uszBwxc13IGGY7NGEjHA+0w==", "dependencies": { - "@turf/area": "^7.1.0", - "@turf/bbox": "^7.1.0", - "@turf/bbox-polygon": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/point-grid": "^7.1.0", - "@turf/random": "^7.1.0", - "@turf/square-grid": "^7.1.0", + "@turf/area": "^7.2.0", + "@turf/bbox": "^7.2.0", + "@turf/bbox-polygon": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/point-grid": "^7.2.0", + "@turf/random": "^7.2.0", + "@turf/square-grid": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/random": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/random/-/random-7.1.0.tgz", - "integrity": "sha512-22mXv8ejDMUWkz8DSMMqdZb0s7a0ISJzXt6T9cHovfT//vsotzkVH+5PDxJQjvmigKMnpaUgobHmQss23tAwEQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/random/-/random-7.2.0.tgz", + "integrity": "sha512-fNXs5mOeXsrirliw84S8UCNkpm4RMNbefPNsuCTfZEXhcr1MuHMzq4JWKb4FweMdN1Yx2l/xcytkO0s71cJ50w==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/rectangle-grid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/rectangle-grid/-/rectangle-grid-7.1.0.tgz", - "integrity": "sha512-4d2AuDj4LfMMJxNHbds5yX1oFR3mIVAB5D7mx6pFB0e+YkQW0mE2dUWhDTFGJZM+n45yqbNQ5hg19bmiXv94ug==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/rectangle-grid/-/rectangle-grid-7.2.0.tgz", + "integrity": "sha512-f0o5ifvy0Ml/nHDJzMNcuSk4h11aa3BfvQNnYQhLpuTQu03j/ICZNlzKTLxwjcUqvxADUifty7Z9CX5W6zky4A==", "dependencies": { - "@turf/boolean-intersects": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/boolean-intersects": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/rewind": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-7.1.0.tgz", - "integrity": "sha512-zX0KDZpeiH89m1vYLTEJdDL6mFyoAsCxcG0P94mXO7/JXWf0AaxzA9MkNnA/d2QYX0G4ioCMjZ5cD6nXb8SXzw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-7.2.0.tgz", + "integrity": "sha512-SZpRAZiZsE22+HVz6pEID+ST25vOdpAMGk5NO1JeqzhpMALIkIGnkG+xnun2CfYHz7wv8/Z0ADiAvei9rkcQYA==", "dependencies": { - "@turf/boolean-clockwise": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/boolean-clockwise": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/rhumb-bearing": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/rhumb-bearing/-/rhumb-bearing-7.1.0.tgz", - "integrity": "sha512-ESZt70eOljHVnQMFKIdiu8LIHuQlpZgzh2nqSfV40BrYjsjI/sBKeK+sp2cBWk88nsSDlriPuMTNh4f50Jqpkw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/rhumb-bearing/-/rhumb-bearing-7.2.0.tgz", + "integrity": "sha512-jbdexlrR8X2ZauUciHx3tRwG+BXoMXke4B8p8/IgDlAfIrVdzAxSQN89FMzIKnjJ/kdLjo9bFGvb92bu31Etug==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/rhumb-destination": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/rhumb-destination/-/rhumb-destination-7.1.0.tgz", - "integrity": "sha512-WA2TeO3qrv5ZrzNihtTLLYu8X4kd12WEC6JKElm99XhgLao1/4ao2SJUi43l88HqwbrnNiq4TueGQ6tYpXGU7A==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/rhumb-destination/-/rhumb-destination-7.2.0.tgz", + "integrity": "sha512-U9OLgLAHlH4Wfx3fBZf3jvnkDjdTcfRan5eI7VPV1+fQWkOteATpzkiRjCvSYK575GljVwWBjkKca8LziGWitQ==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/rhumb-distance": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/rhumb-distance/-/rhumb-distance-7.1.0.tgz", - "integrity": "sha512-fR1V+yC4E1tnbdThomosiLcv0PQOwbfLSPM8rSWuxbMcJtffsncWxyJ0+N1F5juuHbcdaYhlduX8ri5I0ZCejw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/rhumb-distance/-/rhumb-distance-7.2.0.tgz", + "integrity": "sha512-NsijTPON1yOc9tirRPEQQuJ5aQi7pREsqchQquaYKbHNWsexZjcDi4wnw2kM3Si4XjmgynT+2f7aXH7FHarHzw==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/sample": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/sample/-/sample-7.1.0.tgz", - "integrity": "sha512-9Iq/Ankr4+sgBoh4FpuVVvoW+AA10eej3FS89Zu79SFdCqUIdT7T42Nn3MlSVj4jMyA1oXyT2HIAlNWkwgLw6Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/sample/-/sample-7.2.0.tgz", + "integrity": "sha512-f+ZbcbQJ9glQ/F26re8LadxO0ORafy298EJZe6XtbctRTJrNus6UNAsl8+GYXFqMnXM22tbTAznnJX3ZiWNorA==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/sector": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/sector/-/sector-7.1.0.tgz", - "integrity": "sha512-2FI2rg//eXpa/l+WJtFfvHaf1NJ7ie2MoJ+RH5dKANtrfoof1Ed+y9dXSyuhem2tp/Srq2GhrjaSofFN5/g5vA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/sector/-/sector-7.2.0.tgz", + "integrity": "sha512-zL06MjbbMG4DdpiNz+Q9Ax8jsCekt3R76uxeWShulAGkyDB5smdBOUDoRwxn05UX7l4kKv4Ucq2imQXhxKFd1w==", "dependencies": { - "@turf/circle": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/line-arc": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/circle": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/line-arc": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/shortest-path": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/shortest-path/-/shortest-path-7.1.0.tgz", - "integrity": "sha512-1UmFhS5zHNacLv5rszoFOXq02BGov1oJvjlDatXsSWAd+Z7tqxpDc8D+41edrXy0ZB0Yxsy6WPNagM6hG9PRaA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/shortest-path/-/shortest-path-7.2.0.tgz", + "integrity": "sha512-6fpx8feZ2jMSaeRaFdqFShGWkNb+veUOeyLFSHA/aRD9n/e9F2pWZoRbQWKbKTpcKFJ2FnDEqCZnh/GrcAsqWA==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/bbox-polygon": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/clean-coords": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/transform-scale": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/bbox-polygon": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/clean-coords": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/transform-scale": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/simplify": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/simplify/-/simplify-7.1.0.tgz", - "integrity": "sha512-JypymaoiSiFzGHwEoUkK0OPW1KQSnH3hEsEW3UIRS+apzltJ4HdFovYjsfqQgGZJZ+NJ9+dv7h8pgGLYuqcBUQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/simplify/-/simplify-7.2.0.tgz", + "integrity": "sha512-9YHIfSc8BXQfi5IvEMbCeQYqNch0UawIGwbboJaoV8rodhtk6kKV2wrpXdGqk/6Thg6/RWvChJFKVVTjVrULyQ==", "dependencies": { - "@turf/clean-coords": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/clean-coords": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/square": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/square/-/square-7.1.0.tgz", - "integrity": "sha512-ANuA+WXZheGTLW6Veq0i+/B2S4KMhEHAixDv9gQEb9e6FTyqTJVwrqP4CHI3OzA3DZ/ytFf+NTKVofetO/BBQg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/square/-/square-7.2.0.tgz", + "integrity": "sha512-9pMoAGFvqzCDOlO9IRSSBCGXKbl8EwMx6xRRBMKdZgpS0mZgfm9xiptMmx/t1m4qqHIlb/N+3MUF7iMBx6upcA==", "dependencies": { - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/square-grid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/square-grid/-/square-grid-7.1.0.tgz", - "integrity": "sha512-JyhsALULVRlkh8htdTi9aXaXFSUv6wRNbeFbqyGJKKlA5eF+AYmyWdI/BlFGQN27xtbtMPeAuLmj+8jaB2omGw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/square-grid/-/square-grid-7.2.0.tgz", + "integrity": "sha512-EmzGXa90hz+tiCOs9wX+Lak6pH0Vghb7QuX6KZej+pmWi3Yz7vdvQLmy/wuN048+wSkD5c8WUo/kTeNDe7GnmA==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/rectangle-grid": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/rectangle-grid": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/standard-deviational-ellipse": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/standard-deviational-ellipse/-/standard-deviational-ellipse-7.1.0.tgz", - "integrity": "sha512-JqvQFH/witHh+3XgPC1Qk4+3G8w8WQta2NTJjnGinOgFulH+7RD4DcxCT+XXtCHoeq8IvL9VPJRX3ciaW5nSCg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/standard-deviational-ellipse/-/standard-deviational-ellipse-7.2.0.tgz", + "integrity": "sha512-+uC0pR2nRjm90JvMXe/2xOCZsYV2II1ZZ2zmWcBWv6bcFXBspcxk2QfCC3k0bj6jDapELzoQgnn3cG5lbdQV2w==", "dependencies": { - "@turf/center-mean": "^7.1.0", - "@turf/ellipse": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/points-within-polygon": "^7.1.0", + "@turf/center-mean": "^7.2.0", + "@turf/ellipse": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/points-within-polygon": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/tag": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/tag/-/tag-7.1.0.tgz", - "integrity": "sha512-cD8TC++DnNmdI1B/apTf3nj2zRNY6SoLRliB8K76OB+70Kev8tOf4ZVgAqOd0u+Hpdg/T6l7dO7fyJ6UouE7jA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/tag/-/tag-7.2.0.tgz", + "integrity": "sha512-TAFvsbp5TCBqXue8ui+CtcLsPZ6NPC88L8Ad6Hb/R6VAi21qe0U42WJHQYXzWmtThoTNwxi+oKSeFbRDsr0FIA==", "dependencies": { - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/tesselate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/tesselate/-/tesselate-7.1.0.tgz", - "integrity": "sha512-E/Z94Mx6kUjvQVbEcSuM9MbEo2dkOczRe4ZzjhFlLgJh1dCkfRgwYLH49mb2CcfG/me1arxoCgmtG+qgm7LrCg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/tesselate/-/tesselate-7.2.0.tgz", + "integrity": "sha512-zHGcG85aOJJu1seCm+CYTJ3UempX4Xtyt669vFG6Hbr/Hc7ii6STQ2ysFr7lJwFtU9uyYhphVrrgwIqwglvI/Q==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", "earcut": "^2.2.4", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/tin": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/tin/-/tin-7.1.0.tgz", - "integrity": "sha512-h8Bdm0IYN6OpKHM8lBRWGxkJnZcxL0KYecf8U6pa6DCEYsEXuEExMTvYSD2OmqIsL5ml8P6RjwgyI+dZeE0O9A==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/tin/-/tin-7.2.0.tgz", + "integrity": "sha512-y24Vt3oeE6ZXvyLJamP0Ke02rPlDGE9gF7OFADnR0mT+2uectb0UTIBC3kKzON80TEAlA3GXpKFkCW5Fo/O/Kg==", "dependencies": { - "@turf/helpers": "^7.1.0", + "@turf/helpers": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/transform-rotate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/transform-rotate/-/transform-rotate-7.1.0.tgz", - "integrity": "sha512-Vp7VBZ6DqaPV8mkwSycksBFRLqSj3y16zg+uEPSCsXUjbFtw9DOLcyH2F5vMpnC2bOpS9NOB4hebhJRwBwAPWQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/transform-rotate/-/transform-rotate-7.2.0.tgz", + "integrity": "sha512-EMCj0Zqy3cF9d3mGRqDlYnX2ZBXe3LgT+piDR0EuF5c5sjuKErcFcaBIsn/lg1gp4xCNZFinkZ3dsFfgGHf6fw==", "dependencies": { - "@turf/centroid": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", - "@turf/rhumb-destination": "^7.1.0", - "@turf/rhumb-distance": "^7.1.0", + "@turf/centroid": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", + "@turf/rhumb-destination": "^7.2.0", + "@turf/rhumb-distance": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/transform-scale": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/transform-scale/-/transform-scale-7.1.0.tgz", - "integrity": "sha512-m5fLnh3JqrWSv0sAC8Aieet/fr5IZND8BFaE9LakMidtNaJqOIPOyVmUoklcrGn6eK6MX+66rRPn+5a1pahlLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/transform-scale/-/transform-scale-7.2.0.tgz", + "integrity": "sha512-HYB+pw938eeI8s1/zSWFy6hq+t38fuUaBb0jJsZB1K9zQ1WjEYpPvKF/0//80zNPlyxLv3cOkeBucso3hzI07A==", "dependencies": { - "@turf/bbox": "^7.1.0", - "@turf/center": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", - "@turf/rhumb-destination": "^7.1.0", - "@turf/rhumb-distance": "^7.1.0", + "@turf/bbox": "^7.2.0", + "@turf/center": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", + "@turf/rhumb-destination": "^7.2.0", + "@turf/rhumb-distance": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/transform-translate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/transform-translate/-/transform-translate-7.1.0.tgz", - "integrity": "sha512-XA6Oh7VqUDrieY9m9/OF4XpBTd8qlfVGi3ObywojCqtHaHKLK3aXwTBZ276i0QKmZqOQA+2jFa9NhgF/TgBDrw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/transform-translate/-/transform-translate-7.2.0.tgz", + "integrity": "sha512-zAglR8MKCqkzDTjGMIQgbg/f+Q3XcKVzr9cELw5l9CrS1a0VTSDtBZLDm0kWx0ankwtam7ZmI2jXyuQWT8Gbug==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/rhumb-destination": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/rhumb-destination": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/triangle-grid": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/triangle-grid/-/triangle-grid-7.1.0.tgz", - "integrity": "sha512-hrPyRAuX5PKu7txmc/11VPKrlJDR+JGzd+eijupKTspNLR4n2sqZUx8UXqSxZ/1nq06ScTyjIfGQJVzlRS8BTg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/triangle-grid/-/triangle-grid-7.2.0.tgz", + "integrity": "sha512-4gcAqWKh9hg6PC5nNSb9VWyLgl821cwf9yR9yEzQhEFfwYL/pZONBWCO1cwVF23vSYMSMm+/TwqxH4emxaArfw==", "dependencies": { - "@turf/distance": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/intersect": "^7.1.0", + "@turf/distance": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/intersect": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/truncate": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/truncate/-/truncate-7.1.0.tgz", - "integrity": "sha512-rrF3AML9PGZw2i5wmt53ESI+Ln9cZyCXgJ7QrEvkT8NbE4OFgmw6p8/1xT8+VEWFSpD4gHz+hmM+5FaFxXvtNg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/truncate/-/truncate-7.2.0.tgz", + "integrity": "sha512-jyFzxYbPugK4XjV5V/k6Xr3taBjjvo210IbPHJXw0Zh7Y6sF+hGxeRVtSuZ9VP/6oRyqAOHKUrze+OOkPqBgUg==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/turf": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/turf/-/turf-7.1.0.tgz", - "integrity": "sha512-7NA6tAjbu9oIvIfpRO5AdPrZbFTlUFU02HVA7sLJM9jFeNIZovW09QuDo23uoS2z5l94SXV1GgKKxN5wo7prCw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/turf/-/turf-7.2.0.tgz", + "integrity": "sha512-G1kKBu4hYgoNoRJgnpJohNuS7bLnoWHZ2G/4wUMym5xOSiYah6carzdTEsMoTsauyi7ilByWHx5UHwbjjCVcBw==", "dependencies": { - "@turf/along": "^7.1.0", - "@turf/angle": "^7.1.0", - "@turf/area": "^7.1.0", - "@turf/bbox": "^7.1.0", - "@turf/bbox-clip": "^7.1.0", - "@turf/bbox-polygon": "^7.1.0", - "@turf/bearing": "^7.1.0", - "@turf/bezier-spline": "^7.1.0", - "@turf/boolean-clockwise": "^7.1.0", - "@turf/boolean-concave": "^7.1.0", - "@turf/boolean-contains": "^7.1.0", - "@turf/boolean-crosses": "^7.1.0", - "@turf/boolean-disjoint": "^7.1.0", - "@turf/boolean-equal": "^7.1.0", - "@turf/boolean-intersects": "^7.1.0", - "@turf/boolean-overlap": "^7.1.0", - "@turf/boolean-parallel": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/boolean-point-on-line": "^7.1.0", - "@turf/boolean-touches": "^7.1.0", - "@turf/boolean-valid": "^7.1.0", - "@turf/boolean-within": "^7.1.0", - "@turf/buffer": "^7.1.0", - "@turf/center": "^7.1.0", - "@turf/center-mean": "^7.1.0", - "@turf/center-median": "^7.1.0", - "@turf/center-of-mass": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/circle": "^7.1.0", - "@turf/clean-coords": "^7.1.0", - "@turf/clone": "^7.1.0", - "@turf/clusters": "^7.1.0", - "@turf/clusters-dbscan": "^7.1.0", - "@turf/clusters-kmeans": "^7.1.0", - "@turf/collect": "^7.1.0", - "@turf/combine": "^7.1.0", - "@turf/concave": "^7.1.0", - "@turf/convex": "^7.1.0", - "@turf/destination": "^7.1.0", - "@turf/difference": "^7.1.0", - "@turf/dissolve": "^7.1.0", - "@turf/distance": "^7.1.0", - "@turf/distance-weight": "^7.1.0", - "@turf/ellipse": "^7.1.0", - "@turf/envelope": "^7.1.0", - "@turf/explode": "^7.1.0", - "@turf/flatten": "^7.1.0", - "@turf/flip": "^7.1.0", - "@turf/geojson-rbush": "^7.1.0", - "@turf/great-circle": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/hex-grid": "^7.1.0", - "@turf/interpolate": "^7.1.0", - "@turf/intersect": "^7.1.0", - "@turf/invariant": "^7.1.0", - "@turf/isobands": "^7.1.0", - "@turf/isolines": "^7.1.0", - "@turf/kinks": "^7.1.0", - "@turf/length": "^7.1.0", - "@turf/line-arc": "^7.1.0", - "@turf/line-chunk": "^7.1.0", - "@turf/line-intersect": "^7.1.0", - "@turf/line-offset": "^7.1.0", - "@turf/line-overlap": "^7.1.0", - "@turf/line-segment": "^7.1.0", - "@turf/line-slice": "^7.1.0", - "@turf/line-slice-along": "^7.1.0", - "@turf/line-split": "^7.1.0", - "@turf/line-to-polygon": "^7.1.0", - "@turf/mask": "^7.1.0", - "@turf/meta": "^7.1.0", - "@turf/midpoint": "^7.1.0", - "@turf/moran-index": "^7.1.0", - "@turf/nearest-neighbor-analysis": "^7.1.0", - "@turf/nearest-point": "^7.1.0", - "@turf/nearest-point-on-line": "^7.1.0", - "@turf/nearest-point-to-line": "^7.1.0", - "@turf/planepoint": "^7.1.0", - "@turf/point-grid": "^7.1.0", - "@turf/point-on-feature": "^7.1.0", - "@turf/point-to-line-distance": "^7.1.0", - "@turf/points-within-polygon": "^7.1.0", - "@turf/polygon-smooth": "^7.1.0", - "@turf/polygon-tangents": "^7.1.0", - "@turf/polygon-to-line": "^7.1.0", - "@turf/polygonize": "^7.1.0", - "@turf/projection": "^7.1.0", - "@turf/quadrat-analysis": "^7.1.0", - "@turf/random": "^7.1.0", - "@turf/rectangle-grid": "^7.1.0", - "@turf/rewind": "^7.1.0", - "@turf/rhumb-bearing": "^7.1.0", - "@turf/rhumb-destination": "^7.1.0", - "@turf/rhumb-distance": "^7.1.0", - "@turf/sample": "^7.1.0", - "@turf/sector": "^7.1.0", - "@turf/shortest-path": "^7.1.0", - "@turf/simplify": "^7.1.0", - "@turf/square": "^7.1.0", - "@turf/square-grid": "^7.1.0", - "@turf/standard-deviational-ellipse": "^7.1.0", - "@turf/tag": "^7.1.0", - "@turf/tesselate": "^7.1.0", - "@turf/tin": "^7.1.0", - "@turf/transform-rotate": "^7.1.0", - "@turf/transform-scale": "^7.1.0", - "@turf/transform-translate": "^7.1.0", - "@turf/triangle-grid": "^7.1.0", - "@turf/truncate": "^7.1.0", - "@turf/union": "^7.1.0", - "@turf/unkink-polygon": "^7.1.0", - "@turf/voronoi": "^7.1.0", + "@turf/along": "^7.2.0", + "@turf/angle": "^7.2.0", + "@turf/area": "^7.2.0", + "@turf/bbox": "^7.2.0", + "@turf/bbox-clip": "^7.2.0", + "@turf/bbox-polygon": "^7.2.0", + "@turf/bearing": "^7.2.0", + "@turf/bezier-spline": "^7.2.0", + "@turf/boolean-clockwise": "^7.2.0", + "@turf/boolean-concave": "^7.2.0", + "@turf/boolean-contains": "^7.2.0", + "@turf/boolean-crosses": "^7.2.0", + "@turf/boolean-disjoint": "^7.2.0", + "@turf/boolean-equal": "^7.2.0", + "@turf/boolean-intersects": "^7.2.0", + "@turf/boolean-overlap": "^7.2.0", + "@turf/boolean-parallel": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/boolean-point-on-line": "^7.2.0", + "@turf/boolean-touches": "^7.2.0", + "@turf/boolean-valid": "^7.2.0", + "@turf/boolean-within": "^7.2.0", + "@turf/buffer": "^7.2.0", + "@turf/center": "^7.2.0", + "@turf/center-mean": "^7.2.0", + "@turf/center-median": "^7.2.0", + "@turf/center-of-mass": "^7.2.0", + "@turf/centroid": "^7.2.0", + "@turf/circle": "^7.2.0", + "@turf/clean-coords": "^7.2.0", + "@turf/clone": "^7.2.0", + "@turf/clusters": "^7.2.0", + "@turf/clusters-dbscan": "^7.2.0", + "@turf/clusters-kmeans": "^7.2.0", + "@turf/collect": "^7.2.0", + "@turf/combine": "^7.2.0", + "@turf/concave": "^7.2.0", + "@turf/convex": "^7.2.0", + "@turf/destination": "^7.2.0", + "@turf/difference": "^7.2.0", + "@turf/dissolve": "^7.2.0", + "@turf/distance": "^7.2.0", + "@turf/distance-weight": "^7.2.0", + "@turf/ellipse": "^7.2.0", + "@turf/envelope": "^7.2.0", + "@turf/explode": "^7.2.0", + "@turf/flatten": "^7.2.0", + "@turf/flip": "^7.2.0", + "@turf/geojson-rbush": "^7.2.0", + "@turf/great-circle": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/hex-grid": "^7.2.0", + "@turf/interpolate": "^7.2.0", + "@turf/intersect": "^7.2.0", + "@turf/invariant": "^7.2.0", + "@turf/isobands": "^7.2.0", + "@turf/isolines": "^7.2.0", + "@turf/kinks": "^7.2.0", + "@turf/length": "^7.2.0", + "@turf/line-arc": "^7.2.0", + "@turf/line-chunk": "^7.2.0", + "@turf/line-intersect": "^7.2.0", + "@turf/line-offset": "^7.2.0", + "@turf/line-overlap": "^7.2.0", + "@turf/line-segment": "^7.2.0", + "@turf/line-slice": "^7.2.0", + "@turf/line-slice-along": "^7.2.0", + "@turf/line-split": "^7.2.0", + "@turf/line-to-polygon": "^7.2.0", + "@turf/mask": "^7.2.0", + "@turf/meta": "^7.2.0", + "@turf/midpoint": "^7.2.0", + "@turf/moran-index": "^7.2.0", + "@turf/nearest-neighbor-analysis": "^7.2.0", + "@turf/nearest-point": "^7.2.0", + "@turf/nearest-point-on-line": "^7.2.0", + "@turf/nearest-point-to-line": "^7.2.0", + "@turf/planepoint": "^7.2.0", + "@turf/point-grid": "^7.2.0", + "@turf/point-on-feature": "^7.2.0", + "@turf/point-to-line-distance": "^7.2.0", + "@turf/point-to-polygon-distance": "^7.2.0", + "@turf/points-within-polygon": "^7.2.0", + "@turf/polygon-smooth": "^7.2.0", + "@turf/polygon-tangents": "^7.2.0", + "@turf/polygon-to-line": "^7.2.0", + "@turf/polygonize": "^7.2.0", + "@turf/projection": "^7.2.0", + "@turf/quadrat-analysis": "^7.2.0", + "@turf/random": "^7.2.0", + "@turf/rectangle-grid": "^7.2.0", + "@turf/rewind": "^7.2.0", + "@turf/rhumb-bearing": "^7.2.0", + "@turf/rhumb-destination": "^7.2.0", + "@turf/rhumb-distance": "^7.2.0", + "@turf/sample": "^7.2.0", + "@turf/sector": "^7.2.0", + "@turf/shortest-path": "^7.2.0", + "@turf/simplify": "^7.2.0", + "@turf/square": "^7.2.0", + "@turf/square-grid": "^7.2.0", + "@turf/standard-deviational-ellipse": "^7.2.0", + "@turf/tag": "^7.2.0", + "@turf/tesselate": "^7.2.0", + "@turf/tin": "^7.2.0", + "@turf/transform-rotate": "^7.2.0", + "@turf/transform-scale": "^7.2.0", + "@turf/transform-translate": "^7.2.0", + "@turf/triangle-grid": "^7.2.0", + "@turf/truncate": "^7.2.0", + "@turf/union": "^7.2.0", + "@turf/unkink-polygon": "^7.2.0", + "@turf/voronoi": "^7.2.0", "@types/geojson": "^7946.0.10", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/union": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/union/-/union-7.1.0.tgz", - "integrity": "sha512-7VI8jONdBg9qmbfNlLQycPr93l5aU9HGMgWI9M6pb4ERuU2+p8KgffCgs2NyMtP2HxPrKSybzj31g7bnbEKofQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/union/-/union-7.2.0.tgz", + "integrity": "sha512-Xex/cfKSmH0RZRWSJl4RLlhSmEALVewywiEXcu0aIxNbuZGTcpNoI0h4oLFrE/fUd0iBGFg/EGLXRL3zTfpg6g==", "dependencies": { - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", - "polygon-clipping": "^0.15.3", - "tslib": "^2.6.2" + "polyclip-ts": "^0.16.8", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/unkink-polygon": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/unkink-polygon/-/unkink-polygon-7.1.0.tgz", - "integrity": "sha512-pqkirni2aLpRA1ELFIuJz+mkjYyJQX8Ar6BflSu1b0ajY/CTrcDxbIv1x8UfvbybLzdJc4Gxzg5mo4cEtSwtaQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/unkink-polygon/-/unkink-polygon-7.2.0.tgz", + "integrity": "sha512-dFPfzlIgkEr15z6oXVxTSWshWi51HeITGVFtl1GAKGMtiXJx1uMqnfRsvljqEjaQu/4AzG1QAp3b+EkSklQSiQ==", "dependencies": { - "@turf/area": "^7.1.0", - "@turf/boolean-point-in-polygon": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/area": "^7.2.0", + "@turf/boolean-point-in-polygon": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/meta": "^7.2.0", "@types/geojson": "^7946.0.10", "rbush": "^3.0.1", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" } }, "node_modules/@turf/voronoi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@turf/voronoi/-/voronoi-7.1.0.tgz", - "integrity": "sha512-xUvzPDG6GaqEekgxd+pjeMKJXOYJ3eFIqUHbTe/ISKzzv3f2cFGiR2VH7ZGXri8d4ozzCQbUQ27ilHPPLf5+xw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@turf/voronoi/-/voronoi-7.2.0.tgz", + "integrity": "sha512-3K6N0LtJsWTXxPb/5N2qD9e8f4q8+tjTbGV3lE3v8x06iCnNlnuJnqM5NZNPpvgvCatecBkhClO3/3RndE61Fw==", "dependencies": { - "@turf/clone": "^7.1.0", - "@turf/helpers": "^7.1.0", - "@turf/invariant": "^7.1.0", + "@turf/clone": "^7.2.0", + "@turf/helpers": "^7.2.0", + "@turf/invariant": "^7.2.0", "@types/d3-voronoi": "^1.1.12", "@types/geojson": "^7946.0.10", "d3-voronoi": "1.1.2", - "tslib": "^2.6.2" + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" @@ -6275,9 +6348,9 @@ } }, "node_modules/@types/geojson": { - "version": "7946.0.14", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", - "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==" + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==" }, "node_modules/@types/graceful-fs": { "version": "4.1.9", @@ -7895,6 +7968,14 @@ "node": "*" } }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -8782,7 +8863,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true + "devOptional": true }, "node_modules/cross-env": { "version": "7.0.3", @@ -9647,7 +9728,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.3.1" } @@ -14991,7 +15072,7 @@ "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true + "devOptional": true }, "node_modules/makeerror": { "version": "1.0.12", @@ -16023,24 +16104,27 @@ "integrity": "sha512-3ojrFwjnnw8Q9242TzgXuTD+eKiutbzyslcq1ydfu82Db2y+Ogbmyrkpv0Hgj31qwT3lbS9+QAAO/pIQM35XRw==" }, "node_modules/point-in-polygon-hao": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/point-in-polygon-hao/-/point-in-polygon-hao-1.1.0.tgz", - "integrity": "sha512-3hTIM2j/v9Lio+wOyur3kckD4NxruZhpowUbEgmyikW+a2Kppjtu1eN+AhnMQtoHW46zld88JiYWv6fxpsDrTQ==" - }, - "node_modules/polygon-clipping": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/polygon-clipping/-/polygon-clipping-0.15.7.tgz", - "integrity": "sha512-nhfdr83ECBg6xtqOAJab1tbksbBAOMUltN60bU+llHVOL0e5Onm1WpAXXWXVB39L8AJFssoIhEVuy/S90MmotA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/point-in-polygon-hao/-/point-in-polygon-hao-1.2.4.tgz", + "integrity": "sha512-x2pcvXeqhRHlNRdhLs/tgFapAbSSe86wa/eqmj1G6pWftbEs5aVRJhRGM6FYSUERKu0PjekJzMq0gsI2XyiclQ==", "dependencies": { - "robust-predicates": "^3.0.2", - "splaytree": "^3.1.0" + "robust-predicates": "^3.0.2" } }, - "node_modules/polygon-clipping/node_modules/robust-predicates": { + "node_modules/point-in-polygon-hao/node_modules/robust-predicates": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" }, + "node_modules/polyclip-ts": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/polyclip-ts/-/polyclip-ts-0.16.8.tgz", + "integrity": "sha512-JPtKbDRuPEuAjuTdhR62Gph7Is2BS1Szx69CFOO3g71lpJDFo78k4tFyi+qFOMVPePEzdSKkpGU3NBXPHHjvKQ==", + "dependencies": { + "bignumber.js": "^9.1.0", + "splaytree-ts": "^1.0.2" + } + }, "node_modules/possible-typed-array-names": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", @@ -19163,10 +19247,10 @@ "wbuf": "^1.7.3" } }, - "node_modules/splaytree": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.2.tgz", - "integrity": "sha512-4OM2BJgC5UzrhVnnJA4BkHKGtjXNzzUfpQjCO8I05xYPsfS/VuQDwjCGGMi8rYQilHEV4j8NBqTFbls/PZEE7A==" + "node_modules/splaytree-ts": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/splaytree-ts/-/splaytree-ts-1.0.2.tgz", + "integrity": "sha512-0kGecIZNIReCSiznK3uheYB8sbstLjCZLiwcQwbmLhgHJj2gz6OnSPkVzJQCMnmEz1BQ4gPK59ylhBoEWOhGNA==" }, "node_modules/split-string": { "version": "3.1.0", @@ -20431,7 +20515,7 @@ "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, + "devOptional": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -20474,7 +20558,7 @@ "version": "8.3.4", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, + "devOptional": true, "dependencies": { "acorn": "^8.11.0" }, @@ -20486,7 +20570,7 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true + "devOptional": true }, "node_modules/tsconfig-paths": { "version": "3.15.0", @@ -20973,7 +21057,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true + "devOptional": true }, "node_modules/v8-to-istanbul": { "version": "8.1.1", @@ -22032,7 +22116,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6" } diff --git a/app/package.json b/app/package.json index 39b8663..f8eb17d 100644 --- a/app/package.json +++ b/app/package.json @@ -9,10 +9,12 @@ "@react-three/drei": "^9.113.0", "@react-three/fiber": "^8.17.7", "@react-three/postprocessing": "^2.16.3", + "@recast-navigation/three": "^0.39.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", - "@turf/turf": "^7.1.0", + "@turf/helpers": "^7.2.0", + "@turf/turf": "^7.2.0", "@types/jest": "^27.5.2", "@types/react": "^18.3.5", "@types/react-dom": "^18.3.0", diff --git a/app/src/modules/builder/agv/agv.tsx b/app/src/modules/builder/agv/agv.tsx new file mode 100644 index 0000000..52ad15c --- /dev/null +++ b/app/src/modules/builder/agv/agv.tsx @@ -0,0 +1,1577 @@ +import React from "react"; +import { useThree } from "@react-three/fiber"; +import { useEffect, useRef, useState } from "react"; +import * as THREE from "three"; +import PolygonGenerator from "./polygonGenerator"; +import NavMeshDetails from "./navMeshDetails"; +import { NavMesh as RecastNavMesh } from "@recast-navigation/core"; +import PathNavigator from "./pathNavigator"; +interface RawNavMesh { + ptr: number; // Replace `number` with the actual type if known +} +interface NavMesh { + raw: RawNavMesh; +} +// interface LineProps{ +// lines +// planes: +// } +export default function Agv({ }) { + const { scene } = useThree(); + const groupRef = useRef(null); + const [navMesh, setNavMesh] = useState(null); + let pathPoints = [ + [ + { x: 8.477161935339709, y: 0, z: 17.41343083550102 }, + { x: 9.175416491482693, y: 0, z: -12.361001232663693 }, + ], + [ + { x: 16.792040856420844, y: 0, z: 15.86281907549489 }, + { x: -42.77173264503395, y: 0, z: -15.821322764400804 }, + ], + ]; + let processPoint = [ + { + _id: { + $oid: "67da9121029b39637717b7b1", + }, + layer: 1, + line: [ + { + position: { + x: -32.49832772097252, + y: 0.01, + z: -14.687753872309017, + _id: { + $oid: "67da9121029b39637717b7b3", + }, + }, + uuid: "9ba396ee-8ef5-4996-84a9-6fdac915eea8", + _id: { + $oid: "67da9121029b39637717b7b2", + }, + }, + { + position: { + x: -26.13448312795506, + y: 0.01, + z: -14.687753872309019, + _id: { + $oid: "67da9121029b39637717b7b5", + }, + }, + uuid: "b51d6a49-8d6a-4889-8b51-6b45353ee4d7", + _id: { + $oid: "67da9121029b39637717b7b4", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9122029b39637717b7b7", + }, + layer: 1, + line: [ + { + position: { + x: -26.13448312795506, + y: 0.01, + z: -14.687753872309019, + _id: { + $oid: "67da9122029b39637717b7b9", + }, + }, + uuid: "b51d6a49-8d6a-4889-8b51-6b45353ee4d7", + _id: { + $oid: "67da9122029b39637717b7b8", + }, + }, + { + position: { + x: -26.13448312795506, + y: 0.01, + z: -7.782512568268439, + _id: { + $oid: "67da9122029b39637717b7bb", + }, + }, + uuid: "b5ace9cb-7795-47bd-a813-7ae29a713692", + _id: { + $oid: "67da9122029b39637717b7ba", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9126029b39637717b7bd", + }, + layer: 1, + line: [ + { + position: { + x: -26.13448312795506, + y: 0.01, + z: -7.782512568268439, + _id: { + $oid: "67da9126029b39637717b7bf", + }, + }, + uuid: "b5ace9cb-7795-47bd-a813-7ae29a713692", + _id: { + $oid: "67da9126029b39637717b7be", + }, + }, + { + position: { + x: -32.639282521592044, + y: 0.01, + z: -7.782512568268438, + _id: { + $oid: "67da9126029b39637717b7c1", + }, + }, + uuid: "08df978b-ce38-4a0d-a89c-9992f0c470e7", + _id: { + $oid: "67da9126029b39637717b7c0", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9127029b39637717b7c3", + }, + layer: 1, + line: [ + { + position: { + x: -32.639282521592044, + y: 0.01, + z: -7.782512568268438, + _id: { + $oid: "67da9127029b39637717b7c5", + }, + }, + uuid: "08df978b-ce38-4a0d-a89c-9992f0c470e7", + _id: { + $oid: "67da9127029b39637717b7c4", + }, + }, + { + position: { + x: -32.49832772097252, + y: 0.01, + z: -14.687753872309017, + _id: { + $oid: "67da9127029b39637717b7c7", + }, + }, + uuid: "9ba396ee-8ef5-4996-84a9-6fdac915eea8", + _id: { + $oid: "67da9127029b39637717b7c6", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9131029b39637717b7c9", + }, + layer: 1, + line: [ + { + position: { + x: -18.900000000000002, + y: 0.01, + z: -14.65000050000732, + _id: { + $oid: "67da9131029b39637717b7cb", + }, + }, + uuid: "d066f4bd-3df9-4824-9e66-b5b67263152b", + _id: { + $oid: "67da9131029b39637717b7ca", + }, + }, + { + position: { + x: -11.499324355168639, + y: 0.01, + z: -14.650000500007321, + _id: { + $oid: "67da9131029b39637717b7cd", + }, + }, + uuid: "ddea6247-d96d-42b6-b9cf-ef2da7d12848", + _id: { + $oid: "67da9131029b39637717b7cc", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9132029b39637717b7cf", + }, + layer: 1, + line: [ + { + position: { + x: -11.499324355168639, + y: 0.01, + z: -14.650000500007321, + _id: { + $oid: "67da9132029b39637717b7d1", + }, + }, + uuid: "ddea6247-d96d-42b6-b9cf-ef2da7d12848", + _id: { + $oid: "67da9132029b39637717b7d0", + }, + }, + { + position: { + x: -11.499324355168639, + y: 0.01, + z: -7.946995896512458, + _id: { + $oid: "67da9132029b39637717b7d3", + }, + }, + uuid: "1b3d365d-e15a-4690-ab1f-097bc43a7206", + _id: { + $oid: "67da9132029b39637717b7d2", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9135029b39637717b7d5", + }, + layer: 1, + line: [ + { + position: { + x: -11.499324355168639, + y: 0.01, + z: -7.946995896512458, + _id: { + $oid: "67da9135029b39637717b7d7", + }, + }, + uuid: "1b3d365d-e15a-4690-ab1f-097bc43a7206", + _id: { + $oid: "67da9135029b39637717b7d6", + }, + }, + { + position: { + x: -19.2026753309413, + y: 0.01, + z: -7.946995896512457, + _id: { + $oid: "67da9135029b39637717b7d9", + }, + }, + uuid: "1e0576fb-c048-483c-acf9-1431e7c108f9", + _id: { + $oid: "67da9135029b39637717b7d8", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9136029b39637717b7db", + }, + layer: 1, + line: [ + { + position: { + x: -19.2026753309413, + y: 0.01, + z: -7.946995896512457, + _id: { + $oid: "67da9136029b39637717b7dd", + }, + }, + uuid: "1e0576fb-c048-483c-acf9-1431e7c108f9", + _id: { + $oid: "67da9136029b39637717b7dc", + }, + }, + { + position: { + x: -18.900000000000002, + y: 0.01, + z: -14.65000050000732, + _id: { + $oid: "67da9136029b39637717b7df", + }, + }, + uuid: "d066f4bd-3df9-4824-9e66-b5b67263152b", + _id: { + $oid: "67da9136029b39637717b7de", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da913a029b39637717b7e1", + }, + layer: 1, + line: [ + { + position: { + x: -2.8000000000000007, + y: 0.01, + z: -14.350000500007173, + _id: { + $oid: "67da913a029b39637717b7e3", + }, + }, + uuid: "589c4a82-c0a3-4fe3-85b2-92436d874016", + _id: { + $oid: "67da913a029b39637717b7e2", + }, + }, + { + position: { + x: 3.3000000000000043, + y: 0.01, + z: -14.350000500007173, + _id: { + $oid: "67da913a029b39637717b7e5", + }, + }, + uuid: "5808bc4e-be8b-467a-851e-23571fb4883d", + _id: { + $oid: "67da913a029b39637717b7e4", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da913b029b39637717b7e7", + }, + layer: 1, + line: [ + { + position: { + x: 3.3000000000000043, + y: 0.01, + z: -14.350000500007173, + _id: { + $oid: "67da913b029b39637717b7e9", + }, + }, + uuid: "5808bc4e-be8b-467a-851e-23571fb4883d", + _id: { + $oid: "67da913b029b39637717b7e8", + }, + }, + { + position: { + x: 3.3000000000000047, + y: 0.01, + z: -7.749242967720177, + _id: { + $oid: "67da913b029b39637717b7eb", + }, + }, + uuid: "5531d693-96a5-4317-9d54-64aaee0c4aca", + _id: { + $oid: "67da913b029b39637717b7ea", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da913d029b39637717b7ed", + }, + layer: 1, + line: [ + { + position: { + x: 3.3000000000000047, + y: 0.01, + z: -7.749242967720177, + _id: { + $oid: "67da913d029b39637717b7ef", + }, + }, + uuid: "5531d693-96a5-4317-9d54-64aaee0c4aca", + _id: { + $oid: "67da913d029b39637717b7ee", + }, + }, + { + position: { + x: -3.5007464355254387, + y: 0.01, + z: -7.749242967720176, + _id: { + $oid: "67da913d029b39637717b7f1", + }, + }, + uuid: "42877408-00e9-45b7-825e-ab9ec32bbbcb", + _id: { + $oid: "67da913d029b39637717b7f0", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da913e029b39637717b7f3", + }, + layer: 1, + line: [ + { + position: { + x: -3.5007464355254387, + y: 0.01, + z: -7.749242967720176, + _id: { + $oid: "67da913e029b39637717b7f5", + }, + }, + uuid: "42877408-00e9-45b7-825e-ab9ec32bbbcb", + _id: { + $oid: "67da913e029b39637717b7f4", + }, + }, + { + position: { + x: -2.8000000000000007, + y: 0.01, + z: -14.350000500007173, + _id: { + $oid: "67da913e029b39637717b7f7", + }, + }, + uuid: "589c4a82-c0a3-4fe3-85b2-92436d874016", + _id: { + $oid: "67da913e029b39637717b7f6", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9143029b39637717b7f9", + }, + layer: 1, + line: [ + { + position: { + x: -32.3, + y: 0.01, + z: -1.0500005000005297, + _id: { + $oid: "67da9143029b39637717b7fb", + }, + }, + uuid: "ac46f914-ad0c-47f6-a1e9-8b73d0f359ef", + _id: { + $oid: "67da9143029b39637717b7fa", + }, + }, + { + position: { + x: -26.099193600828997, + y: 0.01, + z: -1.0500005000005297, + _id: { + $oid: "67da9143029b39637717b7fd", + }, + }, + uuid: "9ace6852-938b-48e8-b6b6-fc81d0140301", + _id: { + $oid: "67da9143029b39637717b7fc", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9144029b39637717b7ff", + }, + layer: 1, + line: [ + { + position: { + x: -26.099193600828997, + y: 0.01, + z: -1.0500005000005297, + _id: { + $oid: "67da9144029b39637717b801", + }, + }, + uuid: "9ace6852-938b-48e8-b6b6-fc81d0140301", + _id: { + $oid: "67da9144029b39637717b800", + }, + }, + { + position: { + x: -26.099193600828997, + y: 0.01, + z: 5.353098600486059, + _id: { + $oid: "67da9144029b39637717b803", + }, + }, + uuid: "e74176ae-eb71-484e-aada-c0f54c67b81d", + _id: { + $oid: "67da9144029b39637717b802", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9147029b39637717b805", + }, + layer: 1, + line: [ + { + position: { + x: -26.099193600828997, + y: 0.01, + z: 5.353098600486059, + _id: { + $oid: "67da9147029b39637717b807", + }, + }, + uuid: "e74176ae-eb71-484e-aada-c0f54c67b81d", + _id: { + $oid: "67da9147029b39637717b806", + }, + }, + { + position: { + x: -32.60000073871014, + y: 0.01, + z: 5.35309860048606, + _id: { + $oid: "67da9147029b39637717b809", + }, + }, + uuid: "84072a23-945a-4270-a63e-3940e081dfc0", + _id: { + $oid: "67da9147029b39637717b808", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9148029b39637717b80b", + }, + layer: 1, + line: [ + { + position: { + x: -32.60000073871014, + y: 0.01, + z: 5.35309860048606, + _id: { + $oid: "67da9148029b39637717b80d", + }, + }, + uuid: "84072a23-945a-4270-a63e-3940e081dfc0", + _id: { + $oid: "67da9148029b39637717b80c", + }, + }, + { + position: { + x: -32.3, + y: 0.01, + z: -1.0500005000005297, + _id: { + $oid: "67da9148029b39637717b80f", + }, + }, + uuid: "ac46f914-ad0c-47f6-a1e9-8b73d0f359ef", + _id: { + $oid: "67da9148029b39637717b80e", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da914c029b39637717b811", + }, + layer: 1, + line: [ + { + position: { + x: -17.699999999999996, + y: 0.01, + z: -0.6500005000003296, + _id: { + $oid: "67da914c029b39637717b813", + }, + }, + uuid: "c92f88d8-c05e-4736-9b05-dc03c45b5cd7", + _id: { + $oid: "67da914c029b39637717b812", + }, + }, + { + position: { + x: -11.499999999999996, + y: 0.01, + z: -0.6500005000003296, + _id: { + $oid: "67da914c029b39637717b815", + }, + }, + uuid: "9eba6103-dfff-4282-8872-848584d26d45", + _id: { + $oid: "67da914c029b39637717b814", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da914e029b39637717b817", + }, + layer: 1, + line: [ + { + position: { + x: -11.499999999999996, + y: 0.01, + z: -0.6500005000003296, + _id: { + $oid: "67da914e029b39637717b819", + }, + }, + uuid: "9eba6103-dfff-4282-8872-848584d26d45", + _id: { + $oid: "67da914e029b39637717b818", + }, + }, + { + position: { + x: -11.499999999999996, + y: 0.01, + z: 5.950757032286672, + _id: { + $oid: "67da914e029b39637717b81b", + }, + }, + uuid: "c176bd60-1bfe-496b-a030-1a1b17fada7c", + _id: { + $oid: "67da914e029b39637717b81a", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da914f029b39637717b81d", + }, + layer: 1, + line: [ + { + position: { + x: -11.499999999999996, + y: 0.01, + z: 5.950757032286672, + _id: { + $oid: "67da914f029b39637717b81f", + }, + }, + uuid: "c176bd60-1bfe-496b-a030-1a1b17fada7c", + _id: { + $oid: "67da914f029b39637717b81e", + }, + }, + { + position: { + x: -17.90079308213536, + y: 0.01, + z: 5.950757032286673, + _id: { + $oid: "67da914f029b39637717b821", + }, + }, + uuid: "d99e9ed6-81b5-4a13-82db-e144b84d558b", + _id: { + $oid: "67da914f029b39637717b820", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9150029b39637717b823", + }, + layer: 1, + line: [ + { + position: { + x: -17.90079308213536, + y: 0.01, + z: 5.950757032286673, + _id: { + $oid: "67da9150029b39637717b825", + }, + }, + uuid: "d99e9ed6-81b5-4a13-82db-e144b84d558b", + _id: { + $oid: "67da9150029b39637717b824", + }, + }, + { + position: { + x: -17.699999999999996, + y: 0.01, + z: -0.6500005000003296, + _id: { + $oid: "67da9150029b39637717b827", + }, + }, + uuid: "c92f88d8-c05e-4736-9b05-dc03c45b5cd7", + _id: { + $oid: "67da9150029b39637717b826", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9155029b39637717b829", + }, + layer: 1, + line: [ + { + position: { + x: -2.400000000000002, + y: 0.01, + z: -0.8500005000004297, + _id: { + $oid: "67da9155029b39637717b82b", + }, + }, + uuid: "67580953-4b53-4d70-8e25-ed840c6f2d72", + _id: { + $oid: "67da9155029b39637717b82a", + }, + }, + { + position: { + x: 2.8009614495783284, + y: 0.01, + z: -0.8500005000004297, + _id: { + $oid: "67da9155029b39637717b82d", + }, + }, + uuid: "a4121a99-ff0a-4b9f-b6ea-545de9049ea6", + _id: { + $oid: "67da9155029b39637717b82c", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9155029b39637717b82f", + }, + layer: 1, + line: [ + { + position: { + x: 2.8009614495783284, + y: 0.01, + z: -0.8500005000004297, + _id: { + $oid: "67da9155029b39637717b831", + }, + }, + uuid: "a4121a99-ff0a-4b9f-b6ea-545de9049ea6", + _id: { + $oid: "67da9155029b39637717b830", + }, + }, + { + position: { + x: 2.800961449578329, + y: 0.01, + z: 7.352461661099969, + _id: { + $oid: "67da9155029b39637717b833", + }, + }, + uuid: "3f4a3ee0-f8ba-4bd3-9f5b-008330bdcdc8", + _id: { + $oid: "67da9155029b39637717b832", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9156029b39637717b835", + }, + layer: 1, + line: [ + { + position: { + x: 2.800961449578329, + y: 0.01, + z: 7.352461661099969, + _id: { + $oid: "67da9156029b39637717b837", + }, + }, + uuid: "3f4a3ee0-f8ba-4bd3-9f5b-008330bdcdc8", + _id: { + $oid: "67da9156029b39637717b836", + }, + }, + { + position: { + x: -3.500000000000003, + y: 0.01, + z: 6.049999500003015, + _id: { + $oid: "67da9156029b39637717b839", + }, + }, + uuid: "bd269764-9ece-4803-8581-ede457df054c", + _id: { + $oid: "67da9156029b39637717b838", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9157029b39637717b83b", + }, + layer: 1, + line: [ + { + position: { + x: -3.500000000000003, + y: 0.01, + z: 6.049999500003015, + _id: { + $oid: "67da9157029b39637717b83d", + }, + }, + uuid: "bd269764-9ece-4803-8581-ede457df054c", + _id: { + $oid: "67da9157029b39637717b83c", + }, + }, + { + position: { + x: -2.400000000000002, + y: 0.01, + z: -0.8500005000004297, + _id: { + $oid: "67da9157029b39637717b83f", + }, + }, + uuid: "67580953-4b53-4d70-8e25-ed840c6f2d72", + _id: { + $oid: "67da9157029b39637717b83e", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da915a029b39637717b841", + }, + layer: 1, + line: [ + { + position: { + x: -31.899999999999995, + y: 0.01, + z: 12.44999950000622, + _id: { + $oid: "67da915a029b39637717b843", + }, + }, + uuid: "32f006c1-4038-4159-9ca5-f51677a904f3", + _id: { + $oid: "67da915a029b39637717b842", + }, + }, + { + position: { + x: -26.499999999999993, + y: 0.01, + z: 12.849999500006419, + _id: { + $oid: "67da915a029b39637717b845", + }, + }, + uuid: "bca361f3-66a7-4137-a1a2-7194925224ea", + _id: { + $oid: "67da915a029b39637717b844", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da915b029b39637717b847", + }, + layer: 1, + line: [ + { + position: { + x: -26.499999999999993, + y: 0.01, + z: 12.849999500006419, + _id: { + $oid: "67da915b029b39637717b849", + }, + }, + uuid: "bca361f3-66a7-4137-a1a2-7194925224ea", + _id: { + $oid: "67da915b029b39637717b848", + }, + }, + { + position: { + x: -26.499999999999993, + y: 0.01, + z: 19.150793100818913, + _id: { + $oid: "67da915b029b39637717b84b", + }, + }, + uuid: "a92a1504-6628-4e02-bc5e-da38256dbaa8", + _id: { + $oid: "67da915b029b39637717b84a", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da915c029b39637717b84d", + }, + layer: 1, + line: [ + { + position: { + x: -26.499999999999993, + y: 0.01, + z: 19.150793100818913, + _id: { + $oid: "67da915c029b39637717b84f", + }, + }, + uuid: "a92a1504-6628-4e02-bc5e-da38256dbaa8", + _id: { + $oid: "67da915c029b39637717b84e", + }, + }, + { + position: { + x: -32.6, + y: 0.01, + z: 18.649999500009315, + _id: { + $oid: "67da915c029b39637717b851", + }, + }, + uuid: "577a0d87-ba44-41ce-b526-4352790e12a1", + _id: { + $oid: "67da915c029b39637717b850", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da915d029b39637717b853", + }, + layer: 1, + line: [ + { + position: { + x: -32.6, + y: 0.01, + z: 18.649999500009315, + _id: { + $oid: "67da915d029b39637717b855", + }, + }, + uuid: "577a0d87-ba44-41ce-b526-4352790e12a1", + _id: { + $oid: "67da915d029b39637717b854", + }, + }, + { + position: { + x: -31.899999999999995, + y: 0.01, + z: 12.44999950000622, + _id: { + $oid: "67da915d029b39637717b857", + }, + }, + uuid: "32f006c1-4038-4159-9ca5-f51677a904f3", + _id: { + $oid: "67da915d029b39637717b856", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9160029b39637717b859", + }, + layer: 1, + line: [ + { + position: { + x: -16.7, + y: 0.01, + z: 12.649999500006311, + _id: { + $oid: "67da9160029b39637717b85b", + }, + }, + uuid: "dfee795e-6446-40b7-892b-a94da5056328", + _id: { + $oid: "67da9160029b39637717b85a", + }, + }, + { + position: { + x: -10.199230814741991, + y: 0.01, + z: 12.649999500006311, + _id: { + $oid: "67da9160029b39637717b85d", + }, + }, + uuid: "ed10ad9b-b461-4c9c-a397-1bd5e05df3b9", + _id: { + $oid: "67da9160029b39637717b85c", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9160029b39637717b85f", + }, + layer: 1, + line: [ + { + position: { + x: -10.199230814741991, + y: 0.01, + z: 12.649999500006311, + _id: { + $oid: "67da9160029b39637717b861", + }, + }, + uuid: "ed10ad9b-b461-4c9c-a397-1bd5e05df3b9", + _id: { + $oid: "67da9160029b39637717b860", + }, + }, + { + position: { + x: -9.811292099159576, + y: 0.01, + z: 18.601665294824446, + _id: { + $oid: "67da9178029b39637717b88f", + }, + }, + uuid: "695d5859-3c42-45d5-8843-326833dc0802", + _id: { + $oid: "67da9160029b39637717b862", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9161029b39637717b865", + }, + layer: 1, + line: [ + { + position: { + x: -9.811292099159576, + y: 0.01, + z: 18.601665294824446, + _id: { + $oid: "67da9178029b39637717b88f", + }, + }, + uuid: "695d5859-3c42-45d5-8843-326833dc0802", + _id: { + $oid: "67da9161029b39637717b866", + }, + }, + { + position: { + x: -17.667236770650547, + y: 0.01, + z: 18.729297555078116, + _id: { + $oid: "67da917b029b39637717b891", + }, + }, + uuid: "4fc8bc1a-1cca-4a3f-8645-4ea608e9571d", + _id: { + $oid: "67da9161029b39637717b868", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9162029b39637717b86b", + }, + layer: 1, + line: [ + { + position: { + x: -17.667236770650547, + y: 0.01, + z: 18.729297555078116, + _id: { + $oid: "67da917b029b39637717b891", + }, + }, + uuid: "4fc8bc1a-1cca-4a3f-8645-4ea608e9571d", + _id: { + $oid: "67da9162029b39637717b86c", + }, + }, + { + position: { + x: -16.7, + y: 0.01, + z: 12.649999500006311, + _id: { + $oid: "67da9162029b39637717b86f", + }, + }, + uuid: "dfee795e-6446-40b7-892b-a94da5056328", + _id: { + $oid: "67da9162029b39637717b86e", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9165029b39637717b871", + }, + layer: 1, + line: [ + { + position: { + x: -2.4999999999999964, + y: 0.01, + z: 12.949999500006472, + _id: { + $oid: "67da9165029b39637717b873", + }, + }, + uuid: "357eb663-01e5-4dab-b961-bb14416a289e", + _id: { + $oid: "67da9165029b39637717b872", + }, + }, + { + position: { + x: 2.6009802979427414, + y: 0.01, + z: 12.949999500006472, + _id: { + $oid: "67da9165029b39637717b875", + }, + }, + uuid: "0e9f216f-77bd-442f-bd6f-c8ff04ae24f3", + _id: { + $oid: "67da9165029b39637717b874", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9166029b39637717b877", + }, + layer: 1, + line: [ + { + position: { + x: 2.6009802979427414, + y: 0.01, + z: 12.949999500006472, + _id: { + $oid: "67da9166029b39637717b879", + }, + }, + uuid: "0e9f216f-77bd-442f-bd6f-c8ff04ae24f3", + _id: { + $oid: "67da9166029b39637717b878", + }, + }, + { + position: { + x: 2.600980297942742, + y: 0.01, + z: 20.352675289331685, + _id: { + $oid: "67da9166029b39637717b87b", + }, + }, + uuid: "88d9dc8d-b7e5-488e-ac1a-7455885bea1f", + _id: { + $oid: "67da9166029b39637717b87a", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9166029b39637717b87d", + }, + layer: 1, + line: [ + { + position: { + x: 2.600980297942742, + y: 0.01, + z: 20.352675289331685, + _id: { + $oid: "67da9166029b39637717b87f", + }, + }, + uuid: "88d9dc8d-b7e5-488e-ac1a-7455885bea1f", + _id: { + $oid: "67da9166029b39637717b87e", + }, + }, + { + position: { + x: -3.300000000000004, + y: 0.01, + z: 19.949999500009966, + _id: { + $oid: "67da9166029b39637717b881", + }, + }, + uuid: "d36f39b8-c4b1-4859-8b86-f4c4693efda8", + _id: { + $oid: "67da9166029b39637717b880", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9168029b39637717b883", + }, + layer: 1, + line: [ + { + position: { + x: -3.300000000000004, + y: 0.01, + z: 19.949999500009966, + _id: { + $oid: "67da9168029b39637717b885", + }, + }, + uuid: "d36f39b8-c4b1-4859-8b86-f4c4693efda8", + _id: { + $oid: "67da9168029b39637717b884", + }, + }, + { + position: { + x: -2.4999999999999964, + y: 0.01, + z: 12.949999500006472, + _id: { + $oid: "67da9168029b39637717b887", + }, + }, + uuid: "357eb663-01e5-4dab-b961-bb14416a289e", + _id: { + $oid: "67da9168029b39637717b886", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da916d029b39637717b889", + }, + layer: 1, + line: [ + { + position: { + x: 6.899999999999991, + y: 0.01, + z: -15.150000500007573, + _id: { + $oid: "67da916d029b39637717b88b", + }, + }, + uuid: "909123d8-0364-4b08-9c6e-c0fedab2ea9b", + _id: { + $oid: "67da916d029b39637717b88a", + }, + }, + { + position: { + x: 6.899999999999993, + y: 0.01, + z: 22.050537130534586, + _id: { + $oid: "67da916d029b39637717b88d", + }, + }, + uuid: "cae9c80c-13f9-4681-b638-2df63ed21a68", + _id: { + $oid: "67da916d029b39637717b88c", + }, + }, + ], + type: "AisleLine", + __v: 0, + }, + { + _id: { + $oid: "67da9239029b39637717b8a6", + }, + layer: 1, + line: [ + { + position: { + x: -39.01181407607426, + y: 0.01, + z: -15.164269566681014, + _id: { + $oid: "67da9239029b39637717b8a8", + }, + }, + uuid: "597dae26-e0e4-40ab-a7cd-885e99e3b639", + _id: { + $oid: "67da9239029b39637717b8a7", + }, + }, + { + position: { + x: -39.01181407607426, + y: 0.01, + z: 2.4462151192550863, + _id: { + $oid: "67da9239029b39637717b8aa", + }, + }, + uuid: "36b6a74c-8eb8-4d1d-93a5-11bb0f692e21", + _id: { + $oid: "67da9239029b39637717b8a9", + }, + }, + ], + type: "WallLine", + __v: 0, + }, + { + _id: { + $oid: "67da923b029b39637717b8ac", + }, + layer: 1, + line: [ + { + position: { + x: -39.01181407607426, + y: 0.01, + z: 2.4462151192550863, + _id: { + $oid: "67da923b029b39637717b8ae", + }, + }, + uuid: "36b6a74c-8eb8-4d1d-93a5-11bb0f692e21", + _id: { + $oid: "67da923b029b39637717b8ad", + }, + }, + { + position: { + x: -39.01181407607426, + y: 0.01, + z: 18.116739329146327, + _id: { + $oid: "67da923b029b39637717b8b0", + }, + }, + uuid: "7fb2c837-9599-4481-9b90-6598c12873ed", + _id: { + $oid: "67da923b029b39637717b8af", + }, + }, + ], + type: "WallLine", + __v: 0, + }, + { + _id: { + $oid: "67da929f029b39637717b8c1", + }, + layer: 1, + line: [ + { + position: { + x: -36.42107219144319, + y: 0.01, + z: -18.72939338741006, + _id: { + $oid: "67da929f029b39637717b8c3", + }, + }, + uuid: "1c6a6439-e096-4f0f-a88e-9e221733e9a1", + _id: { + $oid: "67da929f029b39637717b8c2", + }, + }, + { + position: { + x: 4.466350487599726, + y: 0.01, + z: -18.72939338741006, + _id: { + $oid: "67da929f029b39637717b8c5", + }, + }, + uuid: "a8e4ec42-f05b-47ed-9cf4-3bc1461f178f", + _id: { + $oid: "67da929f029b39637717b8c4", + }, + }, + ], + type: "FloorLine", + __v: 0, + }, + ]; + React.useEffect(() => { + const groups = new THREE.Group(); + groups.name = "Meshes"; + groupRef.current = groups; + scene.add(groups); + + return () => { + if (groupRef.current) { + scene.remove(groupRef.current); + } + }; + }, [scene]); + + return ( + <> + + + {pathPoints.map((pair, i) => ( + + ))} + + ); +} diff --git a/app/src/modules/builder/agv/navMeshDetails.tsx b/app/src/modules/builder/agv/navMeshDetails.tsx new file mode 100644 index 0000000..f702d74 --- /dev/null +++ b/app/src/modules/builder/agv/navMeshDetails.tsx @@ -0,0 +1,166 @@ +// import React, { useEffect, useState } from "react"; +// import { init as initRecastNavigation } from "@recast-navigation/core"; +// import { generateSoloNavMesh } from "@recast-navigation/generators"; +// import { DebugDrawer, getPositionsAndIndices } from "@recast-navigation/three"; +// import { useThree } from "@react-three/fiber"; +// import * as THREE from "three"; +// interface RawNavMesh { +// ptr: number; // Replace `number` with the actual type if known +// } + +// interface NavMesh { +// raw: RawNavMesh; +// } + +// // Update the MeshState interface to use the correct type +// interface MeshState { +// setNavMesh: React.Dispatch>; +// } +// export default function NavMeshDetails({ setNavMesh }: MeshState) { +// const { scene } = useThree(); +// useEffect(() => { +// const initializeNavMesh = async () => { +// try { +// // Initialize Recast Navigation +// await initRecastNavigation(); + +// // Extract meshes from the scene +// // Extract meshes from the scene +// const meshes = scene?.children +// .filter((child) => child.name === "Meshes") +// .flatMap((mesh) => mesh.children); + +// if (!meshes || meshes.length === 0) { + +// return; +// } + +// // Filter and process only Mesh objects +// const meshObjects = meshes.filter( +// ( +// child +// ): child is THREE.Mesh< +// THREE.BufferGeometry, +// THREE.Material | THREE.Material[] +// > => child instanceof THREE.Mesh +// ); + +// if (meshObjects.length === 0) { + +// return; +// } + +// // Get positions and indices from the meshes +// const [positions, indices] = getPositionsAndIndices(meshObjects); + +// // Generate navigation mesh +// const cs = 0.05; +// const ch = 0.05; +// const walkableRadius = 0.87; +// const { success, navMesh } = generateSoloNavMesh(positions, indices, { +// cs, +// ch, +// walkableRadius: Math.round(walkableRadius / ch), +// }); + +// if (!success || !navMesh) { + +// return; +// } + +// // Log and update the navigation mesh + +// +// setNavMesh(navMesh); + +// // Draw the debug visualization +// const debugDrawer = new DebugDrawer(); +// debugDrawer.drawNavMesh(navMesh); +// // scene.add(debugDrawer); // Uncomment if you want to add the debug drawer to the scene +// } catch (error) { + +// } +// }; + +// initializeNavMesh(); +// }, [setNavMesh, scene]); + +// return null; +// } +import React, { useEffect } from "react"; +import { init as initRecastNavigation } from "@recast-navigation/core"; +import { generateSoloNavMesh } from "@recast-navigation/generators"; +import { DebugDrawer, getPositionsAndIndices } from "@recast-navigation/three"; +import { useThree } from "@react-three/fiber"; +import * as THREE from "three"; + +// Import the NavMesh type from the library +import { NavMesh as RecastNavMesh } from "@recast-navigation/core"; + +// Define the state type based on the library's NavMesh type +interface MeshState { + setNavMesh: React.Dispatch>; +} + +export default function NavMeshDetails({ setNavMesh }: MeshState) { + const { scene } = useThree(); + + useEffect(() => { + const initializeNavMesh = async () => { + try { + // Initialize Recast Navigation + await initRecastNavigation(); + + // Extract meshes from the scene + const meshes = scene?.children + .filter((child) => child.name === "Meshes") + .flatMap((mesh) => mesh.children); + + if (!meshes || meshes.length === 0) { + return; + } + + // Filter and process only Mesh objects + const meshObjects = meshes.filter( + ( + child + ): child is THREE.Mesh< + THREE.BufferGeometry, + THREE.Material | THREE.Material[] + > => child instanceof THREE.Mesh + ); + + if (meshObjects.length === 0) { + return; + } + + // Get positions and indices from the meshes + const [positions, indices] = getPositionsAndIndices(meshObjects); + + // Generate navigation mesh + const cs = 0.05; + const ch = 0.05; + const walkableRadius = 0.95; + const { success, navMesh } = generateSoloNavMesh(positions, indices, { + cs, + ch, + walkableRadius: Math.round(walkableRadius / ch), + }); + + if (!success || !navMesh) { + return; + } + // Log and update the navigation mesh + setNavMesh(navMesh); // Now compatible with the library's NavMesh type + // Draw the debug visualization + const debugDrawer = new DebugDrawer(); + debugDrawer.drawNavMesh(navMesh); + scene.add(debugDrawer); // Uncomment if you want to add the debug drawer to the scene + } catch (error) {} + }; + + initializeNavMesh(); + }, [setNavMesh, scene]); + + return null; +} diff --git a/app/src/modules/builder/agv/pathNavigator.tsx b/app/src/modules/builder/agv/pathNavigator.tsx new file mode 100644 index 0000000..257e3e4 --- /dev/null +++ b/app/src/modules/builder/agv/pathNavigator.tsx @@ -0,0 +1,140 @@ +import React, { useCallback, useEffect, useRef, useState } from "react"; +import * as THREE from "three"; +import { NavMeshQuery } from "@recast-navigation/core"; +import { NavMesh as RecastNavMesh } from "@recast-navigation/core"; +import { useFrame, useThree } from "@react-three/fiber"; +import { Line } from "@react-three/drei"; +interface Pair { + x: number; + y: number; + z: number; +} +interface PathProps { + navMesh: RecastNavMesh | null; // The navigation mesh + pathPoints: Pair[] | undefined; // Array of points (or undefined) +} +const PathNavigator = ({ navMesh, pathPoints }: PathProps) => { + const { scene, raycaster, gl } = useThree(); + + const [path, setPath] = useState([]); // Path is an array of THREE.Vector3 + const [points, setSelectedPoints] = useState([]); // Path is an array of THREE.Vector3 + const progressRef = useRef(0); + const meshRef = useRef(null!); + const handleClick = useCallback(() => { + if (!navMesh) return; + + const intersects = raycaster.intersectObjects(scene.children, true); + if (intersects.length > 0) { + const { point } = intersects[0]; + const newPoint = { x: point.x, y: 0, z: point.z }; + + setSelectedPoints((prevPoints: THREE.Vector3[]) => { + if (prevPoints.length === 2) { + // If two points already exist, replace them with the new point + return [new THREE.Vector3(newPoint.x, newPoint.y, newPoint.z)]; + } + // Otherwise, append the new point to the array + return [ + ...prevPoints, + new THREE.Vector3(newPoint.x, newPoint.y, newPoint.z), + ]; + }); + } + }, [navMesh, scene]); + React.useEffect(() => { + if (points?.length === 2 && navMesh) { + const [start, end] = points; + console.log("start: ", start); + console.log("end: ", end); + + const navMeshQuery = new NavMeshQuery(navMesh); + console.log("navMeshQuery: ", navMeshQuery); + + const { path } = navMeshQuery.computePath(start, end); + console.log("paths: ", path); + + // if (path.length > 0) { + // setPath( + // path.map((point) => { + // const newY = point.y + 0.1; // Increment the y-coordinate + // return new THREE.Vector3(point.x, newY, point.z); // Create a new Vector3 + // }) + // ); + // progressRef.current = 0; + // } + } + }, [points,]); + + useFrame((_, delta) => { + if (path.length > 1 && meshRef.current) { + const speed = 3; + progressRef.current += delta * speed; + let totalDistance = 0; + const distances = []; + for (let i = 0; i < path.length - 1; i++) { + const start = new THREE.Vector3(...path[i]); + const end = new THREE.Vector3(...path[i + 1]); + const segmentDistance = start.distanceTo(end); + distances.push(segmentDistance); + totalDistance += segmentDistance; + } + + let coveredDistance = progressRef.current; + let accumulatedDistance = 0; + let index = 0; + + while ( + index < distances.length && + coveredDistance > accumulatedDistance + distances[index] + ) { + accumulatedDistance += distances[index]; + index++; + } + + if (index < distances.length) { + const start = new THREE.Vector3(...path[index]); + const end = new THREE.Vector3(...path[index + 1]); + const segmentDistance = distances[index]; + + const t = (coveredDistance - accumulatedDistance) / segmentDistance; + const position = start.lerp(end, t); + meshRef.current.position.copy(position); + + const direction = new THREE.Vector3() + .subVectors(end, start) + .normalize(); + const targetQuaternion = new THREE.Quaternion().setFromUnitVectors( + new THREE.Vector3(0, 0, 1), + direction + ); + meshRef.current.quaternion.slerp(targetQuaternion, 0.1); + } else { + progressRef.current = totalDistance; + } + } + }); + + useEffect(() => { + gl.domElement.addEventListener("click", handleClick); + return () => gl.domElement.removeEventListener("click", handleClick); + }, [handleClick]); + return ( + <> + {path.length > 0 && } + {path.length > 0 && ( + // 0 ? path[0] : [0, 0.1, 0]} + // scale={[0.5, 0.5, 0.5]} + // /> + 0 ? path[0] : [0, 0.1, 0]}> + + + + )} + + ); +}; + +export default PathNavigator; diff --git a/app/src/modules/builder/agv/polygonGenerator.tsx b/app/src/modules/builder/agv/polygonGenerator.tsx new file mode 100644 index 0000000..0f4307b --- /dev/null +++ b/app/src/modules/builder/agv/polygonGenerator.tsx @@ -0,0 +1,159 @@ +import * as THREE from "three"; +import { useEffect, useRef } from "react"; +import { useThree } from "@react-three/fiber"; +import * as turf from "@turf/turf"; +import * as Types from "../../../types/world/worldTypes"; +// import { Feature, Polygon, MultiPolygon } from "@turf/helpers"; +type Point = { + position: { x: number; y: number; z: number }; + uuid: string; +}; + +type LineData = { + type: string; + line: Point[]; +}; + +type PolygonGeneratorProps = { + processPoint: LineData[]; + groupRef: React.RefObject; +}; + +export default function PolygonGenerator({ + processPoint, + groupRef, +}: PolygonGeneratorProps) { + const { scene } = useThree(); + let lines : Types.Lines; +// console.log("storedFloorItems: ", lines); + +// useEffect(() => { +// if (!groupRef?.current) return; +// const groundGeometry = new THREE.BoxGeometry(80, 1, 60); +// const groundMaterial = new THREE.MeshBasicMaterial({ color: "#99ff99" }); +// const groundMesh = new THREE.Mesh(groundGeometry, groundMaterial); +// groundMesh.position.set(-10, -0.5, 3); +// groundMesh.name = "GroundMesh"; +// groupRef.current.add(groundMesh); +// scene.add(groupRef.current); +// }, [groupRef, scene]); + + useEffect(() => { + if (!processPoint) return; + const wallInLayer = processPoint?.filter( + (line) => line.type === "WallLine" + ); + const wallPoints = wallInLayer.map((pair) => + pair?.line.map((vals) => vals.position) + ); + renderWallGeometry(wallPoints); + + const linesInLayer = processPoint?.filter( + (line) => line.type === "AisleLine" + ); + const result = linesInLayer.map((pair) => + pair?.line.map((point) => ({ + position: [point.position.x, point.position.z], + uuid: point.uuid, + })) + ); + + const lineFeatures = result.map((line) => + turf.lineString(line.map((p) => p.position)) + ); + const polygons = turf.polygonize(turf.featureCollection(lineFeatures)); + let union: any[] = []; + + polygons.features.forEach((feature) => { + union.push(feature); + }); + + if (union.length > 0) { + const unionResult = turf.union(turf.featureCollection(union)); + if (unionResult && unionResult.geometry.type === "MultiPolygon") { + unionResult.geometry.coordinates.forEach((poly) => { + const Coordinates = poly[0].map( + ([x, z]) => new THREE.Vector3(x, 0, z) + ); + renderBoxGeometry(Coordinates); + }); + } else if (unionResult && unionResult.geometry.type === "Polygon") { + const Coordinates = unionResult.geometry.coordinates[0].map( + ([x, z]) => new THREE.Vector3(x, 0, z) + ); + renderBoxGeometry(Coordinates); + } + } + }, [processPoint]); + + const renderBoxGeometry = (coordinates: THREE.Vector3[]) => { + const minX = Math.min(...coordinates.map((p) => p.x)); + const maxX = Math.max(...coordinates.map((p) => p.x)); + const minZ = Math.min(...coordinates.map((p) => p.z)); + const maxZ = Math.max(...coordinates.map((p) => p.z)); + + const width = maxX - minX; + const depth = maxZ - minZ; + const height = 3; + + const geometry = new THREE.BoxGeometry(width, height, depth); + const material = new THREE.MeshBasicMaterial({ color: "#ff66cc" }); + const mesh = new THREE.Mesh(geometry, material); + mesh.position.set((minX + maxX) / 2, height / 2, (minZ + maxZ) / 2); + + groupRef?.current?.add(mesh); + scene.add(groupRef.current!); + }; + + const renderWallGeometry = ( + walls: { x: number; y: number; z: number }[][] + ) => { + walls.forEach((wall) => { + if (wall.length < 2) return; + + for (let i = 0; i < wall.length - 1; i++) { + const start = new THREE.Vector3(wall[i].x, wall[i].y, wall[i].z); + const end = new THREE.Vector3( + wall[i + 1].x, + wall[i + 1].y, + wall[i + 1].z + ); + const wallHeight = 10; + const direction = new THREE.Vector3().subVectors(end, start); + const length = direction.length(); + direction.normalize(); + + const wallGeometry = new THREE.BoxGeometry(length, wallHeight, 0.5); + const wallMaterial = new THREE.MeshBasicMaterial({ + color: "#aaa", + transparent: true, + opacity: 0.5, + }); + const wallMesh = new THREE.Mesh(wallGeometry, wallMaterial); + + const midPoint = new THREE.Vector3() + .addVectors(start, end) + .multiplyScalar(0.5); + wallMesh.position.set(midPoint.x, wallHeight / 2, midPoint.z); + + const quaternion = new THREE.Quaternion(); + quaternion.setFromUnitVectors(new THREE.Vector3(1, 0, 0), direction); + wallMesh.quaternion.copy(quaternion); + + groupRef?.current?.add(wallMesh); + scene.add(groupRef.current!); + + const lineGeometry = new THREE.BufferGeometry().setFromPoints([ + start, + end, + ]); + const lineMaterial = new THREE.LineBasicMaterial({ color: "blue" }); + const line = new THREE.Line(lineGeometry, lineMaterial); + + groupRef?.current?.add(line); + } + }); + }; + + return null; +} diff --git a/app/src/modules/scene/scene.tsx b/app/src/modules/scene/scene.tsx index 3aaff94..6d291b1 100644 --- a/app/src/modules/scene/scene.tsx +++ b/app/src/modules/scene/scene.tsx @@ -51,6 +51,9 @@ export default function Scene() { + + + ); } diff --git a/app/src/modules/scene/world/world.tsx b/app/src/modules/scene/world/world.tsx index f8a43ec..998b22d 100644 --- a/app/src/modules/scene/world/world.tsx +++ b/app/src/modules/scene/world/world.tsx @@ -28,7 +28,7 @@ import { useShadows, useUpdateScene, useWalls, - useToolMode + useToolMode, } from "../../../store/store"; ////////// 3D Function Imports ////////// @@ -50,16 +50,17 @@ import { findEnvironment } from "../../../services/factoryBuilder/environment/fi import Layer2DVisibility from "../../builder/geomentries/layers/layer2DVisibility"; import DrieHtmlTemp from "../mqttTemp/drieHtmlTemp"; import ZoneGroup from "../../builder/groups/zoneGroup"; +import Agv from "../../builder/agv/agv"; export default function World() { - const state = useThree(); // Importing the state from the useThree hook, which contains the scene, camera, and other Three.js elements. - const csg = useRef(); // Reference for CSG object, used for 3D modeling. - const CSGGroup = useRef() as Types.RefMesh; // Reference to a group of CSG objects. - const scene = useRef() as Types.RefScene; // Reference to the scene. - const camera = useRef() as Types.RefCamera; // Reference to the camera object. - const controls = useRef(); // Reference to the controls object. - const raycaster = useRef() as Types.RefRaycaster; // Reference for raycaster used for detecting objects being pointed at in the scene. - const dragPointControls = useRef() as Types.RefDragControl; // Reference for drag point controls, an array for drag control. + const state = useThree(); // Importing the state from the useThree hook, which contains the scene, camera, and other Three.js elements. + const csg = useRef(); // Reference for CSG object, used for 3D modeling. + const CSGGroup = useRef() as Types.RefMesh; // Reference to a group of CSG objects. + const scene = useRef() as Types.RefScene; // Reference to the scene. + const camera = useRef() as Types.RefCamera; // Reference to the camera object. + const controls = useRef(); // Reference to the controls object. + const raycaster = useRef() as Types.RefRaycaster; // Reference for raycaster used for detecting objects being pointed at in the scene. + const dragPointControls = useRef() as Types.RefDragControl; // Reference for drag point controls, an array for drag control. // Assigning the scene and camera from the Three.js state to the references. @@ -68,47 +69,48 @@ export default function World() { controls.current = state.controls; raycaster.current = state.raycaster; - const plane = useRef(null); // Reference for a plane object for raycaster reference. - const grid = useRef() as any; // Reference for a grid object for raycaster reference. - const snappedPoint = useRef() as Types.RefVector3; // Reference for storing a snapped point at the (end = isSnapped) and (start = ispreSnapped) of the line. - const isSnapped = useRef(false) as Types.RefBoolean; // Boolean reference to indicate if an object is snapped at the (end). - const anglesnappedPoint = useRef() as Types.RefVector3; // Reference for storing an angle-snapped point when the line is in 90 degree etc... - const isAngleSnapped = useRef(false) as Types.RefBoolean; // Boolean to indicate if angle snapping is active. - const isSnappedUUID = useRef() as Types.RefString; // UUID reference to identify the snapped point. - const ispreSnapped = useRef(false) as Types.RefBoolean; // Boolean reference to indicate if an object is snapped at the (start). - const tempLoader = useRef() as Types.RefMesh; // Reference for a temporary loader for the floor items. - const isTempLoader = useRef() as Types.RefBoolean; // Reference to check if a temporary loader is active. - const Tube = useRef() as Types.RefTubeGeometry; // Reference for tubes used for reference line creation and updation. - const line = useRef([]) as Types.RefLine; // Reference for line which stores the current line that is being drawn. - const lines = useRef([]) as Types.RefLines; // Reference for lines which stores all the lines that are ever drawn. - const onlyFloorline = useRef([]); // Reference for floor lines which does not have walls or roof and have only floor used to store the current line that is being drawn. - const onlyFloorlines = useRef([]); // Reference for all the floor lines that are ever drawn. - const ReferenceLineMesh = useRef() as Types.RefMesh; // Reference for storing the mesh of the reference line for moving it during draw. - const LineCreated = useRef(false) as Types.RefBoolean; // Boolean to track whether the reference line is created or not. - const referencePole = useRef() as Types.RefMesh; // Reference for a pole that is used as the reference for the user to show where it is placed. - const itemsGroup = useRef() as Types.RefGroup; // Reference to the THREE.Group that has the floor items (Gltf). - const floorGroup = useRef() as Types.RefGroup; // Reference to the THREE.Group that has the roofs and the floors. - const AttachedObject = useRef() as Types.RefMesh; // Reference for an object that is attached using dbl click for transform controls rotation. - const floorPlanGroup = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the lines group and the points group. - const floorPlanGroupLine = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the lines that are drawn. - const floorPlanGroupPoint = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the points that are created. + const plane = useRef(null); // Reference for a plane object for raycaster reference. + const grid = useRef() as any; // Reference for a grid object for raycaster reference. + const snappedPoint = useRef() as Types.RefVector3; // Reference for storing a snapped point at the (end = isSnapped) and (start = ispreSnapped) of the line. + const isSnapped = useRef(false) as Types.RefBoolean; // Boolean reference to indicate if an object is snapped at the (end). + const anglesnappedPoint = useRef() as Types.RefVector3; // Reference for storing an angle-snapped point when the line is in 90 degree etc... + const isAngleSnapped = useRef(false) as Types.RefBoolean; // Boolean to indicate if angle snapping is active. + const isSnappedUUID = useRef() as Types.RefString; // UUID reference to identify the snapped point. + const ispreSnapped = useRef(false) as Types.RefBoolean; // Boolean reference to indicate if an object is snapped at the (start). + const tempLoader = useRef() as Types.RefMesh; // Reference for a temporary loader for the floor items. + const isTempLoader = useRef() as Types.RefBoolean; // Reference to check if a temporary loader is active. + const Tube = useRef() as Types.RefTubeGeometry; // Reference for tubes used for reference line creation and updation. + const line = useRef([]) as Types.RefLine; // Reference for line which stores the current line that is being drawn. + const lines = useRef([]) as Types.RefLines; // Reference for lines which stores all the lines that are ever drawn. + const onlyFloorline = useRef([]); // Reference for floor lines which does not have walls or roof and have only floor used to store the current line that is being drawn. + const onlyFloorlines = useRef([]); // Reference for all the floor lines that are ever drawn. + const ReferenceLineMesh = useRef() as Types.RefMesh; // Reference for storing the mesh of the reference line for moving it during draw. + const LineCreated = useRef(false) as Types.RefBoolean; // Boolean to track whether the reference line is created or not. + const referencePole = useRef() as Types.RefMesh; // Reference for a pole that is used as the reference for the user to show where it is placed. + const itemsGroup = useRef() as Types.RefGroup; // Reference to the THREE.Group that has the floor items (Gltf). + const floorGroup = useRef() as Types.RefGroup; // Reference to the THREE.Group that has the roofs and the floors. + const AttachedObject = useRef() as Types.RefMesh; // Reference for an object that is attached using dbl click for transform controls rotation. + const floorPlanGroup = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the lines group and the points group. + const floorPlanGroupLine = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the lines that are drawn. + const floorPlanGroupPoint = useRef() as Types.RefGroup; // Reference for a THREE.Group that has the points that are created. const floorGroupAisle = useRef() as Types.RefGroup; const zoneGroup = useRef() as Types.RefGroup; - const currentLayerPoint = useRef([]) as Types.RefMeshArray; // Reference for points that re in the current layer used to update the points in drag controls. - const hoveredDeletablePoint = useRef() as Types.RefMesh; // Reference for the currently hovered point that can be deleted. - const hoveredDeletableLine = useRef() as Types.RefMesh; // Reference for the currently hovered line that can be deleted. - const hoveredDeletableFloorItem = useRef() as Types.RefMesh; // Reference for the currently hovered floor item that can be deleted. - const hoveredDeletableWallItem = useRef() as Types.RefMesh; // Reference for the currently hovered wall item that can be deleted. - const hoveredDeletablePillar = useRef() as Types.RefMesh; // Reference for the currently hovered pillar that can be deleted. - const currentWallItem = useRef() as Types.RefMesh; // Reference for the currently selected wall item that can be scaled, dragged etc... + const currentLayerPoint = useRef([]) as Types.RefMeshArray; // Reference for points that re in the current layer used to update the points in drag controls. + const hoveredDeletablePoint = useRef() as Types.RefMesh; // Reference for the currently hovered point that can be deleted. + const hoveredDeletableLine = useRef() as Types.RefMesh; // Reference for the currently hovered line that can be deleted. + const hoveredDeletableFloorItem = useRef() as Types.RefMesh; // Reference for the currently hovered floor item that can be deleted. + const hoveredDeletableWallItem = useRef() as Types.RefMesh; // Reference for the currently hovered wall item that can be deleted. + const hoveredDeletablePillar = useRef() as Types.RefMesh; // Reference for the currently hovered pillar that can be deleted. + const currentWallItem = useRef() as Types.RefMesh; // Reference for the currently selected wall item that can be scaled, dragged etc... - const cursorPosition = new THREE.Vector3(); // 3D vector for storing the cursor position. + const cursorPosition = new THREE.Vector3(); // 3D vector for storing the cursor position. - const [selectedItemsIndex, setSelectedItemsIndex] = useState(null); // State for tracking the index of the selected item. - const { activeLayer, setActiveLayer } = useActiveLayer(); // State that changes based on which layer the user chooses in Layers.jsx. - const { toggleView, setToggleView } = useToggleView(); // State for toggling between 2D and 3D. + const [selectedItemsIndex, setSelectedItemsIndex] = + useState(null); // State for tracking the index of the selected item. + const { activeLayer, setActiveLayer } = useActiveLayer(); // State that changes based on which layer the user chooses in Layers.jsx. + const { toggleView, setToggleView } = useToggleView(); // State for toggling between 2D and 3D. const { toolMode, setToolMode } = useToolMode(); - const { movePoint, setMovePoint } = useMovePoint(); // State that stores a boolean which represents whether the move mode is active or not. + const { movePoint, setMovePoint } = useMovePoint(); // State that stores a boolean which represents whether the move mode is active or not. const { deletePointOrLine, setDeletePointOrLine } = useDeletePointOrLine(); const { socket } = useSocketStore(); const { roofVisibility, setRoofVisibility } = useRoofVisibility(); @@ -118,7 +120,6 @@ export default function World() { const { walls, setWalls } = useWalls(); const [RefTextupdate, setRefTextUpdate] = useState(-1000); - // const loader = new GLTFLoader(); // const dracoLoader = new DRACOLoader(); @@ -162,7 +163,14 @@ export default function World() { dragPointControls.current.enabled = false; } if (toggleView) { - Layer2DVisibility(activeLayer, floorPlanGroup, floorPlanGroupLine, floorPlanGroupPoint, currentLayerPoint, dragPointControls); + Layer2DVisibility( + activeLayer, + floorPlanGroup, + floorPlanGroupLine, + floorPlanGroupPoint, + currentLayerPoint, + dragPointControls + ); } else { setToolMode(null); setDeletePointOrLine(false); @@ -179,11 +187,14 @@ export default function World() { }, []); useEffect(() => { - const email = localStorage.getItem('email') - const organization = (email!.split("@")[1]).split(".")[0]; + const email = localStorage.getItem("email"); + const organization = email!.split("@")[1].split(".")[0]; async function fetchVisibility() { - const visibility = await findEnvironment(organization, localStorage.getItem('userId')!); + const visibility = await findEnvironment( + organization, + localStorage.getItem("userId")! + ); if (visibility) { setRoofVisibility(visibility.roofVisibility); setWallVisibility(visibility.wallVisibility); @@ -191,13 +202,33 @@ export default function World() { } } fetchVisibility(); - }, []) + }, []); ////////// UseFrame is Here ////////// useFrame(() => { if (toolMode) { - Draw(state, plane, cursorPosition, floorPlanGroupPoint, floorPlanGroupLine, snappedPoint, isSnapped, isSnappedUUID, line, lines, ispreSnapped, floorPlanGroup, ReferenceLineMesh, LineCreated, setRefTextUpdate, Tube, anglesnappedPoint, isAngleSnapped, toolMode) + Draw( + state, + plane, + cursorPosition, + floorPlanGroupPoint, + floorPlanGroupLine, + snappedPoint, + isSnapped, + isSnappedUUID, + line, + lines, + ispreSnapped, + floorPlanGroup, + ReferenceLineMesh, + LineCreated, + setRefTextUpdate, + Tube, + anglesnappedPoint, + isAngleSnapped, + toolMode + ); } }); @@ -304,7 +335,6 @@ export default function World() { anglesnappedPoint={anglesnappedPoint} /> */} - - + + + {/* */} ); -} \ No newline at end of file +} From 3953b1813f1452e8ad990736cd03d7a8e1819587 Mon Sep 17 00:00:00 2001 From: Poovizhi99 Date: Wed, 26 Mar 2025 18:40:28 +0530 Subject: [PATCH 2/9] updated navmesh invisible state --- app/src/modules/builder/agv/agv.tsx | 15 +++++--- .../modules/builder/agv/navMeshDetails.tsx | 2 +- .../modules/builder/agv/polygonGenerator.tsx | 37 ++++++++++++------- app/src/modules/scene/world/world.tsx | 3 +- 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/app/src/modules/builder/agv/agv.tsx b/app/src/modules/builder/agv/agv.tsx index 52ad15c..e8a7ea7 100644 --- a/app/src/modules/builder/agv/agv.tsx +++ b/app/src/modules/builder/agv/agv.tsx @@ -12,11 +12,9 @@ interface RawNavMesh { interface NavMesh { raw: RawNavMesh; } -// interface LineProps{ -// lines -// planes: -// } -export default function Agv({ }) { +export default function Agv({ lines, plane }: any) { + console.log("planes: ", plane); + console.log("lines: ", lines); const { scene } = useThree(); const groupRef = useRef(null); const [navMesh, setNavMesh] = useState(null); @@ -1567,7 +1565,12 @@ export default function Agv({ }) { return ( <> - + {pathPoints.map((pair, i) => ( diff --git a/app/src/modules/builder/agv/navMeshDetails.tsx b/app/src/modules/builder/agv/navMeshDetails.tsx index f702d74..0f4852e 100644 --- a/app/src/modules/builder/agv/navMeshDetails.tsx +++ b/app/src/modules/builder/agv/navMeshDetails.tsx @@ -155,7 +155,7 @@ export default function NavMeshDetails({ setNavMesh }: MeshState) { // Draw the debug visualization const debugDrawer = new DebugDrawer(); debugDrawer.drawNavMesh(navMesh); - scene.add(debugDrawer); // Uncomment if you want to add the debug drawer to the scene + // scene.add(debugDrawer); // Uncomment if you want to add the debug drawer to the scene } catch (error) {} }; diff --git a/app/src/modules/builder/agv/polygonGenerator.tsx b/app/src/modules/builder/agv/polygonGenerator.tsx index 0f4307b..3ad5c95 100644 --- a/app/src/modules/builder/agv/polygonGenerator.tsx +++ b/app/src/modules/builder/agv/polygonGenerator.tsx @@ -17,26 +17,34 @@ type LineData = { type PolygonGeneratorProps = { processPoint: LineData[]; groupRef: React.RefObject; + lines: any; + plane: any; }; export default function PolygonGenerator({ processPoint, groupRef, + lines, + plane, }: PolygonGeneratorProps) { const { scene } = useThree(); - let lines : Types.Lines; -// console.log("storedFloorItems: ", lines); + console.log( + "lines: ", + lines.current.map((val: any) => val) + ); + console.log("planes: ", plane); + // console.log("storedFloorItems: ", lines); -// useEffect(() => { -// if (!groupRef?.current) return; -// const groundGeometry = new THREE.BoxGeometry(80, 1, 60); -// const groundMaterial = new THREE.MeshBasicMaterial({ color: "#99ff99" }); -// const groundMesh = new THREE.Mesh(groundGeometry, groundMaterial); -// groundMesh.position.set(-10, -0.5, 3); -// groundMesh.name = "GroundMesh"; -// groupRef.current.add(groundMesh); -// scene.add(groupRef.current); -// }, [groupRef, scene]); + useEffect(() => { + if (!groupRef?.current) return; + // const groundGeometry = new THREE.BoxGeometry(80, 1, 60); + // const groundMaterial = new THREE.MeshBasicMaterial({ color: "#99ff99" }); + // const groundMesh = new THREE.Mesh(groundGeometry, groundMaterial); + // groundMesh.position.set(-10, -0.5, 3); + // groundMesh.name = "GroundMesh"; + groupRef.current.add(plane); + scene.add(groupRef.current); + }, [groupRef, scene]); useEffect(() => { if (!processPoint) return; @@ -97,7 +105,10 @@ export default function PolygonGenerator({ const height = 3; const geometry = new THREE.BoxGeometry(width, height, depth); - const material = new THREE.MeshBasicMaterial({ color: "#ff66cc" }); + const material = new THREE.MeshBasicMaterial({ + color: "#ff66cc", + visible: false, + }); const mesh = new THREE.Mesh(geometry, material); mesh.position.set((minX + maxX) / 2, height / 2, (minZ + maxZ) / 2); diff --git a/app/src/modules/scene/world/world.tsx b/app/src/modules/scene/world/world.tsx index 998b22d..16b4b53 100644 --- a/app/src/modules/scene/world/world.tsx +++ b/app/src/modules/scene/world/world.tsx @@ -359,8 +359,7 @@ export default function World() { - - {/* */} + ); } From 6e925a995ceb04f8c00eecaf0c3744f97fe6dda8 Mon Sep 17 00:00:00 2001 From: Poovizhi99 Date: Wed, 26 Mar 2025 18:46:20 +0530 Subject: [PATCH 3/9] cleared consoles --- app/src/modules/builder/agv/agv.tsx | 4 ++-- .../modules/builder/agv/polygonGenerator.tsx | 24 +++++-------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/app/src/modules/builder/agv/agv.tsx b/app/src/modules/builder/agv/agv.tsx index e8a7ea7..b2e78c0 100644 --- a/app/src/modules/builder/agv/agv.tsx +++ b/app/src/modules/builder/agv/agv.tsx @@ -13,8 +13,8 @@ interface NavMesh { raw: RawNavMesh; } export default function Agv({ lines, plane }: any) { - console.log("planes: ", plane); - console.log("lines: ", lines); + + const { scene } = useThree(); const groupRef = useRef(null); const [navMesh, setNavMesh] = useState(null); diff --git a/app/src/modules/builder/agv/polygonGenerator.tsx b/app/src/modules/builder/agv/polygonGenerator.tsx index 3ad5c95..75c0911 100644 --- a/app/src/modules/builder/agv/polygonGenerator.tsx +++ b/app/src/modules/builder/agv/polygonGenerator.tsx @@ -12,6 +12,9 @@ type Point = { type LineData = { type: string; line: Point[]; + _id: {}; + layer: number; + __v: number; }; type PolygonGeneratorProps = { @@ -28,23 +31,8 @@ export default function PolygonGenerator({ plane, }: PolygonGeneratorProps) { const { scene } = useThree(); - console.log( - "lines: ", - lines.current.map((val: any) => val) - ); - console.log("planes: ", plane); - // console.log("storedFloorItems: ", lines); - useEffect(() => { - if (!groupRef?.current) return; - // const groundGeometry = new THREE.BoxGeometry(80, 1, 60); - // const groundMaterial = new THREE.MeshBasicMaterial({ color: "#99ff99" }); - // const groundMesh = new THREE.Mesh(groundGeometry, groundMaterial); - // groundMesh.position.set(-10, -0.5, 3); - // groundMesh.name = "GroundMesh"; - groupRef.current.add(plane); - scene.add(groupRef.current); - }, [groupRef, scene]); + useEffect(() => { if (!processPoint) return; @@ -113,7 +101,7 @@ export default function PolygonGenerator({ mesh.position.set((minX + maxX) / 2, height / 2, (minZ + maxZ) / 2); groupRef?.current?.add(mesh); - scene.add(groupRef.current!); + // scene.add(groupRef.current!); }; const renderWallGeometry = ( @@ -152,7 +140,7 @@ export default function PolygonGenerator({ wallMesh.quaternion.copy(quaternion); groupRef?.current?.add(wallMesh); - scene.add(groupRef.current!); + // scene.add(groupRef.current!); const lineGeometry = new THREE.BufferGeometry().setFromPoints([ start, From c1251dc59847959c7ad1254d634b8c6c9da6abcd Mon Sep 17 00:00:00 2001 From: Poovizhi99 Date: Thu, 27 Mar 2025 15:37:16 +0530 Subject: [PATCH 4/9] created paths based on aisle and wall points --- app/src/components/ui/list/DropDownList.tsx | 2 +- app/src/modules/builder/agv/agv.tsx | 1583 +---------------- .../modules/builder/agv/navMeshDetails.tsx | 155 +- app/src/modules/builder/agv/pathNavigator.tsx | 98 +- .../modules/builder/agv/polygonGenerator.tsx | 130 +- 5 files changed, 141 insertions(+), 1827 deletions(-) diff --git a/app/src/components/ui/list/DropDownList.tsx b/app/src/components/ui/list/DropDownList.tsx index a61054b..d31ef96 100644 --- a/app/src/components/ui/list/DropDownList.tsx +++ b/app/src/components/ui/list/DropDownList.tsx @@ -39,7 +39,7 @@ const DropDownList: React.FC = ({ useEffect(() => { async function GetZoneData() { const response = await getZonesApi("hexrfactory") - console.log('response: ', response.data); + // console.log('response: ', response.data); setZoneDataList([{ id: "1", name: "zone1" }, { id: "2", name: "Zone 2" },]) } diff --git a/app/src/modules/builder/agv/agv.tsx b/app/src/modules/builder/agv/agv.tsx index b2e78c0..749e39f 100644 --- a/app/src/modules/builder/agv/agv.tsx +++ b/app/src/modules/builder/agv/agv.tsx @@ -1,1580 +1,51 @@ -import React from "react"; +import PolygonGenerator from "./polygonGenerator"; import { useThree } from "@react-three/fiber"; import { useEffect, useRef, useState } from "react"; import * as THREE from "three"; -import PolygonGenerator from "./polygonGenerator"; -import NavMeshDetails from "./navMeshDetails"; -import { NavMesh as RecastNavMesh } from "@recast-navigation/core"; +import * as Types from "../../../types/world/worldTypes"; import PathNavigator from "./pathNavigator"; -interface RawNavMesh { - ptr: number; // Replace `number` with the actual type if known -} -interface NavMesh { - raw: RawNavMesh; -} -export default function Agv({ lines, plane }: any) { - - - const { scene } = useThree(); - const groupRef = useRef(null); - const [navMesh, setNavMesh] = useState(null); +import NavMeshDetails from "./navMeshDetails"; + +const Agv = ({ + lines, + plane, +}: { + lines: Types.RefLines; + plane: Types.RefMesh; +}) => { let pathPoints = [ [ { x: 8.477161935339709, y: 0, z: 17.41343083550102 }, { x: 9.175416491482693, y: 0, z: -12.361001232663693 }, ], + , + // [ + // { x: 13.508213355232144, y: 0, z: -15.456970649652018 }, + // { x: -30.464866520869617, y: 0, z: 9.779806557688929 }, + // ], [ { x: 16.792040856420844, y: 0, z: 15.86281907549489 }, { x: -42.77173264503395, y: 0, z: -15.821322764400804 }, ], ]; - let processPoint = [ - { - _id: { - $oid: "67da9121029b39637717b7b1", - }, - layer: 1, - line: [ - { - position: { - x: -32.49832772097252, - y: 0.01, - z: -14.687753872309017, - _id: { - $oid: "67da9121029b39637717b7b3", - }, - }, - uuid: "9ba396ee-8ef5-4996-84a9-6fdac915eea8", - _id: { - $oid: "67da9121029b39637717b7b2", - }, - }, - { - position: { - x: -26.13448312795506, - y: 0.01, - z: -14.687753872309019, - _id: { - $oid: "67da9121029b39637717b7b5", - }, - }, - uuid: "b51d6a49-8d6a-4889-8b51-6b45353ee4d7", - _id: { - $oid: "67da9121029b39637717b7b4", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9122029b39637717b7b7", - }, - layer: 1, - line: [ - { - position: { - x: -26.13448312795506, - y: 0.01, - z: -14.687753872309019, - _id: { - $oid: "67da9122029b39637717b7b9", - }, - }, - uuid: "b51d6a49-8d6a-4889-8b51-6b45353ee4d7", - _id: { - $oid: "67da9122029b39637717b7b8", - }, - }, - { - position: { - x: -26.13448312795506, - y: 0.01, - z: -7.782512568268439, - _id: { - $oid: "67da9122029b39637717b7bb", - }, - }, - uuid: "b5ace9cb-7795-47bd-a813-7ae29a713692", - _id: { - $oid: "67da9122029b39637717b7ba", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9126029b39637717b7bd", - }, - layer: 1, - line: [ - { - position: { - x: -26.13448312795506, - y: 0.01, - z: -7.782512568268439, - _id: { - $oid: "67da9126029b39637717b7bf", - }, - }, - uuid: "b5ace9cb-7795-47bd-a813-7ae29a713692", - _id: { - $oid: "67da9126029b39637717b7be", - }, - }, - { - position: { - x: -32.639282521592044, - y: 0.01, - z: -7.782512568268438, - _id: { - $oid: "67da9126029b39637717b7c1", - }, - }, - uuid: "08df978b-ce38-4a0d-a89c-9992f0c470e7", - _id: { - $oid: "67da9126029b39637717b7c0", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9127029b39637717b7c3", - }, - layer: 1, - line: [ - { - position: { - x: -32.639282521592044, - y: 0.01, - z: -7.782512568268438, - _id: { - $oid: "67da9127029b39637717b7c5", - }, - }, - uuid: "08df978b-ce38-4a0d-a89c-9992f0c470e7", - _id: { - $oid: "67da9127029b39637717b7c4", - }, - }, - { - position: { - x: -32.49832772097252, - y: 0.01, - z: -14.687753872309017, - _id: { - $oid: "67da9127029b39637717b7c7", - }, - }, - uuid: "9ba396ee-8ef5-4996-84a9-6fdac915eea8", - _id: { - $oid: "67da9127029b39637717b7c6", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9131029b39637717b7c9", - }, - layer: 1, - line: [ - { - position: { - x: -18.900000000000002, - y: 0.01, - z: -14.65000050000732, - _id: { - $oid: "67da9131029b39637717b7cb", - }, - }, - uuid: "d066f4bd-3df9-4824-9e66-b5b67263152b", - _id: { - $oid: "67da9131029b39637717b7ca", - }, - }, - { - position: { - x: -11.499324355168639, - y: 0.01, - z: -14.650000500007321, - _id: { - $oid: "67da9131029b39637717b7cd", - }, - }, - uuid: "ddea6247-d96d-42b6-b9cf-ef2da7d12848", - _id: { - $oid: "67da9131029b39637717b7cc", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9132029b39637717b7cf", - }, - layer: 1, - line: [ - { - position: { - x: -11.499324355168639, - y: 0.01, - z: -14.650000500007321, - _id: { - $oid: "67da9132029b39637717b7d1", - }, - }, - uuid: "ddea6247-d96d-42b6-b9cf-ef2da7d12848", - _id: { - $oid: "67da9132029b39637717b7d0", - }, - }, - { - position: { - x: -11.499324355168639, - y: 0.01, - z: -7.946995896512458, - _id: { - $oid: "67da9132029b39637717b7d3", - }, - }, - uuid: "1b3d365d-e15a-4690-ab1f-097bc43a7206", - _id: { - $oid: "67da9132029b39637717b7d2", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9135029b39637717b7d5", - }, - layer: 1, - line: [ - { - position: { - x: -11.499324355168639, - y: 0.01, - z: -7.946995896512458, - _id: { - $oid: "67da9135029b39637717b7d7", - }, - }, - uuid: "1b3d365d-e15a-4690-ab1f-097bc43a7206", - _id: { - $oid: "67da9135029b39637717b7d6", - }, - }, - { - position: { - x: -19.2026753309413, - y: 0.01, - z: -7.946995896512457, - _id: { - $oid: "67da9135029b39637717b7d9", - }, - }, - uuid: "1e0576fb-c048-483c-acf9-1431e7c108f9", - _id: { - $oid: "67da9135029b39637717b7d8", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9136029b39637717b7db", - }, - layer: 1, - line: [ - { - position: { - x: -19.2026753309413, - y: 0.01, - z: -7.946995896512457, - _id: { - $oid: "67da9136029b39637717b7dd", - }, - }, - uuid: "1e0576fb-c048-483c-acf9-1431e7c108f9", - _id: { - $oid: "67da9136029b39637717b7dc", - }, - }, - { - position: { - x: -18.900000000000002, - y: 0.01, - z: -14.65000050000732, - _id: { - $oid: "67da9136029b39637717b7df", - }, - }, - uuid: "d066f4bd-3df9-4824-9e66-b5b67263152b", - _id: { - $oid: "67da9136029b39637717b7de", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da913a029b39637717b7e1", - }, - layer: 1, - line: [ - { - position: { - x: -2.8000000000000007, - y: 0.01, - z: -14.350000500007173, - _id: { - $oid: "67da913a029b39637717b7e3", - }, - }, - uuid: "589c4a82-c0a3-4fe3-85b2-92436d874016", - _id: { - $oid: "67da913a029b39637717b7e2", - }, - }, - { - position: { - x: 3.3000000000000043, - y: 0.01, - z: -14.350000500007173, - _id: { - $oid: "67da913a029b39637717b7e5", - }, - }, - uuid: "5808bc4e-be8b-467a-851e-23571fb4883d", - _id: { - $oid: "67da913a029b39637717b7e4", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da913b029b39637717b7e7", - }, - layer: 1, - line: [ - { - position: { - x: 3.3000000000000043, - y: 0.01, - z: -14.350000500007173, - _id: { - $oid: "67da913b029b39637717b7e9", - }, - }, - uuid: "5808bc4e-be8b-467a-851e-23571fb4883d", - _id: { - $oid: "67da913b029b39637717b7e8", - }, - }, - { - position: { - x: 3.3000000000000047, - y: 0.01, - z: -7.749242967720177, - _id: { - $oid: "67da913b029b39637717b7eb", - }, - }, - uuid: "5531d693-96a5-4317-9d54-64aaee0c4aca", - _id: { - $oid: "67da913b029b39637717b7ea", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da913d029b39637717b7ed", - }, - layer: 1, - line: [ - { - position: { - x: 3.3000000000000047, - y: 0.01, - z: -7.749242967720177, - _id: { - $oid: "67da913d029b39637717b7ef", - }, - }, - uuid: "5531d693-96a5-4317-9d54-64aaee0c4aca", - _id: { - $oid: "67da913d029b39637717b7ee", - }, - }, - { - position: { - x: -3.5007464355254387, - y: 0.01, - z: -7.749242967720176, - _id: { - $oid: "67da913d029b39637717b7f1", - }, - }, - uuid: "42877408-00e9-45b7-825e-ab9ec32bbbcb", - _id: { - $oid: "67da913d029b39637717b7f0", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da913e029b39637717b7f3", - }, - layer: 1, - line: [ - { - position: { - x: -3.5007464355254387, - y: 0.01, - z: -7.749242967720176, - _id: { - $oid: "67da913e029b39637717b7f5", - }, - }, - uuid: "42877408-00e9-45b7-825e-ab9ec32bbbcb", - _id: { - $oid: "67da913e029b39637717b7f4", - }, - }, - { - position: { - x: -2.8000000000000007, - y: 0.01, - z: -14.350000500007173, - _id: { - $oid: "67da913e029b39637717b7f7", - }, - }, - uuid: "589c4a82-c0a3-4fe3-85b2-92436d874016", - _id: { - $oid: "67da913e029b39637717b7f6", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9143029b39637717b7f9", - }, - layer: 1, - line: [ - { - position: { - x: -32.3, - y: 0.01, - z: -1.0500005000005297, - _id: { - $oid: "67da9143029b39637717b7fb", - }, - }, - uuid: "ac46f914-ad0c-47f6-a1e9-8b73d0f359ef", - _id: { - $oid: "67da9143029b39637717b7fa", - }, - }, - { - position: { - x: -26.099193600828997, - y: 0.01, - z: -1.0500005000005297, - _id: { - $oid: "67da9143029b39637717b7fd", - }, - }, - uuid: "9ace6852-938b-48e8-b6b6-fc81d0140301", - _id: { - $oid: "67da9143029b39637717b7fc", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9144029b39637717b7ff", - }, - layer: 1, - line: [ - { - position: { - x: -26.099193600828997, - y: 0.01, - z: -1.0500005000005297, - _id: { - $oid: "67da9144029b39637717b801", - }, - }, - uuid: "9ace6852-938b-48e8-b6b6-fc81d0140301", - _id: { - $oid: "67da9144029b39637717b800", - }, - }, - { - position: { - x: -26.099193600828997, - y: 0.01, - z: 5.353098600486059, - _id: { - $oid: "67da9144029b39637717b803", - }, - }, - uuid: "e74176ae-eb71-484e-aada-c0f54c67b81d", - _id: { - $oid: "67da9144029b39637717b802", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9147029b39637717b805", - }, - layer: 1, - line: [ - { - position: { - x: -26.099193600828997, - y: 0.01, - z: 5.353098600486059, - _id: { - $oid: "67da9147029b39637717b807", - }, - }, - uuid: "e74176ae-eb71-484e-aada-c0f54c67b81d", - _id: { - $oid: "67da9147029b39637717b806", - }, - }, - { - position: { - x: -32.60000073871014, - y: 0.01, - z: 5.35309860048606, - _id: { - $oid: "67da9147029b39637717b809", - }, - }, - uuid: "84072a23-945a-4270-a63e-3940e081dfc0", - _id: { - $oid: "67da9147029b39637717b808", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9148029b39637717b80b", - }, - layer: 1, - line: [ - { - position: { - x: -32.60000073871014, - y: 0.01, - z: 5.35309860048606, - _id: { - $oid: "67da9148029b39637717b80d", - }, - }, - uuid: "84072a23-945a-4270-a63e-3940e081dfc0", - _id: { - $oid: "67da9148029b39637717b80c", - }, - }, - { - position: { - x: -32.3, - y: 0.01, - z: -1.0500005000005297, - _id: { - $oid: "67da9148029b39637717b80f", - }, - }, - uuid: "ac46f914-ad0c-47f6-a1e9-8b73d0f359ef", - _id: { - $oid: "67da9148029b39637717b80e", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da914c029b39637717b811", - }, - layer: 1, - line: [ - { - position: { - x: -17.699999999999996, - y: 0.01, - z: -0.6500005000003296, - _id: { - $oid: "67da914c029b39637717b813", - }, - }, - uuid: "c92f88d8-c05e-4736-9b05-dc03c45b5cd7", - _id: { - $oid: "67da914c029b39637717b812", - }, - }, - { - position: { - x: -11.499999999999996, - y: 0.01, - z: -0.6500005000003296, - _id: { - $oid: "67da914c029b39637717b815", - }, - }, - uuid: "9eba6103-dfff-4282-8872-848584d26d45", - _id: { - $oid: "67da914c029b39637717b814", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da914e029b39637717b817", - }, - layer: 1, - line: [ - { - position: { - x: -11.499999999999996, - y: 0.01, - z: -0.6500005000003296, - _id: { - $oid: "67da914e029b39637717b819", - }, - }, - uuid: "9eba6103-dfff-4282-8872-848584d26d45", - _id: { - $oid: "67da914e029b39637717b818", - }, - }, - { - position: { - x: -11.499999999999996, - y: 0.01, - z: 5.950757032286672, - _id: { - $oid: "67da914e029b39637717b81b", - }, - }, - uuid: "c176bd60-1bfe-496b-a030-1a1b17fada7c", - _id: { - $oid: "67da914e029b39637717b81a", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da914f029b39637717b81d", - }, - layer: 1, - line: [ - { - position: { - x: -11.499999999999996, - y: 0.01, - z: 5.950757032286672, - _id: { - $oid: "67da914f029b39637717b81f", - }, - }, - uuid: "c176bd60-1bfe-496b-a030-1a1b17fada7c", - _id: { - $oid: "67da914f029b39637717b81e", - }, - }, - { - position: { - x: -17.90079308213536, - y: 0.01, - z: 5.950757032286673, - _id: { - $oid: "67da914f029b39637717b821", - }, - }, - uuid: "d99e9ed6-81b5-4a13-82db-e144b84d558b", - _id: { - $oid: "67da914f029b39637717b820", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9150029b39637717b823", - }, - layer: 1, - line: [ - { - position: { - x: -17.90079308213536, - y: 0.01, - z: 5.950757032286673, - _id: { - $oid: "67da9150029b39637717b825", - }, - }, - uuid: "d99e9ed6-81b5-4a13-82db-e144b84d558b", - _id: { - $oid: "67da9150029b39637717b824", - }, - }, - { - position: { - x: -17.699999999999996, - y: 0.01, - z: -0.6500005000003296, - _id: { - $oid: "67da9150029b39637717b827", - }, - }, - uuid: "c92f88d8-c05e-4736-9b05-dc03c45b5cd7", - _id: { - $oid: "67da9150029b39637717b826", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9155029b39637717b829", - }, - layer: 1, - line: [ - { - position: { - x: -2.400000000000002, - y: 0.01, - z: -0.8500005000004297, - _id: { - $oid: "67da9155029b39637717b82b", - }, - }, - uuid: "67580953-4b53-4d70-8e25-ed840c6f2d72", - _id: { - $oid: "67da9155029b39637717b82a", - }, - }, - { - position: { - x: 2.8009614495783284, - y: 0.01, - z: -0.8500005000004297, - _id: { - $oid: "67da9155029b39637717b82d", - }, - }, - uuid: "a4121a99-ff0a-4b9f-b6ea-545de9049ea6", - _id: { - $oid: "67da9155029b39637717b82c", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9155029b39637717b82f", - }, - layer: 1, - line: [ - { - position: { - x: 2.8009614495783284, - y: 0.01, - z: -0.8500005000004297, - _id: { - $oid: "67da9155029b39637717b831", - }, - }, - uuid: "a4121a99-ff0a-4b9f-b6ea-545de9049ea6", - _id: { - $oid: "67da9155029b39637717b830", - }, - }, - { - position: { - x: 2.800961449578329, - y: 0.01, - z: 7.352461661099969, - _id: { - $oid: "67da9155029b39637717b833", - }, - }, - uuid: "3f4a3ee0-f8ba-4bd3-9f5b-008330bdcdc8", - _id: { - $oid: "67da9155029b39637717b832", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9156029b39637717b835", - }, - layer: 1, - line: [ - { - position: { - x: 2.800961449578329, - y: 0.01, - z: 7.352461661099969, - _id: { - $oid: "67da9156029b39637717b837", - }, - }, - uuid: "3f4a3ee0-f8ba-4bd3-9f5b-008330bdcdc8", - _id: { - $oid: "67da9156029b39637717b836", - }, - }, - { - position: { - x: -3.500000000000003, - y: 0.01, - z: 6.049999500003015, - _id: { - $oid: "67da9156029b39637717b839", - }, - }, - uuid: "bd269764-9ece-4803-8581-ede457df054c", - _id: { - $oid: "67da9156029b39637717b838", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9157029b39637717b83b", - }, - layer: 1, - line: [ - { - position: { - x: -3.500000000000003, - y: 0.01, - z: 6.049999500003015, - _id: { - $oid: "67da9157029b39637717b83d", - }, - }, - uuid: "bd269764-9ece-4803-8581-ede457df054c", - _id: { - $oid: "67da9157029b39637717b83c", - }, - }, - { - position: { - x: -2.400000000000002, - y: 0.01, - z: -0.8500005000004297, - _id: { - $oid: "67da9157029b39637717b83f", - }, - }, - uuid: "67580953-4b53-4d70-8e25-ed840c6f2d72", - _id: { - $oid: "67da9157029b39637717b83e", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da915a029b39637717b841", - }, - layer: 1, - line: [ - { - position: { - x: -31.899999999999995, - y: 0.01, - z: 12.44999950000622, - _id: { - $oid: "67da915a029b39637717b843", - }, - }, - uuid: "32f006c1-4038-4159-9ca5-f51677a904f3", - _id: { - $oid: "67da915a029b39637717b842", - }, - }, - { - position: { - x: -26.499999999999993, - y: 0.01, - z: 12.849999500006419, - _id: { - $oid: "67da915a029b39637717b845", - }, - }, - uuid: "bca361f3-66a7-4137-a1a2-7194925224ea", - _id: { - $oid: "67da915a029b39637717b844", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da915b029b39637717b847", - }, - layer: 1, - line: [ - { - position: { - x: -26.499999999999993, - y: 0.01, - z: 12.849999500006419, - _id: { - $oid: "67da915b029b39637717b849", - }, - }, - uuid: "bca361f3-66a7-4137-a1a2-7194925224ea", - _id: { - $oid: "67da915b029b39637717b848", - }, - }, - { - position: { - x: -26.499999999999993, - y: 0.01, - z: 19.150793100818913, - _id: { - $oid: "67da915b029b39637717b84b", - }, - }, - uuid: "a92a1504-6628-4e02-bc5e-da38256dbaa8", - _id: { - $oid: "67da915b029b39637717b84a", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da915c029b39637717b84d", - }, - layer: 1, - line: [ - { - position: { - x: -26.499999999999993, - y: 0.01, - z: 19.150793100818913, - _id: { - $oid: "67da915c029b39637717b84f", - }, - }, - uuid: "a92a1504-6628-4e02-bc5e-da38256dbaa8", - _id: { - $oid: "67da915c029b39637717b84e", - }, - }, - { - position: { - x: -32.6, - y: 0.01, - z: 18.649999500009315, - _id: { - $oid: "67da915c029b39637717b851", - }, - }, - uuid: "577a0d87-ba44-41ce-b526-4352790e12a1", - _id: { - $oid: "67da915c029b39637717b850", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da915d029b39637717b853", - }, - layer: 1, - line: [ - { - position: { - x: -32.6, - y: 0.01, - z: 18.649999500009315, - _id: { - $oid: "67da915d029b39637717b855", - }, - }, - uuid: "577a0d87-ba44-41ce-b526-4352790e12a1", - _id: { - $oid: "67da915d029b39637717b854", - }, - }, - { - position: { - x: -31.899999999999995, - y: 0.01, - z: 12.44999950000622, - _id: { - $oid: "67da915d029b39637717b857", - }, - }, - uuid: "32f006c1-4038-4159-9ca5-f51677a904f3", - _id: { - $oid: "67da915d029b39637717b856", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9160029b39637717b859", - }, - layer: 1, - line: [ - { - position: { - x: -16.7, - y: 0.01, - z: 12.649999500006311, - _id: { - $oid: "67da9160029b39637717b85b", - }, - }, - uuid: "dfee795e-6446-40b7-892b-a94da5056328", - _id: { - $oid: "67da9160029b39637717b85a", - }, - }, - { - position: { - x: -10.199230814741991, - y: 0.01, - z: 12.649999500006311, - _id: { - $oid: "67da9160029b39637717b85d", - }, - }, - uuid: "ed10ad9b-b461-4c9c-a397-1bd5e05df3b9", - _id: { - $oid: "67da9160029b39637717b85c", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9160029b39637717b85f", - }, - layer: 1, - line: [ - { - position: { - x: -10.199230814741991, - y: 0.01, - z: 12.649999500006311, - _id: { - $oid: "67da9160029b39637717b861", - }, - }, - uuid: "ed10ad9b-b461-4c9c-a397-1bd5e05df3b9", - _id: { - $oid: "67da9160029b39637717b860", - }, - }, - { - position: { - x: -9.811292099159576, - y: 0.01, - z: 18.601665294824446, - _id: { - $oid: "67da9178029b39637717b88f", - }, - }, - uuid: "695d5859-3c42-45d5-8843-326833dc0802", - _id: { - $oid: "67da9160029b39637717b862", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9161029b39637717b865", - }, - layer: 1, - line: [ - { - position: { - x: -9.811292099159576, - y: 0.01, - z: 18.601665294824446, - _id: { - $oid: "67da9178029b39637717b88f", - }, - }, - uuid: "695d5859-3c42-45d5-8843-326833dc0802", - _id: { - $oid: "67da9161029b39637717b866", - }, - }, - { - position: { - x: -17.667236770650547, - y: 0.01, - z: 18.729297555078116, - _id: { - $oid: "67da917b029b39637717b891", - }, - }, - uuid: "4fc8bc1a-1cca-4a3f-8645-4ea608e9571d", - _id: { - $oid: "67da9161029b39637717b868", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9162029b39637717b86b", - }, - layer: 1, - line: [ - { - position: { - x: -17.667236770650547, - y: 0.01, - z: 18.729297555078116, - _id: { - $oid: "67da917b029b39637717b891", - }, - }, - uuid: "4fc8bc1a-1cca-4a3f-8645-4ea608e9571d", - _id: { - $oid: "67da9162029b39637717b86c", - }, - }, - { - position: { - x: -16.7, - y: 0.01, - z: 12.649999500006311, - _id: { - $oid: "67da9162029b39637717b86f", - }, - }, - uuid: "dfee795e-6446-40b7-892b-a94da5056328", - _id: { - $oid: "67da9162029b39637717b86e", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9165029b39637717b871", - }, - layer: 1, - line: [ - { - position: { - x: -2.4999999999999964, - y: 0.01, - z: 12.949999500006472, - _id: { - $oid: "67da9165029b39637717b873", - }, - }, - uuid: "357eb663-01e5-4dab-b961-bb14416a289e", - _id: { - $oid: "67da9165029b39637717b872", - }, - }, - { - position: { - x: 2.6009802979427414, - y: 0.01, - z: 12.949999500006472, - _id: { - $oid: "67da9165029b39637717b875", - }, - }, - uuid: "0e9f216f-77bd-442f-bd6f-c8ff04ae24f3", - _id: { - $oid: "67da9165029b39637717b874", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9166029b39637717b877", - }, - layer: 1, - line: [ - { - position: { - x: 2.6009802979427414, - y: 0.01, - z: 12.949999500006472, - _id: { - $oid: "67da9166029b39637717b879", - }, - }, - uuid: "0e9f216f-77bd-442f-bd6f-c8ff04ae24f3", - _id: { - $oid: "67da9166029b39637717b878", - }, - }, - { - position: { - x: 2.600980297942742, - y: 0.01, - z: 20.352675289331685, - _id: { - $oid: "67da9166029b39637717b87b", - }, - }, - uuid: "88d9dc8d-b7e5-488e-ac1a-7455885bea1f", - _id: { - $oid: "67da9166029b39637717b87a", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9166029b39637717b87d", - }, - layer: 1, - line: [ - { - position: { - x: 2.600980297942742, - y: 0.01, - z: 20.352675289331685, - _id: { - $oid: "67da9166029b39637717b87f", - }, - }, - uuid: "88d9dc8d-b7e5-488e-ac1a-7455885bea1f", - _id: { - $oid: "67da9166029b39637717b87e", - }, - }, - { - position: { - x: -3.300000000000004, - y: 0.01, - z: 19.949999500009966, - _id: { - $oid: "67da9166029b39637717b881", - }, - }, - uuid: "d36f39b8-c4b1-4859-8b86-f4c4693efda8", - _id: { - $oid: "67da9166029b39637717b880", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9168029b39637717b883", - }, - layer: 1, - line: [ - { - position: { - x: -3.300000000000004, - y: 0.01, - z: 19.949999500009966, - _id: { - $oid: "67da9168029b39637717b885", - }, - }, - uuid: "d36f39b8-c4b1-4859-8b86-f4c4693efda8", - _id: { - $oid: "67da9168029b39637717b884", - }, - }, - { - position: { - x: -2.4999999999999964, - y: 0.01, - z: 12.949999500006472, - _id: { - $oid: "67da9168029b39637717b887", - }, - }, - uuid: "357eb663-01e5-4dab-b961-bb14416a289e", - _id: { - $oid: "67da9168029b39637717b886", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da916d029b39637717b889", - }, - layer: 1, - line: [ - { - position: { - x: 6.899999999999991, - y: 0.01, - z: -15.150000500007573, - _id: { - $oid: "67da916d029b39637717b88b", - }, - }, - uuid: "909123d8-0364-4b08-9c6e-c0fedab2ea9b", - _id: { - $oid: "67da916d029b39637717b88a", - }, - }, - { - position: { - x: 6.899999999999993, - y: 0.01, - z: 22.050537130534586, - _id: { - $oid: "67da916d029b39637717b88d", - }, - }, - uuid: "cae9c80c-13f9-4681-b638-2df63ed21a68", - _id: { - $oid: "67da916d029b39637717b88c", - }, - }, - ], - type: "AisleLine", - __v: 0, - }, - { - _id: { - $oid: "67da9239029b39637717b8a6", - }, - layer: 1, - line: [ - { - position: { - x: -39.01181407607426, - y: 0.01, - z: -15.164269566681014, - _id: { - $oid: "67da9239029b39637717b8a8", - }, - }, - uuid: "597dae26-e0e4-40ab-a7cd-885e99e3b639", - _id: { - $oid: "67da9239029b39637717b8a7", - }, - }, - { - position: { - x: -39.01181407607426, - y: 0.01, - z: 2.4462151192550863, - _id: { - $oid: "67da9239029b39637717b8aa", - }, - }, - uuid: "36b6a74c-8eb8-4d1d-93a5-11bb0f692e21", - _id: { - $oid: "67da9239029b39637717b8a9", - }, - }, - ], - type: "WallLine", - __v: 0, - }, - { - _id: { - $oid: "67da923b029b39637717b8ac", - }, - layer: 1, - line: [ - { - position: { - x: -39.01181407607426, - y: 0.01, - z: 2.4462151192550863, - _id: { - $oid: "67da923b029b39637717b8ae", - }, - }, - uuid: "36b6a74c-8eb8-4d1d-93a5-11bb0f692e21", - _id: { - $oid: "67da923b029b39637717b8ad", - }, - }, - { - position: { - x: -39.01181407607426, - y: 0.01, - z: 18.116739329146327, - _id: { - $oid: "67da923b029b39637717b8b0", - }, - }, - uuid: "7fb2c837-9599-4481-9b90-6598c12873ed", - _id: { - $oid: "67da923b029b39637717b8af", - }, - }, - ], - type: "WallLine", - __v: 0, - }, - { - _id: { - $oid: "67da929f029b39637717b8c1", - }, - layer: 1, - line: [ - { - position: { - x: -36.42107219144319, - y: 0.01, - z: -18.72939338741006, - _id: { - $oid: "67da929f029b39637717b8c3", - }, - }, - uuid: "1c6a6439-e096-4f0f-a88e-9e221733e9a1", - _id: { - $oid: "67da929f029b39637717b8c2", - }, - }, - { - position: { - x: 4.466350487599726, - y: 0.01, - z: -18.72939338741006, - _id: { - $oid: "67da929f029b39637717b8c5", - }, - }, - uuid: "a8e4ec42-f05b-47ed-9cf4-3bc1461f178f", - _id: { - $oid: "67da929f029b39637717b8c4", - }, - }, - ], - type: "FloorLine", - __v: 0, - }, - ]; - React.useEffect(() => { - const groups = new THREE.Group(); - groups.name = "Meshes"; - groupRef.current = groups; - scene.add(groups); - - return () => { - if (groupRef.current) { - scene.remove(groupRef.current); - } - }; - }, [scene]); + let groupRef = useRef() as Types.RefGroup; + const [navMesh, setNavMesh] = useState(); return ( <> - + - {pathPoints.map((pair, i) => ( - + ))} + ); -} +}; + +export default Agv; diff --git a/app/src/modules/builder/agv/navMeshDetails.tsx b/app/src/modules/builder/agv/navMeshDetails.tsx index 0f4852e..c941011 100644 --- a/app/src/modules/builder/agv/navMeshDetails.tsx +++ b/app/src/modules/builder/agv/navMeshDetails.tsx @@ -1,146 +1,43 @@ -// import React, { useEffect, useState } from "react"; -// import { init as initRecastNavigation } from "@recast-navigation/core"; -// import { generateSoloNavMesh } from "@recast-navigation/generators"; -// import { DebugDrawer, getPositionsAndIndices } from "@recast-navigation/three"; -// import { useThree } from "@react-three/fiber"; -// import * as THREE from "three"; -// interface RawNavMesh { -// ptr: number; // Replace `number` with the actual type if known -// } - -// interface NavMesh { -// raw: RawNavMesh; -// } - -// // Update the MeshState interface to use the correct type -// interface MeshState { -// setNavMesh: React.Dispatch>; -// } -// export default function NavMeshDetails({ setNavMesh }: MeshState) { -// const { scene } = useThree(); -// useEffect(() => { -// const initializeNavMesh = async () => { -// try { -// // Initialize Recast Navigation -// await initRecastNavigation(); - -// // Extract meshes from the scene -// // Extract meshes from the scene -// const meshes = scene?.children -// .filter((child) => child.name === "Meshes") -// .flatMap((mesh) => mesh.children); - -// if (!meshes || meshes.length === 0) { - -// return; -// } - -// // Filter and process only Mesh objects -// const meshObjects = meshes.filter( -// ( -// child -// ): child is THREE.Mesh< -// THREE.BufferGeometry, -// THREE.Material | THREE.Material[] -// > => child instanceof THREE.Mesh -// ); - -// if (meshObjects.length === 0) { - -// return; -// } - -// // Get positions and indices from the meshes -// const [positions, indices] = getPositionsAndIndices(meshObjects); - -// // Generate navigation mesh -// const cs = 0.05; -// const ch = 0.05; -// const walkableRadius = 0.87; -// const { success, navMesh } = generateSoloNavMesh(positions, indices, { -// cs, -// ch, -// walkableRadius: Math.round(walkableRadius / ch), -// }); - -// if (!success || !navMesh) { - -// return; -// } - -// // Log and update the navigation mesh - -// -// setNavMesh(navMesh); - -// // Draw the debug visualization -// const debugDrawer = new DebugDrawer(); -// debugDrawer.drawNavMesh(navMesh); -// // scene.add(debugDrawer); // Uncomment if you want to add the debug drawer to the scene -// } catch (error) { - -// } -// }; - -// initializeNavMesh(); -// }, [setNavMesh, scene]); - -// return null; -// } -import React, { useEffect } from "react"; +import React, { useEffect, useState } from "react"; import { init as initRecastNavigation } from "@recast-navigation/core"; import { generateSoloNavMesh } from "@recast-navigation/generators"; import { DebugDrawer, getPositionsAndIndices } from "@recast-navigation/three"; import { useThree } from "@react-three/fiber"; import * as THREE from "three"; +import * as Types from "../../../types/world/worldTypes"; -// Import the NavMesh type from the library -import { NavMesh as RecastNavMesh } from "@recast-navigation/core"; - -// Define the state type based on the library's NavMesh type -interface MeshState { - setNavMesh: React.Dispatch>; +interface NavMeshDetailsProps { + setNavMesh: (navMesh: any) => void; + groupRef: React.MutableRefObject; + lines: Types.RefLines; + plane: Types.RefMesh; } -export default function NavMeshDetails({ setNavMesh }: MeshState) { +export default function NavMeshDetails({ + lines, + setNavMesh, + groupRef, + plane, +}: NavMeshDetailsProps) { const { scene } = useThree(); useEffect(() => { - const initializeNavMesh = async () => { + const initializeNavigation = async () => { try { - // Initialize Recast Navigation await initRecastNavigation(); - // Extract meshes from the scene - const meshes = scene?.children - .filter((child) => child.name === "Meshes") - .flatMap((mesh) => mesh.children); - - if (!meshes || meshes.length === 0) { + if (!groupRef.current || groupRef.current.children.length === 0) { return; } - // Filter and process only Mesh objects - const meshObjects = meshes.filter( - ( - child - ): child is THREE.Mesh< - THREE.BufferGeometry, - THREE.Material | THREE.Material[] - > => child instanceof THREE.Mesh - ); + const meshes = groupRef?.current?.children as THREE.Mesh[]; - if (meshObjects.length === 0) { - return; - } + const [positions, indices] = getPositionsAndIndices(meshes); - // Get positions and indices from the meshes - const [positions, indices] = getPositionsAndIndices(meshObjects); + const cs = 0.5; + const ch = 0.5; + const walkableRadius = 0.89; - // Generate navigation mesh - const cs = 0.05; - const ch = 0.05; - const walkableRadius = 0.95; const { success, navMesh } = generateSoloNavMesh(positions, indices, { cs, ch, @@ -150,17 +47,17 @@ export default function NavMeshDetails({ setNavMesh }: MeshState) { if (!success || !navMesh) { return; } - // Log and update the navigation mesh - setNavMesh(navMesh); // Now compatible with the library's NavMesh type - // Draw the debug visualization + + setNavMesh(navMesh); + const debugDrawer = new DebugDrawer(); debugDrawer.drawNavMesh(navMesh); - // scene.add(debugDrawer); // Uncomment if you want to add the debug drawer to the scene + // scene.add(debugDrawer); } catch (error) {} }; - initializeNavMesh(); - }, [setNavMesh, scene]); + initializeNavigation(); + }, [scene, groupRef, lines.current]); return null; } diff --git a/app/src/modules/builder/agv/pathNavigator.tsx b/app/src/modules/builder/agv/pathNavigator.tsx index 257e3e4..4193fb7 100644 --- a/app/src/modules/builder/agv/pathNavigator.tsx +++ b/app/src/modules/builder/agv/pathNavigator.tsx @@ -1,76 +1,46 @@ -import React, { useCallback, useEffect, useRef, useState } from "react"; +import React, { useEffect, useState, useRef } from "react"; import * as THREE from "three"; +import { useFrame } from "@react-three/fiber"; import { NavMeshQuery } from "@recast-navigation/core"; -import { NavMesh as RecastNavMesh } from "@recast-navigation/core"; -import { useFrame, useThree } from "@react-three/fiber"; import { Line } from "@react-three/drei"; -interface Pair { - x: number; - y: number; - z: number; + +// Define interface for props +interface PathNavigatorProps { + navMesh: any; + selectedPoints: any; } -interface PathProps { - navMesh: RecastNavMesh | null; // The navigation mesh - pathPoints: Pair[] | undefined; // Array of points (or undefined) -} -const PathNavigator = ({ navMesh, pathPoints }: PathProps) => { - const { scene, raycaster, gl } = useThree(); - const [path, setPath] = useState([]); // Path is an array of THREE.Vector3 - const [points, setSelectedPoints] = useState([]); // Path is an array of THREE.Vector3 - const progressRef = useRef(0); - const meshRef = useRef(null!); - const handleClick = useCallback(() => { - if (!navMesh) return; +export default function PathNavigator({ + navMesh, + selectedPoints, +}: PathNavigatorProps) { + const [path, setPath] = useState<[number, number, number][]>([]); + const progressRef = useRef(0); + const meshRef = useRef(null); - const intersects = raycaster.intersectObjects(scene.children, true); - if (intersects.length > 0) { - const { point } = intersects[0]; - const newPoint = { x: point.x, y: 0, z: point.z }; - - setSelectedPoints((prevPoints: THREE.Vector3[]) => { - if (prevPoints.length === 2) { - // If two points already exist, replace them with the new point - return [new THREE.Vector3(newPoint.x, newPoint.y, newPoint.z)]; - } - // Otherwise, append the new point to the array - return [ - ...prevPoints, - new THREE.Vector3(newPoint.x, newPoint.y, newPoint.z), - ]; - }); - } - }, [navMesh, scene]); - React.useEffect(() => { - if (points?.length === 2 && navMesh) { - const [start, end] = points; - console.log("start: ", start); - console.log("end: ", end); + useEffect(() => { + if (selectedPoints.length === 2 && navMesh) { + const [start, end] = selectedPoints; + if (!start || !end) return; const navMeshQuery = new NavMeshQuery(navMesh); - console.log("navMeshQuery: ", navMeshQuery); - const { path } = navMeshQuery.computePath(start, end); - console.log("paths: ", path); + const { path: computedPath } = navMeshQuery.computePath(start, end); - // if (path.length > 0) { - // setPath( - // path.map((point) => { - // const newY = point.y + 0.1; // Increment the y-coordinate - // return new THREE.Vector3(point.x, newY, point.z); // Create a new Vector3 - // }) - // ); - // progressRef.current = 0; - // } + if (computedPath.length > 0) { + setPath(computedPath.map(({ x, y, z }) => [x, y + 0.1, z])); + progressRef.current = 0; + } } - }, [points,]); + }, [selectedPoints, navMesh]); useFrame((_, delta) => { if (path.length > 1 && meshRef.current) { const speed = 3; progressRef.current += delta * speed; + let totalDistance = 0; - const distances = []; + const distances: number[] = []; for (let i = 0; i < path.length - 1; i++) { const start = new THREE.Vector3(...path[i]); const end = new THREE.Vector3(...path[i + 1]); @@ -97,7 +67,7 @@ const PathNavigator = ({ navMesh, pathPoints }: PathProps) => { const segmentDistance = distances[index]; const t = (coveredDistance - accumulatedDistance) / segmentDistance; - const position = start.lerp(end, t); + const position = start.clone().lerp(end, t); // Use clone() to avoid mutating the original vector meshRef.current.position.copy(position); const direction = new THREE.Vector3() @@ -114,20 +84,10 @@ const PathNavigator = ({ navMesh, pathPoints }: PathProps) => { } }); - useEffect(() => { - gl.domElement.addEventListener("click", handleClick); - return () => gl.domElement.removeEventListener("click", handleClick); - }, [handleClick]); return ( <> {path.length > 0 && } {path.length > 0 && ( - // 0 ? path[0] : [0, 0.1, 0]} - // scale={[0.5, 0.5, 0.5]} - // /> 0 ? path[0] : [0, 0.1, 0]}> @@ -135,6 +95,4 @@ const PathNavigator = ({ navMesh, pathPoints }: PathProps) => { )} ); -}; - -export default PathNavigator; +} diff --git a/app/src/modules/builder/agv/polygonGenerator.tsx b/app/src/modules/builder/agv/polygonGenerator.tsx index 75c0911..1eca588 100644 --- a/app/src/modules/builder/agv/polygonGenerator.tsx +++ b/app/src/modules/builder/agv/polygonGenerator.tsx @@ -1,86 +1,86 @@ import * as THREE from "three"; -import { useEffect, useRef } from "react"; -import { useThree } from "@react-three/fiber"; +import { useEffect, useState } from "react"; import * as turf from "@turf/turf"; import * as Types from "../../../types/world/worldTypes"; -// import { Feature, Polygon, MultiPolygon } from "@turf/helpers"; -type Point = { - position: { x: number; y: number; z: number }; - uuid: string; -}; - -type LineData = { - type: string; - line: Point[]; - _id: {}; - layer: number; - __v: number; -}; - -type PolygonGeneratorProps = { - processPoint: LineData[]; - groupRef: React.RefObject; - lines: any; - plane: any; -}; +import arrayLinesToObject from "../geomentries/lines/lineConvertions/arrayLinesToObject"; +interface PolygonGeneratorProps { + groupRef: React.MutableRefObject; + lines: Types.RefLines; + plane: Types.RefMesh; +} export default function PolygonGenerator({ - processPoint, groupRef, lines, plane, }: PolygonGeneratorProps) { - const { scene } = useThree(); - - + // const [rooms, setRooms] = useState([]); useEffect(() => { - if (!processPoint) return; - const wallInLayer = processPoint?.filter( - (line) => line.type === "WallLine" - ); - const wallPoints = wallInLayer.map((pair) => - pair?.line.map((vals) => vals.position) - ); - renderWallGeometry(wallPoints); + if (groupRef.current && plane.current) { + groupRef.current.add(plane.current.clone()); + } + }, [groupRef, plane]); - const linesInLayer = processPoint?.filter( - (line) => line.type === "AisleLine" - ); - const result = linesInLayer.map((pair) => + useEffect(() => { + let allLines = arrayLinesToObject(lines.current); + const wallLines = allLines?.filter((line) => line?.type === "WallLine"); + const aisleLines = allLines?.filter((line) => line?.type === "AisleLine"); + + const wallPoints = wallLines + .map((pair) => pair?.line.map((vals) => vals.position)) + .filter((wall): wall is THREE.Vector3[] => !!wall); + + const result = aisleLines.map((pair) => pair?.line.map((point) => ({ position: [point.position.x, point.position.z], uuid: point.uuid, })) ); + if (!result || result.some((line) => !line)) { + return; + } - const lineFeatures = result.map((line) => - turf.lineString(line.map((p) => p.position)) + const lineFeatures = result?.map((line: any) => + turf.lineString(line.map((p: any) => p?.position)) ); + const polygons = turf.polygonize(turf.featureCollection(lineFeatures)); - let union: any[] = []; + renderWallGeometry(wallPoints); + + let union: any = []; polygons.features.forEach((feature) => { union.push(feature); }); - if (union.length > 0) { + if (union.length > 1) { const unionResult = turf.union(turf.featureCollection(union)); - if (unionResult && unionResult.geometry.type === "MultiPolygon") { + + if (unionResult?.geometry.type === "MultiPolygon") { unionResult.geometry.coordinates.forEach((poly) => { - const Coordinates = poly[0].map( - ([x, z]) => new THREE.Vector3(x, 0, z) - ); - renderBoxGeometry(Coordinates); + const coordinates = poly[0].map(([x, z]) => { + return new THREE.Vector3(x, 0, z); + }); + renderBoxGeometry(coordinates); }); - } else if (unionResult && unionResult.geometry.type === "Polygon") { - const Coordinates = unionResult.geometry.coordinates[0].map( - ([x, z]) => new THREE.Vector3(x, 0, z) + } else if (unionResult?.geometry.type === "Polygon") { + const coordinates = unionResult.geometry.coordinates[0].map( + ([x, z]) => { + return new THREE.Vector3(x, 0, z); + } ); - renderBoxGeometry(Coordinates); + renderBoxGeometry(coordinates); } + } else if (union.length === 1) { + const coordinates = union[0].geometry.coordinates[0].map( + ([x, z]: [number, number]) => { + return new THREE.Vector3(x, 0, z); + } + ); + // setRooms((prevRooms) => [...prevRooms, coordinates]); } - }, [processPoint]); + }, [lines.current]); const renderBoxGeometry = (coordinates: THREE.Vector3[]) => { const minX = Math.min(...coordinates.map((p) => p.x)); @@ -97,16 +97,13 @@ export default function PolygonGenerator({ color: "#ff66cc", visible: false, }); + const mesh = new THREE.Mesh(geometry, material); mesh.position.set((minX + maxX) / 2, height / 2, (minZ + maxZ) / 2); - - groupRef?.current?.add(mesh); - // scene.add(groupRef.current!); + groupRef.current?.add(mesh); }; - const renderWallGeometry = ( - walls: { x: number; y: number; z: number }[][] - ) => { + const renderWallGeometry = (walls: THREE.Vector3[][]) => { walls.forEach((wall) => { if (wall.length < 2) return; @@ -117,19 +114,20 @@ export default function PolygonGenerator({ wall[i + 1].y, wall[i + 1].z ); + const wallHeight = 10; const direction = new THREE.Vector3().subVectors(end, start); const length = direction.length(); direction.normalize(); - const wallGeometry = new THREE.BoxGeometry(length, wallHeight, 0.5); + const wallGeometry = new THREE.BoxGeometry(length, wallHeight); const wallMaterial = new THREE.MeshBasicMaterial({ color: "#aaa", transparent: true, opacity: 0.5, }); - const wallMesh = new THREE.Mesh(wallGeometry, wallMaterial); + const wallMesh = new THREE.Mesh(wallGeometry, wallMaterial); const midPoint = new THREE.Vector3() .addVectors(start, end) .multiplyScalar(0.5); @@ -139,17 +137,7 @@ export default function PolygonGenerator({ quaternion.setFromUnitVectors(new THREE.Vector3(1, 0, 0), direction); wallMesh.quaternion.copy(quaternion); - groupRef?.current?.add(wallMesh); - // scene.add(groupRef.current!); - - const lineGeometry = new THREE.BufferGeometry().setFromPoints([ - start, - end, - ]); - const lineMaterial = new THREE.LineBasicMaterial({ color: "blue" }); - const line = new THREE.Line(lineGeometry, lineMaterial); - - groupRef?.current?.add(line); + groupRef.current?.add(wallMesh); } }); }; From 4408bc763b041d4604ae763d2abc6f096febcfe9 Mon Sep 17 00:00:00 2001 From: gabriel Date: Thu, 27 Mar 2025 17:55:27 +0530 Subject: [PATCH 5/9] resolved chart data bug --- .../realTimeVis/charts/LineGraphComponent.tsx | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/app/src/components/ui/realTimeVis/charts/LineGraphComponent.tsx b/app/src/components/ui/realTimeVis/charts/LineGraphComponent.tsx index 07a387f..cc40187 100644 --- a/app/src/components/ui/realTimeVis/charts/LineGraphComponent.tsx +++ b/app/src/components/ui/realTimeVis/charts/LineGraphComponent.tsx @@ -201,18 +201,16 @@ const LineGraphComponent = ({ const { measurements, setMeasurements, updateDuration, duration } = useChartStore(); useEffect(() => { - if ( measurements.length > 0 ) { - const socket = io("http://192.168.0.192:5010"); + const socket = io("http://192.168.0.192:5010"); + + if ( measurements.length > 0 ) { var inputes = { measurements: measurements, duration: duration, interval: 1000, } - console.log('graphHHHHHHHHHHHHHHHHHHHHHHHHHHHHH',inputes); - - // Start stream const startStream = () => { socket.emit("lineInput", inputes); @@ -226,23 +224,24 @@ const LineGraphComponent = ({ // Extract timestamps and values const labels = responceData.time; - const datasets = data.measurements.map((measurement: any) => ({ - label: `${measurement.name}.${measurement.fields}`, - data: responceData[`${measurement.name}.${measurement.fields}`]?.values || [], - backgroundColor: themeColor[0] || "#5c87df", - borderColor: themeColor[1] || "#ffffff", - borderWidth: 2, - // fill: false, - })); + const datasets = measurements.map((measurement: any) => { + const key = `${measurement.name}.${measurement.fields}`; + return { + label: key, + data: responceData[key]?.values ?? [], // Ensure it exists + backgroundColor: themeColor[0] || "#5c87df", + borderColor: themeColor[1] || "#ffffff", + }; + }); setChartData({ labels, datasets }); }); + } return () => { socket.off("lineOutput"); socket.emit("stop_stream"); // Stop streaming when component unmounts }; - } }, [measurements, duration]); // useEffect(() => { From e4ef26331f4ac209fa712cbe85570a98dac0519e Mon Sep 17 00:00:00 2001 From: Poovizhi99 Date: Fri, 28 Mar 2025 13:55:30 +0530 Subject: [PATCH 6/9] solved ui bugs marketplace --- app/src/modules/market/Card.tsx | 21 ++++-- app/src/modules/market/CardsContainer.tsx | 64 +++++++++++++++---- app/src/services/marketplace/fetchAssets.ts | 14 ++++ .../components/marketPlace/marketPlace.scss | 11 ++++ 4 files changed, 92 insertions(+), 18 deletions(-) create mode 100644 app/src/services/marketplace/fetchAssets.ts diff --git a/app/src/modules/market/Card.tsx b/app/src/modules/market/Card.tsx index 646fe39..b872dc0 100644 --- a/app/src/modules/market/Card.tsx +++ b/app/src/modules/market/Card.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import { CommentsIcon, DownloadIcon, @@ -11,13 +11,14 @@ import assetImage from "../../assets/image/image.png"; interface CardProps { assetName: string; - uploadedOn: string; + uploadedOn: number; price: number; rating: number; views: number; + image: string; onSelectCard: (cardData: { assetName: string; - uploadedOn: string; + uploadedOn: number; price: number; rating: number; views: number; @@ -30,6 +31,7 @@ const Card: React.FC = ({ price, rating, views, + image, onSelectCard, }) => { const handleCardSelect = () => { @@ -42,12 +44,19 @@ const Card: React.FC = ({
- {assetName} + {assetName}
-
{assetName}
-
{uploadedOn}
+
{assetName.split("_").join(" ")}
+
+ Uploaded on -{" "} + {new Date(uploadedOn).toLocaleDateString("en-GB", { + day: "2-digit", + month: "short", + year: "2-digit", + })} +
diff --git a/app/src/modules/market/CardsContainer.tsx b/app/src/modules/market/CardsContainer.tsx index 96a47e4..67bf849 100644 --- a/app/src/modules/market/CardsContainer.tsx +++ b/app/src/modules/market/CardsContainer.tsx @@ -1,9 +1,25 @@ -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; import Card from "./Card"; import AssetPreview from "./AssetPreview"; import RenderOverlay from "../../components/templates/Overlay"; +import { fetchAssets } from "../../services/marketplace/fetchAssets"; +interface ModelData { + CreatedBy: string; + animated: string | null; + category: string; + description: string; + filename: string; + isArchieve: boolean; + modelfileID: string; + tags: string; + thumbnail: string; + uploadDate: number; + _id: string; +} const CardsContainer: React.FC = () => { + const [models, setModels] = useState([]); + const array = [ { id: 1, @@ -105,7 +121,7 @@ const CardsContainer: React.FC = () => { const [selectedCard, setSelectedCard] = useState<{ assetName: string; - uploadedOn: string; + uploadedOn: number; price: number; rating: number; views: number; @@ -113,19 +129,30 @@ const CardsContainer: React.FC = () => { const handleCardSelect = (cardData: { assetName: string; - uploadedOn: string; + uploadedOn: number; price: number; rating: number; views: number; }) => { setSelectedCard(cardData); }; - + const getAllAssets = async () => { + try { + const assetsData = await fetchAssets(); + const reversedData = [...assetsData]?.reverse().slice(0, 8); + setModels(reversedData); + } catch (error) { + } finally { + } + }; + useEffect(() => { + getAllAssets(); + }, []); return (
Products You May Like
- {array.map((asset) => ( + {/* {array.map((asset) => ( { views={asset.views} onSelectCard={handleCardSelect} /> - ))} - {/* */} - {selectedCard && ( - 0 && + models.map((assetDetail) => ( + - )} + ))} + {/* */} + {selectedCard && ( + + )} {/* */}
diff --git a/app/src/services/marketplace/fetchAssets.ts b/app/src/services/marketplace/fetchAssets.ts new file mode 100644 index 0000000..3408252 --- /dev/null +++ b/app/src/services/marketplace/fetchAssets.ts @@ -0,0 +1,14 @@ +let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`; +export const fetchAssets = async () => { + try { + const response = await fetch(`${BackEnd_url}/api/v1/getAllAssets`); + if (!response.ok) { + throw new Error("Network response was not ok"); + } + const result = await response.json(); + return result; + } catch (error) { + console.log("error: ", error); + // throw new Error(error.message); + } +}; diff --git a/app/src/styles/components/marketPlace/marketPlace.scss b/app/src/styles/components/marketPlace/marketPlace.scss index cac366e..8df0896 100644 --- a/app/src/styles/components/marketPlace/marketPlace.scss +++ b/app/src/styles/components/marketPlace/marketPlace.scss @@ -8,6 +8,7 @@ background-color: var(--background-color-secondary); position: absolute; left: 0; + top: 0; padding: 100px 50px; padding-bottom: 32px; backdrop-filter: blur(6px); @@ -89,6 +90,7 @@ color: var(--text-color); font-weight: $medium-weight; font-size: $xlarge; + margin-bottom: 12px; } .cards-wrapper-container { @@ -122,7 +124,13 @@ .image-container { width: 100%; display: flex; + max-height: 180px; justify-content: center; + img{ + height: inherit; + width: 100%; + object-fit: cover; + } } .assets-container { @@ -133,6 +141,9 @@ display: flex; flex-direction: column; gap: 3px; + .assets-name{ + text-transform: capitalize; + } .asstes-container { font-weight: #{$bold-weight}; From b3b077c80d3c7911f3efe2a08136b3b3b0b3948c Mon Sep 17 00:00:00 2001 From: Vishnu Date: Fri, 28 Mar 2025 14:11:11 +0530 Subject: [PATCH 7/9] type error fix --- app/package-lock.json | 47 +++++++---------------- app/src/modules/market/Card.tsx | 4 +- app/src/modules/market/CardsContainer.tsx | 6 +-- 3 files changed, 19 insertions(+), 38 deletions(-) diff --git a/app/package-lock.json b/app/package-lock.json index 20fa0fc..c8210e0 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -2017,7 +2017,7 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "devOptional": true, + "dev": true, "dependencies": { "@jridgewell/trace-mapping": "0.3.9" }, @@ -2029,7 +2029,7 @@ "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "devOptional": true, + "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -4128,25 +4128,6 @@ "url": "https://github.com/sponsors/gregberge" } }, - "node_modules/@testing-library/dom": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", - "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^5.0.1", - "aria-query": "5.3.0", - "chalk": "^4.1.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.5.0", - "pretty-format": "^27.0.2" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/@testing-library/jest-dom": { "version": "5.17.0", "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.17.0.tgz", @@ -4258,25 +4239,25 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "devOptional": true + "dev": true }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "devOptional": true + "dev": true }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "devOptional": true + "dev": true }, "node_modules/@tsconfig/node16": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "devOptional": true + "dev": true }, "node_modules/@turf/along": { "version": "7.2.0", @@ -8883,7 +8864,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "devOptional": true + "dev": true }, "node_modules/cross-env": { "version": "7.0.3", @@ -9748,7 +9729,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.3.1" } @@ -15092,7 +15073,7 @@ "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "devOptional": true + "dev": true }, "node_modules/makeerror": { "version": "1.0.12", @@ -20535,7 +20516,7 @@ "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "devOptional": true, + "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -20578,7 +20559,7 @@ "version": "8.3.4", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "devOptional": true, + "dev": true, "dependencies": { "acorn": "^8.11.0" }, @@ -20590,7 +20571,7 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "devOptional": true + "dev": true }, "node_modules/tsconfig-paths": { "version": "3.15.0", @@ -21077,7 +21058,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "devOptional": true + "dev": true }, "node_modules/v8-to-istanbul": { "version": "8.1.1", @@ -22136,7 +22117,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "devOptional": true, + "dev": true, "engines": { "node": ">=6" } diff --git a/app/src/modules/market/Card.tsx b/app/src/modules/market/Card.tsx index b872dc0..91729e3 100644 --- a/app/src/modules/market/Card.tsx +++ b/app/src/modules/market/Card.tsx @@ -11,14 +11,14 @@ import assetImage from "../../assets/image/image.png"; interface CardProps { assetName: string; - uploadedOn: number; + uploadedOn: string; price: number; rating: number; views: number; image: string; onSelectCard: (cardData: { assetName: string; - uploadedOn: number; + uploadedOn: string; price: number; rating: number; views: number; diff --git a/app/src/modules/market/CardsContainer.tsx b/app/src/modules/market/CardsContainer.tsx index 67bf849..2704311 100644 --- a/app/src/modules/market/CardsContainer.tsx +++ b/app/src/modules/market/CardsContainer.tsx @@ -121,7 +121,7 @@ const CardsContainer: React.FC = () => { const [selectedCard, setSelectedCard] = useState<{ assetName: string; - uploadedOn: number; + uploadedOn: string; price: number; rating: number; views: number; @@ -129,7 +129,7 @@ const CardsContainer: React.FC = () => { const handleCardSelect = (cardData: { assetName: string; - uploadedOn: number; + uploadedOn: string; price: number; rating: number; views: number; @@ -168,7 +168,7 @@ const CardsContainer: React.FC = () => { Date: Fri, 28 Mar 2025 16:25:53 +0530 Subject: [PATCH 8/9] completed some features in market place --- app/src/modules/market/AssetPreview.tsx | 50 ++++++- app/src/modules/market/Card.tsx | 5 +- app/src/modules/market/CardsContainer.tsx | 132 +----------------- app/src/modules/market/FilterSearch.tsx | 58 +++++++- app/src/modules/market/GltfLoader.tsx | 79 +++++++++++ app/src/modules/market/MarketPlace.tsx | 40 +++++- .../services/marketplace/fetchAssetDetails.ts | 22 +++ app/src/services/marketplace/fetchAssets.ts | 2 + app/src/services/marketplace/fetchGltfUrl.ts | 7 + .../services/marketplace/getAssetDownload.ts | 4 + .../services/marketplace/getSortedAssets.ts | 25 ++++ .../components/marketPlace/marketPlace.scss | 4 +- 12 files changed, 286 insertions(+), 142 deletions(-) create mode 100644 app/src/modules/market/GltfLoader.tsx create mode 100644 app/src/services/marketplace/fetchAssetDetails.ts create mode 100644 app/src/services/marketplace/fetchGltfUrl.ts create mode 100644 app/src/services/marketplace/getAssetDownload.ts create mode 100644 app/src/services/marketplace/getSortedAssets.ts diff --git a/app/src/modules/market/AssetPreview.tsx b/app/src/modules/market/AssetPreview.tsx index be474a2..864c5e5 100644 --- a/app/src/modules/market/AssetPreview.tsx +++ b/app/src/modules/market/AssetPreview.tsx @@ -1,11 +1,15 @@ -import React from "react"; +import React, { Suspense, useEffect } from "react"; import assetImage from "../../assets/image/image.png"; import { FiileedStarsIconSmall } from "../../components/icons/marketPlaceIcons"; +import { Canvas, useThree } from "@react-three/fiber"; +import { ContactShadows, OrbitControls, Text } from "@react-three/drei"; +import GltfLoader from "./GltfLoader"; +import * as THREE from "three"; // Define the shape of the selected card interface SelectedCard { assetName: string; - uploadedOn: string; + uploadedOn: number; price: number; rating: number; views: number; @@ -17,6 +21,14 @@ interface AssetPreviewProps { setSelectedCard: React.Dispatch>; // Type for setter function } +function Ui() { + return ( + + Loading your model... + + ); +} + const AssetPreview: React.FC = ({ selectedCard, setSelectedCard, @@ -27,8 +39,6 @@ const AssetPreview: React.FC = ({ Math.min(5, isNaN(selectedCard.rating) ? 0 : selectedCard.rating) ); - console.log("selectedCard: ", selectedCard); - // Ensure that the rating is a valid positive integer for array length const starsArray = Array.from({ length: rating }, (_, index) => index); @@ -36,8 +46,38 @@ const AssetPreview: React.FC = ({
- + {/* */} {/* Add canvas here */} +
+ { + scene.background = new THREE.Color(0xffffff); + }} + > + }> + {selectedCard.assetName && ( + + )} + + + + +
diff --git a/app/src/modules/market/Card.tsx b/app/src/modules/market/Card.tsx index b872dc0..4188447 100644 --- a/app/src/modules/market/Card.tsx +++ b/app/src/modules/market/Card.tsx @@ -8,6 +8,7 @@ import { } from "../../components/icons/marketPlaceIcons"; import assetImage from "../../assets/image/image.png"; +import { getAssetDownload } from "../../services/marketplace/getAssetDownload"; interface CardProps { assetName: string; @@ -40,9 +41,9 @@ const Card: React.FC = ({ return (
-
+ {/* -
+ */}
{assetName}
diff --git a/app/src/modules/market/CardsContainer.tsx b/app/src/modules/market/CardsContainer.tsx index 67bf849..50da667 100644 --- a/app/src/modules/market/CardsContainer.tsx +++ b/app/src/modules/market/CardsContainer.tsx @@ -16,109 +16,11 @@ interface ModelData { uploadDate: number; _id: string; } +interface ModelsProps { + models: ModelData[]; +} -const CardsContainer: React.FC = () => { - const [models, setModels] = useState([]); - - const array = [ - { - id: 1, - name: "Asset 1", - uploadedOn: "12 Jan 23", - price: 36500, - rating: 4.5, - views: 500, - }, - { - id: 2, - name: "Asset 2", - uploadedOn: "14 Jan 23", - price: 45000, - rating: 4.0, - views: 500, - }, - { - id: 3, - name: "Asset 3", - uploadedOn: "15 Jan 23", - price: 52000, - rating: 4.8, - views: 500, - }, - { - id: 4, - name: "Asset 4", - uploadedOn: "18 Jan 23", - price: 37000, - rating: 3.9, - views: 500, - }, - { - id: 5, - name: "Asset 5", - uploadedOn: "20 Jan 23", - price: 60000, - rating: 5.0, - views: 500, - }, - { - id: 6, - name: "Asset 6", - uploadedOn: "22 Jan 23", - price: 46000, - rating: 4.2, - views: 500, - }, - { - id: 7, - name: "Asset 7", - uploadedOn: "25 Jan 23", - price: 38000, - rating: 4.3, - views: 500, - }, - { - id: 8, - name: "Asset 8", - uploadedOn: "27 Jan 23", - price: 41000, - rating: 4.1, - views: 500, - }, - { - id: 9, - name: "Asset 9", - uploadedOn: "30 Jan 23", - price: 55000, - rating: 4.6, - views: 500, - }, - { - id: 10, - name: "Asset 10", - uploadedOn: "2 Feb 23", - price: 49000, - rating: 4.4, - views: 500, - }, - { - id: 11, - name: "Asset 11", - uploadedOn: "5 Feb 23", - price: 62000, - rating: 5.0, - views: 500, - }, - { - id: 12, - name: "Asset 12", - uploadedOn: "7 Feb 23", - price: 53000, - rating: 4.7, - views: 500, - }, - ]; - +const CardsContainer: React.FC = ({ models }) => { const [selectedCard, setSelectedCard] = useState<{ assetName: string; uploadedOn: number; @@ -136,33 +38,11 @@ const CardsContainer: React.FC = () => { }) => { setSelectedCard(cardData); }; - const getAllAssets = async () => { - try { - const assetsData = await fetchAssets(); - const reversedData = [...assetsData]?.reverse().slice(0, 8); - setModels(reversedData); - } catch (error) { - } finally { - } - }; - useEffect(() => { - getAllAssets(); - }, []); + return (
Products You May Like
- {/* {array.map((asset) => ( - - ))} */} {models.length > 0 && models.map((assetDetail) => ( { uploadedOn={assetDetail.uploadDate} price={36500} rating={4.5} - views={500} + views={800} onSelectCard={handleCardSelect} image={assetDetail.thumbnail} /> diff --git a/app/src/modules/market/FilterSearch.tsx b/app/src/modules/market/FilterSearch.tsx index 11a2cbf..08103ba 100644 --- a/app/src/modules/market/FilterSearch.tsx +++ b/app/src/modules/market/FilterSearch.tsx @@ -1,19 +1,69 @@ -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; // import RegularDropDown from "./ui/inputs/RegularDropDown"; import Search from "../../components/ui/inputs/Search"; import { StarsIcon } from "../../components/icons/marketPlaceIcons"; import RegularDropDown from "../../components/ui/inputs/RegularDropDown"; - -const FilterSearch: React.FC = () => { +import { getSortedAssets } from "../../services/marketplace/getSortedAssets"; +interface ModelData { + CreatedBy: string; + animated: string | null; + category: string; + description: string; + filename: string; + isArchieve: boolean; + modelfileID: string; + tags: string; + thumbnail: string; + uploadDate: number; + _id: string; +} +interface ModelsProps { + models: ModelData[]; + setModels: React.Dispatch>; + filteredModels: ModelData[]; +} +const FilterSearch: React.FC = ({ + models, + setModels, + filteredModels, +}) => { const [activeOption, setActiveOption] = useState("Sort by"); // State for active option + console.log("filteredModels: ", filteredModels); const handleSelect = (option: string) => { setActiveOption(option); + console.log("option: ", option); + // Alphabet ascending + // Alphabet descending + // All }; + useEffect(() => { + if (activeOption == "Alphabet ascending") { + let ascending = models + ?.slice() + .sort((a, b) => a.filename.localeCompare(b.filename)) + .map((val) => val); + setModels(ascending); + } else if (activeOption == "Alphabet descending") { + let descending = models + ?.slice() + .sort((a, b) => b.filename.localeCompare(a.filename)) + .map((val) => val); + setModels(descending); + } + }, [activeOption]); + const handleSearch = (val: string) => { + const filteredModel = filteredModels?.filter((model) => + model.filename.toLowerCase().includes(val.toLowerCase()) + ); + + setModels(filteredModel); + }; + return (
- {}} /> + void; + selectedAnimation?: string; + setSelectedAnimation?: (animation: string) => void; +} + +// const getGLTFUrl = (url: string) => url; // Placeholder for your actual function + +const GltfLoader: React.FC = ({ + glbdata, + fromServer, + setAnimations, + selectedAnimation, +}) => { + const modelUrl: any = fromServer ? fetchGltfUrl(fromServer) : glbdata; + const { scene, animations } = useGLTF(modelUrl ?? "") as { + scene: Object3D; + animations: THREE.AnimationClip[]; + }; + + const mixer = useRef( + scene ? new AnimationMixer(scene) : null + ); + const actions = useRef>({}); + + useEffect(() => { + if (animations.length > 0 && mixer.current && setAnimations) { + const animationNames = animations.map((animation) => animation.name); + setAnimations(animationNames); + + animations.forEach((animation) => { + const action = mixer.current!.clipAction(animation); + actions.current[animation.name] = action; + }); + } else { + setAnimations && setAnimations([]); + } + }, [animations, setAnimations]); + + useEffect(() => { + if (actions.current && selectedAnimation) { + const action = actions.current[selectedAnimation]; + if (action) { + action.reset().fadeIn(0.5).play(); + return () => { + action.fadeOut(0.5); + }; + } + } + }, [selectedAnimation]); + + useFrame((_, delta) => { + if (mixer.current) { + mixer.current.update(delta); + } + }); + + return ( + + + + ); +}; + +export default GltfLoader; diff --git a/app/src/modules/market/MarketPlace.tsx b/app/src/modules/market/MarketPlace.tsx index 71dc0a5..d830576 100644 --- a/app/src/modules/market/MarketPlace.tsx +++ b/app/src/modules/market/MarketPlace.tsx @@ -1,14 +1,46 @@ -import React from "react"; +import React, { useEffect, useState } from "react"; import FilterSearch from "./FilterSearch"; import CardsContainer from "./CardsContainer"; - +import { fetchAssets } from "../../services/marketplace/fetchAssets"; +import { getAssetImages } from "../../services/factoryBuilder/assest/assets/getAssetImages"; +interface ModelData { + CreatedBy: string; + animated: string | null; + category: string; + description: string; + filename: string; + isArchieve: boolean; + modelfileID: string; + tags: string; + thumbnail: string; + uploadDate: number; + _id: string; +} const MarketPlace = () => { + const [models, setModels] = useState([]); + const [filteredModels, setFilteredModels] = useState([]); + + useEffect(() => { + const filteredAssets = async () => { + try { + const filt = await getAssetImages("67d934ad0f42a1fdadb19aa6"); + setModels(filt.items); + setFilteredModels(filt.items); + } catch {} + }; + filteredAssets(); + }, []); + return (
- - + +
diff --git a/app/src/services/marketplace/fetchAssetDetails.ts b/app/src/services/marketplace/fetchAssetDetails.ts new file mode 100644 index 0000000..b14fd3f --- /dev/null +++ b/app/src/services/marketplace/fetchAssetDetails.ts @@ -0,0 +1,22 @@ +let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`; +export const getAssetDetails = async (filename: string) => { + try { + const response = await fetch(`${BackEnd_url}/api/v1/assetDetails`, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ filename }), + }); + + if (!response.ok) { + throw new Error("Failed to fetch asset details"); + } + + const result = await response.json(); + return result; + } catch (error: any) { + // console.error("Error fetching category:", error.message); + throw new Error(error.message); + } +}; diff --git a/app/src/services/marketplace/fetchAssets.ts b/app/src/services/marketplace/fetchAssets.ts index 3408252..e434a2b 100644 --- a/app/src/services/marketplace/fetchAssets.ts +++ b/app/src/services/marketplace/fetchAssets.ts @@ -6,6 +6,8 @@ export const fetchAssets = async () => { throw new Error("Network response was not ok"); } const result = await response.json(); + const last10Assets = result.slice(-10); + console.log('last10Assets: ', last10Assets); return result; } catch (error) { console.log("error: ", error); diff --git a/app/src/services/marketplace/fetchGltfUrl.ts b/app/src/services/marketplace/fetchGltfUrl.ts new file mode 100644 index 0000000..3916c9e --- /dev/null +++ b/app/src/services/marketplace/fetchGltfUrl.ts @@ -0,0 +1,7 @@ +let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`; +export const fetchGltfUrl = (filename: string) => { + if (filename) { + return `${BackEnd_url}/api/v1/getAssetFile/${filename}`; + } + return null; // or handle the case when filename is not provided +}; diff --git a/app/src/services/marketplace/getAssetDownload.ts b/app/src/services/marketplace/getAssetDownload.ts new file mode 100644 index 0000000..dea6d14 --- /dev/null +++ b/app/src/services/marketplace/getAssetDownload.ts @@ -0,0 +1,4 @@ +let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`; +export const getAssetDownload = (filename: any) => { + return `${BackEnd_url}/api/v1/getAssetFile/${filename}.gltf`; +}; diff --git a/app/src/services/marketplace/getSortedAssets.ts b/app/src/services/marketplace/getSortedAssets.ts new file mode 100644 index 0000000..3bbbfbe --- /dev/null +++ b/app/src/services/marketplace/getSortedAssets.ts @@ -0,0 +1,25 @@ +let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`; +export const getSortedAssets = async (category: any, orders: any) => { + try { + const response = await fetch( + `${BackEnd_url}/api/v1/categoryWise/${category}?sortBy=${orders}`, + { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + } + ); + + if (!response.ok) { + throw new Error(`Error: ${response.statusText}`); + } + + const result = await response.json(); + + return result; // Return the result to be used later + } catch (error: any) { + console.error("Error fetching category:", error.message); + throw new Error(error.message); + } +}; diff --git a/app/src/styles/components/marketPlace/marketPlace.scss b/app/src/styles/components/marketPlace/marketPlace.scss index 8df0896..71f5897 100644 --- a/app/src/styles/components/marketPlace/marketPlace.scss +++ b/app/src/styles/components/marketPlace/marketPlace.scss @@ -126,6 +126,8 @@ display: flex; max-height: 180px; justify-content: center; + border-radius: #{$border-radius-medium}; + overflow: hidden; img{ height: inherit; width: 100%; @@ -211,7 +213,7 @@ background-color: var(--background-color); display: flex; gap: 12px; - z-index: 100; + overflow: hidden; border-radius: 20px; } From f46f29b88cf814ed166f32a8b285921b389eff71 Mon Sep 17 00:00:00 2001 From: Jerald-Golden-B Date: Fri, 28 Mar 2025 19:10:49 +0530 Subject: [PATCH 9/9] Add MQTT URL to environment variables and refactor simulation components --- app/.env | 3 + .../layout/sidebarRight/SideBarRight.tsx | 16 +- .../mechanics/ConveyorMechanics.tsx | 586 +++++++++++++++ .../mechanics/MachineMechanics.tsx | 533 ------------- .../mechanics/VehicleMechanics.tsx | 561 ++++++++++++++ .../modules/builder/agv/navMeshDetails.tsx | 12 +- app/src/modules/builder/agv/pathNavigator.tsx | 2 +- .../modules/builder/agv/polygonGenerator.tsx | 76 +- app/src/modules/collaboration/collabCams.tsx | 2 +- app/src/modules/scene/scene.tsx | 4 - .../simulation/behaviour/behaviour.tsx | 58 +- .../modules/simulation/path/pathConnector.tsx | 312 +++++--- .../modules/simulation/path/pathCreation.tsx | 203 +++-- app/src/modules/simulation/simulation.tsx | 2 +- app/src/modules/simulation/simulationUI.tsx | 698 +++++++++--------- app/src/pages/Project.tsx | 1 - .../factoryBuilder/mqtt/mqttEvents.ts | 5 +- app/src/store/store.ts | 29 +- app/src/types/world/worldTypes.d.ts | 32 + 19 files changed, 1971 insertions(+), 1164 deletions(-) create mode 100644 app/src/components/layout/sidebarRight/mechanics/ConveyorMechanics.tsx delete mode 100644 app/src/components/layout/sidebarRight/mechanics/MachineMechanics.tsx create mode 100644 app/src/components/layout/sidebarRight/mechanics/VehicleMechanics.tsx diff --git a/app/.env b/app/.env index db5ccb6..81bd26d 100644 --- a/app/.env +++ b/app/.env @@ -9,3 +9,6 @@ REACT_APP_SERVER_REST_API_BASE_URL=185.100.212.76:5000 # Base URL for the server marketplace API. REACT_APP_SERVER_MARKETPLACE_URL=185.100.212.76:50011 + +# Base URL for the server mqtt. +REACT_APP_SERVER_MQTT_URL=185.100.212.76:23457 diff --git a/app/src/components/layout/sidebarRight/SideBarRight.tsx b/app/src/components/layout/sidebarRight/SideBarRight.tsx index 0efe99b..3ba5595 100644 --- a/app/src/components/layout/sidebarRight/SideBarRight.tsx +++ b/app/src/components/layout/sidebarRight/SideBarRight.tsx @@ -10,7 +10,7 @@ import { SimulationIcon, } from "../../icons/SimulationIcons"; import useToggleStore from "../../../store/useUIToggleStore"; -import MachineMechanics from "./mechanics/MachineMechanics"; +import ConveyorMechanics from "./mechanics/ConveyorMechanics"; import Visualization from "./visualization/Visualization"; import Analysis from "./analysis/Analysis"; import Simulations from "./simulation/Simulations"; @@ -18,6 +18,7 @@ import { useSelectedActionSphere } from "../../../store/store"; import GlobalProperties from "./properties/GlobalProperties"; import AsstePropertiies from "./properties/AssetProperties"; import ZoneProperties from "./properties/ZoneProperties"; +import VehicleMechanics from "./mechanics/VehicleMechanics"; const SideBarRight: React.FC = () => { const { activeModule } = useModuleStore(); @@ -98,17 +99,24 @@ const SideBarRight: React.FC = () => { {toggleUI && activeModule === "simulation" && ( <> - {subModule === "mechanics" && selectedActionSphere && ( + {subModule === "mechanics" && selectedActionSphere && selectedActionSphere.path.type === "Conveyor" && (
- + +
+
+ )} + {subModule === "mechanics" && selectedActionSphere && selectedActionSphere.path.type === "Vehicle" && ( +
+
+ {/* */}
)} {subModule === "mechanics" && !selectedActionSphere && (
- {/* */} +
)} diff --git a/app/src/components/layout/sidebarRight/mechanics/ConveyorMechanics.tsx b/app/src/components/layout/sidebarRight/mechanics/ConveyorMechanics.tsx new file mode 100644 index 0000000..a1f8bf3 --- /dev/null +++ b/app/src/components/layout/sidebarRight/mechanics/ConveyorMechanics.tsx @@ -0,0 +1,586 @@ +import React, { useRef, useState, useMemo, useEffect } from "react"; +import { + AddIcon, + InfoIcon, + RemoveIcon, + ResizeHeightIcon, +} from "../../../icons/ExportCommonIcons"; +import RenameInput from "../../../ui/inputs/RenameInput"; +import InputWithDropDown from "../../../ui/inputs/InputWithDropDown"; +import LabledDropdown from "../../../ui/inputs/LabledDropdown"; +import RegularDropDown from "../../../ui/inputs/RegularDropDown"; +import { handleResize } from "../../../../functions/handleResizePannel"; +import EyeDropInput from "../../../ui/inputs/EyeDropInput"; +import { useSelectedActionSphere, useSelectedPath, useSimulationPaths } from "../../../../store/store"; +import * as THREE from 'three'; +import * as Types from '../../../../types/world/worldTypes'; +import InputToggle from "../../../ui/inputs/InputToggle"; + +const ConveyorMechanics: React.FC = () => { + const { selectedActionSphere } = useSelectedActionSphere(); + const { selectedPath, setSelectedPath } = useSelectedPath(); + const { simulationPaths, setSimulationPaths } = useSimulationPaths(); + + const actionsContainerRef = useRef(null); + const triggersContainerRef = useRef(null); + + const selectedPoint = useMemo(() => { + if (!selectedActionSphere) return null; + return simulationPaths + .filter((path): path is Types.ConveyorEventsSchema => path.type === "Conveyor") + .flatMap((path) => path.points) + .find((point) => point.uuid === selectedActionSphere.point.uuid); + }, [selectedActionSphere, simulationPaths]); + + const handleAddAction = () => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => { + if (path.type === "Conveyor") { + return { + ...path, + points: path.points.map((point) => { + if (point.uuid === selectedActionSphere.point.uuid) { + const actionIndex = point.actions.length; + const newAction = { + uuid: THREE.MathUtils.generateUUID(), + name: `Action ${actionIndex + 1}`, + type: 'Inherit', + material: 'Inherit', + delay: 'Inherit', + spawnInterval: 'Inherit', + isUsed: false + }; + + return { ...point, actions: [...point.actions, newAction] }; + } + return point; + }), + }; + } + return path; + }); + + setSimulationPaths(updatedPaths); + }; + + const handleDeleteAction = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { ...point, actions: point.actions.filter(action => action.uuid !== uuid) } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleActionSelect = (uuid: string, actionType: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid + ? { + ...action, + type: actionType, + material: actionType === 'Spawn' || actionType === 'Swap' ? 'Inherit' : action.material, + delay: actionType === 'Delay' ? 'Inherit' : action.delay, + spawnInterval: actionType === 'Spawn' ? 'Inherit' : action.spawnInterval + } + : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Update the selected item to reflect changes + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + const updatedAction = updatedPaths + .filter((path): path is Types.ConveyorEventsSchema => path.type === "Conveyor") + .flatMap(path => path.points) + .find(p => p.uuid === selectedActionSphere.point.uuid) + ?.actions.find(a => a.uuid === uuid); + + if (updatedAction) { + setSelectedItem({ + type: "action", + item: updatedAction + }); + } + } + }; + + // Modified handleMaterialSelect to ensure it only applies to relevant action types + const handleMaterialSelect = (uuid: string, material: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid && + (action.type === 'Spawn' || action.type === 'Swap') + ? { ...action, material } + : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Update selected item if it's the current action + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + material + } + }); + } + }; + + const handleDelayChange = (uuid: string, delay: number | string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid ? { ...action, delay } : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleSpawnIntervalChange = (uuid: string, spawnInterval: number | string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid ? { ...action, spawnInterval } : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleSpeedChange = (speed: number) => { + if (!selectedPath) return; + + const updatedPaths = simulationPaths.map((path) => + path.modeluuid === selectedPath.path.modeluuid ? { ...path, speed } : path + ); + + setSimulationPaths(updatedPaths); + setSelectedPath({ ...selectedPath, path: { ...selectedPath.path, speed } }); + }; + + const handleAddTrigger = () => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => { + if (point.uuid === selectedActionSphere.point.uuid) { + const triggerIndex = point.triggers.length; + const newTrigger = { + uuid: THREE.MathUtils.generateUUID(), + name: `Trigger ${triggerIndex + 1}`, + type: '', + isUsed: false + }; + + return { ...point, triggers: [...point.triggers, newTrigger] }; + } + return point; + }), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleDeleteTrigger = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { ...point, triggers: point.triggers.filter(trigger => trigger.uuid !== uuid) } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleTriggerSelect = (uuid: string, triggerType: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + triggers: point.triggers.map((trigger) => + trigger.uuid === uuid ? { ...trigger, type: triggerType } : trigger + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + // Update the toggle handlers to immediately update the selected item + const handleActionToggle = (uuid: string) => { + if (!selectedActionSphere) return; + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => ({ + ...action, + isUsed: action.uuid === uuid ? !action.isUsed : false, + })), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Immediately update the selected item if it's the one being toggled + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + isUsed: !selectedItem.item.isUsed + } + }); + } + }; + + // Do the same for trigger toggle + const handleTriggerToggle = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + triggers: point.triggers.map((trigger) => ({ + ...trigger, + isUsed: trigger.uuid === uuid ? !trigger.isUsed : false, + })), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Immediately update the selected item if it's the one being toggled + if (selectedItem?.type === "trigger" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + isUsed: !selectedItem.item.isUsed + } + }); + } + }; + + const [selectedItem, setSelectedItem] = useState<{ type: "action" | "trigger"; item: any; } | null>(null); + + useEffect(() => { + setSelectedItem(null); // Reset selectedItem when selectedActionSphere changes + }, [selectedActionSphere]); + + return ( +
+
+ {selectedActionSphere?.path?.modelName || "point name not found"} +
+ +
+ {!selectedPath && + <> +
+
+
Actions
+
+ Add +
+
+
+
+ {selectedPoint?.actions.map((action) => ( +
+
setSelectedItem({ type: "action", item: action })} + > + +
+
handleDeleteAction(action.uuid)} + > + +
+
+ ))} +
+
handleResize(e, actionsContainerRef)} + > + +
+
+
+
+
+
Triggers
+
+ Add +
+
+
+
+ {selectedPoint?.triggers.map((trigger) => ( +
+
setSelectedItem({ type: "trigger", item: trigger })} + > + +
+
handleDeleteTrigger(trigger.uuid)} + > + +
+
+ ))} +
+
handleResize(e, triggersContainerRef)} + > + +
+
+
+ + } + +
+ {selectedItem && ( + <> +
{selectedItem.item.name}
+ + {selectedItem.type === "action" && ( + <> + handleActionToggle(selectedItem.item.uuid)} + /> + handleActionSelect(selectedItem.item.uuid, option)} + /> + + {/* Only show material dropdown for Spawn/Swap actions */} + {(selectedItem.item.type === 'Spawn' || selectedItem.item.type === 'Swap') && ( + handleMaterialSelect(selectedItem.item.uuid, option)} + /> + )} + + {/* Only show delay input for Delay actions */} + {selectedItem.item.type === 'Delay' && ( + { + const numValue = parseInt(value); + handleDelayChange( + selectedItem.item.uuid, + !value ? 'Inherit' : numValue + ); + }} + /> + )} + + {/* Only show spawn interval for Spawn actions */} + {selectedItem.item.type === 'Spawn' && ( + { + handleSpawnIntervalChange(selectedItem.item.uuid, (value === "") ? "Inherit" : parseInt(value)); + }} + /> + + )} + + )} + + {selectedItem.type === "trigger" && ( + <> + handleTriggerToggle(selectedItem.item.uuid)} + /> + + handleTriggerSelect(selectedItem.item.uuid, option)} + /> + + )} + + )} + + {selectedPath && !selectedItem && ( +
+ handleSpeedChange(parseFloat(value))} + /> +
+ )} +
+
+ + By selecting points, you can create events and triggers. +
+
+
+ ); +}; + +export default ConveyorMechanics; \ No newline at end of file diff --git a/app/src/components/layout/sidebarRight/mechanics/MachineMechanics.tsx b/app/src/components/layout/sidebarRight/mechanics/MachineMechanics.tsx deleted file mode 100644 index e1ecfb3..0000000 --- a/app/src/components/layout/sidebarRight/mechanics/MachineMechanics.tsx +++ /dev/null @@ -1,533 +0,0 @@ -import React, { useRef, useState, useMemo, useEffect } from "react"; -import { - AddIcon, - InfoIcon, - RemoveIcon, - ResizeHeightIcon, -} from "../../../icons/ExportCommonIcons"; -import RenameInput from "../../../ui/inputs/RenameInput"; -import InputWithDropDown from "../../../ui/inputs/InputWithDropDown"; -import LabledDropdown from "../../../ui/inputs/LabledDropdown"; -import RegularDropDown from "../../../ui/inputs/RegularDropDown"; -import { handleResize } from "../../../../functions/handleResizePannel"; -import EyeDropInput from "../../../ui/inputs/EyeDropInput"; -import { useSelectedActionSphere, useSelectedPath, useSimulationPaths } from "../../../../store/store"; -import * as THREE from 'three'; -import InputToggle from "../../../ui/inputs/InputToggle"; - -const MachineMechanics: React.FC = () => { - const { selectedActionSphere } = useSelectedActionSphere(); - const { selectedPath, setSelectedPath } = useSelectedPath(); - const { simulationPaths, setSimulationPaths } = useSimulationPaths(); - - const actionsContainerRef = useRef(null); - const triggersContainerRef = useRef(null); - - const selectedPoint = useMemo(() => { - if (!selectedActionSphere) return null; - return simulationPaths.flatMap((path) => path.points).find((point) => point.uuid === selectedActionSphere.point.uuid); - }, [selectedActionSphere, simulationPaths]); - - const handleAddAction = () => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => { - if (point.uuid === selectedActionSphere.point.uuid) { - const actionIndex = point.actions.length; - const newAction = { - uuid: THREE.MathUtils.generateUUID(), - name: `Action ${actionIndex + 1}`, - type: 'Inherit', - material: 'Inherit', - delay: 'Inherit', - spawnInterval: 'Inherit', - isUsed: false - }; - - return { ...point, actions: [...point.actions, newAction] }; - } - return point; - }), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleDeleteAction = (uuid: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { ...point, actions: point.actions.filter(action => action.uuid !== uuid) } - : point - ), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleActionSelect = (uuid: string, actionType: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid - ? { - ...action, - type: actionType, - // Reset dependent fields when type changes - material: actionType === 'Spawn' || actionType === 'Swap' ? 'Inherit' : action.material, - delay: actionType === 'Delay' ? 'Inherit' : action.delay, - spawnInterval: actionType === 'Spawn' ? 'Inherit' : action.spawnInterval - } - : action - ), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - - // Update the selected item to reflect changes - if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { - const updatedAction = updatedPaths - .flatMap(path => path.points) - .find(p => p.uuid === selectedActionSphere.point.uuid) - ?.actions.find(a => a.uuid === uuid); - - if (updatedAction) { - setSelectedItem({ - type: "action", - item: updatedAction - }); - } - } - }; - - // Modified handleMaterialSelect to ensure it only applies to relevant action types - const handleMaterialSelect = (uuid: string, material: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid && - (action.type === 'Spawn' || action.type === 'Swap') - ? { ...action, material } - : action - ), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - - // Update selected item if it's the current action - if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { - setSelectedItem({ - ...selectedItem, - item: { - ...selectedItem.item, - material - } - }); - } - }; - - const handleDelayChange = (uuid: string, delay: number | string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, delay } : action - ), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleSpawnIntervalChange = (uuid: string, spawnInterval: number | string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, spawnInterval } : action - ), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleSpeedChange = (speed: number) => { - if (!selectedPath) return; - - const updatedPaths = simulationPaths.map((path) => - path.modeluuid === selectedPath.path.modeluuid ? { ...path, speed } : path - ); - - setSimulationPaths(updatedPaths); - setSelectedPath({ ...selectedPath, path: { ...selectedPath.path, speed } }); - }; - - const handleAddTrigger = () => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => { - if (point.uuid === selectedActionSphere.point.uuid) { - const triggerIndex = point.triggers.length; - const newTrigger = { - uuid: THREE.MathUtils.generateUUID(), - name: `Trigger ${triggerIndex + 1}`, - type: '', - isUsed: false - }; - - return { ...point, triggers: [...point.triggers, newTrigger] }; - } - return point; - }), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleDeleteTrigger = (uuid: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { ...point, triggers: point.triggers.filter(trigger => trigger.uuid !== uuid) } - : point - ), - })); - - setSimulationPaths(updatedPaths); - }; - - const handleTriggerSelect = (uuid: string, triggerType: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - triggers: point.triggers.map((trigger) => - trigger.uuid === uuid ? { ...trigger, type: triggerType } : trigger - ), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - }; - - // Update the toggle handlers to immediately update the selected item - const handleActionToggle = (uuid: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => ({ - ...action, - isUsed: action.uuid === uuid ? !action.isUsed : false, - })), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - - // Immediately update the selected item if it's the one being toggled - if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { - setSelectedItem({ - ...selectedItem, - item: { - ...selectedItem.item, - isUsed: !selectedItem.item.isUsed - } - }); - } - }; - - // Do the same for trigger toggle - const handleTriggerToggle = (uuid: string) => { - if (!selectedActionSphere) return; - - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - triggers: point.triggers.map((trigger) => ({ - ...trigger, - isUsed: trigger.uuid === uuid ? !trigger.isUsed : false, - })), - } - : point - ), - })); - - setSimulationPaths(updatedPaths); - - // Immediately update the selected item if it's the one being toggled - if (selectedItem?.type === "trigger" && selectedItem.item.uuid === uuid) { - setSelectedItem({ - ...selectedItem, - item: { - ...selectedItem.item, - isUsed: !selectedItem.item.isUsed - } - }); - } - }; - - const [selectedItem, setSelectedItem] = useState<{ type: "action" | "trigger"; item: any; } | null>(null); - - useEffect(() => { - setSelectedItem(null); // Reset selectedItem when selectedActionSphere changes - }, [selectedActionSphere]); - - return ( -
-
- {selectedActionSphere?.path?.modelName || "point name not found"} -
- -
-
-
-
Actions
-
- Add -
-
-
-
- {selectedPoint?.actions.map((action) => ( -
-
setSelectedItem({ type: "action", item: action })} - > - -
-
handleDeleteAction(action.uuid)} - > - -
-
- ))} -
-
handleResize(e, actionsContainerRef)} - > - -
-
-
-
-
-
Triggers
-
- Add -
-
-
-
- {selectedPoint?.triggers.map((trigger) => ( -
-
setSelectedItem({ type: "trigger", item: trigger })} - > - -
-
handleDeleteTrigger(trigger.uuid)} - > - -
-
- ))} -
-
handleResize(e, triggersContainerRef)} - > - -
-
-
-
- {selectedItem && ( - <> -
{selectedItem.item.name}
- - {selectedItem.type === "action" && ( - <> - handleActionToggle(selectedItem.item.uuid)} - /> - handleActionSelect(selectedItem.item.uuid, option)} - /> - - {/* Only show material dropdown for Spawn/Swap actions */} - {(selectedItem.item.type === 'Spawn' || selectedItem.item.type === 'Swap') && ( - handleMaterialSelect(selectedItem.item.uuid, option)} - /> - )} - - {/* Only show delay input for Delay actions */} - {selectedItem.item.type === 'Delay' && ( - { - const numValue = parseInt(value); - handleDelayChange( - selectedItem.item.uuid, - !value ? 'Inherit' : numValue - ); - }} - /> - )} - - {/* Only show spawn interval for Spawn actions */} - {selectedItem.item.type === 'Spawn' && ( - { - handleSpawnIntervalChange(selectedItem.item.uuid, (value === "") ? "Inherit" : parseInt(value)); - }} - /> - - )} - - )} - - {selectedItem.type === "trigger" && ( - <> - handleTriggerToggle(selectedItem.item.uuid)} - /> - - handleTriggerSelect(selectedItem.item.uuid, option)} - /> - - )} - - )} - - {selectedPath && !selectedItem && ( -
- handleSpeedChange(parseFloat(value))} - /> -
- )} -
-
- - By selecting points, you can create events and triggers. -
-
-
- ); -}; - -export default MachineMechanics; \ No newline at end of file diff --git a/app/src/components/layout/sidebarRight/mechanics/VehicleMechanics.tsx b/app/src/components/layout/sidebarRight/mechanics/VehicleMechanics.tsx new file mode 100644 index 0000000..7d3ffb0 --- /dev/null +++ b/app/src/components/layout/sidebarRight/mechanics/VehicleMechanics.tsx @@ -0,0 +1,561 @@ +import React, { useRef, useState, useMemo, useEffect } from "react"; +import { + AddIcon, + InfoIcon, + RemoveIcon, + ResizeHeightIcon, +} from "../../../icons/ExportCommonIcons"; +import RenameInput from "../../../ui/inputs/RenameInput"; +import InputWithDropDown from "../../../ui/inputs/InputWithDropDown"; +import LabledDropdown from "../../../ui/inputs/LabledDropdown"; +import RegularDropDown from "../../../ui/inputs/RegularDropDown"; +import { handleResize } from "../../../../functions/handleResizePannel"; +import EyeDropInput from "../../../ui/inputs/EyeDropInput"; +import { useSelectedActionSphere, useSelectedPath, useSimulationPaths } from "../../../../store/store"; +import * as THREE from 'three'; +import * as Types from '../../../../types/world/worldTypes'; +import InputToggle from "../../../ui/inputs/InputToggle"; + +const VehicleMechanics: React.FC = () => { + const { selectedActionSphere } = useSelectedActionSphere(); + const { selectedPath, setSelectedPath } = useSelectedPath(); + const { simulationPaths, setSimulationPaths } = useSimulationPaths(); + + const actionsContainerRef = useRef(null); + const triggersContainerRef = useRef(null); + + const selectedPoint = useMemo(() => { + if (!selectedActionSphere) return null; + return simulationPaths + .filter((path): path is Types.ConveyorEventsSchema => path.type === "Conveyor") + .flatMap((path) => path.points) + .find((point) => point.uuid === selectedActionSphere.point.uuid); + }, [selectedActionSphere, simulationPaths]); + + const handleAddAction = () => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => { + if (path.type === "Conveyor") { + return { + ...path, + points: path.points.map((point) => { + if (point.uuid === selectedActionSphere.point.uuid) { + const actionIndex = point.actions.length; + const newAction = { + uuid: THREE.MathUtils.generateUUID(), + name: `Action ${actionIndex + 1}`, + type: 'Inherit', + material: 'Inherit', + delay: 'Inherit', + spawnInterval: 'Inherit', + isUsed: false + }; + + return { ...point, actions: [...point.actions, newAction] }; + } + return point; + }), + }; + } + return path; + }); + + setSimulationPaths(updatedPaths); + }; + + const handleDeleteAction = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { ...point, actions: point.actions.filter(action => action.uuid !== uuid) } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleActionSelect = (uuid: string, actionType: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid + ? { + ...action, + type: actionType, + material: actionType === 'Spawn' || actionType === 'Swap' ? 'Inherit' : action.material, + delay: actionType === 'Delay' ? 'Inherit' : action.delay, + spawnInterval: actionType === 'Spawn' ? 'Inherit' : action.spawnInterval + } + : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Update the selected item to reflect changes + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + const updatedAction = updatedPaths + .filter((path): path is Types.ConveyorEventsSchema => path.type === "Conveyor") + .flatMap(path => path.points) + .find(p => p.uuid === selectedActionSphere.point.uuid) + ?.actions.find(a => a.uuid === uuid); + + if (updatedAction) { + setSelectedItem({ + type: "action", + item: updatedAction + }); + } + } + }; + + // Modified handleMaterialSelect to ensure it only applies to relevant action types + const handleMaterialSelect = (uuid: string, material: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid && + (action.type === 'Spawn' || action.type === 'Swap') + ? { ...action, material } + : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Update selected item if it's the current action + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + material + } + }); + } + }; + + const handleDelayChange = (uuid: string, delay: number | string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid ? { ...action, delay } : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleSpawnIntervalChange = (uuid: string, spawnInterval: number | string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => + action.uuid === uuid ? { ...action, spawnInterval } : action + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleSpeedChange = (speed: number) => { + if (!selectedPath) return; + + const updatedPaths = simulationPaths.map((path) => + path.modeluuid === selectedPath.path.modeluuid ? { ...path, speed } : path + ); + + setSimulationPaths(updatedPaths); + setSelectedPath({ ...selectedPath, path: { ...selectedPath.path, speed } }); + }; + + const handleAddTrigger = () => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => { + if (point.uuid === selectedActionSphere.point.uuid) { + const triggerIndex = point.triggers.length; + const newTrigger = { + uuid: THREE.MathUtils.generateUUID(), + name: `Trigger ${triggerIndex + 1}`, + type: '', + isUsed: false + }; + + return { ...point, triggers: [...point.triggers, newTrigger] }; + } + return point; + }), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleDeleteTrigger = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { ...point, triggers: point.triggers.filter(trigger => trigger.uuid !== uuid) } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + const handleTriggerSelect = (uuid: string, triggerType: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + triggers: point.triggers.map((trigger) => + trigger.uuid === uuid ? { ...trigger, type: triggerType } : trigger + ), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + }; + + // Update the toggle handlers to immediately update the selected item + const handleActionToggle = (uuid: string) => { + if (!selectedActionSphere) return; + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + actions: point.actions.map((action) => ({ + ...action, + isUsed: action.uuid === uuid ? !action.isUsed : false, + })), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Immediately update the selected item if it's the one being toggled + if (selectedItem?.type === "action" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + isUsed: !selectedItem.item.isUsed + } + }); + } + }; + + // Do the same for trigger toggle + const handleTriggerToggle = (uuid: string) => { + if (!selectedActionSphere) return; + + const updatedPaths = simulationPaths.map((path) => + path.type === "Conveyor" + ? { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + triggers: point.triggers.map((trigger) => ({ + ...trigger, + isUsed: trigger.uuid === uuid ? !trigger.isUsed : false, + })), + } + : point + ), + } + : path + ); + + setSimulationPaths(updatedPaths); + + // Immediately update the selected item if it's the one being toggled + if (selectedItem?.type === "trigger" && selectedItem.item.uuid === uuid) { + setSelectedItem({ + ...selectedItem, + item: { + ...selectedItem.item, + isUsed: !selectedItem.item.isUsed + } + }); + } + }; + + const [selectedItem, setSelectedItem] = useState<{ type: "action" | "trigger"; item: any; } | null>(null); + + useEffect(() => { + setSelectedItem(null); // Reset selectedItem when selectedActionSphere changes + }, [selectedActionSphere]); + + return ( +
+
+ {selectedActionSphere?.path?.modelName || "point name not found"} +
+ +
+
+
+
Actions
+
+ Add +
+
+
+
+ <> + {console.log(selectedPoint)} + +
+
handleResize(e, actionsContainerRef)} + > + +
+
+
+
+
+
Triggers
+
+ Add +
+
+
+
+ {selectedPoint?.triggers.map((trigger) => ( +
+
setSelectedItem({ type: "trigger", item: trigger })} + > + +
+
handleDeleteTrigger(trigger.uuid)} + > + +
+
+ ))} +
+
handleResize(e, triggersContainerRef)} + > + +
+
+
+
+ {selectedItem && ( + <> +
{selectedItem.item.name}
+ + {selectedItem.type === "action" && ( + <> + handleActionToggle(selectedItem.item.uuid)} + /> + handleActionSelect(selectedItem.item.uuid, option)} + /> + + {/* Only show material dropdown for Spawn/Swap actions */} + {(selectedItem.item.type === 'Spawn' || selectedItem.item.type === 'Swap') && ( + handleMaterialSelect(selectedItem.item.uuid, option)} + /> + )} + + {/* Only show delay input for Delay actions */} + {selectedItem.item.type === 'Delay' && ( + { + const numValue = parseInt(value); + handleDelayChange( + selectedItem.item.uuid, + !value ? 'Inherit' : numValue + ); + }} + /> + )} + + {/* Only show spawn interval for Spawn actions */} + {selectedItem.item.type === 'Spawn' && ( + { + handleSpawnIntervalChange(selectedItem.item.uuid, (value === "") ? "Inherit" : parseInt(value)); + }} + /> + + )} + + )} + + {selectedItem.type === "trigger" && ( + <> + handleTriggerToggle(selectedItem.item.uuid)} + /> + + handleTriggerSelect(selectedItem.item.uuid, option)} + /> + + )} + + )} + + {selectedPath && !selectedItem && ( +
+ handleSpeedChange(parseFloat(value))} + /> +
+ )} +
+
+ + By selecting points, you can create events and triggers. +
+
+
+ ); +}; + +export default VehicleMechanics; \ No newline at end of file diff --git a/app/src/modules/builder/agv/navMeshDetails.tsx b/app/src/modules/builder/agv/navMeshDetails.tsx index c941011..571be5a 100644 --- a/app/src/modules/builder/agv/navMeshDetails.tsx +++ b/app/src/modules/builder/agv/navMeshDetails.tsx @@ -34,15 +34,11 @@ export default function NavMeshDetails({ const [positions, indices] = getPositionsAndIndices(meshes); - const cs = 0.5; + const cs = 0.25; const ch = 0.5; - const walkableRadius = 0.89; + const walkableRadius = 0.5; - const { success, navMesh } = generateSoloNavMesh(positions, indices, { - cs, - ch, - walkableRadius: Math.round(walkableRadius / ch), - }); + const { success, navMesh } = generateSoloNavMesh(positions, indices, { cs, ch, walkableRadius: Math.round(walkableRadius / ch), }); if (!success || !navMesh) { return; @@ -53,7 +49,7 @@ export default function NavMeshDetails({ const debugDrawer = new DebugDrawer(); debugDrawer.drawNavMesh(navMesh); // scene.add(debugDrawer); - } catch (error) {} + } catch (error) { } }; initializeNavigation(); diff --git a/app/src/modules/builder/agv/pathNavigator.tsx b/app/src/modules/builder/agv/pathNavigator.tsx index 4193fb7..25d3af0 100644 --- a/app/src/modules/builder/agv/pathNavigator.tsx +++ b/app/src/modules/builder/agv/pathNavigator.tsx @@ -86,7 +86,7 @@ export default function PathNavigator({ return ( <> - {path.length > 0 && } + {/* {path.length > 0 && } */} {path.length > 0 && ( 0 ? path[0] : [0, 0.1, 0]}> diff --git a/app/src/modules/builder/agv/polygonGenerator.tsx b/app/src/modules/builder/agv/polygonGenerator.tsx index 1eca588..8682371 100644 --- a/app/src/modules/builder/agv/polygonGenerator.tsx +++ b/app/src/modules/builder/agv/polygonGenerator.tsx @@ -43,66 +43,46 @@ export default function PolygonGenerator({ const lineFeatures = result?.map((line: any) => turf.lineString(line.map((p: any) => p?.position)) - ); + ); const polygons = turf.polygonize(turf.featureCollection(lineFeatures)); renderWallGeometry(wallPoints); - let union: any = []; + if (polygons.features.length > 1) { + polygons.features.forEach((feature) => { + if (feature.geometry.type === "Polygon") { - polygons.features.forEach((feature) => { - union.push(feature); - }); + const shape = new THREE.Shape(); + const coords = feature.geometry.coordinates[0]; - if (union.length > 1) { - const unionResult = turf.union(turf.featureCollection(union)); + shape.moveTo(coords[0][0], coords[0][1]); - if (unionResult?.geometry.type === "MultiPolygon") { - unionResult.geometry.coordinates.forEach((poly) => { - const coordinates = poly[0].map(([x, z]) => { - return new THREE.Vector3(x, 0, z); - }); - renderBoxGeometry(coordinates); - }); - } else if (unionResult?.geometry.type === "Polygon") { - const coordinates = unionResult.geometry.coordinates[0].map( - ([x, z]) => { - return new THREE.Vector3(x, 0, z); + for (let i = 1; i < coords.length; i++) { + shape.lineTo(coords[i][0], coords[i][1]); } - ); - renderBoxGeometry(coordinates); - } - } else if (union.length === 1) { - const coordinates = union[0].geometry.coordinates[0].map( - ([x, z]: [number, number]) => { - return new THREE.Vector3(x, 0, z); + shape.lineTo(coords[0][0], coords[0][1]); + + const extrudeSettings = { + depth: 5, + bevelEnabled: false, + }; + + const geometry = new THREE.ExtrudeGeometry(shape, extrudeSettings); + + const material = new THREE.MeshBasicMaterial({ color: "blue", transparent: true, opacity: 0.5 }); + const mesh = new THREE.Mesh(geometry, material); + mesh.rotateX(Math.PI / 2); + mesh.name = "agv-collider"; + mesh.position.y = 5; + + mesh.receiveShadow = true; + groupRef.current?.add(mesh); } - ); - // setRooms((prevRooms) => [...prevRooms, coordinates]); + }); + } }, [lines.current]); - const renderBoxGeometry = (coordinates: THREE.Vector3[]) => { - const minX = Math.min(...coordinates.map((p) => p.x)); - const maxX = Math.max(...coordinates.map((p) => p.x)); - const minZ = Math.min(...coordinates.map((p) => p.z)); - const maxZ = Math.max(...coordinates.map((p) => p.z)); - - const width = maxX - minX; - const depth = maxZ - minZ; - const height = 3; - - const geometry = new THREE.BoxGeometry(width, height, depth); - const material = new THREE.MeshBasicMaterial({ - color: "#ff66cc", - visible: false, - }); - - const mesh = new THREE.Mesh(geometry, material); - mesh.position.set((minX + maxX) / 2, height / 2, (minZ + maxZ) / 2); - groupRef.current?.add(mesh); - }; - const renderWallGeometry = (walls: THREE.Vector3[][]) => { walls.forEach((wall) => { if (wall.length < 2) return; diff --git a/app/src/modules/collaboration/collabCams.tsx b/app/src/modules/collaboration/collabCams.tsx index da20b34..9d5475e 100644 --- a/app/src/modules/collaboration/collabCams.tsx +++ b/app/src/modules/collaboration/collabCams.tsx @@ -78,7 +78,7 @@ const CamModelsGroup = () => { socket.off('userDisConnectRespones'); socket.off('cameraUpdateResponse'); }; - }, [socket]); + }, [socket, activeUsers]); useFrame(() => { if (!groupRef.current) return; diff --git a/app/src/modules/scene/scene.tsx b/app/src/modules/scene/scene.tsx index 8ceeb2e..9b13a54 100644 --- a/app/src/modules/scene/scene.tsx +++ b/app/src/modules/scene/scene.tsx @@ -49,7 +49,6 @@ export default function Scene() { - {/* */} @@ -58,9 +57,6 @@ export default function Scene() { - - - ); } diff --git a/app/src/modules/simulation/behaviour/behaviour.tsx b/app/src/modules/simulation/behaviour/behaviour.tsx index d7a08af..2854172 100644 --- a/app/src/modules/simulation/behaviour/behaviour.tsx +++ b/app/src/modules/simulation/behaviour/behaviour.tsx @@ -1,43 +1,29 @@ -import { useFloorItems } from '../../../store/store'; +import { useFloorItems, useSimulationPaths } from '../../../store/store'; import * as THREE from 'three'; import * as Types from '../../../types/world/worldTypes'; import { useEffect } from 'react'; -interface Path { - modeluuid: string; - modelName: string; - points: { - uuid: string; - position: [number, number, number]; - rotation: [number, number, number]; - actions: { uuid: string; name: string; type: string; material: string; delay: number | string; spawnInterval: number | string; isUsed: boolean }[] | []; - triggers: { uuid: string; name: string; type: string; isUsed: boolean }[] | []; - connections: { source: { pathUUID: string; pointUUID: string }; targets: { pathUUID: string; pointUUID: string }[] }; - }[]; - pathPosition: [number, number, number]; - pathRotation: [number, number, number]; - speed: number; -} - -function Behaviour({ setSimulationPaths }: { setSimulationPaths: any }) { +function Behaviour() { + const { setSimulationPaths } = useSimulationPaths(); const { floorItems } = useFloorItems(); useEffect(() => { - const newPaths: Path[] = []; + const newPaths: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema)[] = []; floorItems.forEach((item: Types.FloorItemType) => { - if (item.modelfileID === "6633215057b31fe671145959") { - const point1Position = new THREE.Vector3(0, 1.25, 3.3); - const middlePointPosition = new THREE.Vector3(0, 1.25, 0); - const point2Position = new THREE.Vector3(0, 1.25, -3.3); + if (item.modelfileID === "672a090f80d91ac979f4d0bd") { + const point1Position = new THREE.Vector3(0, 0.85, 2.2); + const middlePointPosition = new THREE.Vector3(0, 0.85, 0); + const point2Position = new THREE.Vector3(0, 0.85, -2.2); const point1UUID = THREE.MathUtils.generateUUID(); const middlePointUUID = THREE.MathUtils.generateUUID(); const point2UUID = THREE.MathUtils.generateUUID(); - const newPath: Path = { + const newPath: Types.ConveyorEventsSchema = { modeluuid: item.modeluuid, modelName: item.modelname, + type: 'Conveyor', points: [ { uuid: point1UUID, @@ -64,12 +50,32 @@ function Behaviour({ setSimulationPaths }: { setSimulationPaths: any }) { connections: { source: { pathUUID: item.modeluuid, pointUUID: point2UUID }, targets: [] }, }, ], - pathPosition: [...item.position], - pathRotation: [item.rotation.x, item.rotation.y, item.rotation.z], + assetPosition: [...item.position], + assetRotation: [item.rotation.x, item.rotation.y, item.rotation.z], speed: 1, }; newPaths.push(newPath); + } else if (item.modelfileID === "67e3da19c2e8f37134526e6a") { + const pointUUID = THREE.MathUtils.generateUUID(); + const pointPosition = new THREE.Vector3(0, 1.3, 0); + + const newVehiclePath: Types.VehicleEventsSchema = { + modeluuid: item.modeluuid, + modelName: item.modelname, + type: 'Vehicle', + point: { + uuid: pointUUID, + position: [pointPosition.x, pointPosition.y, pointPosition.z], + actions: [{ uuid: THREE.MathUtils.generateUUID(), name: 'Action 1', type: 'Start', start: THREE.MathUtils.generateUUID(), hitCount: 1, end: THREE.MathUtils.generateUUID(), buffer: 0, isUsed: false }], + triggers: [], + connections: { source: { pathUUID: item.modeluuid, pointUUID: pointUUID }, targets: [] }, + }, + assetPosition: [...item.position], + speed: 2, + }; + + newPaths.push(newVehiclePath); } }); diff --git a/app/src/modules/simulation/path/pathConnector.tsx b/app/src/modules/simulation/path/pathConnector.tsx index 93172b7..8df718c 100644 --- a/app/src/modules/simulation/path/pathConnector.tsx +++ b/app/src/modules/simulation/path/pathConnector.tsx @@ -1,6 +1,7 @@ import { useFrame, useThree } from '@react-three/fiber'; import React, { useEffect, useState } from 'react'; import * as THREE from 'three'; +import * as Types from '../../../types/world/worldTypes'; import { QuadraticBezierLine } from '@react-three/drei'; import { useIsConnecting, useSimulationPaths } from '../../../store/store'; import useModuleStore from '../../../store/useModuleStore'; @@ -27,61 +28,113 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec toPointUUID: string ) => { const updatedPaths = simulationPaths.map(path => { - if (path.modeluuid === fromPathUUID) { - return { - ...path, - points: path.points.map(point => { - if (point.uuid === fromPointUUID) { - const newTarget = { - pathUUID: toPathUUID, - pointUUID: toPointUUID - }; - const existingTargets = point.connections.targets || []; - - if (!existingTargets.some(target => - target.pathUUID === newTarget.pathUUID && - target.pointUUID === newTarget.pointUUID - )) { - return { - ...point, - connections: { - ...point.connections, - targets: [...existingTargets, newTarget] - } + if (path.type === 'Conveyor') { + if (path.modeluuid === fromPathUUID) { + return { + ...path, + points: path.points.map(point => { + if (point.uuid === fromPointUUID) { + const newTarget = { + pathUUID: toPathUUID, + pointUUID: toPointUUID }; + const existingTargets = point.connections.targets || []; + + if (!existingTargets.some(target => + target.pathUUID === newTarget.pathUUID && + target.pointUUID === newTarget.pointUUID + )) { + return { + ...point, + connections: { + ...point.connections, + targets: [...existingTargets, newTarget] + } + }; + } } - } - return point; - }) - }; + return point; + }) + }; + } + else if (path.modeluuid === toPathUUID) { + return { + ...path, + points: path.points.map(point => { + if (point.uuid === toPointUUID) { + const reverseTarget = { + pathUUID: fromPathUUID, + pointUUID: fromPointUUID + }; + const existingTargets = point.connections.targets || []; + + if (!existingTargets.some(target => + target.pathUUID === reverseTarget.pathUUID && + target.pointUUID === reverseTarget.pointUUID + )) { + return { + ...point, + connections: { + ...point.connections, + targets: [...existingTargets, reverseTarget] + } + }; + } + } + return point; + }) + }; + } } - else if (path.modeluuid === toPathUUID) { - return { - ...path, - points: path.points.map(point => { - if (point.uuid === toPointUUID) { - const reverseTarget = { - pathUUID: fromPathUUID, - pointUUID: fromPointUUID - }; - const existingTargets = point.connections.targets || []; + else if (path.type === 'Vehicle') { + // Handle outgoing connections from Vehicle + if (path.modeluuid === fromPathUUID && path.point.uuid === fromPointUUID) { + const newTarget = { + pathUUID: toPathUUID, + pointUUID: toPointUUID + }; + const existingTargets = path.point.connections.targets || []; - if (!existingTargets.some(target => - target.pathUUID === reverseTarget.pathUUID && - target.pointUUID === reverseTarget.pointUUID - )) { - return { - ...point, - connections: { - ...point.connections, - targets: [...existingTargets, reverseTarget] - } - }; + if (!existingTargets.some(target => + target.pathUUID === newTarget.pathUUID && + target.pointUUID === newTarget.pointUUID + )) { + return { + ...path, + point: { + ...path.point, + connections: { + ...path.point.connections, + targets: [...existingTargets, newTarget] + } } - } - return point; - }) - }; + }; + } + } + // Handle incoming connections to Vehicle + else if (path.modeluuid === toPathUUID && path.point.uuid === toPointUUID) { + const reverseTarget = { + pathUUID: fromPathUUID, + pointUUID: fromPointUUID + }; + const existingTargets = path.point.connections.targets || []; + + if (!existingTargets.some(target => + target.pathUUID === reverseTarget.pathUUID && + target.pointUUID === reverseTarget.pointUUID + )) { + return { + ...path, + point: { + ...path.point, + connections: { + ...path.point.connections, + targets: [...existingTargets, reverseTarget] + } + } + }; + } + } } return path; }); @@ -126,25 +179,43 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec if (intersects.length > 0) { const intersected = intersects[0].object; - if (intersected.name.includes("action-sphere")) { + if (intersected.name.includes("events-sphere")) { const pathUUID = intersected.userData.path.modeluuid; const sphereUUID = intersected.uuid; const worldPosition = new THREE.Vector3(); intersected.getWorldPosition(worldPosition); - const isStartOrEnd = intersected.userData.path.points.length > 0 && ( - sphereUUID === intersected.userData.path.points[0].uuid || - sphereUUID === intersected.userData.path.points[intersected.userData.path.points.length - 1].uuid - ); + let isStartOrEnd = false; + + if (intersected.userData.path.points) { + isStartOrEnd = intersected.userData.path.points.length > 0 && ( + sphereUUID === intersected.userData.path.points[0].uuid || + sphereUUID === intersected.userData.path.points[intersected.userData.path.points.length - 1].uuid + ); + } else if (intersected.userData.path.point) { + isStartOrEnd = sphereUUID === intersected.userData.path.point.uuid; + } if (pathUUID) { - // Check if sphere is already connected - const isAlreadyConnected = simulationPaths.some(path => - path.points.some(point => - point.uuid === sphereUUID && - point.connections.targets.length > 0 - ) - ); + const firstPath = simulationPaths.find(p => p.modeluuid === firstSelected?.pathUUID); + const secondPath = simulationPaths.find(p => p.modeluuid === pathUUID); + + if (firstPath && secondPath && firstPath.type === 'Vehicle' && secondPath.type === 'Vehicle') { + console.log("Cannot connect two vehicle paths together"); + return; + } + const isAlreadyConnected = simulationPaths.some(path => { + if (path.type === 'Conveyor') { + return path.points.some(point => + point.uuid === sphereUUID && + point.connections.targets.length > 0 + ); + } else if (path.type === 'Vehicle') { + return path.point.uuid === sphereUUID && + path.point.connections.targets.length > 0; + } + return false; + }); if (isAlreadyConnected) { console.log("Sphere is already connected. Ignoring."); @@ -211,6 +282,7 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec raycaster.setFromCamera(pointer, camera); const intersects = raycaster.intersectObjects(scene.children, true).filter((intersect) => !intersect.object.name.includes("Roof") && + !intersect.object.name.includes("agv-collider") && !intersect.object.name.includes("MeasurementReference") && !intersect.object.userData.isPathObject && !(intersect.object.type === "GridHelper") @@ -229,7 +301,7 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec } const sphereIntersects = raycaster.intersectObjects(pathsGroupRef.current.children, true).filter((obj) => - obj.object.name.includes("action-sphere") + obj.object.name.includes("events-sphere") ); if (sphereIntersects.length > 0) { @@ -237,27 +309,45 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec const sphereUUID = sphere.uuid; const spherePosition = new THREE.Vector3(); sphere.getWorldPosition(spherePosition); - const pathUUID = sphere.userData.path.modeluuid; + const pathData = sphere.userData.path; + const pathUUID = pathData.modeluuid; - const isStartOrEnd = sphere.userData.path.points.length > 0 && ( - sphereUUID === sphere.userData.path.points[0].uuid || - sphereUUID === sphere.userData.path.points[sphere.userData.path.points.length - 1].uuid - ); + const firstPath = simulationPaths.find(p => p.modeluuid === firstSelected.pathUUID); + const secondPath = simulationPaths.find(p => p.modeluuid === pathUUID); + const isVehicleToVehicle = firstPath?.type === 'Vehicle' && secondPath?.type === 'Vehicle'; - const isAlreadyConnected = simulationPaths.some(path => - path.points.some(point => - point.uuid === sphereUUID && - point.connections.targets.length > 0 - ) - ); + const isConnectable = (pathData.type === 'Vehicle' || + (pathData.points.length > 0 && ( + sphereUUID === pathData.points[0].uuid || + sphereUUID === pathData.points[pathData.points.length - 1].uuid + ))) && !isVehicleToVehicle; + + const isAlreadyConnected = simulationPaths.some(path => { + if (path.type === 'Conveyor') { + return path.points.some(point => + point.uuid === sphereUUID && + point.connections.targets.length > 0 + ); + } else if (path.type === 'Vehicle') { + return path.point.uuid === sphereUUID && + path.point.connections.targets.length > 0; + } + return false; + }); if ( !isAlreadyConnected && + !isVehicleToVehicle && firstSelected.sphereUUID !== sphereUUID && firstSelected.pathUUID !== pathUUID && - (firstSelected.isCorner || isStartOrEnd) + (firstSelected.isCorner || isConnectable) ) { - snappedSphere = { sphereUUID, position: spherePosition, pathUUID, isCorner: isStartOrEnd }; + snappedSphere = { + sphereUUID, + position: spherePosition, + pathUUID, + isCorner: isConnectable + }; } else { isInvalidConnection = true; } @@ -281,8 +371,13 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec end: point, mid: midPoint, }); + console.log({ + start: firstSelected.position, + end: point, + mid: midPoint, + }); - setIsConnecting(true); + // setIsConnecting(true); if (sphereIntersects.length > 0) { setHelperLineColor(isInvalidConnection ? 'red' : '#6cf542'); @@ -299,13 +394,53 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec } }); - // Render connections from simulationPaths return ( <> - {simulationPaths.flatMap(path => - path.points.flatMap(point => - point.connections.targets.map((target, index) => { - const fromSphere = pathsGroupRef.current?.getObjectByProperty('uuid', point.uuid); + {simulationPaths.flatMap(path => { + if (path.type === 'Conveyor') { + return path.points.flatMap(point => + point.connections.targets.map((target, index) => { + const targetPath = simulationPaths.find(p => p.modeluuid === target.pathUUID); + if (targetPath?.type === 'Vehicle') return null; + + const fromSphere = pathsGroupRef.current?.getObjectByProperty('uuid', point.uuid); + const toSphere = pathsGroupRef.current?.getObjectByProperty('uuid', target.pointUUID); + + if (fromSphere && toSphere) { + const fromWorldPosition = new THREE.Vector3(); + const toWorldPosition = new THREE.Vector3(); + fromSphere.getWorldPosition(fromWorldPosition); + toSphere.getWorldPosition(toWorldPosition); + + const distance = fromWorldPosition.distanceTo(toWorldPosition); + const heightFactor = Math.max(0.5, distance * 0.2); + + const midPoint = new THREE.Vector3( + (fromWorldPosition.x + toWorldPosition.x) / 2, + Math.max(fromWorldPosition.y, toWorldPosition.y) + heightFactor, + (fromWorldPosition.z + toWorldPosition.z) / 2 + ); + + return ( + + ); + } + return null; + }) + ); + } else if (path.type === 'Vehicle') { + return path.point.connections.targets.map((target, index) => { + const fromSphere = pathsGroupRef.current?.getObjectByProperty('uuid', path.point.uuid); const toSphere = pathsGroupRef.current?.getObjectByProperty('uuid', target.pointUUID); if (fromSphere && toSphere) { @@ -325,22 +460,23 @@ function PathConnector({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObjec return ( ); } return null; - }) - ) - )} + }); + } + return []; + })} {currentLine && ( { if (!selectedActionSphere) return; - const updatedPaths: Path[] = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - position: [ - selectedActionSphere.point.position.x, - selectedActionSphere.point.position.y, - selectedActionSphere.point.position.z, - ], - rotation: [ - selectedActionSphere.point.rotation.x, - selectedActionSphere.point.rotation.y, - selectedActionSphere.point.rotation.z, - ] - } - : point - ), - })); + const updatedPaths = simulationPaths.map((path) => { + if (path.type === "Conveyor") { + return { + ...path, + points: path.points.map((point) => + point.uuid === selectedActionSphere.point.uuid + ? { + ...point, + position: [ + selectedActionSphere.point.position.x, + selectedActionSphere.point.position.y, + selectedActionSphere.point.position.z, + ], + rotation: [ + selectedActionSphere.point.rotation.x, + selectedActionSphere.point.rotation.y, + selectedActionSphere.point.rotation.z, + ] + } + : point + ), + }; + } + return path; + }) as ConveyorEventsSchema[]; setSimulationPaths(updatedPaths); }; return ( - + {simulationPaths.map((path) => { - const points = path.points.map(point => new THREE.Vector3(...point.position)); + if (path.type === 'Conveyor') { + const points = path.points.map(point => new THREE.Vector3(...point.position)); - return ( - (groupRefs.current[path.modeluuid] = el!)} - position={path.pathPosition} - rotation={path.pathRotation} - onClick={(e) => { - if (isConnecting) return; - e.stopPropagation(); - setSelectedPath({ path, group: groupRefs.current[path.modeluuid] }); - setSelectedActionSphere(null); - setTransformMode(null); - setSubModule('mechanics'); - }} - onPointerMissed={() => { - setSelectedPath(null); - setSubModule('properties'); - }} - > - {path.points.map((point, index) => ( + return ( + (groupRefs.current[path.modeluuid] = el!)} + position={path.assetPosition} + rotation={path.assetRotation} + onClick={(e) => { + if (isConnecting) return; + e.stopPropagation(); + setSelectedPath({ path, group: groupRefs.current[path.modeluuid] }); + setSelectedActionSphere(null); + setTransformMode(null); + setSubModule('mechanics'); + }} + onPointerMissed={() => { + setSelectedPath(null); + setSubModule('properties'); + }} + > + {path.points.map((point, index) => ( + (sphereRefs.current[point.uuid] = el!)} + onClick={(e) => { + if (isConnecting) return; + e.stopPropagation(); + setSelectedActionSphere({ + path, + point: sphereRefs.current[point.uuid] + }); + setSubModule('mechanics'); + setSelectedPath(null); + }} + userData={{ point, path }} + onPointerMissed={() => { + setSubModule('properties'); + setSelectedActionSphere(null); + }} + > + + + ))} + + {points.slice(0, -1).map((point, index) => { + const nextPoint = points[index + 1]; + const segmentCurve = new THREE.CatmullRomCurve3([point, nextPoint]); + const tubeGeometry = new THREE.TubeGeometry(segmentCurve, 20, 0.1, 16, false); + + return ( + + + + ); + })} + + ); + } else if (path.type === 'Vehicle') { + return ( + (groupRefs.current[path.modeluuid] = el!)} + position={path.assetPosition} + onClick={(e) => { + if (isConnecting) return; + e.stopPropagation(); + setSelectedPath({ path, group: groupRefs.current[path.modeluuid] }); + setSelectedActionSphere(null); + setTransformMode(null); + setSubModule('mechanics'); + }} + onPointerMissed={() => { + setSelectedPath(null); + setSubModule('properties'); + }} + > (sphereRefs.current[point.uuid] = el!)} + name='events-sphere' + ref={el => (sphereRefs.current[path.point.uuid] = el!)} onClick={(e) => { if (isConnecting) return; e.stopPropagation(); setSelectedActionSphere({ path, - point: sphereRefs.current[point.uuid] + point: sphereRefs.current[path.point.uuid] }); setSubModule('mechanics'); setSelectedPath(null); }} - userData={{ point, path }} + userData={{ point: path.point, path }} onPointerMissed={() => { setSubModule('properties'); - setSelectedActionSphere(null) + setSelectedActionSphere(null); }} > - + - ))} - - {points.slice(0, -1).map((point, index) => { - const nextPoint = points[index + 1]; - const segmentCurve = new THREE.CatmullRomCurve3([point, nextPoint]); - const tubeGeometry = new THREE.TubeGeometry(segmentCurve, 20, 0.1, 16, false); - - return ( - - - - ); - })} - - ); + + ); + } + return null; })} {selectedActionSphere && transformMode && ( @@ -163,7 +220,7 @@ function PathCreation({ pathsGroupRef }: { pathsGroupRef: React.MutableRefObject ref={transformRef} object={selectedActionSphere.point} mode={transformMode} - onObjectChange={updateSimulationPaths} + onMouseUp={updateSimulationPaths} /> )} diff --git a/app/src/modules/simulation/simulation.tsx b/app/src/modules/simulation/simulation.tsx index fab1042..10934fb 100644 --- a/app/src/modules/simulation/simulation.tsx +++ b/app/src/modules/simulation/simulation.tsx @@ -31,7 +31,7 @@ function Simulation() { return ( <> - + {activeModule === 'simulation' && ( <> diff --git a/app/src/modules/simulation/simulationUI.tsx b/app/src/modules/simulation/simulationUI.tsx index 3a84134..0ce9fc2 100644 --- a/app/src/modules/simulation/simulationUI.tsx +++ b/app/src/modules/simulation/simulationUI.tsx @@ -1,409 +1,409 @@ -import { useMemo, useState } from 'react'; -import { useSelectedActionSphere, useToggleView, useSimulationPaths, useSelectedPath, useStartSimulation, useDrawMaterialPath } from '../../store/store'; -import * as THREE from 'three'; -import useModuleStore from '../../store/useModuleStore'; +// import { useMemo, useState } from 'react'; +// import { useSelectedActionSphere, useToggleView, useSimulationPaths, useSelectedPath, useStartSimulation, useDrawMaterialPath } from '../../store/store'; +// import * as THREE from 'three'; +// import useModuleStore from '../../store/useModuleStore'; -function SimulationUI() { - const { ToggleView } = useToggleView(); - const { activeModule } = useModuleStore(); - const { startSimulation, setStartSimulation } = useStartSimulation(); - const { selectedActionSphere } = useSelectedActionSphere(); - const { selectedPath, setSelectedPath } = useSelectedPath(); - const { simulationPaths, setSimulationPaths } = useSimulationPaths(); - const { drawMaterialPath, setDrawMaterialPath } = useDrawMaterialPath(); - const [activeButton, setActiveButton] = useState(null); +// function SimulationUI() { +// const { ToggleView } = useToggleView(); +// const { activeModule } = useModuleStore(); +// const { startSimulation, setStartSimulation } = useStartSimulation(); +// const { selectedActionSphere } = useSelectedActionSphere(); +// const { selectedPath, setSelectedPath } = useSelectedPath(); +// const { simulationPaths, setSimulationPaths } = useSimulationPaths(); +// const { drawMaterialPath, setDrawMaterialPath } = useDrawMaterialPath(); +// const [activeButton, setActiveButton] = useState(null); - const handleAddAction = () => { - if (!selectedActionSphere) return; +// const handleAddAction = () => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => { - if (point.uuid === selectedActionSphere.point.uuid) { - const actionIndex = point.actions.length; - const newAction = { - uuid: THREE.MathUtils.generateUUID(), - name: `Action ${actionIndex + 1}`, // Assign action name based on index - type: 'Inherit', - material: 'Inherit', - delay: 'Inherit', - spawnInterval: 'Inherit', - isUsed: false - }; +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => { +// if (point.uuid === selectedActionSphere.point.uuid) { +// const actionIndex = point.actions.length; +// const newAction = { +// uuid: THREE.MathUtils.generateUUID(), +// name: `Action ${actionIndex + 1}`, // Assign action name based on index +// type: 'Inherit', +// material: 'Inherit', +// delay: 'Inherit', +// spawnInterval: 'Inherit', +// isUsed: false +// }; - return { ...point, actions: [...point.actions, newAction] }; - } - return point; - }), - })); +// return { ...point, actions: [...point.actions, newAction] }; +// } +// return point; +// }), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleDeleteAction = (uuid: string) => { - if (!selectedActionSphere) return; +// const handleDeleteAction = (uuid: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { ...point, actions: point.actions.filter(action => action.uuid !== uuid) } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { ...point, actions: point.actions.filter(action => action.uuid !== uuid) } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleActionSelect = (uuid: string, actionType: string) => { - if (!selectedActionSphere) return; +// const handleActionSelect = (uuid: string, actionType: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, type: actionType } : action - ), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// actions: point.actions.map((action) => +// action.uuid === uuid ? { ...action, type: actionType } : action +// ), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleMaterialSelect = (uuid: string, material: string) => { - if (!selectedActionSphere) return; +// const handleMaterialSelect = (uuid: string, material: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, material } : action - ), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// actions: point.actions.map((action) => +// action.uuid === uuid ? { ...action, material } : action +// ), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleDelayChange = (uuid: string, delay: number | string) => { - if (!selectedActionSphere) return; +// const handleDelayChange = (uuid: string, delay: number | string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, delay } : action - ), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// actions: point.actions.map((action) => +// action.uuid === uuid ? { ...action, delay } : action +// ), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleSpawnIntervalChange = (uuid: string, spawnInterval: number | string) => { - if (!selectedActionSphere) return; +// const handleSpawnIntervalChange = (uuid: string, spawnInterval: number | string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => - action.uuid === uuid ? { ...action, spawnInterval } : action - ), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// actions: point.actions.map((action) => +// action.uuid === uuid ? { ...action, spawnInterval } : action +// ), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleSpeedChange = (speed: number) => { - if (!selectedPath) return; +// const handleSpeedChange = (speed: number) => { +// if (!selectedPath) return; - const updatedPaths = simulationPaths.map((path) => - path.modeluuid === selectedPath.path.modeluuid ? { ...path, speed } : path - ); +// const updatedPaths = simulationPaths.map((path) => +// path.modeluuid === selectedPath.path.modeluuid ? { ...path, speed } : path +// ); - setSimulationPaths(updatedPaths); - setSelectedPath({ ...selectedPath, path: { ...selectedPath.path, speed } }); - }; +// setSimulationPaths(updatedPaths); +// setSelectedPath({ ...selectedPath, path: { ...selectedPath.path, speed } }); +// }; - const handleAddTrigger = () => { - if (!selectedActionSphere) return; +// const handleAddTrigger = () => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => { - if (point.uuid === selectedActionSphere.point.uuid) { - const triggerIndex = point.triggers.length; - const newTrigger = { - uuid: THREE.MathUtils.generateUUID(), - name: `Trigger ${triggerIndex + 1}`, // Assign name based on index - type: '', - isUsed: false - }; +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => { +// if (point.uuid === selectedActionSphere.point.uuid) { +// const triggerIndex = point.triggers.length; +// const newTrigger = { +// uuid: THREE.MathUtils.generateUUID(), +// name: `Trigger ${triggerIndex + 1}`, // Assign name based on index +// type: '', +// isUsed: false +// }; - return { ...point, triggers: [...point.triggers, newTrigger] }; - } - return point; - }), - })); +// return { ...point, triggers: [...point.triggers, newTrigger] }; +// } +// return point; +// }), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleDeleteTrigger = (uuid: string) => { - if (!selectedActionSphere) return; +// const handleDeleteTrigger = (uuid: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { ...point, triggers: point.triggers.filter(trigger => trigger.uuid !== uuid) } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { ...point, triggers: point.triggers.filter(trigger => trigger.uuid !== uuid) } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleTriggerSelect = (uuid: string, triggerType: string) => { - if (!selectedActionSphere) return; +// const handleTriggerSelect = (uuid: string, triggerType: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - triggers: point.triggers.map((trigger) => - trigger.uuid === uuid ? { ...trigger, type: triggerType } : trigger - ), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// triggers: point.triggers.map((trigger) => +// trigger.uuid === uuid ? { ...trigger, type: triggerType } : trigger +// ), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleResetPath = () => { - if (!selectedPath) return; +// const handleResetPath = () => { +// if (!selectedPath) return; - }; +// }; - const handleActionToggle = (uuid: string) => { - if (!selectedActionSphere) return; +// const handleActionToggle = (uuid: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - actions: point.actions.map((action) => ({ - ...action, - isUsed: action.uuid === uuid ? !action.isUsed : false, - })), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// actions: point.actions.map((action) => ({ +// ...action, +// isUsed: action.uuid === uuid ? !action.isUsed : false, +// })), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const handleTriggerToggle = (uuid: string) => { - if (!selectedActionSphere) return; +// const handleTriggerToggle = (uuid: string) => { +// if (!selectedActionSphere) return; - const updatedPaths = simulationPaths.map((path) => ({ - ...path, - points: path.points.map((point) => - point.uuid === selectedActionSphere.point.uuid - ? { - ...point, - triggers: point.triggers.map((trigger) => ({ - ...trigger, - isUsed: trigger.uuid === uuid ? !trigger.isUsed : false, - })), - } - : point - ), - })); +// const updatedPaths = simulationPaths.map((path) => ({ +// ...path, +// points: path.points.map((point) => +// point.uuid === selectedActionSphere.point.uuid +// ? { +// ...point, +// triggers: point.triggers.map((trigger) => ({ +// ...trigger, +// isUsed: trigger.uuid === uuid ? !trigger.isUsed : false, +// })), +// } +// : point +// ), +// })); - setSimulationPaths(updatedPaths); - }; +// setSimulationPaths(updatedPaths); +// }; - const selectedPoint = useMemo(() => { - if (!selectedActionSphere) return null; - return simulationPaths.flatMap((path) => path.points).find((point) => point.uuid === selectedActionSphere.point.uuid); - }, [selectedActionSphere, simulationPaths]); +// const selectedPoint = useMemo(() => { +// if (!selectedActionSphere) return null; +// return simulationPaths.flatMap((path) => path.points).find((point) => point.uuid === selectedActionSphere.point.uuid); +// }, [selectedActionSphere, simulationPaths]); - const createPath = () => { - setActiveButton(activeButton !== 'addMaterialPath' ? 'addMaterialPath' : null); - setDrawMaterialPath(!drawMaterialPath); - } +// const createPath = () => { +// setActiveButton(activeButton !== 'addMaterialPath' ? 'addMaterialPath' : null); +// setDrawMaterialPath(!drawMaterialPath); +// } - return ( - <> - {activeModule === "simulation" && ( -
- {!ToggleView && ( - <> - +// return ( +// <> +// {activeModule === "simulation" && ( +//
+// {!ToggleView && ( +// <> +// -
- {!ToggleView && } -
+//
+// {!ToggleView && } +//
- {selectedPath && ( -
- - handleSpeedChange(parseFloat(e.target.value))} - /> -
- )} +// {selectedPath && ( +//
+// +// handleSpeedChange(parseFloat(e.target.value))} +// /> +//
+// )} - {selectedActionSphere && ( -
- - +// {selectedActionSphere && ( +//
+// +// - {selectedPoint?.actions.map((action) => ( -
- - - +// {selectedPoint?.actions.map((action) => ( +//
+// +// +// - {(action.type === 'Spawn' || action.type === 'Swap') && ( -
- -
- )} +// {(action.type === 'Spawn' || action.type === 'Swap') && ( +//
+// +//
+// )} - {action.type === 'Delay' && ( -
- - handleDelayChange(action.uuid, parseInt(e.target.value) || 'Inherit')} - /> +// {action.type === 'Delay' && ( +//
+// +// handleDelayChange(action.uuid, parseInt(e.target.value) || 'Inherit')} +// /> -
- )} +//
+// )} - {action.type === 'Spawn' && ( -
- - handleSpawnIntervalChange(action.uuid, parseInt(e.target.value) || 'Inherit')} - /> +// {action.type === 'Spawn' && ( +//
+// +// handleSpawnIntervalChange(action.uuid, parseInt(e.target.value) || 'Inherit')} +// /> -
- )} -
-
- ))} +//
+// )} +//
+//
+// ))} -
+//
- {selectedPoint?.triggers.map((trigger) => ( -
- - - -
-
- ))} +// {selectedPoint?.triggers.map((trigger) => ( +//
+// +// +// +//
+//
+// ))} -
- )} +//
+// )} - {selectedPath && ( -
- -
- )} - - )} -
- )} - - ); -} +// {selectedPath && ( +//
+// +//
+// )} +// +// )} +//
+// )} +// +// ); +// } -export default SimulationUI; \ No newline at end of file +// export default SimulationUI; \ No newline at end of file diff --git a/app/src/pages/Project.tsx b/app/src/pages/Project.tsx index 1046ea2..a7800e1 100644 --- a/app/src/pages/Project.tsx +++ b/app/src/pages/Project.tsx @@ -64,7 +64,6 @@ const Project: React.FC = () => { {activeModule === "market" && } {activeModule !== "market" && } - {/* */} {isPlaying && activeModule === "simulation" && }
); diff --git a/app/src/services/factoryBuilder/mqtt/mqttEvents.ts b/app/src/services/factoryBuilder/mqtt/mqttEvents.ts index cd79484..41175ca 100644 --- a/app/src/services/factoryBuilder/mqtt/mqttEvents.ts +++ b/app/src/services/factoryBuilder/mqtt/mqttEvents.ts @@ -6,10 +6,7 @@ const MqttEvents = () => { const { setTouch, setTemperature, setHumidity } = useDrieUIValue(); useEffect(() => { - const client = mqtt.connect("ws://192.168.0.192:1884", { - username: "gabby", - password: "gabby" - }); + const client = mqtt.connect(`ws://${process.env.REACT_APP_SERVER_MQTT_URL}`); client.subscribe("touch"); client.subscribe("temperature"); diff --git a/app/src/store/store.ts b/app/src/store/store.ts index 8b8e544..eb2fac4 100644 --- a/app/src/store/store.ts +++ b/app/src/store/store.ts @@ -2,7 +2,6 @@ import * as THREE from "three"; import * as Types from "../types/world/worldTypes"; import { create } from "zustand"; import { io } from "socket.io-client"; -import { ComponentType, SVGProps } from "react"; export const useSocketStore = create((set: any, get: any) => ({ socket: null, @@ -31,8 +30,8 @@ export const useSocketStore = create((set: any, get: any) => ({ })); export const useLoadingProgress = create<{ loadingProgress: number; setLoadingProgress: (x: number) => void }>((set) => ({ - loadingProgress: 1, - setLoadingProgress: (x: number) => set({ loadingProgress: x }), + loadingProgress: 1, + setLoadingProgress: (x: number) => set({ loadingProgress: x }), })); export const useOrganization = create((set: any) => ({ @@ -311,30 +310,14 @@ export const useSelectedPath = create((set: any) => ({ setSelectedPath: (x: any) => set({ selectedPath: x }), })); -interface Path { - modeluuid: string; - modelName: string; - points: { - uuid: string; - position: [number, number, number]; - rotation: [number, number, number]; - actions: { uuid: string; name: string; type: string; material: string; delay: number | string; spawnInterval: number | string; isUsed: boolean }[] | []; - triggers: { uuid: string; name: string; type: string; isUsed: boolean }[] | []; - connections: { source: { pathUUID: string; pointUUID: string }; targets: { pathUUID: string; pointUUID: string }[] }; - }[]; - pathPosition: [number, number, number]; - pathRotation: [number, number, number]; - speed: number; -} - interface SimulationPathsStore { - simulationPaths: Path[]; - setSimulationPaths: (paths: Path[]) => void; + simulationPaths: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema)[]; + setSimulationPaths: (paths: (Types.ConveyorEventsSchema | Types.VehicleEventsSchema)[]) => void; } export const useSimulationPaths = create((set) => ({ - simulationPaths: [], - setSimulationPaths: (paths: Path[]) => set({ simulationPaths: paths }), + simulationPaths: [], + setSimulationPaths: (paths) => set({ simulationPaths: paths }), })); export const useIsConnecting = create((set: any) => ({ diff --git a/app/src/types/world/worldTypes.d.ts b/app/src/types/world/worldTypes.d.ts index c1e7128..2fcbd4f 100644 --- a/app/src/types/world/worldTypes.d.ts +++ b/app/src/types/world/worldTypes.d.ts @@ -284,4 +284,36 @@ interface ConnectionStore { setConnections: (connections: PathConnection[]) => void; addConnection: (newConnection: PathConnection) => void; removeConnection: (fromUUID: string, toUUID: string) => void; +} + +interface ConveyorEventsSchema { + modeluuid: string; + modelName: string; + type: 'Conveyor'; + points: { + uuid: string; + position: [number, number, number]; + rotation: [number, number, number]; + actions: { uuid: string; name: string; type: string; material: string; delay: number | string; spawnInterval: number | string; isUsed: boolean }[] | []; + triggers: { uuid: string; name: string; type: string; isUsed: boolean }[] | []; + connections: { source: { pathUUID: string; pointUUID: string }; targets: { pathUUID: string; pointUUID: string }[] }; + }[]; + assetPosition: [number, number, number]; + assetRotation: [number, number, number]; + speed: number; +} + +interface VehicleEventsSchema { + modeluuid: string; + modelName: string; + type: 'Vehicle'; + point: { + uuid: string; + position: [number, number, number]; + actions: { uuid: string; name: string; type: string; start: string, hitCount: number, end: string, buffer: number; isUsed: boolean }[] | []; + triggers: { uuid: string; name: string; type: string; isUsed: boolean }[] | []; + connections: { source: { pathUUID: string; pointUUID: string }; targets: { pathUUID: string; pointUUID: string }[] }; + }; + assetPosition: [number, number, number]; + speed: number; } \ No newline at end of file