[SOLVED] WebXR Gltf Issues

I’m trying to use the GLTF loader in WebXR by copying the code from boombox/index.html in the simplestAR example



The issue in the console log is:
(index):144 could not load gltf TypeError: Cannot read property ‘add’ of undefined
at loadGLTF.then.gltf ((index):142)

Here is the repo:

If I have improperly stated my question I am happy to refactor it. I am an AR Designer getting into development and have a lot to learn.

Thanks to anyone who can help. I’m surprised to have not yet found a code example with gltf loader in WebXR for AR.

Fixed it! I just need to put it where I’d initialized the scence instead of outside the brackets.