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

Why some libraries assume that THREE is global? #9350

Closed
PolGuixe opened this issue Jul 17, 2016 · 2 comments
Closed

Why some libraries assume that THREE is global? #9350

PolGuixe opened this issue Jul 17, 2016 · 2 comments

Comments

@PolGuixe
Copy link

There are some libraries that assume THREE as a global variables such as the TrackBall controller.

I don't think that it is considered a good practice, and is problematic when using a more modular approach.

Is there some sort of guideline when writing components for THREE that states that THREE could be assumed global?

@csulok
Copy link

csulok commented Jul 18, 2016

three.js exposes itself as a global, and when you'd use a more modular approach - for instance browserify - you'll quickly run into instanceof issues. For now, you're better off using three as a global and keep an eye on issues/pull requests dealing with modularization.

@PolGuixe
Copy link
Author

@csulok True... I have been trying to use Three in a modular approach. And I am already running into instanceof problems.... 😄

@mrdoob mrdoob closed this as completed Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants