mattdesl / three-orbit-controls

orbit controls for ThreeJS
216 stars 72 forks source link

Angular 4 - Cannot read property 'prototype' of undefined #25

Open colouredFunk opened 7 years ago

colouredFunk commented 7 years ago

I'm trying to use this within my Angular 4 app, but I'm getting

Error: Uncaught (in promise): TypeError: Cannot read property 'prototype' of undefined TypeError: Cannot read property 'prototype' of undefined

Errors on this line OrbitControls.prototype = Object.create( THREE.EventDispatcher.prototype ); OrbitControls.prototype.constructor = OrbitControls;

Len0re commented 6 years ago

I'm having the same problem, did you manage to solve this?

tendermario commented 6 years ago

What version of three.js are you using as your THREE variable?

Importing the npm module three at version 0.90.0 doesn't have this issue for me. I'm not using Angular, however I'm not sure if the framework would have anything to do with this error message.