Skip to content

Commit cfab4b4

Browse files
committed
Add options for renderer
1 parent d63829a commit cfab4b4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drawings/simple_graph.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ Drawing.SimpleGraph = function(options) {
7676

7777
function init() {
7878
// Three.js initialization
79-
renderer = new THREE.WebGLRenderer({alpha: true});
80-
renderer.setSize( window.innerWidth, window.innerHeight );
79+
renderer = new THREE.WebGLRenderer({alpha: true, antialias: true});
80+
renderer.setPixelRatio(window.devicePixelRatio);
81+
renderer.setSize(window.innerWidth, window.innerHeight);
82+
8183

8284
camera = new THREE.PerspectiveCamera(40, window.innerWidth/window.innerHeight, 1, 1000000);
8385
camera.position.z = 5000;
@@ -226,7 +228,7 @@ Drawing.SimpleGraph = function(options) {
226228
* Create an edge object (line) and add it to the scene.
227229
*/
228230
function drawEdge(source, target) {
229-
material = new THREE.LineBasicMaterial({ color: 0xff0000, opacity: 1, linewidth: 0.5 });
231+
material = new THREE.LineBasicMaterial({ color: 0xff0000, opacity: 1, linewidth: 1 });
230232

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

0 commit comments

Comments
 (0)