From 430461f970bc607bd7cf50683a8b5b015915dfa3 Mon Sep 17 00:00:00 2001
From: AndriiHeonia <773648+AndriiHeonia@users.noreply.github.com>
Date: Sun, 12 May 2024 09:14:03 +0200
Subject: [PATCH] add note about GitHub URL
---
README.md | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/README.md b/README.md
index f635f6c..2c8ec9a 100755
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-Hull.js is a JavaScript library that builds concave hull by the set of points.
+Hull.js is a JavaScript library that builds concave hull by a set of points.
## Examples
@@ -10,8 +10,8 @@ See live examples
hull(points, 50); // returns points of the hull (in clockwise order)
## Params
-* 1st param - array of coordinates in format: `[[x1, y1], [x2, y2], ..., [xn, yn]]`;
-* 2nd param - concavity. `1` - thin shape. `Infinity` - convex hull. By default `20`;
+* 1st param - array of coordinates in format: `[[x1, y1], [x2, y2], ..., [xn, yn]]`.
+* 2nd param - concavity. `1` - thin shape. `Infinity` - convex hull. By default `20`.
* 3rd param - points format. For example: `['.lng', '.lat']` if you have `{lng: x, lat: y}` points. By default you can use `[x, y]` points.
## How it works
@@ -42,9 +42,9 @@ Let's see step by step what happens when you call `hull()` function:
## Limitations
This library relies on ES6. The ES6 features used are:
-- `new Set(null)`, `Set#add`, `Set#has`
-- `let`, `const`
-- `Math.trunc` (if available)
+- `new Set(null)`, `Set#add`, `Set#has`.
+- `let`, `const`.
+- `Math.trunc` (if available).
You may use [polyfills](https://www.npmjs.com/package/core-js) for `Set` and compile with [babel](https://babeljs.io/) to continue to support old browsers.
@@ -65,6 +65,12 @@ And include `hull` library as a dependency to your `package.json`:
For more details see [GitHub instruction](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package).
+If for some reason you don't want to use GitHub Packages, you can use [GitHub URL](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#github-urls) as a dependency, e.g.:
+
+```
+"@andriiheonia/hull": "andriiheonia/hull"
+```
+
## Development
npm install # install dependencies
npm test # build dist file and run tests
@@ -80,17 +86,17 @@ If you want to get involved with Hull.js development, just use Implementation of a fast and efficient concave hull algorithm;
-* Computational Geometry: Convex Hulls;
-* Andrew's monotone chain convex hull algorithm;
-* Line Segment Intersection Algorithm;
-* Game Math: "Cross Product" of 2D Vectors;
-* Угол между двумя векторами;
+* Implementation of a fast and efficient concave hull algorithm.
+* Computational Geometry: Convex Hulls.
+* Andrew's monotone chain convex hull algorithm.
+* Line Segment Intersection Algorithm.
+* Game Math: "Cross Product" of 2D Vectors.
+* Угол между двумя векторами.
* Когда не нужна тригонометрия.
## Changelog