Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

ModeViewer for 3D models in Hydrogen not working

ModeViewer for 3D models in Hydrogen not working

nhm1990
Shopify Partner
6 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)