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

Certain .glb files will not render #1598

Closed
5 of 10 tasks
jackyliang opened this issue Oct 5, 2020 · 4 comments
Closed
5 of 10 tasks

Certain .glb files will not render #1598

jackyliang opened this issue Oct 5, 2020 · 4 comments

Comments

@jackyliang
Copy link

jackyliang commented Oct 5, 2020

Description

Certain .glb files will not render

Live Demo

Here is the live demo on my website: https://www.esclab.co/example

The first view contains the .glb file that does not render, even though it works in the Model Editor (https://modelviewer.dev/editor/) and a number of other GLB viewers.

The way I got the .glb is uploading my .stl (Solidworks) file to Sketchfab. Downloaded the .gltf file, and converted to .glb using one of the popular GLTF to GLB converters.

I even uploaded the .glb to the Model Editor and exported it back out again, thinking it would work because the Model Editor may know how to "fix" the file.

This is the .glb file in question: https://static1.squarespace.com/static/5f68295cbecfb4667e98556e/t/5f7ab15ece10ea2a486470cf/1601876332015/s00_ss.glb

Version

  • model-viewer@1.2.1

Browser Affected

  • Chrome
  • Edge
  • Firefox
  • IE
  • Safari

OS

  • Android
  • iOS
  • Linux
  • MacOS
  • Windows

image

image

I have attached the code below:

<style>
model-viewer {
    --poster-color: transparent;
    --progress-mask: transparent;
    --progress-bar-color: white;
  }
</style>
<center>
  <div style="background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));">
    <model-viewer
		style="width:100%; height:600px;"
		alt="Series 00" 
		webxr scene-viewer quick-look
		auto-rotate
		auto-rotate-delay="1000"
		camera-controls
        rotation-per-second="300%"
		src="https://static1.squarespace.com/static/5f68295cbecfb4667e98556e/t/5f7ab15ece10ea2a486470cf/1601876332015/s00_ss.glb"
        ios-src="https://static1.squarespace.com/static/5f68295cbecfb4667e98556e/t/5f7aa26ad0564007bdc234dd/1601872507748/Series_00_SS.usdz"
        ar>
</model-viewer>
</div>
</center>
@elalish
Copy link
Collaborator

elalish commented Oct 5, 2020

Your link isn't working for me; perhaps I don't have permission? Do you see any errors in your JS console?

@jackyliang
Copy link
Author

Hi! Looks like it was my fault. I checked the console and there was a CORS error. Once I put the asset through a proxy, the issue was fixed. Thank you

@Midnightfury
Copy link

Hi, I'm facing a CORS error as well in loading a gltf/glb file to model viewer from a github repo. Many have mentioned using a proxy and I'm fairly new to using model-viewer could you please tell me how to do this.

This CORS error is the only thin that is currently a hinderance.

@elalish
Copy link
Collaborator

elalish commented Sep 14, 2021

@Midnightfury you'll have better luck opening a new discussion than using a closed issue. Please post a repro link and describe how you've set up your server and we'll try to help.

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

No branches or pull requests

3 participants