@thi.ng/quad-edge 0.2.37 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -10
- package/README.md +14 -5
- package/package.json +26 -21
- package/lib/index.js +0 -100
- package/lib/index.js.map +0 -1
- package/lib/index.umd.js +0 -1
- package/lib/index.umd.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [0.2
|
|
6
|
+
## [2.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/quad-edge@2.0.1...@thi.ng/quad-edge@2.0.2) (2021-10-15)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @thi.ng/quad-edge
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## [0.
|
|
14
|
+
## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/quad-edge@2.0.0...@thi.ng/quad-edge@2.0.1) (2021-10-13)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @thi.ng/quad-edge
|
|
17
17
|
|
|
@@ -19,22 +19,43 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
# [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/quad-edge@1.0.1...@thi.ng/quad-edge@2.0.0) (2021-10-12)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Build System
|
|
26
|
+
|
|
27
|
+
* major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### BREAKING CHANGES
|
|
31
|
+
|
|
32
|
+
* discontinue CommonJS & UMD versions
|
|
33
|
+
|
|
34
|
+
- only ESM modules will be published from now on
|
|
35
|
+
- CJS obsolete due to ESM support in recent versions of node:
|
|
36
|
+
- i.e. launch NodeJS via:
|
|
37
|
+
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
38
|
+
- in the node REPL use `await import(...)` instead of `require()`
|
|
39
|
+
- UMD obsolete due to widespread browser support for ESM
|
|
40
|
+
|
|
41
|
+
Also:
|
|
42
|
+
- normalize/restructure/reorg all package.json files
|
|
43
|
+
- cleanup all build scripts, remove obsolete
|
|
44
|
+
- switch from mocha to @thi.ng/testament for all tests
|
|
23
45
|
|
|
24
|
-
**Note:** Version bump only for package @thi.ng/quad-edge
|
|
25
46
|
|
|
26
47
|
|
|
27
48
|
|
|
28
49
|
|
|
29
50
|
|
|
30
|
-
#
|
|
51
|
+
# [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/quad-edge@0.1.4...@thi.ng/quad-edge@0.2.0) (2019-07-07)
|
|
31
52
|
|
|
32
|
-
###
|
|
53
|
+
### Features
|
|
33
54
|
|
|
34
|
-
|
|
55
|
+
- **quad-edge:** enable TS strict compiler flags (refactor) ([5a6cec1](https://github.com/thi-ng/umbrella/commit/5a6cec1))
|
|
35
56
|
|
|
36
|
-
#
|
|
57
|
+
# 0.1.0 (2019-02-05)
|
|
37
58
|
|
|
38
|
-
###
|
|
59
|
+
### Features
|
|
39
60
|
|
|
40
|
-
|
|
61
|
+
- **quad-edge:** re-import & update quad edge impl (MBP2010) ([ee76797](https://github.com/thi-ng/umbrella/commit/ee76797))
|
package/README.md
CHANGED
|
@@ -51,15 +51,24 @@ Reference:
|
|
|
51
51
|
yarn add @thi.ng/quad-edge
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
ES module import:
|
|
55
|
+
|
|
54
56
|
```html
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
<script type="module" src="https://cdn.skypack.dev/@thi.ng/quad-edge"></script>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
[Skypack documentation](https://docs.skypack.dev/)
|
|
61
|
+
|
|
62
|
+
For Node.js REPL:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
# with flag only for < v16
|
|
66
|
+
node --experimental-repl-await
|
|
57
67
|
|
|
58
|
-
|
|
59
|
-
<script src="https://unpkg.com/@thi.ng/quad-edge/lib/index.umd.js" crossorigin></script>
|
|
68
|
+
> const quadEdge = await import("@thi.ng/quad-edge");
|
|
60
69
|
```
|
|
61
70
|
|
|
62
|
-
Package sizes (gzipped, pre-treeshake): ESM: 495 bytes
|
|
71
|
+
Package sizes (gzipped, pre-treeshake): ESM: 495 bytes
|
|
63
72
|
|
|
64
73
|
## Dependencies
|
|
65
74
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/quad-edge",
|
|
3
|
-
"version": "0.2
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Quadedge data structure after Guibas & Stolfi",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"module": "./index.js",
|
|
6
|
-
"main": "./lib/index.js",
|
|
7
|
-
"umd:main": "./lib/index.umd.js",
|
|
8
7
|
"typings": "./index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/thi-ng/umbrella.git"
|
|
@@ -24,24 +24,18 @@
|
|
|
24
24
|
"author": "Karsten Schmidt <k+npm@thi.ng>",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "yarn clean &&
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"build:test": "rimraf build && tsc -p test/tsconfig.json",
|
|
31
|
-
"build:check": "tsc --isolatedModules --noEmit",
|
|
32
|
-
"test": "mocha test",
|
|
33
|
-
"cover": "nyc mocha test && nyc report --reporter=lcov",
|
|
34
|
-
"clean": "rimraf *.js *.d.ts *.map .nyc_output build coverage doc lib",
|
|
35
|
-
"doc:readme": "ts-node -P ../../tools/tsconfig.json ../../tools/src/readme.ts",
|
|
36
|
-
"doc": "typedoc --excludePrivate --out doc --theme ../../tools/doc/typedoc-theme src/index.ts",
|
|
27
|
+
"build": "yarn clean && tsc --declaration",
|
|
28
|
+
"clean": "rimraf *.js *.d.ts *.map doc",
|
|
29
|
+
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
37
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
|
|
38
|
-
"
|
|
31
|
+
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
|
|
32
|
+
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
|
|
33
|
+
"pub": "yarn build && yarn publish --access public",
|
|
34
|
+
"test": "testament test"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@thi.ng/testament": "^0.1.2"
|
|
39
38
|
},
|
|
40
|
-
"files": [
|
|
41
|
-
"*.js",
|
|
42
|
-
"*.d.ts",
|
|
43
|
-
"lib"
|
|
44
|
-
],
|
|
45
39
|
"keywords": [
|
|
46
40
|
"2d",
|
|
47
41
|
"3d",
|
|
@@ -58,12 +52,23 @@
|
|
|
58
52
|
"publishConfig": {
|
|
59
53
|
"access": "public"
|
|
60
54
|
},
|
|
61
|
-
"
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=12.7"
|
|
57
|
+
},
|
|
58
|
+
"files": [
|
|
59
|
+
"*.js",
|
|
60
|
+
"*.d.ts"
|
|
61
|
+
],
|
|
62
|
+
"exports": {
|
|
63
|
+
".": {
|
|
64
|
+
"import": "./index.js"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
62
67
|
"thi.ng": {
|
|
63
68
|
"related": [
|
|
64
69
|
"geom-voronoi"
|
|
65
70
|
],
|
|
66
71
|
"year": 2015
|
|
67
72
|
},
|
|
68
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "3c5f903104da150588946a94bb118ad559ad395d"
|
|
69
74
|
}
|
package/lib/index.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
let NEXT_ID = 0;
|
|
6
|
-
const setNextID = (id) => (NEXT_ID = (id + 3) & -4);
|
|
7
|
-
class Edge {
|
|
8
|
-
constructor(parent, id) {
|
|
9
|
-
this.parent = parent;
|
|
10
|
-
this.id = id;
|
|
11
|
-
}
|
|
12
|
-
static create(src, dest) {
|
|
13
|
-
const quad = new Array(4);
|
|
14
|
-
const a = (quad[0] = new Edge(quad, NEXT_ID));
|
|
15
|
-
const b = (quad[1] = new Edge(quad, NEXT_ID + 1));
|
|
16
|
-
const c = (quad[2] = new Edge(quad, NEXT_ID + 2));
|
|
17
|
-
const d = (quad[3] = new Edge(quad, NEXT_ID + 3));
|
|
18
|
-
a.onext = a;
|
|
19
|
-
c.onext = c;
|
|
20
|
-
b.onext = d;
|
|
21
|
-
d.onext = b;
|
|
22
|
-
NEXT_ID += 4;
|
|
23
|
-
src && dest && a.setEnds(src, dest);
|
|
24
|
-
return a;
|
|
25
|
-
}
|
|
26
|
-
get oprev() {
|
|
27
|
-
return this.rot.onext.rot;
|
|
28
|
-
}
|
|
29
|
-
get rot() {
|
|
30
|
-
return this.parent[(this.id + 1) & 3];
|
|
31
|
-
}
|
|
32
|
-
get invrot() {
|
|
33
|
-
return this.parent[(this.id + 3) & 3];
|
|
34
|
-
}
|
|
35
|
-
get sym() {
|
|
36
|
-
return this.parent[(this.id + 2) & 3];
|
|
37
|
-
}
|
|
38
|
-
get dnext() {
|
|
39
|
-
return this.sym.onext.sym;
|
|
40
|
-
}
|
|
41
|
-
get dprev() {
|
|
42
|
-
return this.invrot.onext.invrot;
|
|
43
|
-
}
|
|
44
|
-
get lnext() {
|
|
45
|
-
return this.invrot.onext.rot;
|
|
46
|
-
}
|
|
47
|
-
get lprev() {
|
|
48
|
-
return this.onext.sym;
|
|
49
|
-
}
|
|
50
|
-
get rnext() {
|
|
51
|
-
return this.rot.onext.invrot;
|
|
52
|
-
}
|
|
53
|
-
get rprev() {
|
|
54
|
-
return this.sym.onext;
|
|
55
|
-
}
|
|
56
|
-
get dest() {
|
|
57
|
-
return this.sym.origin;
|
|
58
|
-
}
|
|
59
|
-
setEnds(o, d) {
|
|
60
|
-
this.origin = o;
|
|
61
|
-
this.sym.origin = d;
|
|
62
|
-
}
|
|
63
|
-
connect(e) {
|
|
64
|
-
const n = Edge.create();
|
|
65
|
-
n.splice(this.lnext);
|
|
66
|
-
n.sym.splice(e);
|
|
67
|
-
n.setEnds(this.dest, e.origin);
|
|
68
|
-
return n;
|
|
69
|
-
}
|
|
70
|
-
swap() {
|
|
71
|
-
const a = this.oprev;
|
|
72
|
-
const b = this.sym.oprev;
|
|
73
|
-
this.splice(a);
|
|
74
|
-
this.sym.splice(b);
|
|
75
|
-
this.splice(a.lnext);
|
|
76
|
-
this.sym.splice(b.lnext);
|
|
77
|
-
this.setEnds(a.dest, b.dest);
|
|
78
|
-
}
|
|
79
|
-
remove() {
|
|
80
|
-
this.splice(this.oprev);
|
|
81
|
-
this.sym.splice(this.sym.oprev);
|
|
82
|
-
delete this.parent;
|
|
83
|
-
}
|
|
84
|
-
splice(e) {
|
|
85
|
-
const alpha = this.onext.rot;
|
|
86
|
-
const beta = e.onext.rot;
|
|
87
|
-
const t1 = e.onext;
|
|
88
|
-
const t2 = this.onext;
|
|
89
|
-
const t3 = beta.onext;
|
|
90
|
-
const t4 = alpha.onext;
|
|
91
|
-
this.onext = t1;
|
|
92
|
-
e.onext = t2;
|
|
93
|
-
alpha.onext = t3;
|
|
94
|
-
beta.onext = t4;
|
|
95
|
-
return this;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
exports.Edge = Edge;
|
|
100
|
-
exports.setNextID = setNextID;
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../index.js"],"sourcesContent":null,"names":[],"mappings":";;;;AAAA,IAAI,OAAO,GAAG,CAAC,CAAC;AAMJ,MAAC,SAAS,GAAG,CAAC,EAAE,MAAM,OAAO,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;AAUpD,MAAM,IAAI,CAAC;AAClB,IAAI,WAAW,CAAC,MAAM,EAAE,EAAE,EAAE;AAC5B,QAAQ,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AAC7B,QAAQ,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;AACrB,KAAK;AAYL,IAAI,OAAO,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE;AAC7B,QAAQ,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAClC,QAAQ,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACtD,QAAQ,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1D,QAAQ,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1D,QAAQ,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1D,QAAQ,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;AACpB,QAAQ,CAA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B,QAAQ,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACjC,QAAQ,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AACrC,KAAK;AACL,IAAI,MAAM,GAAG;AACb,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChC,QAAQ,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACxC,QAAQ,OAAO,IAAI,CAAC,MAAM,CAAC;AAC3B,KAAK;AAYL,IAAI,MAAM,CAAC,CAAC,EAAE;AACd,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AACrC,QAAQ,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;AACjC,QAAQ,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC;AAC3B,QAAQ,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;AAC9B,QAAQ,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;AAC9B,QAAQ,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;AAC/B,QAAQ,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;AACxB,QAAQ,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;AACrB,QAAQ,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;AACzB,QAAQ,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;AACxB,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK;AACL;;;;;"}
|
package/lib/index.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).thi=t.thi||{},t.thi.ng=t.thi.ng||{},t.thi.ng.quadEdge={}))}(this,(function(t){"use strict";let e=0;class s{constructor(t,e){this.parent=t,this.id=e}static create(t,n){const i=new Array(4),r=i[0]=new s(i,e),o=i[1]=new s(i,e+1),h=i[2]=new s(i,e+2),p=i[3]=new s(i,e+3);return r.onext=r,h.onext=h,o.onext=p,p.onext=o,e+=4,t&&n&&r.setEnds(t,n),r}get oprev(){return this.rot.onext.rot}get rot(){return this.parent[this.id+1&3]}get invrot(){return this.parent[this.id+3&3]}get sym(){return this.parent[this.id+2&3]}get dnext(){return this.sym.onext.sym}get dprev(){return this.invrot.onext.invrot}get lnext(){return this.invrot.onext.rot}get lprev(){return this.onext.sym}get rnext(){return this.rot.onext.invrot}get rprev(){return this.sym.onext}get dest(){return this.sym.origin}setEnds(t,e){this.origin=t,this.sym.origin=e}connect(t){const e=s.create();return e.splice(this.lnext),e.sym.splice(t),e.setEnds(this.dest,t.origin),e}swap(){const t=this.oprev,e=this.sym.oprev;this.splice(t),this.sym.splice(e),this.splice(t.lnext),this.sym.splice(e.lnext),this.setEnds(t.dest,e.dest)}remove(){this.splice(this.oprev),this.sym.splice(this.sym.oprev),delete this.parent}splice(t){const e=this.onext.rot,s=t.onext.rot,n=t.onext,i=this.onext,r=s.onext,o=e.onext;return this.onext=n,t.onext=i,e.onext=r,s.onext=o,this}}t.Edge=s,t.setNextID=t=>e=t+3&-4,Object.defineProperty(t,"__esModule",{value:!0})}));
|
package/lib/index.umd.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../index.js"],"sourcesContent":null,"names":[],"mappings":";;;;;;IAAA,IAAI,OAAO,GAAG,CAAC,CAAC;AAMJ,UAAC,SAAS,GAAG,CAAC,EAAE,MAAM,OAAO,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;IAUpD,MAAM,IAAI,CAAC;IAClB,IAAI,WAAW,CAAC,MAAM,EAAE,E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