Skip to content

Commit 3bf6e99

Browse files
committed
Update README.md
1 parent 74ff744 commit 3bf6e99

File tree

1 file changed

+9
-88
lines changed

1 file changed

+9
-88
lines changed

README.md

Lines changed: 9 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,16 @@
1-
## NOTE: This library is unmaintained and deprecated.
1+
hull.js is a JavaScript library that builds concave hull by set of points.
22

3-
<details>
4-
<summary>Click to expand library description</summary>
5-
6-
JavaScript library that builds concave hull by set of points.
3+
The [original hull.js](https://github.com/andriiheonia/hull) is not maintained, and the author highly recommends against using it. We'll do that eventually, but for now we still use it. This fork is only around so we can publish a version with the [security fixes](https://github.com/advisories/GHSA-q849-wxrc-vqrp) on npm for our own usage.
74

85
Usage:
96

10-
var points = [ [236, 126], [234, 115], [238, 109], [247, 102], ... ];
11-
hull(points, 50); // returns points of the hull (in clockwise order)
7+
```js
8+
var points = [ [236, 126], [234, 115], [238, 109], [247, 102], ... ];
9+
hull(points, 50); // returns points of the hull (in clockwise order)
10+
```
1211

1312
Params:
1413

15-
* 1st param - array of coordinates in format: `[[x1, y1], [x2, y2], ..., [xn, yn]]`.
16-
* 2nd param - concavity. `1` - thin shape. `Infinity` - convex hull. By default `20`.
17-
* 3rd param - points format. For example: `['.lng', '.lat']` if you have `{lng: x, lat: y}` points. By default you can use `[x, y]` points.
18-
19-
## NPM package
20-
21-
It is still possible to fetch the latest version of the library by using [GitHub URL](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#github-urls) as a dependency, but **since the entire library is now deprecated, it is recommended to look for alternative solutions**.
22-
23-
Publishing this library to the public NPM registry under a different name and encouraging other users using unmaintained package is not recommended.
24-
25-
## Related papers
26-
27-
<details>
28-
<summary>Expand</summary>
29-
30-
* <a target="_blank" href="http://www.it.uu.se/edu/course/homepage/projektTDB/ht13/project10/Project-10-report.pdf">Implementation of a fast and efficient concave hull algorithm</a>.
31-
* <a target="_blank" href="http://www.cs.jhu.edu/~misha/Fall05/09.13.05.pdf">Computational Geometry: Convex Hulls</a>.
32-
* <a target="_blank" href="https://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain">Andrew's monotone chain convex hull algorithm</a>.
33-
* <a target="_blank" href="http://bryceboe.com/2006/10/23/line-segment-intersection-algorithm/">Line Segment Intersection Algorithm</a>.
34-
* <a target="_blank" href="http://allenchou.net/2013/07/cross-product-of-2d-vectors/">Game Math: "Cross Product" of 2D Vectors</a>.
35-
* <a target="_blank" href="http://users.livejournal.com/_winnie/237714.html">Угол между двумя векторами</a>.
36-
* <a target="_blank" href="http://habrahabr.ru/post/105882/">Когда не нужна тригонометрия</a>.
37-
</details>
38-
39-
## Changelog
40-
41-
<details>
42-
<summary>Expand</summary>
43-
44-
### 1.0.13 - 08.02.2025
45-
- Prepare for archiving: remove helper files, examples, and most of documentation.
46-
### 1.0.12 - 26.01.2025
47-
- Some cleanup and deprecation.
48-
### 1.0.11 - 11.12.2024
49-
- Minor fixes in package.json.
50-
### 1.0.10 - 07.11.2024
51-
- Fix vulnerability issue.
52-
### 1.0.9 - 29.10.2024
53-
- Update NPM dependencies to address vulnerability issues.
54-
### 1.0.8 - 31.05.2024
55-
- Deprecate library on [npmjs registry](https://docs.npmjs.com/cli/v10/using-npm/registry).
56-
### 1.0.7 - 03.05.2024
57-
Squash previous tiny releases into one bigger commit with the following minor changes:
58-
- Fix issue with formatting when users pass less than 4 points as an input.
59-
- Remove bower and travis files as they are deprecated.
60-
### 1.0.2 — 26.09.2021
61-
- Clean up .gitignore.
62-
- Add "debug" folder to .npmignore to reduce tarball size.
63-
### 1.0.1 — 24.10.2020
64-
- Fix that avoids hitting stack size limit on large arrays.
65-
### 1.0.0 — 28.06.2019
66-
- Change language level to ES6.
67-
- Performance improvements.
68-
### 0.2.11 — 05.05.2019
69-
- Minor changes: return the first point as the last point when fewer than 4 unique points are provided.
70-
### 0.2.10 — 04.09.2016
71-
- Minor changes: fix missing "var" declaration.
72-
### 0.2.9 — 28.07.2016
73-
- Fix modification of the initial array.
74-
- Add filtration of the duplicates.
75-
### 0.2.8 — 01.04.2016
76-
- Add edgeSkipList to increase performance of the highly accurate shapes (with the small `concavity` number) + some refactoring.
77-
### 0.2.7 — 01.05.2015
78-
- Minor changes: fix bower.json.
79-
### 0.2.6 — 01.05.2015
80-
- Minor changes: fix bower.json.
81-
### 0.2.5 — 01.05.2015
82-
- Minor changes: Bower support.
83-
### 0.2.4 — 23.03.2015
84-
- Minor changes: copyrights.
85-
### 0.2.3 — 04.02.2015
86-
- Minor changes: readme, package.json.
87-
### 0.2.2 — 04.02.2015
88-
- Configurable point format, now you can use points like `{x: 10, y: 10}` and `{lat: 52, lng: 82}`.
89-
### 0.2.1 — 21.10.2014
90-
- Minor changes: doc, package.json, etc.
91-
### 0.2.0 — 20.10.2014
92-
- Second version with better performance inspired by <a href="http://www.it.uu.se/edu/course/homepage/projektTDB/ht13/project10/Project-10-report.pdf" target="_blank">this</a> article.
93-
### 0.1.0 — 06.09.2014
94-
- First version based on Delaunay triangulation.
95-
</details>
14+
* 1st param - array of coordinates in format: `[[x1, y1], [x2, y2], ..., [xn, yn]]`.
15+
* 2nd param - concavity. `1` - thin shape. `Infinity` - convex hull. By default `20`.
16+
* 3rd param - points format. For example: `['.lng', '.lat']` if you have `{lng: x, lat: y}` points. By default you can use `[x, y]` points.

0 commit comments

Comments
 (0)