Search code examples
three.jsjsfiddle

Three.js error: "Uncaught TypeError: THREE.InstancedMesh is not a constructor"


in this fiddle: https://jsfiddle.net/ssccdd/cLzx7ygk/4/ I can't understand why I'm getting the error " Uncaught TypeError: THREE.InstancedMesh is not a constructor". I believe that THREE.InstancedMesh is part of three.min.js where it is imported.

for comparison here is a working example with no error, only three.min.js being imported, using THREE.InstancedMesh, for reference: https://jsfiddle.net/onirenaud/vagwtbmj/


Solution

  • THREE.InstancedMesh was added with r109.

    Your first fiddle uses 103dev whereas the second (working) example uses the latest release.