@antv/g-math 1.0.0-alpha.5 → 1.0.0-alpha.9
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/es/cubic.js +2 -2
- package/lib/cubic.js +2 -2
- package/lib/index.js +8 -8
- package/lib/segments.js +2 -2
- package/lib/util.js +1 -1
- package/package.json +9 -5
package/es/cubic.js
CHANGED
|
@@ -76,9 +76,9 @@ function cubicLength(x1, y1, x2, y2, x3, y3, x4, y4, iterationCount) {
|
|
|
76
76
|
|
|
77
77
|
var cubics = divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, 0.5);
|
|
78
78
|
|
|
79
|
-
var left = __spreadArray(__spreadArray([], __read(cubics[0])), [iterationCount - 1]);
|
|
79
|
+
var left = __spreadArray(__spreadArray([], __read(cubics[0]), false), [iterationCount - 1], false);
|
|
80
80
|
|
|
81
|
-
var right = __spreadArray(__spreadArray([], __read(cubics[1])), [iterationCount - 1]);
|
|
81
|
+
var right = __spreadArray(__spreadArray([], __read(cubics[1]), false), [iterationCount - 1], false);
|
|
82
82
|
|
|
83
83
|
return cubicLength.apply(null, left) + cubicLength.apply(null, right);
|
|
84
84
|
}
|
package/lib/cubic.js
CHANGED
|
@@ -92,8 +92,8 @@ function cubicLength(x1, y1, x2, y2, x3, y3, x4, y4, iterationCount) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
var cubics = divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, 0.5);
|
|
95
|
-
var left = (0, _tslib.__spreadArray)((0, _tslib.__spreadArray)([], (0, _tslib.__read)(cubics[0])), [iterationCount - 1]);
|
|
96
|
-
var right = (0, _tslib.__spreadArray)((0, _tslib.__spreadArray)([], (0, _tslib.__read)(cubics[1])), [iterationCount - 1]);
|
|
95
|
+
var left = (0, _tslib.__spreadArray)((0, _tslib.__spreadArray)([], (0, _tslib.__read)(cubics[0]), false), [iterationCount - 1], false);
|
|
96
|
+
var right = (0, _tslib.__spreadArray)((0, _tslib.__spreadArray)([], (0, _tslib.__read)(cubics[1]), false), [iterationCount - 1], false);
|
|
97
97
|
return cubicLength.apply(null, left) + cubicLength.apply(null, right);
|
|
98
98
|
}
|
|
99
99
|
|
package/lib/index.js
CHANGED
|
@@ -5,10 +5,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
Object.defineProperty(exports, "
|
|
8
|
+
Object.defineProperty(exports, "Arc", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function get() {
|
|
11
|
-
return
|
|
11
|
+
return _arc.default;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "Cubic", {
|
|
@@ -17,12 +17,6 @@ Object.defineProperty(exports, "Cubic", {
|
|
|
17
17
|
return _cubic.default;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
Object.defineProperty(exports, "Arc", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function get() {
|
|
23
|
-
return _arc.default;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
20
|
Object.defineProperty(exports, "Line", {
|
|
27
21
|
enumerable: true,
|
|
28
22
|
get: function get() {
|
|
@@ -41,6 +35,12 @@ Object.defineProperty(exports, "Polyline", {
|
|
|
41
35
|
return _polyline.default;
|
|
42
36
|
}
|
|
43
37
|
});
|
|
38
|
+
Object.defineProperty(exports, "Quad", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _quadratic.default;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
44
|
exports.Util = void 0;
|
|
45
45
|
|
|
46
46
|
var _quadratic = _interopRequireDefault(require("./quadratic"));
|
package/lib/segments.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.lengthOfSegment = lengthOfSegment;
|
|
7
|
-
exports.pointAtSegments = pointAtSegments;
|
|
8
6
|
exports.angleAtSegments = angleAtSegments;
|
|
9
7
|
exports.distanceAtSegment = distanceAtSegment;
|
|
8
|
+
exports.lengthOfSegment = lengthOfSegment;
|
|
9
|
+
exports.pointAtSegments = pointAtSegments;
|
|
10
10
|
|
|
11
11
|
var _line = _interopRequireDefault(require("./line"));
|
|
12
12
|
|
package/lib/util.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.distance = distance;
|
|
7
|
-
exports.isNumberEqual = isNumberEqual;
|
|
8
7
|
exports.getBBoxByArray = getBBoxByArray;
|
|
9
8
|
exports.getBBoxRange = getBBoxRange;
|
|
9
|
+
exports.isNumberEqual = isNumberEqual;
|
|
10
10
|
exports.piMod = piMod;
|
|
11
11
|
|
|
12
12
|
var _util = require("@antv/util");
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g-math",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.9",
|
|
4
4
|
"description": "Geometry util",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
|
-
"module": "es/index.js",
|
|
7
|
-
"types": "
|
|
6
|
+
"module": "es/index.esm.js",
|
|
7
|
+
"types": "es/index.d.ts",
|
|
8
|
+
"unpkg": "dist/index.umd.js",
|
|
8
9
|
"files": [
|
|
9
10
|
"package.json",
|
|
11
|
+
"dist",
|
|
10
12
|
"es",
|
|
11
13
|
"lib",
|
|
12
|
-
"dist",
|
|
13
14
|
"LICENSE",
|
|
14
15
|
"README.md"
|
|
15
16
|
],
|
|
@@ -30,6 +31,9 @@
|
|
|
30
31
|
"bugs": {
|
|
31
32
|
"url": "https://github.com/antvis/g/issues"
|
|
32
33
|
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@babel/runtime": "^7.16.0"
|
|
36
|
+
},
|
|
33
37
|
"devDependencies": {
|
|
34
38
|
"@types/jest": "^25.0.0",
|
|
35
39
|
"npm-run-all": "^4.1.5",
|
|
@@ -37,5 +41,5 @@
|
|
|
37
41
|
"webpack-cli": "^3.3.7"
|
|
38
42
|
},
|
|
39
43
|
"homepage": "https://github.com/antvis/g#readme",
|
|
40
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "97b0cd921c395a28d0432b33db157723b7967db1"
|
|
41
45
|
}
|