Looking to merge to examples

I want merge these two examples:
https://threejs.org/examples/?q=perfor#webgl_instancing_performance
https://threejs.org/examples/?q=glt#webgl_loader_gltf

I have gotten some of the way (ref: https://amfibios.dk/three.js/r115/build/LoadMill3.htm), but now this is the err msg in console:

GLTFLoader.js:121 TypeError: geometry.addEventListener is not a function
    at Object.get (three.module.js:16088)
    at Object.update (three.module.js:16530)
    at projectObject (three.module.js:24647)
    at projectObject (three.module.js:24683)
    at WebGLRenderer.render (three.module.js:24471)
    at render (LoadMill3.htm:223)
    at LoadMill3.htm:107
    at GLTFLoader.js:147
    at GLTFLoader.js:1522

Main goal is to output ‘GPU memory’ only (GPU Draw calls is not relevant, as I only load one model).

I’m afraid the way you create an instance of InstancedMesh is not correct. You can’t just pass the result object of GLTFLoader.load() to its constructor. I’m referring to the following line:

var mesh = new THREE.InstancedMesh( gltf, material );

You should try instead to traverse through gltf.scene, detect all meshes and replace them with InstancedMesh. The traverse can be done by using Object3D.traverse().

I also suggest you have a look at the documentation of GLTFLoader in order to understand the gltf result object.

Yes, I was looking further into it myself … the instanced monkeyhead is a .json-structure as well //but thx