# Problem with MeshLine.js update

**URL:** <https://discourse.threejs.org/t/problem-with-meshline-js-update/13319>\
**Category:** Questions\
**Tags:** geometry, materials\
**Created:** [March 5, 2020, 5:03pm UTC](https://discourse.threejs.org/t/problem-with-meshline-js-update/13319 "2020-03-05T17:03:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benderlidze](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/benderlidze/32/9636_2.png) [@benderlidze](https://discourse.threejs.org/u/benderlidze)\
**Post date:** [March 5, 2020, 5:03pm UTC](https://discourse.threejs.org/t/problem-with-meshline-js-update/13319/1 "2020-03-05T17:03:13Z")

</div>

When I try to update mesh line points(replace it with new) I got some weird geometry - like thin line

> **[MeshLine - JSFiddle - Code Playground](https://jsfiddle.net/benderlio/cL2810or/30/)**
>
> Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.

> var line2d = new THREE.Line3(  
> new THREE.Vector3(0, 0, 0),  
> new THREE.Vector3(100, 100, 0)  
> )  
> var center = line2d.getCenter();  
> var curve = new THREE.QuadraticBezierCurve3(  
> new THREE.Vector3(0, 0, 0),  
> new THREE.Vector3(center.x, center.y, 0.5),  
> new THREE.Vector3(100, 200, 0)  
> );
> 
> ```
> var points = curve.getPoints(50);
> var geometry = new THREE.Geometry().setFromPoints(points);
> var newMeshLine = new MeshLine();
> newMeshLine.setGeometry(geometry);
> console.log('!!!',meshLine.geometry.attributes.position.array, newMeshLine.geometry.attributes.position.array);
> meshLine.geometry.attributes.position.array = newMeshLine.geometry.attributes.position.array
> meshLine.geometry.attributes.position.needsUpdate = true
> 
> ```

If you click update button and turn the line you will see that it is weird.  
The problem is in update function, but not sure where exactly  
Thanks

---

<div class="post-metadata">

**Author:** ![marquizzo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/marquizzo/32/25192_2.png) [@marquizzo](https://discourse.threejs.org/u/marquizzo)\
**Post date:** [March 5, 2020, 10:34pm UTC](https://discourse.threejs.org/t/problem-with-meshline-js-update/13319/2 "2020-03-05T22:34:50Z")

</div>

> <https://stackoverflow.com/questions/60552114/how-to-update-meshline-line-coordinates/60554747#60554747>
