Hello everyone! I am currently building an ecommerce app using React. My goal is to render a different 3d object for each item’s show page. I’m using GLTFLoader to load the 3d models and the first 3d object loads wonderfully. However, when I navigate the site to view a different item’s show page, the object does not load. I am getting the error below in my browser console.
And here’s my code:
Is there a way I can have different 3d objects render on different routes? For example, http://localhost:3000/products/1, http://localhost:3000/products/2, http://localhost:3000/products/3 would all load different 3d objects. Or is three.js only meant for one page applications? Thank you so much for your help. I could not find any information on the internet.