spite / THREE.MeshLine

Mesh replacement for THREE.Line
MIT License
2.13k stars 379 forks source link

Fix warning on "this.geometry.addAttribute( )" #107

Closed Chrisbright10 closed 3 years ago

Chrisbright10 commented 3 years ago

I get thousands of warnings saying "THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()"

this seems like it would be a quick fix and no longer flood my console with warnings. specifically lines 337 - 343... this.geometry.addAttribute( 'position', this.attributes.position ); this.geometry.addAttribute( 'previous', this.attributes.previous ); this.geometry.addAttribute( 'next', this.attributes.next ); this.geometry.addAttribute( 'side', this.attributes.side ); this.geometry.addAttribute( 'width', this.attributes.width ); this.geometry.addAttribute( 'uv', this.attributes.uv ); this.geometry.addAttribute( 'counters', this.attributes.counters );

Chrisbright10 commented 3 years ago

I found out that it was the npm package that hasn't been updated to work with the fix that has already been done here. If you control the package, can you update that too please?

Jeremboo commented 3 years ago

You're right! The new release is still not available on npm...

@spite, can you do it? I don't have the permission to publish yet

Jeremboo commented 3 years ago

@Chrisbright10 It's done! See the v1.2.1 => https://www.npmjs.com/package/three.meshline

Thanks to let us know!