src/javascript/lib/drawings/simple_graph.js
/**
     *  Create an edge object (line) and add it to the scene.
     */
Create an edge object (line) and add it to the scene.
Create an edge object ( line ) and add it to the scene .
function drawEdge(source, target) {
        material = new THREE.LineBasicMaterial({color: 0x00f000, opacity: 0.5, linewidth: 1});
        var tmp_geo = new THREE.Geometry();
        tmp_geo.vertices.push(source.data.draw_object.position);
        tmp_geo.vertices.push(target.data.draw_object.position);
        line = new THREE.Line(tmp_geo, material, THREE.LinePieces);
        line.scale.x = line.scale.y = line.scale.z = 1;
        line.originalScale = 1;
        geometries.push(tmp_geo);
        scene.add(line);
    }
function drawEdge ( source , target ) { material = new THREE . LineBasicMaterial ( { color : 0x00f000 , opacity : 0.5 , linewidth : 1 } ) ; var tmp_geo = new THREE . Geometry ( ) ; tmp_geo . vertices . push ( source . data . draw_object . position ) ; tmp_geo . vertices . push ( target . data . draw_object . position ) ; line = new THREE . Line ( tmp_geo , material , THREE . LinePieces ) ; line . scale . x = line . scale . y = line . scale . z = 1 ; line . originalScale = 1 ; geometries . push ( tmp_geo ) ; scene . add ( line ) ; }
Create an edge object (line) and add it to the scene.
Create an edge object ( line ) and add it to the scene .