Hi, I am new to three.js and since I’ve started using orbit controls I have been getting this error when I move my mouse:
Uncaught TypeError: Cannot read property ‘call’ of undefined
at THREE.OrbitControls.dispatchEvent (three.min.js:343)
at THREE.OrbitControls.update (OrbitControls.js:230)
at handleMouseMoveRotate (OrbitControls.js:493)
at HTMLDocument.onMouseMove (OrbitControls.js:901)
I was wondering if anyone came across this issue and if you did is there a way to fix it?
I am using the newest version of three.js and this is how I implement the orbit controls in my code:
You can obtain more info about the error if you switch from three.min.js to three.js. That way you can inspect the code and know what is failing, since three.js is not a minified version of the code.
Besides that, you are calling controls.addEventListener(‘change’, renderer);. You shouldn’t pass the renderer, but a function.
Uncaught TypeError: array[i].call is not a function
at THREE.OrbitControls.dispatchEvent (three.js:343)
at THREE.OrbitControls.update (OrbitControls.js:230)
at alley.js:154