mrdoob/three.js — Issue #1295: Line position problem in WebGL mode
Author: drsagitn
Created: 2012-02-10 08:59:42+00:00
State: open

Hi,

I would like to create a set of lines connecting multiple objects. And everytime I move an object, the line would be updated (also move to attach with that object) accordingly. I use following code

```javascript
for(var i = 0; i< lineArrayModel.length; i++){
var geometry = new THREE.Geometry();
for(var j = 0; j< objArrayModel.length; j++){// each line may go through multiple objects, loop through objects to get the info of vertex
var obj = scene.getChildByName(objArrayModel[j].name]);
geometry.vertices.push(new THREE.Vertex(obj.position));
}
var linesMaterial = new THREE.LineBasicMaterial({color:0xd3d3d3, linewidth:2, fog:false});
var line = new THREE.Line(geometry, linesMaterial);
scene.add(line);
}
```

It's work fine in CanvasRenderer mode but when change to WeGL, it's not able to update the lines when moving objects. Is it issue of ANGLE same as the lineWidth problem or something else with my code.

Thanks