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

Change street component parameters

Open Algorush opened this issue 9 months ago β€’ 5 comments

Added the ability to change the parameters of the street component (showGround, showVehicles, showStriping) without reloading the scene. It remains to add globalAnimated. So this PR not ready yet. Also, now there is no need to rename street to not-street, like streetmix-loader and intersection. I added a check that the scene is loaded from jsonFile and do not run the update function in these components

Algorush avatar May 03 '24 20:05 Algorush

Deploy Preview for 3dstreet-core-builds ready!

Name Link
Latest commit 4fc7a9077cddf34a52c262eee2fd0492d889d0b5
Latest deploy log https://app.netlify.com/sites/3dstreet-core-builds/deploys/66354ccc5d63e30008c5295b
Deploy Preview https://deploy-preview-512--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 May 03 '24 20:05 netlify[bot]

Updated this PR to the latest version of the 3dstreet repository. This issue has now been fixed: https://github.com/3DStreet/3dstreet/issues/673

Algorush avatar Jun 27 '24 20:06 Algorush

please add a new property to street component such as synchronized true/false

if synchronized is true (it should be true by default at the start) then it will create children entities; after creating children entities for the first time synchronized should be set to false; then use that instead of the global STREET.sourceType

Ok, it works good, when I added synchronized flag for streetmix-loader and stretplan-loader too. But I dont understand the logic why synchronized should be true by default?

Algorush avatar Jun 29 '24 18:06 Algorush

question: should visibility options showGround, showStripping, showVehicles be saved in JSON or should they only be valid during the session? I have now made that these parameters are updated without reloading the scene. The reason for this was that if the user changed one of these parameters, the entire street would be reloaded and all his changes would be lost.

Algorush avatar Jul 01 '24 02:07 Algorush

@Algorush sorry for the miscommunication, this is close but the logic is inverted.

Instead of "this.data.synchronized = true;" we would like to have synchronize be the variable and the default is true. If the value of synchronize is true, then please yes do the actual element creation; if it is false, then do not. Effectively this is the opposite logic of what you have implemented.

For the avoidance of doubt, after the objects are created initially, then set synchronize to false.

kfarr avatar Jul 01 '24 16:07 kfarr

test

  • import a streetmix scene
  • save / reload that 3dstreet scene
  • ensure that the scene is only loaded once per "synchronize" flag
  • see if we see props panel
  • if we are able to use the component properites -- great! that's a bonus

kfarr avatar Jul 03 '24 16:07 kfarr