ModeViewer for 3D models in Hydrogen not working

ModeViewer for 3D models in Hydrogen not working

nhm1990
Visitor
2 0 1

Hello folks,

 

I've tried to add the <ModelViewer /> component Hydrogen provides us (https://shopify.dev/docs/api/hydrogen-react/2024-04/components/modelviewer)


1. First to make it run I had to add to add to entry.server.tsx:

createContentSecurityPolicy
...
scriptSrc: ["'self'", 'https://unpkg.com', ..
...


2. Next I adjusted the graphQL request according to get the correct data as Model3D. It's also rendering and showing the preloadedImage.

3. Now I get in the console following error message (see screenshot)


Maybe something with usdz / glb format?
Any ideas? Sounds to me like a bug.

 

model viewer error.JPG

 

 

Replies 0 (0)