GLTFLoader itemStart Error

Hi! I’m pretty new to Three.js. I’m following this tutorial: https://discoverthreejs.com

Im running the tutorial locally using express to serve the content, and I’m recieving this error while trying to load a Gltf model:

GLTFLoader.js:47 Uncaught TypeError: Cannot read property ‘itemStart’ of undefined
at GLTFLoader.load (GLTFLoader.js:47)
at loadModels (scripts.js:90)
at init (scripts.js:21)
at scripts.js:148

Any helps is really welcomed.

Thanks!

Can you please share your code that shows how you are loading the glTF asset?

hi. have the same issue with current latest loader (examples/js/loaders/GLTFLoader.js)

var loader = new THREE.GLTFLoader();
loader.load(‘1.gltf’), function( gltf){
console.log(gltf)
}

@Gase12 have you tried with this syntax? The callback function needs to be passed as the second argument.

var loader = new THREE.GLTFLoader();
loader.load( '1.gltf' , function( gltf ){
  console.log( gltf );
});

ops.
yes this works with current master. but on dev branch i seem to have the same line 47 issue as mentioned above…

The following example from the dev branch works fine:

https://raw.githack.com/mrdoob/three.js/dev/examples/webgl_loader_gltf.html

Please ensure that GLTFLoader and three.js are from the same release.