Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

earcut

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

earcut - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

test/fixtures/issue16.json

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc