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

triangulate-polyline

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

triangulate-polyline - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "triangulate-polyline",
"version": "1.0.0",
"version": "1.0.1",
"description": "Triangulates a complex polygon",

@@ -5,0 +5,0 @@ "main": "tripolyline.js",

@@ -14,2 +14,11 @@ "use strict"

function tryTriangulation(ctx) {
try {
ctx.triangulate()
} catch(e) {
return false
}
return true
}
function triangulatePolyline(loops, positions) {

@@ -54,3 +63,5 @@ //Converts a loop into poly2tri format

//Triangulate
ctx.triangulate()
if(!tryTriangulation(ctx)) {
return []
}
var triangles = ctx.getTriangles()

@@ -57,0 +68,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