THREE GLTFLoader is not a constructor

good evening. unfortunately we have a problem with a recent change.

our gltf models are no longer loaded. The chrome console reports

Uncaught TypeError: THREE.GLTFLoader is not a constructor

everything worked until a few days ago.

could someone help me with troubleshooting?

How do you import GLTFLoader into your app?

hello,

with this script-tag

Then please read the following topic. It should explain what’s happening:

from source https://threejs.org/build/three.js

thanks i will check this

i will check this

thanks

Also keep in mind to not import library files from https://threejs.org. Always use a CDN like unpkg.com with versioned URLs. E.g. https://unpkg.com/three@0.148.0/build/three.module.js.

1 Like