@thi.ng/geom 3.2.3 → 3.2.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-05-07T11:33:35Z
3
+ - **Last updated**: 2022-06-09T16:14:01Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/aabb.d.ts CHANGED
@@ -5,7 +5,7 @@ import type { Sphere } from "./api/sphere.js";
5
5
  export declare function aabb(pos: Vec, size: number | Vec, attribs?: Attribs): AABB;
6
6
  export declare function aabb(size: number | Vec, attribs?: Attribs): AABB;
7
7
  export declare function aabb(attribs?: Attribs): AABB;
8
- export declare const aabbFromMinMax: (min: Vec, max: Vec, attribs?: Attribs | undefined) => AABB;
8
+ export declare const aabbFromMinMax: (min: Vec, max: Vec, attribs?: Attribs) => AABB;
9
9
  /**
10
10
  * Returns the intersection AABB of given inputs or `undefined` if they
11
11
  * are non-overlapping.
package/arc.d.ts CHANGED
@@ -2,5 +2,5 @@ import type { Attribs } from "@thi.ng/geom-api";
2
2
  import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
3
3
  import { Arc } from "./api/arc.js";
4
4
  export declare const arc: (pos: Vec, r: number | Vec, axis: number, start: number, end: number, xl?: boolean, clockwise?: boolean) => Arc;
5
- export declare const arcFrom2Points: (a: ReadonlyVec, b: ReadonlyVec, radii: ReadonlyVec, axis?: number, xl?: boolean, cw?: boolean, attribs?: Attribs | undefined) => Arc | undefined;
5
+ export declare const arcFrom2Points: (a: ReadonlyVec, b: ReadonlyVec, radii: ReadonlyVec, axis?: number, xl?: boolean, cw?: boolean, attribs?: Attribs) => Arc | undefined;
6
6
  //# sourceMappingURL=arc.d.ts.map
package/as-path.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import type { Attribs, IShape } from "@thi.ng/geom-api";
2
- export declare const asPath: (src: IShape, attribs?: Attribs | undefined) => import("./index.js").Path;
2
+ export declare const asPath: (src: IShape, attribs?: Attribs) => import("./index.js").Path;
3
3
  //# sourceMappingURL=as-path.d.ts.map
package/bpatch.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { Attribs } from "@thi.ng/geom-api";
2
2
  import { Vec } from "@thi.ng/vectors";
3
3
  import { BPatch } from "./api/bpatch.js";
4
- export declare const bpatch: (pts: Vec[], attribs?: Attribs | undefined) => BPatch;
5
- export declare const bpatchFromQuad: (pts: Vec[], attribs?: Attribs | undefined) => BPatch;
6
- export declare const bpatchFromHex: (pts: Vec[], attribs?: Attribs | undefined) => BPatch;
4
+ export declare const bpatch: (pts: Vec[], attribs?: Attribs) => BPatch;
5
+ export declare const bpatchFromQuad: (pts: Vec[], attribs?: Attribs) => BPatch;
6
+ export declare const bpatchFromHex: (pts: Vec[], attribs?: Attribs) => BPatch;
7
7
  //# sourceMappingURL=bpatch.d.ts.map
package/circle.d.ts CHANGED
@@ -5,6 +5,6 @@ export declare function circle(pos: Vec, r: number, attribs?: Attribs): Circle;
5
5
  export declare function circle(pos: Vec, attribs?: Attribs): Circle;
6
6
  export declare function circle(r: number, attribs?: Attribs): Circle;
7
7
  export declare function circle(attribs?: Attribs): Circle;
8
- export declare const circleFrom2Points: (a: ReadonlyVec, b: ReadonlyVec, attribs?: Attribs | undefined) => Circle;
9
- export declare const circleFrom3Points: (a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, attribs?: Attribs | undefined) => Circle | undefined;
8
+ export declare const circleFrom2Points: (a: ReadonlyVec, b: ReadonlyVec, attribs?: Attribs) => Circle;
9
+ export declare const circleFrom3Points: (a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, attribs?: Attribs) => Circle | undefined;
10
10
  //# sourceMappingURL=circle.d.ts.map
package/cubic.d.ts CHANGED
@@ -5,6 +5,6 @@ import { Cubic } from "./api/cubic.js";
5
5
  export declare function cubic(a: Vec, b: Vec, c: Vec, d: Vec, attribs?: Attribs): Cubic;
6
6
  export declare function cubic(pts: Vec[], attribs?: Attribs): Cubic;
7
7
  export declare const cubicFromArc: (arc: Arc) => Cubic[];
8
- export declare const cubicFromLine: (a: Vec, b: Vec, attribs?: Attribs | undefined) => Cubic;
9
- export declare const cubicFromQuadratic: (a: Vec, b: Vec, c: Vec, attribs?: Attribs | undefined) => Cubic;
8
+ export declare const cubicFromLine: (a: Vec, b: Vec, attribs?: Attribs) => Cubic;
9
+ export declare const cubicFromQuadratic: (a: Vec, b: Vec, c: Vec, attribs?: Attribs) => Cubic;
10
10
  //# sourceMappingURL=cubic.d.ts.map
package/group.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import type { Attribs, IHiccupShape } from "@thi.ng/geom-api";
2
2
  import { Group } from "./api/group.js";
3
- export declare const group: (attribs?: Attribs, children?: IHiccupShape[] | undefined) => Group;
3
+ export declare const group: (attribs?: Attribs, children?: IHiccupShape[]) => Group;
4
4
  //# sourceMappingURL=group.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import type { Attribs, PCLikeConstructor } from "@thi.ng/geom-api";
2
2
  import type { Vec } from "@thi.ng/vectors";
3
- export declare const __pointArraysAsShapes: (ctor: PCLikeConstructor, src?: Iterable<Vec[]> | undefined, attribs?: Attribs | undefined) => import("@thi.ng/geom-api").PCLike[] | undefined;
3
+ export declare const __pointArraysAsShapes: (ctor: PCLikeConstructor, src?: Iterable<Vec[]>, attribs?: Attribs) => import("@thi.ng/geom-api").PCLike[] | undefined;
4
4
  //# sourceMappingURL=points-as-shape.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/geom",
3
- "version": "3.2.3",
3
+ "version": "3.2.6",
4
4
  "description": "Functional, polymorphic API for 2D geometry types & SVG generation",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,41 +35,41 @@
35
35
  "tool:bpatch": "tools:node-esm tools/bpatch.ts"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.3.6",
39
- "@thi.ng/arrays": "^2.2.2",
40
- "@thi.ng/associative": "^6.1.7",
41
- "@thi.ng/checks": "^3.1.6",
42
- "@thi.ng/defmulti": "^2.1.6",
43
- "@thi.ng/equiv": "^2.1.6",
44
- "@thi.ng/errors": "^2.1.6",
45
- "@thi.ng/geom-api": "^3.1.11",
46
- "@thi.ng/geom-arc": "^2.1.11",
47
- "@thi.ng/geom-clip-line": "^2.1.11",
48
- "@thi.ng/geom-clip-poly": "^2.1.11",
49
- "@thi.ng/geom-closest-point": "^2.1.11",
50
- "@thi.ng/geom-hull": "^2.1.11",
51
- "@thi.ng/geom-isec": "^2.1.11",
52
- "@thi.ng/geom-poly-utils": "^2.2.3",
53
- "@thi.ng/geom-resample": "^2.1.11",
54
- "@thi.ng/geom-splines": "^2.1.11",
55
- "@thi.ng/geom-subdiv-curve": "^2.1.11",
56
- "@thi.ng/geom-tessellate": "^2.1.11",
57
- "@thi.ng/hiccup": "^4.2.7",
58
- "@thi.ng/hiccup-svg": "^4.2.11",
59
- "@thi.ng/math": "^5.3.2",
60
- "@thi.ng/matrices": "^2.1.11",
61
- "@thi.ng/random": "^3.2.6",
62
- "@thi.ng/strings": "^3.3.4",
63
- "@thi.ng/transducers": "^8.3.2",
64
- "@thi.ng/vectors": "^7.5.3"
38
+ "@thi.ng/api": "^8.3.7",
39
+ "@thi.ng/arrays": "^2.2.5",
40
+ "@thi.ng/associative": "^6.1.10",
41
+ "@thi.ng/checks": "^3.2.1",
42
+ "@thi.ng/defmulti": "^2.1.7",
43
+ "@thi.ng/equiv": "^2.1.7",
44
+ "@thi.ng/errors": "^2.1.7",
45
+ "@thi.ng/geom-api": "^3.1.14",
46
+ "@thi.ng/geom-arc": "^2.1.14",
47
+ "@thi.ng/geom-clip-line": "^2.1.14",
48
+ "@thi.ng/geom-clip-poly": "^2.1.14",
49
+ "@thi.ng/geom-closest-point": "^2.1.14",
50
+ "@thi.ng/geom-hull": "^2.1.14",
51
+ "@thi.ng/geom-isec": "^2.1.14",
52
+ "@thi.ng/geom-poly-utils": "^2.2.6",
53
+ "@thi.ng/geom-resample": "^2.1.14",
54
+ "@thi.ng/geom-splines": "^2.1.14",
55
+ "@thi.ng/geom-subdiv-curve": "^2.1.14",
56
+ "@thi.ng/geom-tessellate": "^2.1.14",
57
+ "@thi.ng/hiccup": "^4.2.9",
58
+ "@thi.ng/hiccup-svg": "^4.2.14",
59
+ "@thi.ng/math": "^5.3.3",
60
+ "@thi.ng/matrices": "^2.1.14",
61
+ "@thi.ng/random": "^3.3.2",
62
+ "@thi.ng/strings": "^3.3.5",
63
+ "@thi.ng/transducers": "^8.3.5",
64
+ "@thi.ng/vectors": "^7.5.6"
65
65
  },
66
66
  "devDependencies": {
67
- "@microsoft/api-extractor": "^7.23.1",
68
- "@thi.ng/testament": "^0.2.6",
67
+ "@microsoft/api-extractor": "^7.25.0",
68
+ "@thi.ng/testament": "^0.2.8",
69
69
  "rimraf": "^3.0.2",
70
70
  "tools": "^0.0.1",
71
- "typedoc": "^0.22.15",
72
- "typescript": "^4.6.4"
71
+ "typedoc": "^0.22.17",
72
+ "typescript": "^4.7.3"
73
73
  },
74
74
  "keywords": [
75
75
  "2d",
@@ -362,5 +362,5 @@
362
362
  "thi.ng": {
363
363
  "year": 2013
364
364
  },
365
- "gitHead": "cf084be5fd5932226054d2dd32bad35481379f5d\n"
365
+ "gitHead": "ab0188234419f2d9f471de80871df930e5555bd6\n"
366
366
  }
package/path-builder.d.ts CHANGED
@@ -40,5 +40,5 @@ export declare class PathBuilder {
40
40
  protected addCubic(cp1: Vec, cp2: Vec, p: Vec, relative: boolean): void;
41
41
  protected addQuadratic(cp: Vec, p: Vec, relative: boolean): void;
42
42
  }
43
- export declare const pathBuilder: (attribs?: Attribs | undefined, opts?: Partial<PathBuilderOpts> | undefined) => PathBuilder;
43
+ export declare const pathBuilder: (attribs?: Attribs, opts?: Partial<PathBuilderOpts>) => PathBuilder;
44
44
  //# sourceMappingURL=path-builder.d.ts.map
package/path.d.ts CHANGED
@@ -2,8 +2,8 @@ import type { Attribs, PathSegment } from "@thi.ng/geom-api";
2
2
  import type { Vec } from "@thi.ng/vectors";
3
3
  import type { Cubic } from "./api/cubic.js";
4
4
  import { Path } from "./api/path.js";
5
- export declare const path: (segments: PathSegment[], attribs?: Attribs | undefined) => Path;
6
- export declare const pathFromCubics: (cubics: Cubic[], attribs?: Attribs | undefined) => Path;
5
+ export declare const path: (segments: PathSegment[], attribs?: Attribs) => Path;
6
+ export declare const pathFromCubics: (cubics: Cubic[], attribs?: Attribs) => Path;
7
7
  export declare const normalizedPath: (path: Path) => Path;
8
- export declare const roundedRect: (pos: Vec, size: Vec, r: number | Vec, attribs?: Attribs | undefined) => Path;
8
+ export declare const roundedRect: (pos: Vec, size: Vec, r: number | Vec, attribs?: Attribs) => Path;
9
9
  //# sourceMappingURL=path.d.ts.map
package/plane.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { Attribs } from "@thi.ng/geom-api";
2
2
  import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
3
3
  import { Plane } from "./api/plane.js";
4
- export declare const plane: (normal: Vec, w: number, attribs?: Attribs | undefined) => Plane;
5
- export declare const planeWithPoint: (normal: Vec, p: ReadonlyVec, attribs?: Attribs | undefined) => Plane;
6
- export declare const planeFrom3Points: (a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, attribs?: Attribs | undefined) => Plane;
4
+ export declare const plane: (normal: Vec, w: number, attribs?: Attribs) => Plane;
5
+ export declare const planeWithPoint: (normal: Vec, p: ReadonlyVec, attribs?: Attribs) => Plane;
6
+ export declare const planeFrom3Points: (a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, attribs?: Attribs) => Plane;
7
7
  //# sourceMappingURL=plane.d.ts.map
package/points.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Attribs } from "@thi.ng/geom-api";
2
2
  import type { Vec } from "@thi.ng/vectors";
3
3
  import { Points, Points3 } from "./api/points.js";
4
- export declare const points: (pts?: Vec[] | undefined, attribs?: Attribs | undefined) => Points;
5
- export declare const points3: (pts?: Vec[] | undefined, attribs?: Attribs | undefined) => Points3;
4
+ export declare const points: (pts?: Vec[], attribs?: Attribs) => Points;
5
+ export declare const points3: (pts?: Vec[], attribs?: Attribs) => Points3;
6
6
  //# sourceMappingURL=points.d.ts.map
package/polygon.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Attribs } from "@thi.ng/geom-api";
2
2
  import type { Vec } from "@thi.ng/vectors";
3
3
  import { Polygon } from "./api/polygon.js";
4
- export declare const polygon: (pts?: Vec[] | undefined, attribs?: Attribs | undefined) => Polygon;
5
- export declare const star: (r: number, n: number, profile: number[], attribs?: Attribs | undefined) => Polygon;
4
+ export declare const polygon: (pts?: Vec[], attribs?: Attribs) => Polygon;
5
+ export declare const star: (r: number, n: number, profile: number[], attribs?: Attribs) => Polygon;
6
6
  //# sourceMappingURL=polygon.d.ts.map
package/polyline.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Attribs } from "@thi.ng/geom-api";
2
2
  import type { Vec } from "@thi.ng/vectors";
3
3
  import { Polyline } from "./api/polyline.js";
4
- export declare const polyline: (pts: Vec[], attribs?: Attribs | undefined) => Polyline;
4
+ export declare const polyline: (pts: Vec[], attribs?: Attribs) => Polyline;
5
5
  //# sourceMappingURL=polyline.d.ts.map
package/quad.d.ts CHANGED
@@ -7,5 +7,5 @@ export declare function quad(a: Vec, b: Vec, c: Vec, d: Vec, attribs?: Attribs):
7
7
  export declare function quad(pts: Vec[], attribs?: Attribs): Quad;
8
8
  export declare function quad3(a: Vec, b: Vec, c: Vec, d: Vec, attribs?: Attribs): Quad;
9
9
  export declare function quad3(pts: Vec[], attribs?: Attribs): Quad;
10
- export declare const quadOnPlane: (plane: Plane, pos: ReadonlyVec, size: number | ReadonlyVec, attribs?: Attribs | undefined) => Quad3;
10
+ export declare const quadOnPlane: (plane: Plane, pos: ReadonlyVec, size: number | ReadonlyVec, attribs?: Attribs) => Quad3;
11
11
  //# sourceMappingURL=quad.d.ts.map
package/quadratic.d.ts CHANGED
@@ -3,5 +3,5 @@ import type { Vec } from "@thi.ng/vectors";
3
3
  import { Quadratic } from "./api/quadratic.js";
4
4
  export declare function quadratic(a: Vec, b: Vec, c: Vec, attribs?: Attribs): Quadratic;
5
5
  export declare function quadratic(pts: Vec[], attribs?: Attribs): Quadratic;
6
- export declare const quadraticFromLine: (a: Vec, b: Vec, attribs?: Attribs | undefined) => Quadratic;
6
+ export declare const quadraticFromLine: (a: Vec, b: Vec, attribs?: Attribs) => Quadratic;
7
7
  //# sourceMappingURL=quadratic.d.ts.map
package/ray.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Attribs } from "@thi.ng/geom-api";
2
2
  import type { Vec } from "@thi.ng/vectors";
3
3
  import { Ray } from "./api/ray.js";
4
- export declare const ray: (pos: Vec, dir: Vec, attribs?: Attribs | undefined, normalize?: boolean) => Ray;
4
+ export declare const ray: (pos: Vec, dir: Vec, attribs?: Attribs, normalize?: boolean) => Ray;
5
5
  //# sourceMappingURL=ray.d.ts.map
package/rect.d.ts CHANGED
@@ -6,8 +6,8 @@ import { Rect } from "./api/rect.js";
6
6
  export declare function rect(pos: Vec, size: number | Vec, attribs?: Attribs): Rect;
7
7
  export declare function rect(size: number | Vec, attribs?: Attribs): Rect;
8
8
  export declare function rect(attribs?: Attribs): Rect;
9
- export declare const rectFromMinMax: (min: Vec, max: Vec, attribs?: Attribs | undefined) => Rect;
10
- export declare const rectFromCentroid: (centroid: Vec, size: Vec, attribs?: Attribs | undefined) => Rect;
9
+ export declare const rectFromMinMax: (min: Vec, max: Vec, attribs?: Attribs) => Rect;
10
+ export declare const rectFromCentroid: (centroid: Vec, size: Vec, attribs?: Attribs) => Rect;
11
11
  /**
12
12
  * Returns the intersection rect of given inputs or `undefined` if they
13
13
  * are non-overlapping.
package/sphere.d.ts CHANGED
@@ -5,5 +5,5 @@ export declare function sphere(pos: Vec, r: number, attribs?: Attribs): Sphere;
5
5
  export declare function sphere(pos: Vec, attribs?: Attribs): Sphere;
6
6
  export declare function sphere(r: number, attribs?: Attribs): Sphere;
7
7
  export declare function sphere(attribs?: Attribs): Sphere;
8
- export declare const sphereFrom2Points: (a: ReadonlyVec, b: ReadonlyVec, attribs?: Attribs | undefined) => Sphere;
8
+ export declare const sphereFrom2Points: (a: ReadonlyVec, b: ReadonlyVec, attribs?: Attribs) => Sphere;
9
9
  //# sourceMappingURL=sphere.d.ts.map
package/text.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Attribs } from "@thi.ng/geom-api";
2
2
  import type { Vec } from "@thi.ng/vectors";
3
3
  import { Text } from "./api/text.js";
4
- export declare const text: (pos: Vec, body: any, attribs?: Attribs | undefined) => Text;
4
+ export declare const text: (pos: Vec, body: any, attribs?: Attribs) => Text;
5
5
  //# sourceMappingURL=text.d.ts.map
package/triangle.d.ts CHANGED
@@ -3,5 +3,5 @@ import type { Vec } from "@thi.ng/vectors";
3
3
  import { Triangle } from "./api/triangle.js";
4
4
  export declare function triangle(a: Vec, b: Vec, c: Vec, attribs?: Attribs): Triangle;
5
5
  export declare function triangle(pts: Vec[], attribs?: Attribs): Triangle;
6
- export declare const equilateralTriangle: (a: Vec, b: Vec, attribs?: Attribs | undefined) => Triangle;
6
+ export declare const equilateralTriangle: (a: Vec, b: Vec, attribs?: Attribs) => Triangle;
7
7
  //# sourceMappingURL=triangle.d.ts.map
package/warp-points.d.ts CHANGED
@@ -3,5 +3,5 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors/api";
3
3
  import type { BPatch } from "./api/bpatch.js";
4
4
  import type { Rect } from "./api/rect.js";
5
5
  export declare const warpPoints: (pts: ReadonlyVec[], dest: IShape, src: IShape) => Vec[];
6
- export declare const warpPointsBPatch: (pts: ReadonlyVec[], dest: BPatch, src?: Rect | undefined, out?: Vec[]) => Vec[];
6
+ export declare const warpPointsBPatch: (pts: ReadonlyVec[], dest: BPatch, src?: Rect, out?: Vec[]) => Vec[];
7
7
  //# sourceMappingURL=warp-points.d.ts.map