Comparing version 1.4.0 to 1.4.1
{ | ||
"name": "earcut", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "The fastest and smallest JavaScript polygon triangulation library for your WebGL apps", | ||
@@ -5,0 +5,0 @@ "main": "src/earcut.js", |
@@ -93,2 +93,6 @@ ## Earcut | ||
##### 1.4.1 (Mar 17, 2015) | ||
- Fixed a rare edge case that led to incomplete triangulation. | ||
##### 1.4.0 (Mar 9, 2015) | ||
@@ -95,0 +99,0 @@ |
@@ -293,3 +293,4 @@ 'use strict'; | ||
// a self-intersection where edge (v[i-1],v[i]) intersects (v[i+1],v[i+2]) | ||
if (intersects(a.p, node.p, node.next.p, b.p) && locallyInside(a, b) && locallyInside(b, a)) { | ||
if (intersects(a.p, node.p, node.next.p, b.p) && | ||
locallyInside(a, b) && locallyInside(b, a) && !equals(a.p, b.p)) { | ||
@@ -296,0 +297,0 @@ if (indexed) { |
@@ -21,2 +21,3 @@ 'use strict'; | ||
areaTest('empty-square'); | ||
areaTest('issue16'); | ||
@@ -23,0 +24,0 @@ indicesCreationTest('indices-2d'); |
@@ -54,5 +54,6 @@ var testPoints = [ | ||
var triangles = []; | ||
var dim = testPoints[0][0].length; | ||
for (var i = 0; i < result.indices.length; i++) { | ||
var index = result.indices[i]; | ||
triangles.push([result.vertices[index], result.vertices[index + 1]]); | ||
triangles.push([result.vertices[index * dim], result.vertices[index * dim + 1]]); | ||
} | ||
@@ -59,0 +60,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
321116
27
2421
132