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

Display BL 3D Files #579

Open
NoraRamsey opened this issue Nov 12, 2024 · 0 comments
Open

Display BL 3D Files #579

NoraRamsey opened this issue Nov 12, 2024 · 0 comments

Comments

@NoraRamsey
Copy link
Collaborator

If a code was embedded into the repository in order to automate access to 3d files we could add a url link that will take the visitor away from the repository site in order to view the image in a 3d viewer hosted in Glitch (or elsewhere)

Our bl labs team mentioned:

You would need to change the CORS policy on the repository server to allow access from glitch.me (or the domain you are using) by adding something like this to your server config:
Access-Control-Allow-Origin: https://[glitch project name].glitch.me

or the possibly riskier option that allows connections from everywhere:
Access-Control-Allow-Origin: *
A lot of APIs have the second option set I think to allow remote usage.

MDN has a good explanation: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

Here is the URL for this experiment: https://lgh-model-viewer-example.glitch.me/blrepo3d.html

To use it do the following:

Go to a repository page for a model
Download the file ending in "_gltf.zip" to your computer
Go to the URL above and use the "Browse" button to upload the file
After a couple of seconds you should see the model.

@NoraRamsey NoraRamsey converted this from a draft issue Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Development
Development

No branches or pull requests

1 participant