Uncaught TypeError: quat.clone(...).invert is not a function

Hello! My web page is now just all black and the error is:

Uncaught TypeError: quat.clone(…).invert is not a function
at OrbitControls.js:145
at new OrbitControls (OrbitControls.js:251)
at lic.html:75
The 145th line in OrbitControls.js is: const quatInverse = quat.clone().invert();
and the 75th line in lic.html is: controls = new THREE.OrbitControls(camera,renderer.domElement);

Also, i imported the OrbitControls script with:

What is wrong?

Hi!
Make sure, that all scripts/modules are from the same revision of three.js.

1 Like

I’m sorry, what does that exactly mean? I’m still new with threejs

I’m sorry, what does that exactly mean? I’m still new with threejs

If you use the main script three.min.js of revision 129, then OrbitControls.js has to be from the same revision 129.

Where can I find the OrbitControls in revision 129?

Use a CDN
https://cdn.jsdelivr.net/npm/three@0.129.0/examples/jsm/controls/OrbitControls.js

see three CDN by jsDelivr - A free, fast, and reliable Open Source CDN

2 Likes

Thank You this helped a lot. :slightly_smiling_face:

older versions uses quat.inverse(), wich is deprecated at three version 0.142.0