Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING: Multiple instances of Three.js being imported. #3

Open
thekubilay opened this issue Jun 27, 2022 · 4 comments
Open

WARNING: Multiple instances of Three.js being imported. #3

thekubilay opened this issue Jun 27, 2022 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@thekubilay
Copy link

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"

@danielblagy
Copy link
Owner

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?

@thekubilay
Copy link
Author

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";

@danielblagy danielblagy self-assigned this Jun 28, 2022
@danielblagy
Copy link
Owner

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.

@thekubilay
Copy link
Author

thank you, waiting for your update. hope, you figure it out and enlighten me about this.

@danielblagy danielblagy added the help wanted Extra attention is needed label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants