The loadMolecule function has a loader.load function, some lines from it are pasted below, this is where you add the second link next to the first. You shift the start and end positions by a certain amount of the vector and draw another.
for ( var i = 0; i < geometryBonds.vertices.length; i += 2 ) {
var start = geometryBonds.vertices[ i ];
var end = geometryBonds.vertices[ i + 1 ];
start.multiplyScalar( 75 );
end.multiplyScalar( 75 );
tmpVec1.subVectors( end, start );
var bondLength = tmpVec1.length() - 50;
}
source
share