Skip to content

Commit df13b03

Browse files
committed
Update three.js to r83
1 parent 25f596a commit df13b03

File tree

7 files changed

+29840
-24107
lines changed

7 files changed

+29840
-24107
lines changed

drawings/simple_graph.js

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

103103
// Node geometry
104104
if(that.layout === "3d") {
105-
geometry = new THREE.CubeGeometry( 25, 25, 25 );
105+
geometry = new THREE.BoxGeometry( 25, 25, 25 );
106106
} else {
107-
geometry = new THREE.CubeGeometry( 50, 50, 0 );
107+
geometry = new THREE.BoxGeometry( 50, 50, 0 );
108108
}
109109

110110
// Create node selection, if set
@@ -232,7 +232,7 @@ Drawing.SimpleGraph = function(options) {
232232
tmp_geo.vertices.push(source.data.draw_object.position);
233233
tmp_geo.vertices.push(target.data.draw_object.position);
234234

235-
line = new THREE.Line( tmp_geo, material, THREE.LinePieces );
235+
line = new THREE.LineSegments( tmp_geo, material );
236236
line.scale.x = line.scale.y = line.scale.z = 1;
237237
line.originalScale = 1;
238238

drawings/sphere_graph.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Drawing.SphereGraph = function(options) {
250250
tmp_geo.vertices.push(source.data.draw_object.position);
251251
tmp_geo.vertices.push(target.data.draw_object.position);
252252

253-
line = new THREE.Line( tmp_geo, material, THREE.LinePieces );
253+
line = new THREE.LineSegments( tmp_geo, material );
254254
line.scale.x = line.scale.y = line.scale.z = 1;
255255
line.originalScale = 1;
256256

index_example.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<!DOCTYPE html>
1515
<html>
1616
<head>
17+
<meta charset="utf-8">
1718
<title>Graph Visualization</title>
1819
<script type="text/javascript" src="Graph.js"></script>
1920
<script type="text/javascript" src="webgl-frameworks/three.min.js"></script>

utils/Label.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,18 @@ THREE.Label = function(text, parameters) {
3737
xc.textBaseline = 'top';
3838
xc.fillText(text, 0, 0);
3939

40-
var geometry = new THREE.CubeGeometry(len, 200, 0);
41-
var xm = new THREE.MeshBasicMaterial({map: new THREE.Texture(labelCanvas), transparent: true});
40+
var geometry = new THREE.BoxGeometry(len, 200, 0);
41+
var xm = new THREE.MeshBasicMaterial({
42+
map: new THREE.CanvasTexture(
43+
labelCanvas,
44+
THREE.UVMapping,
45+
THREE.ClampToEdgeWrapping,
46+
THREE.ClampToEdgeWrapping,
47+
THREE.LinearFilter,
48+
THREE.LinearFilter
49+
),
50+
transparent: true
51+
});
4252
xm.map.needsUpdate = true;
4353

4454
// set text canvas to cube geometry

utils/ObjectSelection.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ THREE.ObjectSelection = function(parameters) {
1616
var parameters = parameters || {};
1717

1818
this.domElement = parameters.domElement || document;
19-
this.projector = new THREE.Projector();
2019
this.INTERSECTED;
2120

2221
var _this = this;
@@ -42,7 +41,7 @@ THREE.ObjectSelection = function(parameters) {
4241

4342
this.render = function(scene, camera) {
4443
var vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );
45-
this.projector.unprojectVector( vector, camera );
44+
vector.unproject(camera);
4645

4746
var raycaster = new THREE.Raycaster(camera.position, vector.sub(camera.position).normalize());
4847

0 commit comments

Comments
 (0)