When i use OrbitControls.js, i get following error console.log. Everythings works as expected as zoom, rotate but bug persists. Does anyone have this issue? How can i fix this?
Uncaught TypeError: b[c].call is not a function
at THREE.OrbitControls.dispatchEvent (three.min.js:344)
at THREE.OrbitControls.update (OrbitControls.js:232)
at handleMouseMoveRotate (OrbitControls.js:495)
at HTMLDocument.onMouseMove (OrbitControls.js:903)
dispatchEvent @ three.min.js:344
update @ OrbitControls.js:232
handleMouseMoveRotate @ OrbitControls.js:495
onMouseMove @ OrbitControls.js:903
Can you please demonstrate the issue with this live example: https://jsfiddle.net/hyok6tvj/
OrbitControls is already included. In this way, it’s easier to debug the runtime error.
Update fiddle: https://jsfiddle.net/s7fptue8/
you have to code:
addEventListener() expects a function, not an instance of
BTW: You really don’t need this line at all if you have an animation loop anyway:
Re-rendering the scene when the
change event fires does only make sense when you have a static scene without any animated objects.
oh thanx so much for the help. its fixed