Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Hull.js - JavaScript library that builds concave hull by set of points.
See live examples here.
var points = [ [236, 126], [234, 115], [238, 109], [247, 102], ... ];
hull(points, 50); // returns points of the hull (in clockwise order)
[[x1, y1], [x2, y2], ..., [xn, yn]]
;1
- thin shape. Infinity
- convex hull. By default 20
;['.lng', '.lat']
if you have {lng: x, lat: y}
points. By default you can use [x, y]
points.Let's see step by step what happens when you call hull()
function:
npm install # install dependencies
npm test # build dist file and run tests
npm run-script watch # watch ./src dir and rebuild dist file
If you want to get involved with Hull.js development, just use github flow and feel free to contribute!
concavity
adjustment based on density.Return the first point as the last point when fewer than 4 unique points are provided.
Fixed missing "var" declaration
Fixed modification of the initial array, added filtration of the duplicates
Added edgeSkipList to increase performance of the highly accurate shapes (with the small concavity
number) + refactoring.
Fixed bower.json
Fixed bower.json
Bower support
Minor fixes (copyrights)
Minor fixes (readme, package.json)
Configurable point formats, now you can use points like {x: 10, y: 10}
and {lat: 52, lng: 82}
.
Some minor updates (doc, package.json, etc.).
Second version with better performance inspired by this article.
First version based on Delaunay triangulation.
FAQs
JavaScript library that builds concave hulls (shapes) by the set of points
The npm package hull.js receives a total of 16,636 weekly downloads. As such, hull.js popularity was classified as popular.
We found that hull.js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.