@stemy/ngx-utils 19.8.2 → 19.8.4
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/fesm2022/stemy-ngx-utils-tools.mjs.map +1 -1
- package/fesm2022/stemy-ngx-utils.mjs +403 -340
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +2 -1
- package/ngx-utils/utils/file.utils.d.ts +2 -0
- package/ngx-utils/utils/geometry/index.d.ts +1 -1
- package/ngx-utils/utils/geometry/shapes.d.ts +11 -4
- package/package.json +1 -1
- package/public_api.d.ts +1 -1
|
@@ -322,7 +322,8 @@ export interface ShapeDistance {
|
|
|
322
322
|
}
|
|
323
323
|
export interface IShape extends IPoint {
|
|
324
324
|
readonly center: IPoint;
|
|
325
|
-
|
|
325
|
+
readonly subShapes?: ReadonlyArray<IShape>;
|
|
326
|
+
getPath(x: number, y: number, ratio?: number): Path2D;
|
|
326
327
|
support(dir: IPoint): IPoint;
|
|
327
328
|
move(pos: IPoint): IShape;
|
|
328
329
|
intersection(shape: IShape): ShapeIntersection;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { HttpClient } from "@angular/common/http";
|
|
2
2
|
export declare class FileUtils {
|
|
3
3
|
static readonly base64: RegExp;
|
|
4
|
+
protected static readonly blobCache: Map<string, Promise<Blob>>;
|
|
5
|
+
protected static readBlob(http: HttpClient, url: string): Promise<Blob>;
|
|
4
6
|
static getExtension(file: File): string;
|
|
5
7
|
static getName(file: File): string;
|
|
6
8
|
static toFile(blob: Blob, fileName: string): File;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { gjkDistance, gjkIntersection } from "./gjk";
|
|
2
2
|
export { dotProduct, tripleProduct, isPoint, ensurePoint, perpendicular, negatePt, normalizePt, addPts, distanceSq, distance, lerpPts, lengthOfPt, multiplyPts, dividePts, subPts, rotateDeg, rotateRad, toDegrees, toRadians } from "./functions";
|
|
3
|
-
export { Circle, Point, Rect, Oval } from "./shapes";
|
|
3
|
+
export { Circle, Point, Rect, Oval, ShapeGroup } from "./shapes";
|
|
@@ -5,7 +5,7 @@ declare abstract class Shape implements IShape {
|
|
|
5
5
|
get y(): number;
|
|
6
6
|
protected pt: IPoint;
|
|
7
7
|
protected constructor(x: number, y: number);
|
|
8
|
-
abstract
|
|
8
|
+
abstract getPath(x: number, y: number, ratio?: number): Path2D;
|
|
9
9
|
abstract support(dir: IPoint): IPoint;
|
|
10
10
|
abstract move(pos: IPoint): IShape;
|
|
11
11
|
intersection(shape: IShape): ShapeIntersection;
|
|
@@ -18,7 +18,7 @@ export declare class Point extends Shape {
|
|
|
18
18
|
get length(): number;
|
|
19
19
|
get perpendicular(): Point;
|
|
20
20
|
constructor(xOrP: number | IPoint, y?: number);
|
|
21
|
-
|
|
21
|
+
getPath(x: number, y: number): Path2D;
|
|
22
22
|
support(): IPoint;
|
|
23
23
|
move(pos: IPoint): IShape;
|
|
24
24
|
add(p: IPoint): Point;
|
|
@@ -38,7 +38,7 @@ export declare class Rect extends Shape {
|
|
|
38
38
|
readonly height: number;
|
|
39
39
|
readonly rotation: number;
|
|
40
40
|
constructor(x: number, y: number, width: number, height: number, rotation?: number);
|
|
41
|
-
|
|
41
|
+
getPath(x: number, y: number, ratio?: number): Path2D;
|
|
42
42
|
support(dir: IPoint): IPoint;
|
|
43
43
|
move(pos: IPoint): Rect;
|
|
44
44
|
}
|
|
@@ -47,7 +47,7 @@ export declare class Oval extends Shape {
|
|
|
47
47
|
readonly height: number;
|
|
48
48
|
readonly rotation: number;
|
|
49
49
|
constructor(x: number, y: number, width: number, height: number, rotation?: number);
|
|
50
|
-
|
|
50
|
+
getPath(x: number, y: number, ratio?: number): Path2D;
|
|
51
51
|
support(dir: IPoint): IPoint;
|
|
52
52
|
move(pos: IPoint): Oval;
|
|
53
53
|
}
|
|
@@ -56,4 +56,11 @@ export declare class Circle extends Oval {
|
|
|
56
56
|
constructor(x: number, y: number, radius: number, rotation?: number);
|
|
57
57
|
move(pos: IPoint): Circle;
|
|
58
58
|
}
|
|
59
|
+
export declare class ShapeGroup extends Shape {
|
|
60
|
+
readonly subShapes: ReadonlyArray<IShape>;
|
|
61
|
+
constructor(x: number, y: number, subShapes: ReadonlyArray<IShape>);
|
|
62
|
+
getPath(x: number, y: number, ratio?: number): Path2D;
|
|
63
|
+
support(): IPoint;
|
|
64
|
+
move(pos: IPoint): IShape;
|
|
65
|
+
}
|
|
59
66
|
export {};
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { GenericValue } from "./ngx-utils/utils/generic-value";
|
|
|
15
15
|
export { FileSystemEntryOpenResult, FileSystemEntryOpenCb, FileSystemEntry } from "./ngx-utils/utils/file-system";
|
|
16
16
|
export { ExclusionsRenderer } from "./ngx-utils/utils/canvas-renderers/exclusions-renderer";
|
|
17
17
|
export { RulerCanvasRenderer } from "./ngx-utils/utils/canvas-renderers/ruler-canvas.renderer";
|
|
18
|
-
export { dotProduct, tripleProduct, isPoint, ensurePoint, perpendicular, negatePt, normalizePt, addPts, distanceSq, distance, lerpPts, lengthOfPt, multiplyPts, dividePts, subPts, rotateDeg, rotateRad, toDegrees, toRadians, gjkDistance, gjkIntersection, Point, Rect, Oval, Circle } from "./ngx-utils/utils/geometry";
|
|
18
|
+
export { dotProduct, tripleProduct, isPoint, ensurePoint, perpendicular, negatePt, normalizePt, addPts, distanceSq, distance, lerpPts, lengthOfPt, multiplyPts, dividePts, subPts, rotateDeg, rotateRad, toDegrees, toRadians, gjkDistance, gjkIntersection, Point, Rect, Oval, Circle, ShapeGroup } from "./ngx-utils/utils/geometry";
|
|
19
19
|
export { Initializer } from "./ngx-utils/utils/initializer";
|
|
20
20
|
export { stringify } from "./ngx-utils/utils/json.utils";
|
|
21
21
|
export { ReflectUtils } from "./ngx-utils/utils/reflect.utils";
|