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
For rotating the orientation, you can use
edge.rotateX(Math.PI / 2);
Or
edge.rotateY(Math.PI / 2);
Or
edge.rotateZ(Math.PI / 2);
As per the coordinates you wish to rotate. Hence, the code posted above with:
var orientation = new THREE.Matrix4();
/* THREE.Object3D().up (=Y) default orientation for all objects */
orientation.lookAt(pointX, pointY, new THREE.Object3D().up);
/* rotation around axis X by -90 degrees
* matches the default orientation Y
* with the orientation of looking Z */
orientation.multiply(new THREE.Matrix4(1,0,0,0,
0,0,1,0,
0,-1,0,0,
0,0,0,1));
Will not be required.