dgeoutils 2.3.2 → 2.3.3
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/dist/cjs/DPolygon.js +1 -1
- package/dist/cjs/TraceMatrix.d.ts +1 -2
- package/dist/cjs/index.d.ts +1 -4
- package/dist/cjs/index.js +1 -3
- package/dist/cjs/utils.d.ts +3 -0
- package/dist/cjs/utils.js +6 -4
- package/dist/es2015/DPolygon.js +1 -1
- package/dist/es2015/index.js +1 -4
- package/dist/es2015/utils.js +3 -1
- package/dist/esm/DPolygon.js +1 -1
- package/dist/esm/index.js +1 -4
- package/dist/esm/utils.js +3 -1
- package/dist/umd/dgeoutils.js +5 -6
- package/dist/umd/dgeoutils.min.js +1 -1
- package/dist/umd/dgeoutils.min.js.map +1 -1
- package/package.json +4 -4
package/dist/cjs/DPolygon.js
CHANGED
|
@@ -1299,7 +1299,7 @@ var DPolygon = (function () {
|
|
|
1299
1299
|
var toPoint = Math.max(Math.min(start0, start1), Math.min(end0, end1));
|
|
1300
1300
|
var linePart = new DPolygon(buffer.removePart(fromPoint - 1, toPoint - fromPoint + 1));
|
|
1301
1301
|
buffer.unshift(buffer.pop());
|
|
1302
|
-
return [linePart, buffer];
|
|
1302
|
+
return [linePart.reverse(), buffer];
|
|
1303
1303
|
};
|
|
1304
1304
|
DPolygon.prototype.bezier = function (step) {
|
|
1305
1305
|
if (step === void 0) { step = 0.1; }
|
|
@@ -4,7 +4,7 @@ export declare enum TraceMatrixValues {
|
|
|
4
4
|
f = 0,
|
|
5
5
|
t = 1
|
|
6
6
|
}
|
|
7
|
-
declare type SimpleMatrix = TraceMatrixValues[][];
|
|
7
|
+
export declare type SimpleMatrix = TraceMatrixValues[][];
|
|
8
8
|
export declare class TraceMatrix {
|
|
9
9
|
private readonly size;
|
|
10
10
|
private readonly m;
|
|
@@ -19,4 +19,3 @@ export declare class TraceMatrix {
|
|
|
19
19
|
private createHoleMatrix;
|
|
20
20
|
static createMatrix(size: DPoint, f?: (pos: DPoint) => TraceMatrixValues): SimpleMatrix;
|
|
21
21
|
}
|
|
22
|
-
export {};
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -7,7 +7,4 @@ export * from './FastSearch';
|
|
|
7
7
|
export * from './TraceMatrix';
|
|
8
8
|
export * from './DPolygonLoop';
|
|
9
9
|
export * from './DPlane';
|
|
10
|
-
export { gaussianElimination, createCanvas, createArray, createMatrix, isDefAndNotNull } from './utils';
|
|
11
|
-
export declare const DGeo: {
|
|
12
|
-
DEBUG: boolean;
|
|
13
|
-
};
|
|
10
|
+
export { gaussianElimination, createCanvas, createArray, createMatrix, isDefAndNotNull, DGeo } from './utils';
|
package/dist/cjs/index.js
CHANGED
|
@@ -26,6 +26,4 @@ Object.defineProperty(exports, "createCanvas", { enumerable: true, get: function
|
|
|
26
26
|
Object.defineProperty(exports, "createArray", { enumerable: true, get: function () { return utils_1.createArray; } });
|
|
27
27
|
Object.defineProperty(exports, "createMatrix", { enumerable: true, get: function () { return utils_1.createMatrix; } });
|
|
28
28
|
Object.defineProperty(exports, "isDefAndNotNull", { enumerable: true, get: function () { return utils_1.isDefAndNotNull; } });
|
|
29
|
-
exports.DGeo
|
|
30
|
-
DEBUG: false
|
|
31
|
-
};
|
|
29
|
+
Object.defineProperty(exports, "DGeo", { enumerable: true, get: function () { return utils_1.DGeo; } });
|
package/dist/cjs/utils.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/// <reference types="offscreencanvas" />
|
|
2
2
|
import { DPoint } from './DPoint';
|
|
3
|
+
export declare const DGeo: {
|
|
4
|
+
DEBUG: boolean;
|
|
5
|
+
};
|
|
3
6
|
export declare const warn: (...args: any[]) => void;
|
|
4
7
|
export declare const isDefAndNotNull: (a: any) => boolean;
|
|
5
8
|
declare type CheckFunc = (p: DPoint) => CheckFunction;
|
package/dist/cjs/utils.js
CHANGED
|
@@ -25,15 +25,17 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
25
25
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.createCanvas = exports.gaussianElimination = exports.createMatrix = exports.createArray = exports.checkFunction = exports.isDefAndNotNull = exports.warn = void 0;
|
|
29
|
-
var index_1 = require("./index");
|
|
28
|
+
exports.createCanvas = exports.gaussianElimination = exports.createMatrix = exports.createArray = exports.checkFunction = exports.isDefAndNotNull = exports.warn = exports.DGeo = void 0;
|
|
30
29
|
var DPoint_1 = require("./DPoint");
|
|
30
|
+
exports.DGeo = {
|
|
31
|
+
DEBUG: false
|
|
32
|
+
};
|
|
31
33
|
var warn = function () {
|
|
32
34
|
var args = [];
|
|
33
35
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
34
36
|
args[_i] = arguments[_i];
|
|
35
37
|
}
|
|
36
|
-
if (
|
|
38
|
+
if (exports.DGeo.DEBUG) {
|
|
37
39
|
console.warn.apply(console, __spreadArray([], __read(args), false));
|
|
38
40
|
}
|
|
39
41
|
};
|
|
@@ -81,7 +83,7 @@ var shouldBeMeters = function (scope, funcName, argName) { return function (p) {
|
|
|
81
83
|
}; };
|
|
82
84
|
var checkFunction = function (funcName) { return ({
|
|
83
85
|
checkArgument: function (argName) {
|
|
84
|
-
if (!
|
|
86
|
+
if (!exports.DGeo.DEBUG) {
|
|
85
87
|
return {
|
|
86
88
|
shouldBeDegree: hook(this),
|
|
87
89
|
shouldBeMeters: hook(this),
|
package/dist/es2015/DPolygon.js
CHANGED
|
@@ -864,7 +864,7 @@ export class DPolygon {
|
|
|
864
864
|
const toPoint = Math.max(Math.min(start0, start1), Math.min(end0, end1));
|
|
865
865
|
const linePart = new DPolygon(buffer.removePart(fromPoint - 1, toPoint - fromPoint + 1));
|
|
866
866
|
buffer.unshift(buffer.pop());
|
|
867
|
-
return [linePart, buffer];
|
|
867
|
+
return [linePart.reverse(), buffer];
|
|
868
868
|
}
|
|
869
869
|
bezier(step = 0.1) {
|
|
870
870
|
const res = new DPolygon();
|
package/dist/es2015/index.js
CHANGED
|
@@ -7,7 +7,4 @@ export * from './FastSearch';
|
|
|
7
7
|
export * from './TraceMatrix';
|
|
8
8
|
export * from './DPolygonLoop';
|
|
9
9
|
export * from './DPlane';
|
|
10
|
-
export { gaussianElimination, createCanvas, createArray, createMatrix, isDefAndNotNull } from './utils';
|
|
11
|
-
export const DGeo = {
|
|
12
|
-
DEBUG: false
|
|
13
|
-
};
|
|
10
|
+
export { gaussianElimination, createCanvas, createArray, createMatrix, isDefAndNotNull, DGeo } from './utils';
|
package/dist/es2015/utils.js
CHANGED
package/dist/esm/DPolygon.js
CHANGED
|
@@ -1296,7 +1296,7 @@ var DPolygon = (function () {
|
|
|
1296
1296
|
var toPoint = Math.max(Math.min(start0, start1), Math.min(end0, end1));
|
|
1297
1297
|
var linePart = new DPolygon(buffer.removePart(fromPoint - 1, toPoint - fromPoint + 1));
|
|
1298
1298
|
buffer.unshift(buffer.pop());
|
|
1299
|
-
return [linePart, buffer];
|
|
1299
|
+
return [linePart.reverse(), buffer];
|
|
1300
1300
|
};
|
|
1301
1301
|
DPolygon.prototype.bezier = function (step) {
|
|
1302
1302
|
if (step === void 0) { step = 0.1; }
|
package/dist/esm/index.js
CHANGED
|
@@ -7,7 +7,4 @@ export * from './FastSearch';
|
|
|
7
7
|
export * from './TraceMatrix';
|
|
8
8
|
export * from './DPolygonLoop';
|
|
9
9
|
export * from './DPlane';
|
|
10
|
-
export { gaussianElimination, createCanvas, createArray, createMatrix, isDefAndNotNull } from './utils';
|
|
11
|
-
export var DGeo = {
|
|
12
|
-
DEBUG: false
|
|
13
|
-
};
|
|
10
|
+
export { gaussianElimination, createCanvas, createArray, createMatrix, isDefAndNotNull, DGeo } from './utils';
|
package/dist/esm/utils.js
CHANGED
|
@@ -23,8 +23,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
23
23
|
}
|
|
24
24
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
25
|
};
|
|
26
|
-
import { DGeo } from './index';
|
|
27
26
|
import { DPoint } from './DPoint';
|
|
27
|
+
export var DGeo = {
|
|
28
|
+
DEBUG: false
|
|
29
|
+
};
|
|
28
30
|
export var warn = function () {
|
|
29
31
|
var args = [];
|
|
30
32
|
for (var _i = 0; _i < arguments.length; _i++) {
|