Skip to content
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

call json-utils.js from index.js #468

Merged
merged 7 commits into from
Feb 23, 2024

Conversation

Algorush
Copy link
Collaborator

@Algorush Algorush commented Feb 1, 2024

move functions used in 3DStreet-editor and in index.html (and another HTMLs) from json-utils to a global STREET object

move functions used elsewhere from json-utils to a global STREET object
Copy link

netlify bot commented Feb 1, 2024

Deploy Preview for 3dstreet-core-builds ready!

Name Link
🔨 Latest commit 0212fb5
🔍 Latest deploy log https://app.netlify.com/sites/3dstreet-core-builds/deploys/65bd73fd32ec1500081d66fd
😎 Deploy Preview https://deploy-preview-468--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.

@Algorush
Copy link
Collaborator Author

Algorush commented Feb 1, 2024

I will also update the function calls from json-utils.js in the Editor repo

@Algorush
Copy link
Collaborator Author

Algorush commented Feb 5, 2024

In this PR, all changes are related to requesting json-utils from index.js and calling json-utils functions from the global STREET.utils object. But I also added all corrections to this PR from here (#440) regarding texture saving. Because incorrect saving and loading of textures led to errors on the screen when saving/loading from the Editor. I forgot to mention this.

@@ -175,7 +178,7 @@ const renameProps = {
intersection: 'not-intersection'
};

function filterJSONstreet (removeProps, renameProps, streetJSON) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is why this PR should be applied to editor after to prevent that error:
3DStreet/3dstreet-editor#387

@kfarr
Copy link
Collaborator

kfarr commented Feb 23, 2024

changes needed on the editor:

  • need to update index.html to match -- removing json utils .js from script include, updating calls to functions to use new global
  • may need to update calls to filterJSONstreet function from editor, only pass streetJSON and not removeProps, renameProps

@kfarr kfarr changed the base branch from main to mapbox-and-custom-svg-epic February 23, 2024 06:30
@kfarr kfarr merged commit be3bafd into mapbox-and-custom-svg-epic Feb 23, 2024
2 checks passed
@kfarr kfarr deleted the load-jsonutils-from-indexjs branch February 23, 2024 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants