-
Notifications
You must be signed in to change notification settings - Fork 33
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
specify a URL to load scene from json file (v1) #352
Conversation
✅ Deploy Preview for 3dstreet-core-builds ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
test case:
Now that cors server-side error is fixed, I get the error A few issues:
When using the console to open the URL, the first error I receive is:
This is because json-utils isn't loaded, however in this use case I should be able to load the scene without needing a separate file like json-utils, so it will need to be somehow incorporated into 3dstreet build When I do include json-utils, then I get another error:
I don't know how to fix this error. In summary, there are 3 issues @Algorush
|
I made these 3 points in the new commit. Now json-utils is called through require in index.js. But now inputStreetmix and inputJSON which are used in index.html for UI elements cannot be used. I'm thiking how to best fix it? Add this functions to one of compoents or add them to index.html? Or describe index.js as a module and export functions from module. |
@Algorush yes I think it's a good idea to put the inputStreetmix and inputJSON into their appropriate component counterparts as functions to be called from front-end ui.
yes perhaps it's inputStreetmix function into streetmix-loader component and inputJSON function into json-3dstreet component for example. |
Will index.html in the future have #street-container and #default-street elements or create them dynamically inside a-scene at the first level? Asking because I think do I need to make check for their existing for all places where they needed |
And I also ask because if we place the inputStreetmix function (with the prompt request) inside the component, then it will need to be called when assigning the streetmix-loader attribute, which is called for the #default-street element |
@Algorush I think it's ok to require that certain elements exist on the page for v1 The primary use case is to allow people to bring their 3dstreet scenes to a custom html a-frame scene often hosted on glitch.com . We can create the basic glitch template that includes these elements as a starting point that people can "remix" from |
I moved the inputStreetmix function inside the streetmix-loader component. But still part of the code remains in index.html. This is the eventListener code for a button with a custom input prompt |
- move input event listener to json-3dstreet component - move prepareStreetContainer function to street component - add notify messages
I moved the addEventListener for the change event for the inputSteetmix URL inside the |
@Algorush I'm reviewing this and struggling to understand all of the code. I wonder if there are too many changes going on at the same time and we should go 1 step at a time. Here are the core user goals:
Maybe we start with a very simple PR that does #1 only and then a separate PR that does #2 only? |
Ok, I will gradually transfer the changes from this PR to the new PRs for more convenient. This will take some time. |
Closing this for now, we are splitting this into separate tasks |
No description provided.