Skip to content

Commit f7a6f88

Browse files
committed
Compatible with Three R90
1 parent 06546dc commit f7a6f88

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/navigation/Path.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ ROS3D.Path.prototype.processMessage = function(message){
6666
lineGeometry.vertices.push(v3);
6767
}
6868

69-
lineGeometry.computeLineDistances();
7069
var lineMaterial = new THREE.LineBasicMaterial( { color: this.color } );
7170
var line = new THREE.Line( lineGeometry, lineMaterial );
71+
// line.computeLineDistances(); // Only needed for LineDashedMaterial
7272

7373
this.sn = new ROS3D.SceneNode({
7474
frameID : message.header.frame_id,

src/navigation/Polygon.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ ROS3D.Polygon.prototype.processMessage = function(message){
6969
v3 = new THREE.Vector3( message.polygon.points[0].x, message.polygon.points[0].y,
7070
message.polygon.points[0].z);
7171
lineGeometry.vertices.push(v3);
72-
lineGeometry.computeLineDistances();
72+
7373
var lineMaterial = new THREE.LineBasicMaterial( { color: this.color } );
7474
var line = new THREE.Line( lineGeometry, lineMaterial );
75+
line.computeLineDistances();
76+
// line.computeLineDistances(); // Only needed for LineDashedMaterial
7577

7678
this.sn = new ROS3D.SceneNode({
7779
frameID : message.header.frame_id,

src/navigation/PoseArray.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ ROS3D.PoseArray.prototype.processMessage = function(message){
8484
lineGeometry.vertices.push(side1.add(v3));
8585
lineGeometry.vertices.push(side2.add(v3));
8686
lineGeometry.vertices.push(tip);
87-
88-
lineGeometry.computeLineDistances();
8987
var lineMaterial = new THREE.LineBasicMaterial( { color: this.color } );
9088
line = new THREE.Line( lineGeometry, lineMaterial );
89+
// line.computeLineDistances(); // Only needed for LineDashedMaterial
9190

9291
group.add(line);
9392
}

0 commit comments

Comments
 (0)