New scene function
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.
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...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
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>
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
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
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?
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.
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 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