I have this to create a line between 2 points:
var geometry = new THREE.Geometry(); geometry.vertices.push(new THREE.Vector3(0, 0, 0)); geometry.vertices.pus
I found that only one point can be matched, so I edit it( change pointX to pointY) as below and it works
edge.position = new THREE.Vector3().addVectors(pointY,direction.multiplyScalar(0.5));