Open CarlosSaulMenem opened 7 years ago
I don't use the module version. Back when i built that package, I checked with some people that if it was working as expected. If you can figure out what needs to be fixed, I'll update the package.
Try:
var MeshLine = require( 'three.meshline' );
var line = new MeshLine.MeshLine();
var material = new MeshLine.MeshLineMaterial();
Global exports aren't working in your environment. Library should be updated.
When I do this:
Which is what the readme says, right? Well, I get
Uncaught TypeError: MeshLine is not a constructor
Both modules are installed and load properly. I noticed that some other THREE modules I've used ask for THREE to be sent as a parameter like this
var name = require('name')(THREE);
and I have a feeling it has to do with Line 9 of MeshLines not properly detecting my code's instance of THREE and requiring it's ownline 9:
var THREE = root.THREE || has_require && require('three')