Cannot access my modelviewer #3061
-
Hey :) I want to include a modelviewer in my Shopify store. Both using the Shopify and embedding it manually works and the model gets displayed. However, attempting to change or animate anything has not been successful yet. When both trying to get to the object with "id" and "ref", it ends up showing this error: Uncaught TypeError: Cannot read properties of undefined (reading 'model') at HTMLDivElement. I followed the basic examples as in https://modelviewer.dev/examples/scenegraph/#changeColor. If I inspect the code on the website, I see that the modelviewer has the necessary id-tag. Thank you in advance :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It sounds like you found a |
Beta Was this translation helpful? Give feedback.
It sounds like you found a
<div>
element, which is not a<model-viewer>
element. So, I guess check your ID again? Also, you can do it interactively on the Chrome dev tools console, which might make things clearer.