spite / THREE.MeshLine

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

in-range breaking change. #113

Closed trusktr closed 3 years ago

trusktr commented 3 years ago

I've been using "three.meshline": "^1.2.0". Today I blew away my node_modules and re-installed everything, and I got

Uncaught TypeError: this.setAttribute is not a function
    at MeshLine.process (THREE.MeshLine.js:303)
    at MeshLine.setPoints (THREE.MeshLine.js:124)
    at MeshLine.setGeometry (THREE.MeshLine.js:82)

On this line:

https://github.com/spite/THREE.MeshLine/blob/168f9b28a9cf1f123df874d2d253872cadfa209c/src/THREE.MeshLine.js#L303

So for now I had to pinned the version to 1.2 by removing the ^ from package.json.

ryanking1809 commented 3 years ago

Are you using the latest version of three.js?

ronakshethia commented 3 years ago

how did u solved it ?

Jeremboo commented 3 years ago

Thanks for your comment!

When you are using "three.meshline": "^1.2.0", the ^ indicates that you want to have any version that is greater than or equal to 1.2.0 and less than 2.0.0. In our case, that means the version 1.3.0 will be installed.

And 1.3.0 only support three.js >= r117. So maybe your three.js version was too old.

@ronakshethia 3 solutions are offering to you:

more informations: https://gunnariauvinen.com/what-do-the-tilde-carrot-and-asterick-mean-in-package-dot-json/