GLB model is rendered black in model-viewer

I’m using model-viewer component in my app. It is built inside some folder and opened in iframe context. So I just did:

npm install
npm run build

And try to serve the content using my current server. However, when I open the page and try to visualize some model I see no textures. It seems that geometry loaded but it is totally black. You can see the demo here.

What is wrong with that and how can I fix it? I do not want to use model-viewer as a standalone service and with its own endpoint. I want to use it relative to my current application structure.


Looks like the server is sending the wrong response for the HDR file. Check the contents of

You probably need to specify a public path when building model-viewer, see here.

When we build model-viewer for our server for we specify:

BUILD_TYPE=prod PUBLIC_PATH=/model-viewer/static/ npm run build

Hope that helps!


@slimbuck Thank you, Donavan! I guess, README of model-viewer project really needs this information! I’ll check it up!