three_mmi
three_mmi copied to clipboard
WARNING: Multiple instances of Three.js being imported.
Hello, I got an issue when I import the the "@danielblagy/three-mmi" from node_modules like below.
import * as THREE from "three";
//@ts-ignore
import MouseMeshInteraction from '@danielblagy/three-mmi'
import {OrbitControls} from "three/examples/jsm/controls/OrbitControls";
the error only pops after I import MouseMeshInteraction from "@danielblagy/three-mmi"
Hello! I tried using three_mmi and OrbitControls with webpack and it works fine (this setup https://github.com/designcourse/threejs-webpack-starter), so I wasn't able to reproduce it. Can you please specify what tools you're using.
Also, does the warning go away if you comment out the OrbitControls import and all the OrbitControls code?
Does the code work properly even with the warning?
thank you for replying. I am on vite / vue 3 typescript.
actually code is working perfectly even with the warning but log error bothering me and maybe there is a performance issue coming from it..
additionally I comment out the orbit related code but the warning stay still.
by the way I tried to comment out my three import
// import * as THREE from "three";
Okay, thank you.
I'll try to reproduce this issue and figure out what might be causing it. This may take me some time though.
thank you, waiting for your update. hope, you figure it out and enlighten me about this.