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

require("THREE") should be require("three") #42

Open
jedleslie opened this issue Aug 10, 2021 · 1 comment
Open

require("THREE") should be require("three") #42

jedleslie opened this issue Aug 10, 2021 · 1 comment

Comments

@jedleslie
Copy link

Hi - Thanks for the great library! I'm using three-geo along side three.js in my application. dist/three-geo.min.js has require('THREE') which webkit will not compile as it is not the right case. Changing the min.js to use require("three") works just fine.

If this is just a setup issue on my side I apologize - but typically npm packages are all lower case. Might make sense to update this.

Thanks!

@j-devel
Copy link
Contributor

j-devel commented Aug 11, 2021

Thanks for reporting! When using 'dist/three-geo.min.js', we need to load it as tag:<script src="dist/three-geo.min.js"></script> (c.f. Setup section). Also, it assumes the external symbol 'THREE' is already set up by three.js. That's why 'THREE'.

Changing the min.js to use require("three") works just fine.

I'm not sure about your setup, but if you are using some sort of bundler, you might want to try the ES module version: 'dist/three-geo.esm.js'.

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

2 participants