@xort/cga 0.0.76 → 0.0.79

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.
Files changed (215) hide show
  1. package/dist/app.js +4 -1
  2. package/dist/math/Color.d.ts +7 -9
  3. package/dist/math/Color.js +54 -56
  4. package/package.json +2 -1
  5. package/src/app.ts +4 -1
  6. package/src/index.ts +1 -0
  7. package/src/math/Color.ts +60 -36
  8. package/dist/src/IKanimation/Bone.d.ts +0 -9
  9. package/dist/src/IKanimation/Bone.js +0 -40
  10. package/dist/src/IKanimation/CCDSolver.d.ts +0 -37
  11. package/dist/src/IKanimation/CCDSolver.js +0 -93
  12. package/dist/src/IKanimation/Joint.d.ts +0 -3
  13. package/dist/src/IKanimation/Joint.js +0 -17
  14. package/dist/src/IKanimation/constaint/constraint.d.ts +0 -10
  15. package/dist/src/IKanimation/constaint/constraint.js +0 -25
  16. package/dist/src/IKanimation/constaint/hinge.d.ts +0 -12
  17. package/dist/src/IKanimation/constaint/hinge.js +0 -46
  18. package/dist/src/IKanimation/constaint/slider.d.ts +0 -12
  19. package/dist/src/IKanimation/constaint/slider.js +0 -44
  20. package/dist/src/IKanimation/index.d.ts +0 -0
  21. package/dist/src/IKanimation/index.js +0 -9
  22. package/dist/src/IKanimation/isolver.d.ts +0 -4
  23. package/dist/src/IKanimation/isolver.js +0 -10
  24. package/dist/src/IKanimation/skeleton.d.ts +0 -13
  25. package/dist/src/IKanimation/skeleton.js +0 -31
  26. package/dist/src/alg/common.d.ts +0 -114
  27. package/dist/src/alg/common.js +0 -302
  28. package/dist/src/alg/curve.d.ts +0 -4
  29. package/dist/src/alg/curve.js +0 -11
  30. package/dist/src/alg/delaunator.d.ts +0 -29
  31. package/dist/src/alg/delaunator.js +0 -442
  32. package/dist/src/alg/delaunay.d.ts +0 -20
  33. package/dist/src/alg/delaunay.js +0 -199
  34. package/dist/src/alg/delaunayslow.d.ts +0 -18
  35. package/dist/src/alg/delaunayslow.js +0 -140
  36. package/dist/src/alg/extrude/extrude.d.ts +0 -3
  37. package/dist/src/alg/extrude/extrude.js +0 -17
  38. package/dist/src/alg/extrude.d.ts +0 -199
  39. package/dist/src/alg/extrude.js +0 -731
  40. package/dist/src/alg/offset/index.d.ts +0 -0
  41. package/dist/src/alg/offset/index.js +0 -9
  42. package/dist/src/alg/offset.d.ts +0 -0
  43. package/dist/src/alg/offset.js +0 -472
  44. package/dist/src/alg/pointset.d.ts +0 -94
  45. package/dist/src/alg/pointset.js +0 -223
  46. package/dist/src/alg/recognition.d.ts +0 -14
  47. package/dist/src/alg/recognition.js +0 -37
  48. package/dist/src/alg/result.d.ts +0 -22
  49. package/dist/src/alg/result.js +0 -2
  50. package/dist/src/alg/segmentset.d.ts +0 -11
  51. package/dist/src/alg/segmentset.js +0 -45
  52. package/dist/src/alg/sort.d.ts +0 -2
  53. package/dist/src/alg/sort.js +0 -14
  54. package/dist/src/alg/split.d.ts +0 -8
  55. package/dist/src/alg/split.js +0 -10
  56. package/dist/src/alg/trianglution.d.ts +0 -20
  57. package/dist/src/alg/trianglution.js +0 -77
  58. package/dist/src/alg/vol.d.ts +0 -6
  59. package/dist/src/alg/vol.js +0 -18
  60. package/dist/src/alg/voronoi.d.ts +0 -31
  61. package/dist/src/alg/voronoi.js +0 -418
  62. package/dist/src/app.d.ts +0 -1
  63. package/dist/src/app.js +0 -245
  64. package/dist/src/basic/distance.d.ts +0 -12
  65. package/dist/src/basic/distance.js +0 -42
  66. package/dist/src/csg/bsp.d.ts +0 -9
  67. package/dist/src/csg/bsp.js +0 -22
  68. package/dist/src/csg/node.d.ts +0 -12
  69. package/dist/src/csg/node.js +0 -75
  70. package/dist/src/csg/polygon.d.ts +0 -43
  71. package/dist/src/csg/polygon.js +0 -161
  72. package/dist/src/diamondMaterialShader.d.ts +0 -92
  73. package/dist/src/diamondMaterialShader.js +0 -118
  74. package/dist/src/effect/breath-light.d.ts +0 -4
  75. package/dist/src/effect/breath-light.js +0 -39
  76. package/dist/src/extends/geometryaid.d.ts +0 -28
  77. package/dist/src/extends/geometryaid.js +0 -80
  78. package/dist/src/extends/split.d.ts +0 -3
  79. package/dist/src/extends/split.js +0 -13
  80. package/dist/src/glview.d.ts +0 -112
  81. package/dist/src/glview.js +0 -564
  82. package/dist/src/index.d.ts +0 -36
  83. package/dist/src/index.js +0 -54
  84. package/dist/src/math/Euler.d.ts +0 -47
  85. package/dist/src/math/Euler.js +0 -245
  86. package/dist/src/math/HVec3.d.ts +0 -44
  87. package/dist/src/math/HVec3.js +0 -195
  88. package/dist/src/math/Mat3.d.ts +0 -29
  89. package/dist/src/math/Mat3.js +0 -244
  90. package/dist/src/math/Mat4.d.ts +0 -85
  91. package/dist/src/math/Mat4.js +0 -791
  92. package/dist/src/math/Math.d.ts +0 -130
  93. package/dist/src/math/Math.js +0 -198
  94. package/dist/src/math/Quat.d.ts +0 -83
  95. package/dist/src/math/Quat.js +0 -440
  96. package/dist/src/math/Vec.d.ts +0 -7
  97. package/dist/src/math/Vec.js +0 -43
  98. package/dist/src/math/Vec2.d.ts +0 -68
  99. package/dist/src/math/Vec2.js +0 -347
  100. package/dist/src/math/Vec3.d.ts +0 -232
  101. package/dist/src/math/Vec3.js +0 -1089
  102. package/dist/src/math/Vec4.d.ts +0 -81
  103. package/dist/src/math/Vec4.js +0 -494
  104. package/dist/src/math/vector.d.ts +0 -114
  105. package/dist/src/math/vector.js +0 -373
  106. package/dist/src/render/buffer-attribute.d.ts +0 -100
  107. package/dist/src/render/buffer-attribute.js +0 -340
  108. package/dist/src/render/eventhandler.d.ts +0 -78
  109. package/dist/src/render/eventhandler.js +0 -189
  110. package/dist/src/render/geometry.d.ts +0 -89
  111. package/dist/src/render/geometry.js +0 -775
  112. package/dist/src/render/mesh.d.ts +0 -25
  113. package/dist/src/render/mesh.js +0 -82
  114. package/dist/src/render/thing.d.ts +0 -34
  115. package/dist/src/render/thing.js +0 -196
  116. package/dist/src/render/types.d.ts +0 -2
  117. package/dist/src/render/types.js +0 -8
  118. package/dist/src/robust/plane.d.ts +0 -7
  119. package/dist/src/robust/plane.js +0 -17
  120. package/dist/src/robust/vec.d.ts +0 -15
  121. package/dist/src/robust/vec.js +0 -71
  122. package/dist/src/shape/arc.d.ts +0 -2
  123. package/dist/src/shape/arc.js +0 -14
  124. package/dist/src/struct/3d/Box.d.ts +0 -23
  125. package/dist/src/struct/3d/Box.js +0 -109
  126. package/dist/src/struct/3d/Capsule.d.ts +0 -12
  127. package/dist/src/struct/3d/Capsule.js +0 -36
  128. package/dist/src/struct/3d/Circle.d.ts +0 -34
  129. package/dist/src/struct/3d/Circle.js +0 -80
  130. package/dist/src/struct/3d/Disk.d.ts +0 -10
  131. package/dist/src/struct/3d/Disk.js +0 -22
  132. package/dist/src/struct/3d/Frustum.d.ts +0 -35
  133. package/dist/src/struct/3d/Frustum.js +0 -159
  134. package/dist/src/struct/3d/Line.d.ts +0 -40
  135. package/dist/src/struct/3d/Line.js +0 -339
  136. package/dist/src/struct/3d/Path.d.ts +0 -75
  137. package/dist/src/struct/3d/Path.js +0 -308
  138. package/dist/src/struct/3d/Plane.d.ts +0 -74
  139. package/dist/src/struct/3d/Plane.js +0 -295
  140. package/dist/src/struct/3d/Point.d.ts +0 -4
  141. package/dist/src/struct/3d/Point.js +0 -30
  142. package/dist/src/struct/3d/Polygon.d.ts +0 -8
  143. package/dist/src/struct/3d/Polygon.js +0 -55
  144. package/dist/src/struct/3d/Polyline.d.ts +0 -25
  145. package/dist/src/struct/3d/Polyline.js +0 -109
  146. package/dist/src/struct/3d/Ray.d.ts +0 -21
  147. package/dist/src/struct/3d/Ray.js +0 -262
  148. package/dist/src/struct/3d/Rectangle.d.ts +0 -7
  149. package/dist/src/struct/3d/Rectangle.js +0 -35
  150. package/dist/src/struct/3d/Segment.d.ts +0 -32
  151. package/dist/src/struct/3d/Segment.js +0 -334
  152. package/dist/src/struct/3d/Shape.d.ts +0 -4
  153. package/dist/src/struct/3d/Shape.js +0 -27
  154. package/dist/src/struct/3d/Sphere.d.ts +0 -11
  155. package/dist/src/struct/3d/Sphere.js +0 -30
  156. package/dist/src/struct/3d/Triangle.d.ts +0 -8
  157. package/dist/src/struct/3d/Triangle.js +0 -53
  158. package/dist/src/struct/data/ArrayList.d.ts +0 -42
  159. package/dist/src/struct/data/ArrayList.js +0 -172
  160. package/dist/src/struct/data/ArrayObject.d.ts +0 -30
  161. package/dist/src/struct/data/ArrayObject.js +0 -131
  162. package/dist/src/struct/data/type.d.ts +0 -13
  163. package/dist/src/struct/data/type.js +0 -18
  164. package/dist/src/utils/array.d.ts +0 -24
  165. package/dist/src/utils/array.js +0 -89
  166. package/dist/src/utils/types.d.ts +0 -24
  167. package/dist/src/utils/types.js +0 -20
  168. package/dist/src-gis/app.d.ts +0 -1
  169. package/dist/src-gis/app.js +0 -4
  170. package/dist/src-gis/core/Cartographic.d.ts +0 -20
  171. package/dist/src-gis/core/Cartographic.js +0 -52
  172. package/dist/src-gis/core/EllipsoidGeodesic.d.ts +0 -14
  173. package/dist/src-gis/core/EllipsoidGeodesic.js +0 -51
  174. package/dist/src-gis/core/EllipsoidTerrainProvider.d.ts +0 -10
  175. package/dist/src-gis/core/EllipsoidTerrainProvider.js +0 -29
  176. package/dist/src-gis/core/HeightmapTerrainData.d.ts +0 -3
  177. package/dist/src-gis/core/HeightmapTerrainData.js +0 -9
  178. package/dist/src-gis/core/Rectangle.d.ts +0 -45
  179. package/dist/src-gis/core/Rectangle.js +0 -127
  180. package/dist/src-gis/core/TaskProcessor.d.ts +0 -35
  181. package/dist/src-gis/core/TaskProcessor.js +0 -183
  182. package/dist/src-gis/gis.d.ts +0 -5
  183. package/dist/src-gis/gis.js +0 -12
  184. package/dist/src-gis/globe.d.ts +0 -12
  185. package/dist/src-gis/globe.js +0 -61
  186. package/dist/src-gis/math/Cartographic.d.ts +0 -8
  187. package/dist/src-gis/math/Cartographic.js +0 -26
  188. package/dist/src-gis/math/GVec3.d.ts +0 -12
  189. package/dist/src-gis/math/GVec3.js +0 -69
  190. package/dist/src-gis/math/ellipsoid.d.ts +0 -8
  191. package/dist/src-gis/math/ellipsoid.js +0 -14
  192. package/dist/src-gis/provider/DcTerrainProvider.d.ts +0 -15
  193. package/dist/src-gis/provider/DcTerrainProvider.js +0 -19
  194. package/dist/src-gis/provider/TerrainProvider.d.ts +0 -3
  195. package/dist/src-gis/provider/TerrainProvider.js +0 -17
  196. package/dist/src-gis/scene/DcImageryProvider.d.ts +0 -6
  197. package/dist/src-gis/scene/DcImageryProvider.js +0 -35
  198. package/dist/src-gis/scene/GeographicTilingScheme.d.ts +0 -21
  199. package/dist/src-gis/scene/GeographicTilingScheme.js +0 -46
  200. package/dist/src-gis/scene/Globe.d.ts +0 -34
  201. package/dist/src-gis/scene/Globe.js +0 -62
  202. package/dist/src-gis/scene/GlobeSurfaceShaderSet.d.ts +0 -6
  203. package/dist/src-gis/scene/GlobeSurfaceShaderSet.js +0 -11
  204. package/dist/src-gis/scene/GlobeSurfaceTileProvider.d.ts +0 -21
  205. package/dist/src-gis/scene/GlobeSurfaceTileProvider.js +0 -15
  206. package/dist/src-gis/scene/ImageryLayerCollection.d.ts +0 -21
  207. package/dist/src-gis/scene/ImageryLayerCollection.js +0 -87
  208. package/dist/src-gis/scene/ImageryProvider.d.ts +0 -4
  209. package/dist/src-gis/scene/ImageryProvider.js +0 -28
  210. package/dist/src-gis/scene/QuadtreeTile.d.ts +0 -48
  211. package/dist/src-gis/scene/QuadtreeTile.js +0 -137
  212. package/dist/src-gis/scene/UrlTemplateImageryProvider.d.ts +0 -9
  213. package/dist/src-gis/scene/UrlTemplateImageryProvider.js +0 -29
  214. package/dist/src-gis/scene/quadtree_primitive.d.ts +0 -14
  215. package/dist/src-gis/scene/quadtree_primitive.js +0 -50
@@ -1,30 +0,0 @@
1
- export declare class ArrayObject extends Array {
2
- constructor(...args: any);
3
- get last(): any;
4
- get first(): any;
5
- get(index: number): any;
6
- /**
7
- * 深度优先遍历
8
- * @param {*} method
9
- */
10
- forall(method: (arg0: any) => void): void;
11
- /**
12
- *
13
- */
14
- clone(): ArrayObject;
15
- /**
16
- * 分类
17
- * example:
18
- * var arry = [1,2,3,4,5,6]
19
- * var result = classify(this,(a)={return a%2===0})
20
- *
21
- * @param {Function} classifyMethod 分类方法
22
- */
23
- classify(classifyMethod: (arg0: any, arg1: any, arg2: any[]) => any): any[][];
24
- /**
25
- * 去掉重复元素
26
- * @param {Function} uniqueMethod 去重复
27
- * @param {Function} sortMethod 排序
28
- */
29
- unique(uniqueMethod: (arg0: any, arg1: any) => boolean, sortMethod: ((a: any, b: any) => number) | undefined): this;
30
- }
@@ -1,131 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ArrayObject = void 0;
19
- var ArrayObject = /** @class */ (function (_super) {
20
- __extends(ArrayObject, _super);
21
- function ArrayObject() {
22
- var args = [];
23
- for (var _i = 0; _i < arguments.length; _i++) {
24
- args[_i] = arguments[_i];
25
- }
26
- var _this = _super.apply(this, args) || this;
27
- Object.setPrototypeOf(_this, ArrayObject.prototype);
28
- return _this;
29
- }
30
- Object.defineProperty(ArrayObject.prototype, "last", {
31
- get: function () {
32
- return this.get(-1);
33
- },
34
- enumerable: false,
35
- configurable: true
36
- });
37
- Object.defineProperty(ArrayObject.prototype, "first", {
38
- get: function () {
39
- return this[0];
40
- },
41
- enumerable: false,
42
- configurable: true
43
- });
44
- ArrayObject.prototype.get = function (index) {
45
- if (index < 0)
46
- index = this.length + index;
47
- return this[index];
48
- };
49
- /**
50
- * 深度优先遍历
51
- * @param {*} method
52
- */
53
- ArrayObject.prototype.forall = function (method) {
54
- for (var i = 0; i < this.length; i++) {
55
- method(this[i]);
56
- if (this[i] instanceof Array)
57
- this[i].forall(method);
58
- }
59
- };
60
- /**
61
- *
62
- */
63
- ArrayObject.prototype.clone = function () {
64
- var result = new ArrayObject();
65
- for (var i = 0; i < this.length; i++) {
66
- var ele = this[i];
67
- if (ele instanceof Number || ele instanceof String)
68
- result[i] = ele;
69
- else if (ele.clone) {
70
- result[i] = ele.clone();
71
- }
72
- else
73
- throw ("数组有元素不能clone");
74
- }
75
- return result;
76
- };
77
- /**
78
- * 分类
79
- * example:
80
- * var arry = [1,2,3,4,5,6]
81
- * var result = classify(this,(a)={return a%2===0})
82
- *
83
- * @param {Function} classifyMethod 分类方法
84
- */
85
- ArrayObject.prototype.classify = function (classifyMethod) {
86
- var result = [];
87
- for (var i = 0; i < this.length; i++) {
88
- for (var j = 0; j < result.length; j++) {
89
- if (classifyMethod(this[i], result[j][0], result[j])) {
90
- result[j].push(this[i]);
91
- }
92
- else {
93
- result.push([this[i]]);
94
- }
95
- }
96
- }
97
- return result;
98
- };
99
- /**
100
- * 去掉重复元素
101
- * @param {Function} uniqueMethod 去重复
102
- * @param {Function} sortMethod 排序
103
- */
104
- ArrayObject.prototype.unique = function (uniqueMethod, sortMethod) {
105
- if (sortMethod) {
106
- this.sort(sortMethod);
107
- for (var i = 0; i < this.length; i++) {
108
- for (var j = i + 1; j < this.length; j++) {
109
- if (uniqueMethod(this[i], this[j]) === true) {
110
- this.splice(j, 1);
111
- j--;
112
- }
113
- else
114
- break;
115
- }
116
- }
117
- return this;
118
- }
119
- for (var i = 0; i < this.length; i++) {
120
- for (var j = i + 1; j < this.length; j++) {
121
- if (uniqueMethod(this[i], this[j]) === true) {
122
- this.splice(j, 1);
123
- j--;
124
- }
125
- }
126
- }
127
- return this;
128
- };
129
- return ArrayObject;
130
- }(Array));
131
- exports.ArrayObject = ArrayObject;
@@ -1,13 +0,0 @@
1
- export declare enum IntersectType {
2
- None = 0,
3
- Parallel = 1,
4
- Perpendicular = 2,
5
- Collineation = 3
6
- }
7
- export declare enum Orientation {
8
- None = -1,
9
- Positive = 1,
10
- Negative = 2,
11
- Common = 3,
12
- Intersect = 3
13
- }
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Orientation = exports.IntersectType = void 0;
4
- var IntersectType;
5
- (function (IntersectType) {
6
- IntersectType[IntersectType["None"] = 0] = "None";
7
- IntersectType[IntersectType["Parallel"] = 1] = "Parallel";
8
- IntersectType[IntersectType["Perpendicular"] = 2] = "Perpendicular";
9
- IntersectType[IntersectType["Collineation"] = 3] = "Collineation";
10
- })(IntersectType = exports.IntersectType || (exports.IntersectType = {}));
11
- var Orientation;
12
- (function (Orientation) {
13
- Orientation[Orientation["None"] = -1] = "None";
14
- Orientation[Orientation["Positive"] = 1] = "Positive";
15
- Orientation[Orientation["Negative"] = 2] = "Negative";
16
- Orientation[Orientation["Common"] = 3] = "Common";
17
- Orientation[Orientation["Intersect"] = 3] = "Intersect";
18
- })(Orientation = exports.Orientation || (exports.Orientation = {}));
@@ -1,24 +0,0 @@
1
- /**
2
- * 遍历多级数组中所有对象
3
- * @param {Array} array
4
- * @param {Function} method
5
- */
6
- export declare function forall(array: Array<any>, method: (arg0: any, index?: number, that?: Array<any>) => void): void;
7
- export declare function flat(array: any[]): any[];
8
- /**
9
- * 分类
10
- * example:
11
- * var arry = [1,2,3,4,5,6]
12
- * var result = classify(array,(a)={return a%2===0})
13
- *
14
- * @param {Array} array
15
- * @param {Function} classifyMethod 分类方法
16
- */
17
- export declare function classify(array: Array<any>, classifyMethod: (arg0: any, arg1: any, arg2: any[]) => any): any;
18
- /**
19
- * 去掉重复元素
20
- * @param {Array} array
21
- * @param {Function} uniqueMethod 去重复
22
- * @param {Function} sortMethod 排序 存在就先排序再去重复
23
- */
24
- export declare function unique(array: any[], uniqueMethod: (arg0: any, arg1: any) => boolean, sortMethod?: (a: any, b: any) => number): any[];
@@ -1,89 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unique = exports.classify = exports.flat = exports.forall = void 0;
4
- Array.prototype.get = function (index) {
5
- if (index < 0)
6
- index = this.length + index;
7
- return this[index];
8
- };
9
- Array.prototype.last = function () {
10
- return this.get(-1);
11
- };
12
- /**
13
- * 遍历多级数组中所有对象
14
- * @param {Array} array
15
- * @param {Function} method
16
- */
17
- function forall(array, method) {
18
- for (var i = 0; i < array.length; i++) {
19
- var ele = array[i];
20
- method(ele, i, array);
21
- if (Array.isArray(ele))
22
- forall(ele, method);
23
- }
24
- }
25
- exports.forall = forall;
26
- function flat(array) {
27
- if (array.flat)
28
- return array.flat(Infinity);
29
- return array.reduce(function (pre, cur) {
30
- return pre.concat(Array.isArray(cur) ? flat(cur) : cur);
31
- });
32
- }
33
- exports.flat = flat;
34
- /**
35
- * 分类
36
- * example:
37
- * var arry = [1,2,3,4,5,6]
38
- * var result = classify(array,(a)={return a%2===0})
39
- *
40
- * @param {Array} array
41
- * @param {Function} classifyMethod 分类方法
42
- */
43
- function classify(array, classifyMethod) {
44
- var result = [];
45
- for (var i = 0; i < array.length; i++) {
46
- for (var j = 0; j < result.length; j++) {
47
- if (classifyMethod(array[i], result[j][0], result[j])) {
48
- result[j].push(array[i]);
49
- }
50
- else {
51
- result.push([array[i]]);
52
- }
53
- }
54
- }
55
- return result;
56
- }
57
- exports.classify = classify;
58
- /**
59
- * 去掉重复元素
60
- * @param {Array} array
61
- * @param {Function} uniqueMethod 去重复
62
- * @param {Function} sortMethod 排序 存在就先排序再去重复
63
- */
64
- function unique(array, uniqueMethod, sortMethod) {
65
- if (sortMethod) {
66
- array.sort(sortMethod);
67
- for (var i = 0; i < array.length; i++) {
68
- for (var j = i + 1; j < array.length; j++) {
69
- if (uniqueMethod(array[i], array[j]) === true) {
70
- array.splice(j, 1);
71
- j--;
72
- }
73
- else
74
- break;
75
- }
76
- }
77
- return array;
78
- }
79
- for (var i = 0; i < array.length; i++) {
80
- for (var j = i + 1; j < array.length; j++) {
81
- if (uniqueMethod(array[i], array[j]) === true) {
82
- array.splice(j, 1);
83
- j--;
84
- }
85
- }
86
- }
87
- return array;
88
- }
89
- exports.unique = unique;
@@ -1,24 +0,0 @@
1
- /**
2
- * Defines a string dictionary.
3
- */
4
- export interface IStringDictionary<T> {
5
- [index: string]: T;
6
- }
7
- /**
8
- * Defines a number dictionary.
9
- */
10
- export interface INumberDictionary<T> {
11
- [index: number]: T;
12
- }
13
- /**
14
- * Defines a member that can have a value or be null.
15
- */
16
- export declare type Nullable<T> = null | T;
17
- /**
18
- * Defines a member that can have a value or be undefined.
19
- */
20
- export declare type Undefinable<T> = undefined | T;
21
- export declare function isDefined(value: any): boolean;
22
- export declare function isUndefined(value: any): boolean;
23
- export declare function isFinite(value: any): boolean;
24
- export declare function isString(value: any): boolean;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isString = exports.isFinite = exports.isUndefined = exports.isDefined = void 0;
4
- function isDefined(value) {
5
- return value !== undefined && value !== null;
6
- }
7
- exports.isDefined = isDefined;
8
- //Method
9
- function isUndefined(value) {
10
- return value === undefined;
11
- }
12
- exports.isUndefined = isUndefined;
13
- function isFinite(value) {
14
- return typeof value == 'number' && globalThis.isFinite(value);
15
- }
16
- exports.isFinite = isFinite;
17
- function isString(value) {
18
- return typeof value == 'string';
19
- }
20
- exports.isString = isString;
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // const globe = new Globe({});
4
- // (globalThis as any).globe = globe;
@@ -1,20 +0,0 @@
1
- import { Vec3 } from "../../src/math/Vec3";
2
- export declare const wgs84OneOverRadii: Vec3;
3
- export declare const wgs84OneOverRadiiSquared: Vec3;
4
- /**
5
- * 地理坐标
6
- */
7
- export declare class Cartographic {
8
- longitude: number;
9
- latitude: number;
10
- height: number;
11
- /**
12
- * 单位都是弧度
13
- * @param longitude 经度
14
- * @param latitude 纬度
15
- * @param height 海拔
16
- */
17
- constructor(longitude?: number, latitude?: number, height?: number);
18
- static fromRadians(longitude?: number, latitude?: number, height?: number, result?: Cartographic): Cartographic;
19
- static fromDegrees(longitude?: number, latitude?: number, height?: number, result?: Cartographic): Cartographic;
20
- }
@@ -1,52 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Cartographic = exports.wgs84OneOverRadiiSquared = exports.wgs84OneOverRadii = void 0;
4
- var Math_1 = require("../../src/math/Math");
5
- var Vec3_1 = require("../../src/math/Vec3");
6
- exports.wgs84OneOverRadii = new Vec3_1.Vec3(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.3142451793);
7
- exports.wgs84OneOverRadiiSquared = new Vec3_1.Vec3(1.0 / (6378137.0 * 6378137.0), 1.0 / (6378137.0 * 6378137.0), 1.0 / (6356752.3142451793 * 6356752.3142451793));
8
- /**
9
- * 地理坐标
10
- */
11
- var Cartographic = /** @class */ (function () {
12
- /**
13
- * 单位都是弧度
14
- * @param longitude 经度
15
- * @param latitude 纬度
16
- * @param height 海拔
17
- */
18
- function Cartographic(longitude, latitude, height) {
19
- if (longitude === void 0) { longitude = 0.0; }
20
- if (latitude === void 0) { latitude = 0.0; }
21
- if (height === void 0) { height = 0.0; }
22
- this.longitude = longitude;
23
- this.latitude = latitude;
24
- this.height = height;
25
- }
26
- Cartographic.fromRadians = function (longitude, latitude, height, result) {
27
- if (longitude === void 0) { longitude = 0.0; }
28
- if (latitude === void 0) { latitude = 0.0; }
29
- if (height === void 0) { height = 0.0; }
30
- if (!result) {
31
- return new Cartographic(longitude, latitude, height);
32
- }
33
- result.longitude = longitude;
34
- result.latitude = latitude;
35
- result.height = height;
36
- return result;
37
- };
38
- Cartographic.fromDegrees = function (longitude, latitude, height, result) {
39
- if (longitude === void 0) { longitude = 0.0; }
40
- if (latitude === void 0) { latitude = 0.0; }
41
- if (height === void 0) { height = 0.0; }
42
- if (!result) {
43
- return new Cartographic(longitude, latitude, height);
44
- }
45
- result.longitude = (0, Math_1.toRadians)(longitude);
46
- result.latitude = (0, Math_1.toRadians)(latitude);
47
- result.height = height;
48
- return result;
49
- };
50
- return Cartographic;
51
- }());
52
- exports.Cartographic = Cartographic;
@@ -1,14 +0,0 @@
1
- import { Cartographic } from './Cartographic';
2
- /**
3
- * 椭圆测地线 计算测地距离
4
- */
5
- export declare class EllipsoidGeodesic {
6
- start: Cartographic;
7
- end: Cartographic;
8
- constructor(_ellipsoid: any);
9
- computeProperties(ellipsoid: {
10
- cartographicToCartesian: (arg0: any, arg1: any) => any;
11
- maximumRadius: any;
12
- minimumRadius: any;
13
- }): void;
14
- }
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EllipsoidGeodesic = void 0;
4
- var Cartographic_1 = require("./Cartographic");
5
- /**
6
- * 椭圆测地线 计算测地距离
7
- */
8
- var EllipsoidGeodesic = /** @class */ (function () {
9
- function EllipsoidGeodesic(_ellipsoid) {
10
- this.start = new Cartographic_1.Cartographic();
11
- this.end = new Cartographic_1.Cartographic();
12
- }
13
- EllipsoidGeodesic.prototype.computeProperties = function (ellipsoid) {
14
- // var firstCartesian = Cartesian3.normalize(
15
- // ellipsoid.cartographicToCartesian(start, scratchCart2),
16
- // scratchCart1
17
- // );
18
- // var lastCartesian = Cartesian3.normalize(
19
- // ellipsoid.cartographicToCartesian(end, scratchCart2),
20
- // scratchCart2
21
- // );
22
- // //>>includeStart('debug', pragmas.debug);
23
- // Check.typeOf.number.greaterThanOrEquals(
24
- // "value",
25
- // Math.abs(
26
- // Math.abs(Cartesian3.angleBetween(firstCartesian, lastCartesian)) - Math.PI
27
- // ),
28
- // 0.0125
29
- // );
30
- // //>>includeEnd('debug');
31
- // vincentyInverseFormula(
32
- // this,
33
- // ellipsoid.maximumRadius,
34
- // ellipsoid.minimumRadius,
35
- // start.longitude,
36
- // start.latitude,
37
- // end.longitude,
38
- // end.latitude
39
- // );
40
- // ellipsoidGeodesic._start = Cartographic.clone(
41
- // start,
42
- // ellipsoidGeodesic._start
43
- // );
44
- // ellipsoidGeodesic._end = Cartographic.clone(end, ellipsoidGeodesic._end);
45
- // ellipsoidGeodesic._start.height = 0;
46
- // ellipsoidGeodesic._end.height = 0;
47
- // setConstants(ellipsoidGeodesic);
48
- };
49
- return EllipsoidGeodesic;
50
- }());
51
- exports.EllipsoidGeodesic = EllipsoidGeodesic;
@@ -1,10 +0,0 @@
1
- import { HeightmapTerrainData } from "src-gis/core/HeightmapTerrainData";
2
- import { Ellipsoid } from "../math/ellipsoid";
3
- export interface IEllipsoidTerrainProviderOprion {
4
- ellipsoid?: Ellipsoid;
5
- }
6
- export declare class EllipsoidTerrainProvider {
7
- private _tilingScheme;
8
- constructor(options: IEllipsoidTerrainProviderOprion);
9
- requestTileGeometry(x: number, y: number, level: number, request: any): Promise<HeightmapTerrainData>;
10
- }
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EllipsoidTerrainProvider = void 0;
4
- var HeightmapTerrainData_1 = require("src-gis/core/HeightmapTerrainData");
5
- var ellipsoid_1 = require("../math/ellipsoid");
6
- var GeographicTilingScheme_1 = require("../scene/GeographicTilingScheme");
7
- var EllipsoidTerrainProvider = /** @class */ (function () {
8
- function EllipsoidTerrainProvider(options) {
9
- var _a;
10
- if (!this._tilingScheme) {
11
- this._tilingScheme = new GeographicTilingScheme_1.GeographicTilingScheme({
12
- ellipsoid: (_a = options.ellipsoid) !== null && _a !== void 0 ? _a : ellipsoid_1.Ellipsoid.WGS84,
13
- });
14
- }
15
- }
16
- EllipsoidTerrainProvider.prototype.requestTileGeometry = function (x, y, level, request) {
17
- var width = 16;
18
- var height = 16;
19
- return new Promise(function (resolve, reject) {
20
- resolve(new HeightmapTerrainData_1.HeightmapTerrainData({
21
- buffer: new Uint8Array(width * height),
22
- width: width,
23
- height: height,
24
- }));
25
- });
26
- };
27
- return EllipsoidTerrainProvider;
28
- }());
29
- exports.EllipsoidTerrainProvider = EllipsoidTerrainProvider;
@@ -1,3 +0,0 @@
1
- export declare class HeightmapTerrainData {
2
- constructor(options: any);
3
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HeightmapTerrainData = void 0;
4
- var HeightmapTerrainData = /** @class */ (function () {
5
- function HeightmapTerrainData(options) {
6
- }
7
- return HeightmapTerrainData;
8
- }());
9
- exports.HeightmapTerrainData = HeightmapTerrainData;
@@ -1,45 +0,0 @@
1
- import { Cartographic } from "./Cartographic";
2
- /**
3
- * A two dimensional region specified as longitude and latitude coordinates.
4
- *
5
- * @alias Rectangle
6
- * @constructor
7
- *
8
- * @param {Number} [west=0.0] The westernmost longitude, in radians, in the range [-Pi, Pi].
9
- * @param {Number} [south=0.0] The southernmost latitude, in radians, in the range [-Pi/2, Pi/2].
10
- * @param {Number} [east=0.0] The easternmost longitude, in radians, in the range [-Pi, Pi].
11
- * @param {Number} [north=0.0] The northernmost latitude, in radians, in the range [-Pi/2, Pi/2].
12
- *
13
- * @see Packable
14
- */
15
- export declare class Rectangle {
16
- west: number;
17
- south: number;
18
- east: number;
19
- north: number;
20
- constructor(west?: number, south?: number, east?: number, north?: number);
21
- /**
22
- * 计算宽度 单位弧度
23
- */
24
- static computeWidth: (rectangle: Rectangle) => number;
25
- /**
26
- * 计算高度弧度
27
- */
28
- static computeHeight: (rectangle: Rectangle) => number;
29
- static fromDegrees(west?: number, south?: number, east?: number, north?: number, result?: Rectangle): Rectangle;
30
- static fromRadians(west?: number, south?: number, east?: number, north?: number, result?: Rectangle): Rectangle;
31
- get width(): number;
32
- get height(): number;
33
- /**
34
- * Computes the northeast corner of a rectangle.
35
- *
36
- * @param {Rectangle} rectangle The rectangle for which to find the corner
37
- * @param {Cartographic} [result] The object onto which to store the result.
38
- * @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
39
- */
40
- northeast(result?: Cartographic): Cartographic;
41
- /**
42
- * Computes the southeast corner of a rectangle.
43
- */
44
- southeast(result?: Cartographic): Cartographic;
45
- }