spite / THREE.MeshLine

Mesh replacement for THREE.Line
MIT License
2.16k stars 380 forks source link

instanciating a new mesh material has to be done with 'new' #147

Open range-et opened 2 years ago

range-et commented 2 years ago

Hello, I keep runnning into this error:

Uncaught TypeError: class constructors must be invoked with 'new'
    MeshLineMaterial THREE.MeshLine.js:499
    js app.js:26

and the line that it points to reads as:

const LineMaterial = new MeshLineMaterial({lineWidth: 0.1, color: new THREE.Color(white[0]/255, white[1]/255, white[2]/255),});

I think I am calling a new constructor right?

jacopocolo commented 2 years ago

Yes, you are and that's a strange error. There's a similar one here about class constructors not working with the latest versions of Three. Try using this fork and see if it works? It's here on npm.

range-et commented 2 years ago

Yes the new fork worked! Any plans to fix this with the new versions of Three?

jacopocolo commented 2 years ago

I'm not a maintainer and I'm not experienced enough to be one. But the answer is: it seems like this package is lacking an active maintainer. There are a few pull request in other issues that would fix the problem but no one to merge them into the main branch.

range-et commented 2 years ago

Hmm are they looking for maintainers? I might know someone

jacopocolo commented 2 years ago

Not quite sure, there was a discussion here about it but it seems like it's not very active: https://github.com/spite/THREE.MeshLine/issues/140

edwonedwon commented 2 years ago

I'm running into the same issue, someone needs to fix this on the main branch