Uncaught TypeError: THREEx.DomEvents is not a constructor
ohmygod481999 opened this issue · comments
ohmygod481999 commented
Ugo De March commented
Hello, I'm working on a threejs project and tried to add some threex but i got the same error as you doing this : const domEvent = new THREEx.DomEvent(camera, renderer.domElement);
I'd be happy to know how did you figured it out ?
Angelou commented
+1 on vue.js app, install package with npm
Kubilay Turgut commented
hello, I encountered same problem on vue 3. already installed it via npm and imported it like below.
//@ts-ignore
import THREEx from "threex.domevents/threex.domevents.js"
const domEvents = new THREEx.DomEvents(this.camera, this.renderer.domElement)
but still this giving me "not a constructor" error.