-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix save/load mapbox scene #440
Conversation
- move environment and cameraRig to a-acene parent - fix saving mapbox component data
✅ Deploy Preview for 3dstreet-core-builds ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I can't quite understand what is going on here with the changes to saving the component data, sorry. That's probably ok, I don't need to understand everything. However, it makes me think that we need a standardized manual test process for testing changes to json save / load functions. Right now I just go in there and click around and try randomly to load something, make changes, save them, and reload them. But that's not a standardized procedure and you probably test differently than I do. Or stated differently, how would you suggest testing a change like this to make sure it doesn't adversely affect saving other components? |
Yes, I completely agree that it would be very useful to write tests to test all possible cases of save/load JSON scenes. |
@Algorush I think this is ready for merge except for your suggestion above:
I'm not sure if it is needed or not to add this regex check? |
not now. This may be useful when we need to save the parameters of the |
add additional comment
thanks for the update @Algorush Here is my plan to test:
that is test for this PR Then, once we are ready for a new 3dstreet "release" I should write up a flow that does a couple things like this, and testing a few other flows like importing from streetmix, etc. |
I ended up fixing the filterJSON code. I discovered what the issue was. Now there is no need for additional checks for |
this test is currently passed. And with other scenes too. Only I noticed a strange thing in the DOM inspector after load JSON: components not-street="[object object ]" |
I'll see how to fix this |
This PR is only about saving, it does not affect the JSON loading logic, so the functionality will be backwards compatible with previous JSON scenes |
About the fact that similar things appear: |
I changed operator ?? by ||. After this, it began to work better, the problem with splitting the URL into two parts went away. |
merging this into a combined epic for testing all these changes together |
It turned out that I had not corrected saving the scene with the mapbox component before. I fixed the intersection scene, not mapbox. Now after these changes, saving and loading works, but there are still strange errors when loading.
I'll check further. We will also need to change json-utils.js in the 3DStreet-editor repo.
I know it's time to load json-utils.js from index.js. I did it in this PR, which probably needs some work: #352