3dstreet icon indicating copy to clipboard operation
3dstreet copied to clipboard

New scene function

Open Algorush opened this issue 2 years ago β€’ 3 comments

Added a newScene function to clear the old scene and create an empty scene. Perhaps there is something else to consider in this function, @kfarr ? In the next commits I will add call of this function to the appropriate places in the code.

Algorush avatar Apr 20 '24 02:04 Algorush

Deploy Preview for 3dstreet-core-builds ready!

Name Link
Latest commit 81cd2113c73c36e0b1ddf90fcf3922d5f1c0937f
Latest deploy log https://app.netlify.com/sites/3dstreet-core-builds/deploys/665a8d32c8dd8600084e8a4a
Deploy Preview https://deploy-preview-509--3dstreet-core-builds.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Apr 20 '24 02:04 netlify[bot]

what should be the initial structure of Blank Scene? Like this one?

<a-entity id="street-container" data-layer-name="3D Street Layers" data-layer-show-children>
   <a-entity id="default-street" set-loader-from-hash></a-entity>
</a-entity>
<a-entity id="reference-layers" data-layer-name="Reference Layers" data-layer-show-children></a-entity>
<a-entity id="environment" data-layer-name="Environment" street-environment="preset: day;"></a-entity>

Algorush avatar Apr 24 '24 19:04 Algorush

I have added newScene funtion as STREET.utils.newScene. I have also added a call to this function in the appropriate scene loading methods, including in the Editor code: https://github.com/3DStreet/3dstreet-editor/pull/420

Algorush avatar Apr 25 '24 02:04 Algorush

things this does not reset yet:

  • [x] * currently selected object blue bounding box
  • [ ] * long / lat / elevation in geopanel above scene title
  • [x] only show for pro users
  • [x] * camera pose (position and rotation) -- this is probably ok to leave for a later date

image

kfarr avatar Jun 19 '24 05:06 kfarr

similar to scene title edit modal, when the street-geo component is updated, we should also fire an event such that the react app is listening for this event and 'resets' the geo panel?

kfarr avatar Jun 19 '24 16:06 kfarr

similar to scene title edit modal, when the street-geo component is updated, we should also fire an event such that the react app is listening for this event and 'resets' the geo panel?

@kfarr and I started a GeoContext on @kfarr machine. Almost finished, we just need to reset the context value after calling newScene. We will finish that Friday.

vincentfretin avatar Jun 19 '24 17:06 vincentfretin

Also probably put the "New" button behind a flag or just comment it before merging. Like discussed, just having a new blank scene, without some templates or onboarding is confusing for the user.

vincentfretin avatar Jun 19 '24 17:06 vincentfretin

@vincentfretin i committed our WIP work and tested, all seems to work with exception of resetting geo stuff as you noted so we can resume that on Fri

kfarr avatar Jun 19 '24 21:06 kfarr