Skip to content

Commit 4d398f2

Browse files
committed
Update simple graph drawing
1 parent b4c0a23 commit 4d398f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/simple_graph/simple_graph.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Drawing.SimpleGraph = function(options) {
104104

105105
// Node geometry
106106
if(that.layout === "3d") {
107-
geometry = new THREE.BoxGeometry( 25, 25, 25 );
107+
geometry = new THREE.SphereGeometry(30);
108108
} else {
109109
geometry = new THREE.BoxGeometry( 50, 50, 0 );
110110
}
@@ -197,7 +197,7 @@ Drawing.SimpleGraph = function(options) {
197197
* Create a node object and add it to the scene.
198198
*/
199199
function drawNode(node) {
200-
var draw_object = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, opacity: 0.5 } ) );
200+
var draw_object = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { color: Math.random() * 0xe0e0e0, opacity: 0.8 } ) );
201201
var label_object;
202202

203203
if(that.show_labels) {
@@ -229,7 +229,7 @@ Drawing.SimpleGraph = function(options) {
229229
* Create an edge object (line) and add it to the scene.
230230
*/
231231
function drawEdge(source, target) {
232-
material = new THREE.LineBasicMaterial({ color: 0xff0000, opacity: 1, linewidth: 1 });
232+
material = new THREE.LineBasicMaterial({ color: 0x606060 });
233233

234234
var tmp_geo = new THREE.Geometry();
235235
tmp_geo.vertices.push(source.data.draw_object.position);

0 commit comments

Comments
 (0)