From a4afc3a850244bcc46b7361997d927e9ab28b786 Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Tue, 4 Jun 2024 20:49:48 -0700 Subject: [PATCH 1/6] Add spring objects (#559) * update submodule for dist latest to add: waymo, uoregon objects, light rail vehicle size update * add u of o objects https://github.com/3DStreet/3dstreet-assets-source/issues/84 * add waymo * fix tram path for updated size * update submodule for trash truck * trash truck --- assets | 2 +- src/assets.js | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/assets b/assets index 784d201ab..d371ba2cb 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 784d201ab0185e708933ef9475fa966ee22e3b42 +Subproject commit d371ba2cb0a169ac6dc00b85325b69ad2eb1e7cc diff --git a/src/assets.js b/src/assets.js index a95dfc10f..467bf0f3d 100644 --- a/src/assets.js +++ b/src/assets.js @@ -88,7 +88,9 @@ function buildAssetHTML(assetUrl, categories) { + + `, buildings: ` @@ -188,11 +190,11 @@ function buildAssetHTML(assetUrl, categories) { 'vehicles-transit': ` - + `, dividers: ` - + @@ -204,6 +206,12 @@ function buildAssetHTML(assetUrl, categories) { + + + + + + `, sky: ` From f26ec38ad26b0d5ab4d0952cfc3fdcf03f189e92 Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Tue, 4 Jun 2024 21:12:41 -0700 Subject: [PATCH 2/6] update geopanel coords from entity instead of metadata --- .../GeoPanel/GeoPanel.component.jsx | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/editor/components/components/GeoPanel/GeoPanel.component.jsx b/src/editor/components/components/GeoPanel/GeoPanel.component.jsx index 29abb2878..bb67e7665 100644 --- a/src/editor/components/components/GeoPanel/GeoPanel.component.jsx +++ b/src/editor/components/components/GeoPanel/GeoPanel.component.jsx @@ -10,11 +10,21 @@ import Events from '../../../lib/Events'; */ const GeoPanel = () => { const onClick = () => Events.emit('opengeomodal'); - const metadata = AFRAME.scenes[0].getAttribute('metadata'); - let coordinateInfo; - if (metadata && metadata['coord']) { - const coord = metadata['coord']; - coordinateInfo = `Latitude: ${coord.latitude}, Longitude: ${coord.longitude}, Elevation: ${coord.elevation}m`; + + let latitude = 0; + let longitude = 0; + let elevation = 0; + let coordinateInfo = null; + + const streetGeo = document + .getElementById('reference-layers') + ?.getAttribute('street-geo'); + + if (streetGeo && streetGeo['latitude'] && streetGeo['longitude']) { + latitude = streetGeo['latitude']; + longitude = streetGeo['longitude']; + elevation = streetGeo['elevation'] || 0; + coordinateInfo = `Latitude: ${latitude}, Longitude: ${longitude}, Elevation: ${elevation}m`; } return ( From d71a7b5352ba2a1cda82516179bf00c6dc0795b2 Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Tue, 4 Jun 2024 21:14:07 -0700 Subject: [PATCH 3/6] move search input below map --- .../modals/GeoModal/GeoModal.component.jsx | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/editor/components/modals/GeoModal/GeoModal.component.jsx b/src/editor/components/modals/GeoModal/GeoModal.component.jsx index 8f6a348ec..80291e7c8 100644 --- a/src/editor/components/modals/GeoModal/GeoModal.component.jsx +++ b/src/editor/components/modals/GeoModal/GeoModal.component.jsx @@ -126,16 +126,6 @@ const GeoModal = ({ isOpen, onClose }) => { {isLoaded && ( <> - - } - placeholder="Search for a location" - onChange={(value) => {}} - /> - { )} - + + } + placeholder="Search for a location" + onChange={(value) => {}} + /> +

Centerpoint

From 403f97ef32b4dbe9be43cb56bf7aa81f661a9bae Mon Sep 17 00:00:00 2001 From: Kieran Farr Date: Tue, 4 Jun 2024 21:39:05 -0700 Subject: [PATCH 4/6] prevent scrolling in geomodal --- src/editor/components/modals/GeoModal/GeoModal.component.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/components/modals/GeoModal/GeoModal.component.jsx b/src/editor/components/modals/GeoModal/GeoModal.component.jsx index 80291e7c8..5f581e033 100644 --- a/src/editor/components/modals/GeoModal/GeoModal.component.jsx +++ b/src/editor/components/modals/GeoModal/GeoModal.component.jsx @@ -129,7 +129,7 @@ const GeoModal = ({ isOpen, onClose }) => { Date: Wed, 5 Jun 2024 18:23:34 +0200 Subject: [PATCH 5/6] Fix issue with zoom with mouse wheel jumping when switching to an ortho camera because of missing camera.updateProjectionMatrix() (#560) --- src/editor/lib/cameras.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/editor/lib/cameras.js b/src/editor/lib/cameras.js index d56854f72..ad4e0410b 100644 --- a/src/editor/lib/cameras.js +++ b/src/editor/lib/cameras.js @@ -118,4 +118,5 @@ function setOrthoCamera(camera, dir, ratio) { camera.bottom = info.bottom || -40; camera.position.copy(info.position); camera.rotation.copy(info.rotation); + camera.updateProjectionMatrix(); } From 555217458d15d259c150d7a2947f56cf2b7a661f Mon Sep 17 00:00:00 2001 From: Rahul Gupta Date: Wed, 5 Jun 2024 13:05:59 -0400 Subject: [PATCH 6/6] add posthog (#558) --- index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.html b/index.html index ae80c9b60..21fb9f372 100644 --- a/index.html +++ b/index.html @@ -13,6 +13,13 @@ + + +