@@ -24,7 +24,6 @@ class BuildingShapeUtils extends ShapeUtils {
2424 const elements = way . getElementsByTagName ( 'nd' ) ;
2525
2626 // Get the coordinates of all the nodes and add them to the shape outline.
27-
2827 for ( const element of elements ) {
2928 ref = element . getAttribute ( 'ref' ) ;
3029 nodes . push ( nodelist [ ref ] ) ;
@@ -45,7 +44,6 @@ class BuildingShapeUtils extends ShapeUtils {
4544 }
4645 return shape ;
4746 }
48-
4947 /**
5048 * Check if a way is a closed shape.
5149 *
@@ -288,7 +286,6 @@ class BuildingShapeUtils extends ShapeUtils {
288286 */
289287 static combineCoordinates ( shape ) {
290288 const points = shape . extractPoints ( ) . shape ;
291- points . pop ( ) ;
292289 var x = [ ] ;
293290 var y = [ ] ;
294291 var vec ;
@@ -338,7 +335,6 @@ class BuildingShapeUtils extends ShapeUtils {
338335 */
339336 static edgeLength ( shape ) {
340337 const points = shape . extractPoints ( ) . shape ;
341- points . pop ( ) ;
342338 const lengths = [ ] ;
343339 var p1 ;
344340 var p2 ;
@@ -360,7 +356,6 @@ class BuildingShapeUtils extends ShapeUtils {
360356 */
361357 static vertexAngle ( shape ) {
362358 const points = shape . extractPoints ( ) . shape ;
363- points . pop ( ) ;
364359 const angles = [ ] ;
365360 var p0 ;
366361 var p1 ;
@@ -395,7 +390,6 @@ class BuildingShapeUtils extends ShapeUtils {
395390 */
396391 static edgeDirection ( shape ) {
397392 const points = shape . extractPoints ( ) . shape ;
398- points . pop ( ) ;
399393 const angles = [ ] ;
400394 var p1 ;
401395 var p2 ;
@@ -419,7 +413,6 @@ class BuildingShapeUtils extends ShapeUtils {
419413 static surrounds ( shape , point ) {
420414 var count = 0 ;
421415 const vecs = shape . extractPoints ( ) . shape ;
422- vecs . pop ( ) ;
423416 var vec ;
424417 var nextvec ;
425418 for ( let i = 0 ; i < vecs . length ; i ++ ) {
@@ -469,7 +462,7 @@ class BuildingShapeUtils extends ShapeUtils {
469462 * Return the angle of the longest side of a shape with 90° vertices.
470463 *
471464 * @param {THREE.Shape } shape - the shape
472- * @return {number }
465+ * @return {number } in radians from Pi > x > -Pi
473466 */
474467 static longestSideAngle ( shape ) {
475468 const lengths = BuildingShapeUtils . edgeLength ( shape ) ;
0 commit comments