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

user modified materials are not saved #462

Closed
kfarr opened this issue Jan 25, 2024 · 3 comments
Closed

user modified materials are not saved #462

kfarr opened this issue Jan 25, 2024 · 3 comments
Assignees

Comments

@kfarr
Copy link
Collaborator

kfarr commented Jan 25, 2024

as a user who chooses a different material such as brick texture on a median, those changes are not saved. instead I see a white box where the brick should be.

instead I should see the material i selected
scene: https://3dstreet.app/#/scenes/73c8e705-a8a0-41b7-974c-1e504b8ba8fa.json
wrong:
image
expected:
image

@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in 3DStreet Dev Tracking Jan 25, 2024
@kfarr kfarr moved this from Backlog (Not Ready) to To Do - High Prio in 3DStreet Dev Tracking Jan 25, 2024
@Algorush
Copy link
Collaborator

Algorush commented Jan 29, 2024

in the case of textures loaded in this way, the img element with the src and id attributes is added dynamically to the a-assets DOM element. When saving to JSON, only the id value is saved in material component. Then after loading the JSON file, there is no img with this id in a-assets, so the texture is not loaded.
A possible solution here is to store the src attribute instead of the id for the material texture in case the texture is loaded this way.
All that remains is to learn how to determine that a texture is loaded from external sources. This can be a check if the texture's src does not contain assets.3dstreet.app.
Another question - is it safe to use assets.3dstreet.app to check the source of assets? I think it's better to store the current assets URL address in one of the a-assets element attribute. Then it will be more reliable

@Algorush
Copy link
Collaborator

#465

@kfarr kfarr moved this from To Do - High Prio to For Review in 3DStreet Dev Tracking Feb 23, 2024
@kfarr
Copy link
Collaborator Author

kfarr commented Feb 29, 2024

closed by #465

@kfarr kfarr closed this as completed Feb 29, 2024
@github-project-automation github-project-automation bot moved this from For Review to Done in 3DStreet Dev Tracking Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants