cesium_dev_kit 1.1.21 → 1.1.23

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 (107) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +293 -291
  3. package/README.zh-CN.md +274 -0
  4. package/SECURITY.md +21 -0
  5. package/dist/Analysis-BLpVrGfg.d.mts +143 -0
  6. package/dist/Analysis-DmO1gtgS.d.ts +143 -0
  7. package/dist/Base-DH8H9suE.d.mts +635 -0
  8. package/dist/Base-DH8H9suE.d.ts +635 -0
  9. package/dist/Base-_BOXyMdS.d.ts +43 -0
  10. package/dist/Base-skqjcPfo.d.mts +43 -0
  11. package/dist/Control-B7AMFmHe.d.ts +98 -0
  12. package/dist/Control-BrpRU7RP.d.mts +98 -0
  13. package/dist/CustomCesiumPlugin-BqgAvlhi.d.ts +29 -0
  14. package/dist/CustomCesiumPlugin-CKYQ-7i9.d.mts +29 -0
  15. package/dist/Draw-1NhPP8z3.d.mts +490 -0
  16. package/dist/Draw-DRh7yNzc.d.ts +490 -0
  17. package/dist/Graphics-CuFNsQ3b.d.ts +1565 -0
  18. package/dist/Graphics-QE3Gb43w.d.mts +1565 -0
  19. package/dist/Material-CeZ4l-tY.d.mts +165 -0
  20. package/dist/Material-Cqbyf2Pn.d.ts +165 -0
  21. package/dist/Math3d-0nO-vFbT.d.mts +179 -0
  22. package/dist/Math3d-t635PYzU.d.ts +179 -0
  23. package/dist/PassEffect-DEFyytQZ.d.ts +41 -0
  24. package/dist/PassEffect-DEgElnVk.d.mts +41 -0
  25. package/dist/Plugin-BPCX0zTu.d.mts +197 -0
  26. package/dist/Plugin-DnYT0bue.d.ts +197 -0
  27. package/dist/Primitive-BNXp-9_6.d.mts +199 -0
  28. package/dist/Primitive-UEAuUimH.d.ts +199 -0
  29. package/dist/ThreeJs-BAlEWxa1.d.mts +44 -0
  30. package/dist/ThreeJs-DpAcw_qf.d.ts +44 -0
  31. package/dist/analysis.cjs +145 -0
  32. package/dist/analysis.cjs.map +1 -0
  33. package/dist/analysis.d.mts +6 -0
  34. package/dist/analysis.d.ts +6 -0
  35. package/dist/analysis.mjs +145 -0
  36. package/dist/analysis.mjs.map +1 -0
  37. package/dist/control.cjs +140 -0
  38. package/dist/control.cjs.map +1 -0
  39. package/dist/control.d.mts +4 -0
  40. package/dist/control.d.ts +4 -0
  41. package/dist/control.mjs +140 -0
  42. package/dist/control.mjs.map +1 -0
  43. package/dist/custom-cesium-plugin.cjs +507 -0
  44. package/dist/custom-cesium-plugin.cjs.map +1 -0
  45. package/dist/custom-cesium-plugin.d.mts +4 -0
  46. package/dist/custom-cesium-plugin.d.ts +4 -0
  47. package/dist/custom-cesium-plugin.mjs +507 -0
  48. package/dist/custom-cesium-plugin.mjs.map +1 -0
  49. package/dist/default-static.cjs +3 -0
  50. package/dist/default-static.cjs.map +1 -0
  51. package/dist/default-static.d.mts +37 -0
  52. package/dist/default-static.d.ts +37 -0
  53. package/dist/default-static.mjs +3 -0
  54. package/dist/default-static.mjs.map +1 -0
  55. package/dist/draw.cjs +140 -0
  56. package/dist/draw.cjs.map +1 -0
  57. package/dist/draw.d.mts +6 -0
  58. package/dist/draw.d.ts +6 -0
  59. package/dist/draw.mjs +140 -0
  60. package/dist/draw.mjs.map +1 -0
  61. package/dist/graphics.cjs +140 -0
  62. package/dist/graphics.cjs.map +1 -0
  63. package/dist/graphics.d.mts +19 -0
  64. package/dist/graphics.d.ts +19 -0
  65. package/dist/graphics.mjs +140 -0
  66. package/dist/graphics.mjs.map +1 -0
  67. package/dist/index.cjs +1030 -0
  68. package/dist/index.cjs.map +1 -0
  69. package/dist/index.d.mts +338 -0
  70. package/dist/index.d.ts +338 -0
  71. package/dist/index.mjs +1030 -0
  72. package/dist/index.mjs.map +1 -0
  73. package/dist/material.cjs +391 -0
  74. package/dist/material.cjs.map +1 -0
  75. package/dist/material.d.mts +4 -0
  76. package/dist/material.d.ts +4 -0
  77. package/dist/material.mjs +391 -0
  78. package/dist/material.mjs.map +1 -0
  79. package/dist/pass-effect.cjs +416 -0
  80. package/dist/pass-effect.cjs.map +1 -0
  81. package/dist/pass-effect.d.mts +4 -0
  82. package/dist/pass-effect.d.ts +4 -0
  83. package/dist/pass-effect.mjs +416 -0
  84. package/dist/pass-effect.mjs.map +1 -0
  85. package/dist/plugin.cjs +141 -0
  86. package/dist/plugin.cjs.map +1 -0
  87. package/dist/plugin.d.mts +4 -0
  88. package/dist/plugin.d.ts +4 -0
  89. package/dist/plugin.mjs +141 -0
  90. package/dist/plugin.mjs.map +1 -0
  91. package/dist/primitive.cjs +370 -0
  92. package/dist/primitive.cjs.map +1 -0
  93. package/dist/primitive.d.mts +4 -0
  94. package/dist/primitive.d.ts +4 -0
  95. package/dist/primitive.mjs +370 -0
  96. package/dist/primitive.mjs.map +1 -0
  97. package/dist/three.cjs +140 -0
  98. package/dist/three.cjs.map +1 -0
  99. package/dist/three.d.mts +4 -0
  100. package/dist/three.d.ts +4 -0
  101. package/dist/three.mjs +140 -0
  102. package/dist/three.mjs.map +1 -0
  103. package/package.json +289 -46
  104. package/dist/index.js +0 -1
  105. package/dist/index.min.js +0 -1
  106. package/dist/index.umd.js +0 -1
  107. package/index.js +0 -37
@@ -0,0 +1,165 @@
1
+ import { S as SingleImportConstructor } from './Base-skqjcPfo.mjs';
2
+ import { C as CesiumGlobal, S as StaticResourceConf, V as Viewer, B as BaseInstance } from './Base-DH8H9suE.mjs';
3
+
4
+ /** addMaterialLineGraphics 的参数 */
5
+ interface MaterialLineGraphicsOptions {
6
+ /** 坐标(单个或数组) */
7
+ positions?: any | any[];
8
+ /** 颜色 */
9
+ color?: any;
10
+ /** 持续时长 */
11
+ duration?: number;
12
+ /** 宽度 */
13
+ width?: number;
14
+ /** 图片 url */
15
+ image?: string;
16
+ }
17
+ /** getCustomMaterialLine / _initPolylineCustomMaterialProperty 的参数 */
18
+ interface CustomMaterialLineOptions {
19
+ /** 颜色 */
20
+ color?: any;
21
+ /** 图片 url */
22
+ image?: string;
23
+ /** 持续时长 */
24
+ duration?: number;
25
+ /** Julian 时间(或秒数) */
26
+ time?: any | number;
27
+ /** 自定义材质类型名 */
28
+ MaterialType?: string;
29
+ }
30
+ /** getCustomMaterialWall / _initWallCustomMaterialProperty 的参数 */
31
+ interface CustomMaterialWallOptions extends CustomMaterialLineOptions {
32
+ /** 频率 */
33
+ count?: number;
34
+ /** 方向,可选 ["vertical"|"cross"] */
35
+ freely?: string;
36
+ /** 方向,可选 ["-"|"+"] */
37
+ direction?: string;
38
+ }
39
+ /** 动态材质属性实例(各 _installXxx 内定义的 MaterialProperty 类实例) */
40
+ interface DynamicMaterialProperty {
41
+ _definitionChanged: any;
42
+ _color: unknown;
43
+ _colorSubscription: unknown;
44
+ color: unknown;
45
+ duration: number;
46
+ _time: any;
47
+ _duration: any;
48
+ _durationSubscription: unknown;
49
+ count: number;
50
+ gradient: number;
51
+ _img: string;
52
+ image: string;
53
+ speed: number;
54
+ isTranslucent: () => boolean;
55
+ }
56
+ declare const Material$1: {
57
+ new (viewer?: any, cesiumGlobal?: CesiumGlobal, defaultStatic?: StaticResourceConf): {
58
+ _viewer: any;
59
+ createGraphics: () => any;
60
+ getDfSt: (attrArr: string[]) => string | undefined;
61
+ _getDynamicLineShader: (options?: {
62
+ get?: boolean;
63
+ }) => string | undefined;
64
+ _getDirectionWallShader: (options?: {
65
+ get?: boolean;
66
+ count?: number;
67
+ freely?: string;
68
+ direction?: string;
69
+ }) => string | undefined;
70
+ _getDynamicCircleShader: (options?: {
71
+ get?: boolean;
72
+ }) => string | undefined;
73
+ _getCircleFadeShader: (options?: {
74
+ get?: boolean;
75
+ }) => string | undefined;
76
+ _getDynamicLightLineShader: (options?: {
77
+ get?: boolean;
78
+ }) => string | undefined;
79
+ _getFlowLineShader: (options?: {
80
+ get?: boolean;
81
+ }) => string | undefined;
82
+ image?: string;
83
+ /**
84
+ * 安装默认拓展材质
85
+ * @private
86
+ */
87
+ _installMaterial(): void;
88
+ /**
89
+ * 添加动态炫光线材质
90
+ * @function
91
+ * @param {object} options
92
+ * @returns {polyline} 返回polyline实例
93
+ * @example
94
+ * const material = new Material({ cesiumGlobal: Cesium, containerId: 'cesiumContainer' })
95
+ * // image 指向流光贴图,positions 传 Cartesian3 数组
96
+ * material.addMaterialLineGraphics({
97
+ * positions: Cesium.Cartesian3.fromDegreesArray([104.06, 30.60, 104.10, 30.66]),
98
+ * image: 'static/data/images/material/line.png',
99
+ * color: Cesium.Color.CYAN,
100
+ * duration: 2000,
101
+ * width: 8
102
+ * })
103
+ */
104
+ addMaterialLineGraphics(options?: MaterialLineGraphicsOptions): any;
105
+ /**
106
+ * 获取一个动态线材质
107
+ * @param {object} options
108
+ * @returns {PolylineCustomMaterialProperty}
109
+ */
110
+ getCustomMaterialLine(options?: CustomMaterialLineOptions): any | undefined;
111
+ /**
112
+ * 动态线材质
113
+ * @private
114
+ * @returns {PolylineCustomMaterialProperty}
115
+ */
116
+ _initPolylineCustomMaterialProperty(options?: CustomMaterialLineOptions): DynamicMaterialProperty | undefined;
117
+ /**
118
+ * 添加 动态围栏/炫光墙体
119
+ * @function
120
+ * @returns {wall} 返回wall实例
121
+ * @example
122
+ * const material = new Material({ cesiumGlobal: Cesium, containerId: 'cesiumContainer' })
123
+ * // 传入面状坐标(首尾可重复),自动生成带流光效果的围墙
124
+ * material.addMaterialWallGraphics({
125
+ * positions: Cesium.Cartesian3.fromDegreesArray([104.06, 30.60, 104.10, 30.60, 104.10, 30.64]),
126
+ * image: 'static/data/images/material/wall.png',
127
+ * color: Cesium.Color.ORANGE,
128
+ * duration: 3000
129
+ * })
130
+ */
131
+ addMaterialWallGraphics(options?: MaterialLineGraphicsOptions): any;
132
+ /**
133
+ * 获取一个材质围栏
134
+ * @function
135
+ * @returns {WallLinkCustomMaterialProperty}
136
+ */
137
+ getCustomMaterialWall(options?: CustomMaterialWallOptions): any | undefined;
138
+ /**
139
+ * 动态墙材质
140
+ * @private
141
+ */
142
+ _initWallCustomMaterialProperty(options?: CustomMaterialWallOptions): DynamicMaterialProperty;
143
+ _installWaveCircleMaterial(): void;
144
+ _installCircleFadeMaterial(): void;
145
+ _installCityLineMaterial(): void;
146
+ _installWarnMaterial(): void;
147
+ _installFlowMaterial(): void;
148
+ _installPolylineTrailLinkMaterial(): void;
149
+ };
150
+ };
151
+ type MaterialInstance = InstanceType<typeof Material$1>;
152
+
153
+ /** new Material(...) 返回的实例结构 */
154
+ interface MaterialExtendsApi {
155
+ /** cesium viewer 实例 */
156
+ viewer: Viewer;
157
+ /** Material 模块实例(已混入 Base 等方法) */
158
+ material: MaterialInstance & BaseInstance;
159
+ }
160
+ /**
161
+ * 材质模块(单独引入版)
162
+ */
163
+ declare const Material: SingleImportConstructor<MaterialExtendsApi>;
164
+
165
+ export { type MaterialInstance as M, Material as a, type MaterialExtendsApi as b };
@@ -0,0 +1,165 @@
1
+ import { S as SingleImportConstructor } from './Base-_BOXyMdS.js';
2
+ import { C as CesiumGlobal, S as StaticResourceConf, V as Viewer, B as BaseInstance } from './Base-DH8H9suE.js';
3
+
4
+ /** addMaterialLineGraphics 的参数 */
5
+ interface MaterialLineGraphicsOptions {
6
+ /** 坐标(单个或数组) */
7
+ positions?: any | any[];
8
+ /** 颜色 */
9
+ color?: any;
10
+ /** 持续时长 */
11
+ duration?: number;
12
+ /** 宽度 */
13
+ width?: number;
14
+ /** 图片 url */
15
+ image?: string;
16
+ }
17
+ /** getCustomMaterialLine / _initPolylineCustomMaterialProperty 的参数 */
18
+ interface CustomMaterialLineOptions {
19
+ /** 颜色 */
20
+ color?: any;
21
+ /** 图片 url */
22
+ image?: string;
23
+ /** 持续时长 */
24
+ duration?: number;
25
+ /** Julian 时间(或秒数) */
26
+ time?: any | number;
27
+ /** 自定义材质类型名 */
28
+ MaterialType?: string;
29
+ }
30
+ /** getCustomMaterialWall / _initWallCustomMaterialProperty 的参数 */
31
+ interface CustomMaterialWallOptions extends CustomMaterialLineOptions {
32
+ /** 频率 */
33
+ count?: number;
34
+ /** 方向,可选 ["vertical"|"cross"] */
35
+ freely?: string;
36
+ /** 方向,可选 ["-"|"+"] */
37
+ direction?: string;
38
+ }
39
+ /** 动态材质属性实例(各 _installXxx 内定义的 MaterialProperty 类实例) */
40
+ interface DynamicMaterialProperty {
41
+ _definitionChanged: any;
42
+ _color: unknown;
43
+ _colorSubscription: unknown;
44
+ color: unknown;
45
+ duration: number;
46
+ _time: any;
47
+ _duration: any;
48
+ _durationSubscription: unknown;
49
+ count: number;
50
+ gradient: number;
51
+ _img: string;
52
+ image: string;
53
+ speed: number;
54
+ isTranslucent: () => boolean;
55
+ }
56
+ declare const Material$1: {
57
+ new (viewer?: any, cesiumGlobal?: CesiumGlobal, defaultStatic?: StaticResourceConf): {
58
+ _viewer: any;
59
+ createGraphics: () => any;
60
+ getDfSt: (attrArr: string[]) => string | undefined;
61
+ _getDynamicLineShader: (options?: {
62
+ get?: boolean;
63
+ }) => string | undefined;
64
+ _getDirectionWallShader: (options?: {
65
+ get?: boolean;
66
+ count?: number;
67
+ freely?: string;
68
+ direction?: string;
69
+ }) => string | undefined;
70
+ _getDynamicCircleShader: (options?: {
71
+ get?: boolean;
72
+ }) => string | undefined;
73
+ _getCircleFadeShader: (options?: {
74
+ get?: boolean;
75
+ }) => string | undefined;
76
+ _getDynamicLightLineShader: (options?: {
77
+ get?: boolean;
78
+ }) => string | undefined;
79
+ _getFlowLineShader: (options?: {
80
+ get?: boolean;
81
+ }) => string | undefined;
82
+ image?: string;
83
+ /**
84
+ * 安装默认拓展材质
85
+ * @private
86
+ */
87
+ _installMaterial(): void;
88
+ /**
89
+ * 添加动态炫光线材质
90
+ * @function
91
+ * @param {object} options
92
+ * @returns {polyline} 返回polyline实例
93
+ * @example
94
+ * const material = new Material({ cesiumGlobal: Cesium, containerId: 'cesiumContainer' })
95
+ * // image 指向流光贴图,positions 传 Cartesian3 数组
96
+ * material.addMaterialLineGraphics({
97
+ * positions: Cesium.Cartesian3.fromDegreesArray([104.06, 30.60, 104.10, 30.66]),
98
+ * image: 'static/data/images/material/line.png',
99
+ * color: Cesium.Color.CYAN,
100
+ * duration: 2000,
101
+ * width: 8
102
+ * })
103
+ */
104
+ addMaterialLineGraphics(options?: MaterialLineGraphicsOptions): any;
105
+ /**
106
+ * 获取一个动态线材质
107
+ * @param {object} options
108
+ * @returns {PolylineCustomMaterialProperty}
109
+ */
110
+ getCustomMaterialLine(options?: CustomMaterialLineOptions): any | undefined;
111
+ /**
112
+ * 动态线材质
113
+ * @private
114
+ * @returns {PolylineCustomMaterialProperty}
115
+ */
116
+ _initPolylineCustomMaterialProperty(options?: CustomMaterialLineOptions): DynamicMaterialProperty | undefined;
117
+ /**
118
+ * 添加 动态围栏/炫光墙体
119
+ * @function
120
+ * @returns {wall} 返回wall实例
121
+ * @example
122
+ * const material = new Material({ cesiumGlobal: Cesium, containerId: 'cesiumContainer' })
123
+ * // 传入面状坐标(首尾可重复),自动生成带流光效果的围墙
124
+ * material.addMaterialWallGraphics({
125
+ * positions: Cesium.Cartesian3.fromDegreesArray([104.06, 30.60, 104.10, 30.60, 104.10, 30.64]),
126
+ * image: 'static/data/images/material/wall.png',
127
+ * color: Cesium.Color.ORANGE,
128
+ * duration: 3000
129
+ * })
130
+ */
131
+ addMaterialWallGraphics(options?: MaterialLineGraphicsOptions): any;
132
+ /**
133
+ * 获取一个材质围栏
134
+ * @function
135
+ * @returns {WallLinkCustomMaterialProperty}
136
+ */
137
+ getCustomMaterialWall(options?: CustomMaterialWallOptions): any | undefined;
138
+ /**
139
+ * 动态墙材质
140
+ * @private
141
+ */
142
+ _initWallCustomMaterialProperty(options?: CustomMaterialWallOptions): DynamicMaterialProperty;
143
+ _installWaveCircleMaterial(): void;
144
+ _installCircleFadeMaterial(): void;
145
+ _installCityLineMaterial(): void;
146
+ _installWarnMaterial(): void;
147
+ _installFlowMaterial(): void;
148
+ _installPolylineTrailLinkMaterial(): void;
149
+ };
150
+ };
151
+ type MaterialInstance = InstanceType<typeof Material$1>;
152
+
153
+ /** new Material(...) 返回的实例结构 */
154
+ interface MaterialExtendsApi {
155
+ /** cesium viewer 实例 */
156
+ viewer: Viewer;
157
+ /** Material 模块实例(已混入 Base 等方法) */
158
+ material: MaterialInstance & BaseInstance;
159
+ }
160
+ /**
161
+ * 材质模块(单独引入版)
162
+ */
163
+ declare const Material: SingleImportConstructor<MaterialExtendsApi>;
164
+
165
+ export { type MaterialInstance as M, Material as a, type MaterialExtendsApi as b };
@@ -0,0 +1,179 @@
1
+ import { C as CesiumGlobal, W as WGS84Type } from './Base-DH8H9suE.mjs';
2
+
3
+ /** 模块内部持有的 cesium 全局对象 */
4
+ /** 经纬度坐标对象(角度制) */
5
+ interface LonLatType {
6
+ /** 经度(角度制) */
7
+ lon: number;
8
+ /** 纬度(角度制) */
9
+ lat: number;
10
+ }
11
+ /** - 坐标系对象(角度制经纬度数组,兼容旧命名) */
12
+ type lonlatType = LonLatType[];
13
+ /** 计算两点角度的参数 */
14
+ interface PositionsAngleOptions {
15
+ /** 第一个点坐标 */
16
+ position1: any;
17
+ /** 第二个点坐标 */
18
+ position2: any;
19
+ /** 角度类型:pitch 俯仰角 / heading 偏航角 */
20
+ type?: 'pitch' | 'heading';
21
+ }
22
+ /** raisePositionsToHeight 的参数 */
23
+ interface RaisePositionsToHeightOptions {
24
+ /** 椭球对象 */
25
+ ellipsoid: any;
26
+ /** 缩放比例 */
27
+ height: number;
28
+ /** 拉伸高度 */
29
+ extrudedHeight?: number;
30
+ }
31
+ /** computeEllipseEdgePositions / computeSectorEdgePositions 的参数 */
32
+ interface EllipseEdgeOptions {
33
+ /** 短半轴 */
34
+ semiMinorAxis: number;
35
+ /** 长半轴 */
36
+ semiMajorAxis: number;
37
+ /** 旋转角度(弧度) */
38
+ rotation: number;
39
+ /** 中心点(笛卡尔坐标) */
40
+ center: any;
41
+ /** 粒度(弧度) */
42
+ granularity?: number;
43
+ /** 角度(弧度,仅 computeSectorEdgePositions 使用) */
44
+ angle?: number;
45
+ }
46
+ /** 椭圆 / 扇形边界位置计算结果 */
47
+ interface EllipseEdgeResult {
48
+ /** 边界点数量 */
49
+ numPts: number;
50
+ /** 边界位置坐标(扁平数组 [x,y,z,x,y,z,...]) */
51
+ outerPositions: number[];
52
+ }
53
+ /** 地理坐标对象(弧度制,用于线段插值) */
54
+ interface CartographicLike {
55
+ /** 经度(弧度) */
56
+ longitude: number;
57
+ /** 纬度(弧度) */
58
+ latitude: number;
59
+ /** 高度 */
60
+ height?: number;
61
+ }
62
+ declare const Math3d: {
63
+ new (viewer?: any, cesiumGlobal?: CesiumGlobal): {
64
+ /** cesium viewer 实例 */
65
+ _viewer: any;
66
+ /** WGS84 转地理坐标(由 Base 混入) */
67
+ transformWGS84ToCartographic: (position?: WGS84Type) => any;
68
+ /** WGS84 转笛卡尔(由 Base 混入) */
69
+ transformWGS84ToCartesian: (position?: WGS84Type, alt?: number) => any | undefined;
70
+ /**
71
+ * 拆分组合坐标数组
72
+ * @param cartesianArr - 坐标数组
73
+ * @returns Cartesian3 类型的数组
74
+ */
75
+ splitCartesians3(cartesianArr: number[]): any[];
76
+ /**
77
+ * 计算两点的点集
78
+ * @param startPoint - 开始节点
79
+ * @param endPoint - 结束节点
80
+ * @param angularityFactor - 曲率
81
+ * @param numOfSingleLine - 点集数量
82
+ */
83
+ getLinkedPointList(startPoint: any, endPoint: any, angularityFactor: number, numOfSingleLine: number): any[] | undefined;
84
+ /**
85
+ * 计算两点的角度
86
+ * @param option - 参数
87
+ * @returns 角度
88
+ */
89
+ getPositionsAngle(option?: PositionsAngleOptions): number | undefined;
90
+ /**
91
+ * 计算一组坐标组成的面的面积
92
+ * @param positions - 需要计算的84数组
93
+ */
94
+ getPositionsArea(positions: WGS84Type[]): number | string;
95
+ /**
96
+ * 计算多边形的面积
97
+ * @param positions - 多边形数组
98
+ */
99
+ getPolygonArea(positions?: WGS84Type[]): number | undefined;
100
+ /**
101
+ * 获取两点距离
102
+ * @param point1 - 坐标1
103
+ * @param point2 - 坐标2
104
+ */
105
+ getPointDistance(point1: any, point2: any): number | undefined;
106
+ /**
107
+ * 获取84坐标的距离
108
+ * @param positions - 84坐标数组
109
+ */
110
+ getPositionDistance(positions: WGS84Type[]): string;
111
+ /**
112
+ * 获取相交对象
113
+ * @param startPos - 起始点坐标
114
+ * @param endPos - 终点坐标
115
+ * @param excludeArr - 排除对象数组
116
+ * @param bDrillPick - 只pick首个物体
117
+ */
118
+ getIntersectObj(startPos: any, endPos: any, excludeArr?: unknown[], bDrillPick?: boolean): any[] | object[] | undefined;
119
+ /**
120
+ * 椭圆计算
121
+ * @param theta - 角度θ
122
+ * @param rotation - 旋转角度
123
+ * @param northVec - 东北角
124
+ * @param eastVec - 西南角
125
+ * @param aSqr - 短半轴平方根
126
+ * @param ab - 长半轴与短半轴乘积
127
+ * @param bSqr - 长半轴平方根
128
+ * @param mag - 中心坐标最大长度
129
+ * @param unitPos - 中心坐标归一化
130
+ * @param result - 椭圆坐标
131
+ */
132
+ getPointOnEllipsoid(theta: number, rotation: number, northVec: any, eastVec: any, aSqr: number, ab: number, bSqr: number, mag: number, unitPos: any, result: any): any;
133
+ /**
134
+ * 计算坐标数组插值高度
135
+ * @param positions - 插值数组[x,y,z,x,y,z,...]
136
+ * @param options - 参数
137
+ * @param extrude - 是否拉伸
138
+ * @returns Returns the positions raised to the given heights
139
+ */
140
+ raisePositionsToHeight(positions: number[], options?: RaisePositionsToHeightOptions, extrude?: boolean): Float64Array | undefined;
141
+ /**
142
+ * 计算范围当前椭圆位置的数组
143
+ * @param options - 参数
144
+ */
145
+ computeEllipseEdgePositions(options?: EllipseEdgeOptions): EllipseEdgeResult | undefined;
146
+ /**
147
+ * 计算某角度下椭圆位置坐标
148
+ * @param options - 参数
149
+ */
150
+ computeSectorEdgePositions(options?: EllipseEdgeOptions): EllipseEdgeResult | undefined;
151
+ /**
152
+ * 获取3DTiles高度(传入角度制 lon lat 数组)
153
+ * @param lonlats - 坐标数组
154
+ * @param callback - 回调
155
+ */
156
+ computeLonlatPointsTerrainData(lonlats: lonlatType, callback: Function): void;
157
+ /**
158
+ * 传入Cartographic类型数组(弧度制经纬度),计算位于地形中的高度
159
+ * @param Cartographics - 地理坐标数组
160
+ * @param callback - 回调
161
+ */
162
+ computeCartographicPointsTerrainData(Cartographics: any[], callback?: (result: any[]) => void): void;
163
+ _checkLonDegree(value?: number): boolean;
164
+ _checkLatDegree(value?: number): boolean;
165
+ /** 线段插值(经纬度坐标插值,角度制) */
166
+ computeInterpolateLineLonlat(start?: LonLatType, end?: LonLatType): number[][] | null;
167
+ /** 线段插值(Cartographic 弧度制) */
168
+ computeInterpolateLineCartographic(start?: CartographicLike, end?: CartographicLike, _Delta?: number): any[] | null;
169
+ /** 线段插值(经纬度高程插值) */
170
+ computeInterpolateLineHeightCartographic(start?: CartographicLike, end?: CartographicLike): any[] | null;
171
+ /** 线段插值/经纬度高程插值 */
172
+ computeInterpolate2IndexLineHeightCartographic(start?: CartographicLike, end?: CartographicLike, num?: number, curIndex?: number): any[] | null;
173
+ /** 经纬度高程插值,指定插值位置 index */
174
+ computeInterpolateIndexLineHeightCartographic(start?: CartographicLike, end?: CartographicLike, num?: number, index?: number): any | null;
175
+ };
176
+ };
177
+ type Math3dInstance = InstanceType<typeof Math3d>;
178
+
179
+ export { type Math3dInstance as M, Math3d as a };
@@ -0,0 +1,179 @@
1
+ import { C as CesiumGlobal, W as WGS84Type } from './Base-DH8H9suE.js';
2
+
3
+ /** 模块内部持有的 cesium 全局对象 */
4
+ /** 经纬度坐标对象(角度制) */
5
+ interface LonLatType {
6
+ /** 经度(角度制) */
7
+ lon: number;
8
+ /** 纬度(角度制) */
9
+ lat: number;
10
+ }
11
+ /** - 坐标系对象(角度制经纬度数组,兼容旧命名) */
12
+ type lonlatType = LonLatType[];
13
+ /** 计算两点角度的参数 */
14
+ interface PositionsAngleOptions {
15
+ /** 第一个点坐标 */
16
+ position1: any;
17
+ /** 第二个点坐标 */
18
+ position2: any;
19
+ /** 角度类型:pitch 俯仰角 / heading 偏航角 */
20
+ type?: 'pitch' | 'heading';
21
+ }
22
+ /** raisePositionsToHeight 的参数 */
23
+ interface RaisePositionsToHeightOptions {
24
+ /** 椭球对象 */
25
+ ellipsoid: any;
26
+ /** 缩放比例 */
27
+ height: number;
28
+ /** 拉伸高度 */
29
+ extrudedHeight?: number;
30
+ }
31
+ /** computeEllipseEdgePositions / computeSectorEdgePositions 的参数 */
32
+ interface EllipseEdgeOptions {
33
+ /** 短半轴 */
34
+ semiMinorAxis: number;
35
+ /** 长半轴 */
36
+ semiMajorAxis: number;
37
+ /** 旋转角度(弧度) */
38
+ rotation: number;
39
+ /** 中心点(笛卡尔坐标) */
40
+ center: any;
41
+ /** 粒度(弧度) */
42
+ granularity?: number;
43
+ /** 角度(弧度,仅 computeSectorEdgePositions 使用) */
44
+ angle?: number;
45
+ }
46
+ /** 椭圆 / 扇形边界位置计算结果 */
47
+ interface EllipseEdgeResult {
48
+ /** 边界点数量 */
49
+ numPts: number;
50
+ /** 边界位置坐标(扁平数组 [x,y,z,x,y,z,...]) */
51
+ outerPositions: number[];
52
+ }
53
+ /** 地理坐标对象(弧度制,用于线段插值) */
54
+ interface CartographicLike {
55
+ /** 经度(弧度) */
56
+ longitude: number;
57
+ /** 纬度(弧度) */
58
+ latitude: number;
59
+ /** 高度 */
60
+ height?: number;
61
+ }
62
+ declare const Math3d: {
63
+ new (viewer?: any, cesiumGlobal?: CesiumGlobal): {
64
+ /** cesium viewer 实例 */
65
+ _viewer: any;
66
+ /** WGS84 转地理坐标(由 Base 混入) */
67
+ transformWGS84ToCartographic: (position?: WGS84Type) => any;
68
+ /** WGS84 转笛卡尔(由 Base 混入) */
69
+ transformWGS84ToCartesian: (position?: WGS84Type, alt?: number) => any | undefined;
70
+ /**
71
+ * 拆分组合坐标数组
72
+ * @param cartesianArr - 坐标数组
73
+ * @returns Cartesian3 类型的数组
74
+ */
75
+ splitCartesians3(cartesianArr: number[]): any[];
76
+ /**
77
+ * 计算两点的点集
78
+ * @param startPoint - 开始节点
79
+ * @param endPoint - 结束节点
80
+ * @param angularityFactor - 曲率
81
+ * @param numOfSingleLine - 点集数量
82
+ */
83
+ getLinkedPointList(startPoint: any, endPoint: any, angularityFactor: number, numOfSingleLine: number): any[] | undefined;
84
+ /**
85
+ * 计算两点的角度
86
+ * @param option - 参数
87
+ * @returns 角度
88
+ */
89
+ getPositionsAngle(option?: PositionsAngleOptions): number | undefined;
90
+ /**
91
+ * 计算一组坐标组成的面的面积
92
+ * @param positions - 需要计算的84数组
93
+ */
94
+ getPositionsArea(positions: WGS84Type[]): number | string;
95
+ /**
96
+ * 计算多边形的面积
97
+ * @param positions - 多边形数组
98
+ */
99
+ getPolygonArea(positions?: WGS84Type[]): number | undefined;
100
+ /**
101
+ * 获取两点距离
102
+ * @param point1 - 坐标1
103
+ * @param point2 - 坐标2
104
+ */
105
+ getPointDistance(point1: any, point2: any): number | undefined;
106
+ /**
107
+ * 获取84坐标的距离
108
+ * @param positions - 84坐标数组
109
+ */
110
+ getPositionDistance(positions: WGS84Type[]): string;
111
+ /**
112
+ * 获取相交对象
113
+ * @param startPos - 起始点坐标
114
+ * @param endPos - 终点坐标
115
+ * @param excludeArr - 排除对象数组
116
+ * @param bDrillPick - 只pick首个物体
117
+ */
118
+ getIntersectObj(startPos: any, endPos: any, excludeArr?: unknown[], bDrillPick?: boolean): any[] | object[] | undefined;
119
+ /**
120
+ * 椭圆计算
121
+ * @param theta - 角度θ
122
+ * @param rotation - 旋转角度
123
+ * @param northVec - 东北角
124
+ * @param eastVec - 西南角
125
+ * @param aSqr - 短半轴平方根
126
+ * @param ab - 长半轴与短半轴乘积
127
+ * @param bSqr - 长半轴平方根
128
+ * @param mag - 中心坐标最大长度
129
+ * @param unitPos - 中心坐标归一化
130
+ * @param result - 椭圆坐标
131
+ */
132
+ getPointOnEllipsoid(theta: number, rotation: number, northVec: any, eastVec: any, aSqr: number, ab: number, bSqr: number, mag: number, unitPos: any, result: any): any;
133
+ /**
134
+ * 计算坐标数组插值高度
135
+ * @param positions - 插值数组[x,y,z,x,y,z,...]
136
+ * @param options - 参数
137
+ * @param extrude - 是否拉伸
138
+ * @returns Returns the positions raised to the given heights
139
+ */
140
+ raisePositionsToHeight(positions: number[], options?: RaisePositionsToHeightOptions, extrude?: boolean): Float64Array | undefined;
141
+ /**
142
+ * 计算范围当前椭圆位置的数组
143
+ * @param options - 参数
144
+ */
145
+ computeEllipseEdgePositions(options?: EllipseEdgeOptions): EllipseEdgeResult | undefined;
146
+ /**
147
+ * 计算某角度下椭圆位置坐标
148
+ * @param options - 参数
149
+ */
150
+ computeSectorEdgePositions(options?: EllipseEdgeOptions): EllipseEdgeResult | undefined;
151
+ /**
152
+ * 获取3DTiles高度(传入角度制 lon lat 数组)
153
+ * @param lonlats - 坐标数组
154
+ * @param callback - 回调
155
+ */
156
+ computeLonlatPointsTerrainData(lonlats: lonlatType, callback: Function): void;
157
+ /**
158
+ * 传入Cartographic类型数组(弧度制经纬度),计算位于地形中的高度
159
+ * @param Cartographics - 地理坐标数组
160
+ * @param callback - 回调
161
+ */
162
+ computeCartographicPointsTerrainData(Cartographics: any[], callback?: (result: any[]) => void): void;
163
+ _checkLonDegree(value?: number): boolean;
164
+ _checkLatDegree(value?: number): boolean;
165
+ /** 线段插值(经纬度坐标插值,角度制) */
166
+ computeInterpolateLineLonlat(start?: LonLatType, end?: LonLatType): number[][] | null;
167
+ /** 线段插值(Cartographic 弧度制) */
168
+ computeInterpolateLineCartographic(start?: CartographicLike, end?: CartographicLike, _Delta?: number): any[] | null;
169
+ /** 线段插值(经纬度高程插值) */
170
+ computeInterpolateLineHeightCartographic(start?: CartographicLike, end?: CartographicLike): any[] | null;
171
+ /** 线段插值/经纬度高程插值 */
172
+ computeInterpolate2IndexLineHeightCartographic(start?: CartographicLike, end?: CartographicLike, num?: number, curIndex?: number): any[] | null;
173
+ /** 经纬度高程插值,指定插值位置 index */
174
+ computeInterpolateIndexLineHeightCartographic(start?: CartographicLike, end?: CartographicLike, num?: number, index?: number): any | null;
175
+ };
176
+ };
177
+ type Math3dInstance = InstanceType<typeof Math3d>;
178
+
179
+ export { type Math3dInstance as M, Math3d as a };