@gmgis/gm-sdk 1.12.4 → 2.0.1
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/dist/index.js +1848 -0
- package/dist/gm.min.js +6224 -5596
- package/dist/index.js +1558 -1438
- package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +1 -2
- package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +1 -2
- package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +1 -8337
- package/dist/resources/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/dist/resources/Workers/chunk-335F4KMR.js +26 -0
- package/dist/resources/Workers/chunk-3FFM6NRK.js +26 -0
- package/dist/resources/Workers/chunk-46IDNOB6.js +26 -0
- package/dist/resources/Workers/chunk-4QCIHDA2.js +26 -0
- package/dist/resources/Workers/chunk-5EZKANRV.js +26 -0
- package/dist/resources/Workers/chunk-5GVU4LLW.js +26 -0
- package/dist/resources/Workers/chunk-6EFYFFBI.js +26 -0
- package/dist/resources/Workers/chunk-72ENFGTU.js +26 -0
- package/dist/resources/Workers/{chunk-I2ITFFPX.js → chunk-7IBY6LYM.js} +2 -13
- package/dist/resources/Workers/{chunk-PRGYLLJT.js → chunk-7RJW35V3.js} +3 -31
- package/dist/resources/Workers/chunk-ABHTLV4B.js +26 -0
- package/dist/resources/Workers/{chunk-DI5NGJUP.js → chunk-AHKBUIAX.js} +2 -20
- package/dist/resources/Workers/{chunk-7JO7GPJN.js → chunk-AOSK7NDA.js} +2 -15
- package/dist/resources/Workers/chunk-ATTMFTQ4.js +26 -0
- package/dist/resources/Workers/chunk-BCYX7GBY.js +26 -0
- package/dist/resources/Workers/chunk-BDLVVHOG.js +26 -0
- package/dist/resources/Workers/chunk-BGQDOF2W.js +26 -0
- package/dist/resources/Workers/chunk-BTPJ3H6N.js +26 -0
- package/dist/resources/Workers/chunk-DGGIK7AD.js +66 -0
- package/dist/resources/Workers/chunk-DSXZVGY7.js +26 -0
- package/dist/resources/Workers/chunk-F7XR2IV5.js +26 -0
- package/dist/resources/Workers/chunk-FCVV6A2F.js +28 -0
- package/dist/resources/Workers/chunk-GBI3IATP.js +26 -0
- package/dist/resources/Workers/{chunk-6CHGCNMW.js → chunk-GRCPCORO.js} +4 -34
- package/dist/resources/Workers/chunk-HLFNWOQ4.js +26 -0
- package/dist/resources/Workers/chunk-HMV6ETSJ.js +26 -0
- package/dist/resources/Workers/chunk-I3XHKING.js +26 -0
- package/dist/resources/Workers/chunk-I7WJS3WM.js +26 -0
- package/dist/resources/Workers/chunk-JOXXXMPE.js +26 -0
- package/dist/resources/Workers/chunk-JU23HGY3.js +26 -0
- package/dist/resources/Workers/chunk-KORWG3CG.js +26 -0
- package/dist/resources/Workers/chunk-KTDI3TD2.js +26 -0
- package/dist/resources/Workers/chunk-LIEFEM73.js +26 -0
- package/dist/resources/Workers/chunk-LNFOIPBT.js +26 -0
- package/dist/resources/Workers/chunk-N6G72L23.js +26 -0
- package/dist/resources/Workers/chunk-NU4XOT2V.js +26 -0
- package/dist/resources/Workers/chunk-PO64KPKA.js +26 -0
- package/dist/resources/Workers/chunk-PQSWZ6QE.js +26 -0
- package/dist/resources/Workers/chunk-QGPFMASY.js +26 -0
- package/dist/resources/Workers/chunk-QJG5NRTN.js +26 -0
- package/dist/resources/Workers/chunk-R3KD5ZAI.js +27 -0
- package/dist/resources/Workers/chunk-RQ3X5FSK.js +26 -0
- package/dist/resources/Workers/chunk-SNN6UCXM.js +26 -0
- package/dist/resources/Workers/chunk-SPVHGWGM.js +26 -0
- package/dist/resources/Workers/chunk-SRJEQ4WA.js +26 -0
- package/dist/resources/Workers/chunk-VMOPYKP4.js +26 -0
- package/dist/resources/Workers/chunk-WNAZRVVU.js +26 -0
- package/dist/resources/Workers/chunk-WQBKKXJC.js +26 -0
- package/dist/resources/Workers/chunk-Y53SIX6D.js +26 -0
- package/dist/resources/Workers/chunk-YC4EEWUJ.js +26 -0
- package/dist/resources/Workers/chunk-YDUNCXSU.js +26 -0
- package/dist/resources/Workers/chunk-YL47XCQ4.js +26 -0
- package/dist/resources/Workers/combineGeometry.js +2 -40
- package/dist/resources/Workers/createBoxGeometry.js +2 -32
- package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -209
- package/dist/resources/Workers/createCircleGeometry.js +2 -175
- package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -121
- package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -481
- package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -199
- package/dist/resources/Workers/createCorridorGeometry.js +2 -1237
- package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -542
- package/dist/resources/Workers/createCylinderGeometry.js +2 -34
- package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -205
- package/dist/resources/Workers/createEllipseGeometry.js +2 -45
- package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -38
- package/dist/resources/Workers/createEllipsoidGeometry.js +2 -33
- package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -35
- package/dist/resources/Workers/createFrustumGeometry.js +2 -32
- package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -210
- package/dist/resources/Workers/createGeometry.js +2 -144
- package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -1582
- package/dist/resources/Workers/createPlaneGeometry.js +2 -198
- package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -98
- package/dist/resources/Workers/createPolygonGeometry.js +2 -1381
- package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -509
- package/dist/resources/Workers/createPolylineGeometry.js +2 -470
- package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -354
- package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -251
- package/dist/resources/Workers/createRectangleGeometry.js +2 -1246
- package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -453
- package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -374
- package/dist/resources/Workers/createSphereGeometry.js +2 -92
- package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -92
- package/dist/resources/Workers/createTaskProcessorWorker.js +2 -8
- package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -466
- package/dist/resources/Workers/createVectorTileGeometries.js +2 -361
- package/dist/resources/Workers/createVectorTilePoints.js +2 -88
- package/dist/resources/Workers/createVectorTilePolygons.js +2 -359
- package/dist/resources/Workers/createVectorTilePolylines.js +2 -236
- package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -539
- package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2252
- package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -729
- package/dist/resources/Workers/createWallGeometry.js +2 -464
- package/dist/resources/Workers/createWallOutlineGeometry.js +2 -312
- package/dist/resources/Workers/decodeDraco.js +2 -345
- package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2642
- package/dist/resources/Workers/decodeI3S.js +2 -1319
- package/dist/resources/Workers/gaussianSplatSorter.js +26 -0
- package/dist/resources/Workers/gaussianSplatTextureGenerator.js +26 -0
- package/dist/resources/Workers/transcodeKTX2.js +29 -3360
- package/dist/resources/Workers/transferTypedArrayTest.js +2 -17
- package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -793
- package/package.json +74 -74
- package/dist/resources/ThirdParty/Workers/basis_transcoder.js +0 -21
- package/dist/resources/Workers/chunk-26GA3JAM.js +0 -139
- package/dist/resources/Workers/chunk-27HUZ7SA.js +0 -305
- package/dist/resources/Workers/chunk-2ZGOQXYU.js +0 -171
- package/dist/resources/Workers/chunk-3Q2L65QU.js +0 -1258
- package/dist/resources/Workers/chunk-472HQ3EH.js +0 -100
- package/dist/resources/Workers/chunk-5ODQSF26.js +0 -101
- package/dist/resources/Workers/chunk-5OOFQLKF.js +0 -634
- package/dist/resources/Workers/chunk-5PTXS2GO.js +0 -10390
- package/dist/resources/Workers/chunk-76BYBWHP.js +0 -122
- package/dist/resources/Workers/chunk-7BMOHCPM.js +0 -390
- package/dist/resources/Workers/chunk-7KTQP4VB.js +0 -59
- package/dist/resources/Workers/chunk-7O373FFS.js +0 -665
- package/dist/resources/Workers/chunk-AD63PIY6.js +0 -163
- package/dist/resources/Workers/chunk-BHQJ2NT7.js +0 -353
- package/dist/resources/Workers/chunk-C6YYBQXW.js +0 -102
- package/dist/resources/Workers/chunk-CKY7HOHV.js +0 -287
- package/dist/resources/Workers/chunk-DHYHSFFJ.js +0 -73
- package/dist/resources/Workers/chunk-E27BLMDD.js +0 -115
- package/dist/resources/Workers/chunk-E63IIM5T.js +0 -75
- package/dist/resources/Workers/chunk-E6V6SQZW.js +0 -456
- package/dist/resources/Workers/chunk-EJZTDTUH.js +0 -138
- package/dist/resources/Workers/chunk-FDOV2LBJ.js +0 -220
- package/dist/resources/Workers/chunk-FIGIZHAQ.js +0 -684
- package/dist/resources/Workers/chunk-GESF4OXQ.js +0 -1800
- package/dist/resources/Workers/chunk-GGZJN2TI.js +0 -2717
- package/dist/resources/Workers/chunk-GNBFYG7F.js +0 -1481
- package/dist/resources/Workers/chunk-GWCFU2SA.js +0 -300
- package/dist/resources/Workers/chunk-IBLIYJZR.js +0 -196
- package/dist/resources/Workers/chunk-JW4FOI6M.js +0 -476
- package/dist/resources/Workers/chunk-K4GQUNB5.js +0 -262
- package/dist/resources/Workers/chunk-M3GMB5OP.js +0 -834
- package/dist/resources/Workers/chunk-MXIZJAPH.js +0 -629
- package/dist/resources/Workers/chunk-N5KJGGCM.js +0 -1073
- package/dist/resources/Workers/chunk-NGPPMXRM.js +0 -435
- package/dist/resources/Workers/chunk-O3E4OAOE.js +0 -511
- package/dist/resources/Workers/chunk-PGRPDNHG.js +0 -1048
- package/dist/resources/Workers/chunk-S6MRMMQU.js +0 -157
- package/dist/resources/Workers/chunk-SMDOP47J.js +0 -945
- package/dist/resources/Workers/chunk-TGONEMZO.js +0 -421
- package/dist/resources/Workers/chunk-TKVT5GQM.js +0 -781
- package/dist/resources/Workers/chunk-U72QNFOJ.js +0 -758
- package/dist/resources/Workers/chunk-VJZB3WAV.js +0 -963
- package/dist/resources/Workers/chunk-VU2MNO7L.js +0 -239
- package/dist/resources/Workers/chunk-XY4BATBS.js +0 -500
- package/dist/resources/Workers/chunk-YFXQECWV.js +0 -2857
- package/dist/resources/Workers/chunk-YSGTGQQO.js +0 -398
- package/dist/resources/Workers/chunk-YZ733KKS.js +0 -368
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.122
|
|
5
|
-
*
|
|
6
|
-
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*
|
|
20
|
-
* Columbus View (Pat. Pend.)
|
|
21
|
-
*
|
|
22
|
-
* Portions licensed separately.
|
|
23
|
-
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
import {
|
|
27
|
-
AxisAlignedBoundingBox_default
|
|
28
|
-
} from "./chunk-S6MRMMQU.js";
|
|
29
|
-
import {
|
|
30
|
-
IntersectionTests_default,
|
|
31
|
-
Ray_default
|
|
32
|
-
} from "./chunk-3Q2L65QU.js";
|
|
33
|
-
import {
|
|
34
|
-
Plane_default
|
|
35
|
-
} from "./chunk-2ZGOQXYU.js";
|
|
36
|
-
import {
|
|
37
|
-
Cartesian4_default,
|
|
38
|
-
Matrix4_default,
|
|
39
|
-
Transforms_default
|
|
40
|
-
} from "./chunk-5PTXS2GO.js";
|
|
41
|
-
import {
|
|
42
|
-
Cartesian2_default,
|
|
43
|
-
Cartesian3_default,
|
|
44
|
-
Ellipsoid_default
|
|
45
|
-
} from "./chunk-YFXQECWV.js";
|
|
46
|
-
import {
|
|
47
|
-
defaultValue_default
|
|
48
|
-
} from "./chunk-7JO7GPJN.js";
|
|
49
|
-
import {
|
|
50
|
-
Check_default,
|
|
51
|
-
DeveloperError_default
|
|
52
|
-
} from "./chunk-AD63PIY6.js";
|
|
53
|
-
import {
|
|
54
|
-
defined_default
|
|
55
|
-
} from "./chunk-E63IIM5T.js";
|
|
56
|
-
|
|
57
|
-
// packages/engine/Source/Core/EllipsoidTangentPlane.js
|
|
58
|
-
var scratchCart4 = new Cartesian4_default();
|
|
59
|
-
function EllipsoidTangentPlane(origin, ellipsoid) {
|
|
60
|
-
Check_default.defined("origin", origin);
|
|
61
|
-
ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
|
|
62
|
-
origin = ellipsoid.scaleToGeodeticSurface(origin);
|
|
63
|
-
if (!defined_default(origin)) {
|
|
64
|
-
throw new DeveloperError_default(
|
|
65
|
-
"origin must not be at the center of the ellipsoid."
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
const eastNorthUp = Transforms_default.eastNorthUpToFixedFrame(origin, ellipsoid);
|
|
69
|
-
this._ellipsoid = ellipsoid;
|
|
70
|
-
this._origin = origin;
|
|
71
|
-
this._xAxis = Cartesian3_default.fromCartesian4(
|
|
72
|
-
Matrix4_default.getColumn(eastNorthUp, 0, scratchCart4)
|
|
73
|
-
);
|
|
74
|
-
this._yAxis = Cartesian3_default.fromCartesian4(
|
|
75
|
-
Matrix4_default.getColumn(eastNorthUp, 1, scratchCart4)
|
|
76
|
-
);
|
|
77
|
-
const normal = Cartesian3_default.fromCartesian4(
|
|
78
|
-
Matrix4_default.getColumn(eastNorthUp, 2, scratchCart4)
|
|
79
|
-
);
|
|
80
|
-
this._plane = Plane_default.fromPointNormal(origin, normal);
|
|
81
|
-
}
|
|
82
|
-
Object.defineProperties(EllipsoidTangentPlane.prototype, {
|
|
83
|
-
/**
|
|
84
|
-
* Gets the ellipsoid.
|
|
85
|
-
* @memberof EllipsoidTangentPlane.prototype
|
|
86
|
-
* @type {Ellipsoid}
|
|
87
|
-
*/
|
|
88
|
-
ellipsoid: {
|
|
89
|
-
get: function() {
|
|
90
|
-
return this._ellipsoid;
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
/**
|
|
94
|
-
* Gets the origin.
|
|
95
|
-
* @memberof EllipsoidTangentPlane.prototype
|
|
96
|
-
* @type {Cartesian3}
|
|
97
|
-
*/
|
|
98
|
-
origin: {
|
|
99
|
-
get: function() {
|
|
100
|
-
return this._origin;
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
/**
|
|
104
|
-
* Gets the plane which is tangent to the ellipsoid.
|
|
105
|
-
* @memberof EllipsoidTangentPlane.prototype
|
|
106
|
-
* @readonly
|
|
107
|
-
* @type {Plane}
|
|
108
|
-
*/
|
|
109
|
-
plane: {
|
|
110
|
-
get: function() {
|
|
111
|
-
return this._plane;
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
/**
|
|
115
|
-
* Gets the local X-axis (east) of the tangent plane.
|
|
116
|
-
* @memberof EllipsoidTangentPlane.prototype
|
|
117
|
-
* @readonly
|
|
118
|
-
* @type {Cartesian3}
|
|
119
|
-
*/
|
|
120
|
-
xAxis: {
|
|
121
|
-
get: function() {
|
|
122
|
-
return this._xAxis;
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
/**
|
|
126
|
-
* Gets the local Y-axis (north) of the tangent plane.
|
|
127
|
-
* @memberof EllipsoidTangentPlane.prototype
|
|
128
|
-
* @readonly
|
|
129
|
-
* @type {Cartesian3}
|
|
130
|
-
*/
|
|
131
|
-
yAxis: {
|
|
132
|
-
get: function() {
|
|
133
|
-
return this._yAxis;
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
/**
|
|
137
|
-
* Gets the local Z-axis (up) of the tangent plane.
|
|
138
|
-
* @memberof EllipsoidTangentPlane.prototype
|
|
139
|
-
* @readonly
|
|
140
|
-
* @type {Cartesian3}
|
|
141
|
-
*/
|
|
142
|
-
zAxis: {
|
|
143
|
-
get: function() {
|
|
144
|
-
return this._plane.normal;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
var tmp = new AxisAlignedBoundingBox_default();
|
|
149
|
-
EllipsoidTangentPlane.fromPoints = function(cartesians, ellipsoid) {
|
|
150
|
-
Check_default.defined("cartesians", cartesians);
|
|
151
|
-
const box = AxisAlignedBoundingBox_default.fromPoints(cartesians, tmp);
|
|
152
|
-
return new EllipsoidTangentPlane(box.center, ellipsoid);
|
|
153
|
-
};
|
|
154
|
-
var scratchProjectPointOntoPlaneRay = new Ray_default();
|
|
155
|
-
var scratchProjectPointOntoPlaneCartesian3 = new Cartesian3_default();
|
|
156
|
-
EllipsoidTangentPlane.prototype.projectPointOntoPlane = function(cartesian, result) {
|
|
157
|
-
Check_default.defined("cartesian", cartesian);
|
|
158
|
-
const ray = scratchProjectPointOntoPlaneRay;
|
|
159
|
-
ray.origin = cartesian;
|
|
160
|
-
Cartesian3_default.normalize(cartesian, ray.direction);
|
|
161
|
-
let intersectionPoint = IntersectionTests_default.rayPlane(
|
|
162
|
-
ray,
|
|
163
|
-
this._plane,
|
|
164
|
-
scratchProjectPointOntoPlaneCartesian3
|
|
165
|
-
);
|
|
166
|
-
if (!defined_default(intersectionPoint)) {
|
|
167
|
-
Cartesian3_default.negate(ray.direction, ray.direction);
|
|
168
|
-
intersectionPoint = IntersectionTests_default.rayPlane(
|
|
169
|
-
ray,
|
|
170
|
-
this._plane,
|
|
171
|
-
scratchProjectPointOntoPlaneCartesian3
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
if (defined_default(intersectionPoint)) {
|
|
175
|
-
const v = Cartesian3_default.subtract(
|
|
176
|
-
intersectionPoint,
|
|
177
|
-
this._origin,
|
|
178
|
-
intersectionPoint
|
|
179
|
-
);
|
|
180
|
-
const x = Cartesian3_default.dot(this._xAxis, v);
|
|
181
|
-
const y = Cartesian3_default.dot(this._yAxis, v);
|
|
182
|
-
if (!defined_default(result)) {
|
|
183
|
-
return new Cartesian2_default(x, y);
|
|
184
|
-
}
|
|
185
|
-
result.x = x;
|
|
186
|
-
result.y = y;
|
|
187
|
-
return result;
|
|
188
|
-
}
|
|
189
|
-
return void 0;
|
|
190
|
-
};
|
|
191
|
-
EllipsoidTangentPlane.prototype.projectPointsOntoPlane = function(cartesians, result) {
|
|
192
|
-
Check_default.defined("cartesians", cartesians);
|
|
193
|
-
if (!defined_default(result)) {
|
|
194
|
-
result = [];
|
|
195
|
-
}
|
|
196
|
-
let count = 0;
|
|
197
|
-
const length = cartesians.length;
|
|
198
|
-
for (let i = 0; i < length; i++) {
|
|
199
|
-
const p = this.projectPointOntoPlane(cartesians[i], result[count]);
|
|
200
|
-
if (defined_default(p)) {
|
|
201
|
-
result[count] = p;
|
|
202
|
-
count++;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
result.length = count;
|
|
206
|
-
return result;
|
|
207
|
-
};
|
|
208
|
-
EllipsoidTangentPlane.prototype.projectPointToNearestOnPlane = function(cartesian, result) {
|
|
209
|
-
Check_default.defined("cartesian", cartesian);
|
|
210
|
-
if (!defined_default(result)) {
|
|
211
|
-
result = new Cartesian2_default();
|
|
212
|
-
}
|
|
213
|
-
const ray = scratchProjectPointOntoPlaneRay;
|
|
214
|
-
ray.origin = cartesian;
|
|
215
|
-
Cartesian3_default.clone(this._plane.normal, ray.direction);
|
|
216
|
-
let intersectionPoint = IntersectionTests_default.rayPlane(
|
|
217
|
-
ray,
|
|
218
|
-
this._plane,
|
|
219
|
-
scratchProjectPointOntoPlaneCartesian3
|
|
220
|
-
);
|
|
221
|
-
if (!defined_default(intersectionPoint)) {
|
|
222
|
-
Cartesian3_default.negate(ray.direction, ray.direction);
|
|
223
|
-
intersectionPoint = IntersectionTests_default.rayPlane(
|
|
224
|
-
ray,
|
|
225
|
-
this._plane,
|
|
226
|
-
scratchProjectPointOntoPlaneCartesian3
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
const v = Cartesian3_default.subtract(
|
|
230
|
-
intersectionPoint,
|
|
231
|
-
this._origin,
|
|
232
|
-
intersectionPoint
|
|
233
|
-
);
|
|
234
|
-
const x = Cartesian3_default.dot(this._xAxis, v);
|
|
235
|
-
const y = Cartesian3_default.dot(this._yAxis, v);
|
|
236
|
-
result.x = x;
|
|
237
|
-
result.y = y;
|
|
238
|
-
return result;
|
|
239
|
-
};
|
|
240
|
-
EllipsoidTangentPlane.prototype.projectPointsToNearestOnPlane = function(cartesians, result) {
|
|
241
|
-
Check_default.defined("cartesians", cartesians);
|
|
242
|
-
if (!defined_default(result)) {
|
|
243
|
-
result = [];
|
|
244
|
-
}
|
|
245
|
-
const length = cartesians.length;
|
|
246
|
-
result.length = length;
|
|
247
|
-
for (let i = 0; i < length; i++) {
|
|
248
|
-
result[i] = this.projectPointToNearestOnPlane(cartesians[i], result[i]);
|
|
249
|
-
}
|
|
250
|
-
return result;
|
|
251
|
-
};
|
|
252
|
-
var projectPointsOntoEllipsoidScratch = new Cartesian3_default();
|
|
253
|
-
EllipsoidTangentPlane.prototype.projectPointOntoEllipsoid = function(cartesian, result) {
|
|
254
|
-
Check_default.defined("cartesian", cartesian);
|
|
255
|
-
if (!defined_default(result)) {
|
|
256
|
-
result = new Cartesian3_default();
|
|
257
|
-
}
|
|
258
|
-
const ellipsoid = this._ellipsoid;
|
|
259
|
-
const origin = this._origin;
|
|
260
|
-
const xAxis = this._xAxis;
|
|
261
|
-
const yAxis = this._yAxis;
|
|
262
|
-
const tmp2 = projectPointsOntoEllipsoidScratch;
|
|
263
|
-
Cartesian3_default.multiplyByScalar(xAxis, cartesian.x, tmp2);
|
|
264
|
-
result = Cartesian3_default.add(origin, tmp2, result);
|
|
265
|
-
Cartesian3_default.multiplyByScalar(yAxis, cartesian.y, tmp2);
|
|
266
|
-
Cartesian3_default.add(result, tmp2, result);
|
|
267
|
-
ellipsoid.scaleToGeocentricSurface(result, result);
|
|
268
|
-
return result;
|
|
269
|
-
};
|
|
270
|
-
EllipsoidTangentPlane.prototype.projectPointsOntoEllipsoid = function(cartesians, result) {
|
|
271
|
-
Check_default.defined("cartesians", cartesians);
|
|
272
|
-
const length = cartesians.length;
|
|
273
|
-
if (!defined_default(result)) {
|
|
274
|
-
result = new Array(length);
|
|
275
|
-
} else {
|
|
276
|
-
result.length = length;
|
|
277
|
-
}
|
|
278
|
-
for (let i = 0; i < length; ++i) {
|
|
279
|
-
result[i] = this.projectPointOntoEllipsoid(cartesians[i], result[i]);
|
|
280
|
-
}
|
|
281
|
-
return result;
|
|
282
|
-
};
|
|
283
|
-
var EllipsoidTangentPlane_default = EllipsoidTangentPlane;
|
|
284
|
-
|
|
285
|
-
export {
|
|
286
|
-
EllipsoidTangentPlane_default
|
|
287
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.122
|
|
5
|
-
*
|
|
6
|
-
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*
|
|
20
|
-
* Columbus View (Pat. Pend.)
|
|
21
|
-
*
|
|
22
|
-
* Portions licensed separately.
|
|
23
|
-
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
import {
|
|
27
|
-
Math_default
|
|
28
|
-
} from "./chunk-XY4BATBS.js";
|
|
29
|
-
|
|
30
|
-
// packages/engine/Source/Core/CylinderGeometryLibrary.js
|
|
31
|
-
var CylinderGeometryLibrary = {};
|
|
32
|
-
CylinderGeometryLibrary.computePositions = function(length, topRadius, bottomRadius, slices, fill) {
|
|
33
|
-
const topZ = length * 0.5;
|
|
34
|
-
const bottomZ = -topZ;
|
|
35
|
-
const twoSlice = slices + slices;
|
|
36
|
-
const size = fill ? 2 * twoSlice : twoSlice;
|
|
37
|
-
const positions = new Float64Array(size * 3);
|
|
38
|
-
let i;
|
|
39
|
-
let index = 0;
|
|
40
|
-
let tbIndex = 0;
|
|
41
|
-
const bottomOffset = fill ? twoSlice * 3 : 0;
|
|
42
|
-
const topOffset = fill ? (twoSlice + slices) * 3 : slices * 3;
|
|
43
|
-
for (i = 0; i < slices; i++) {
|
|
44
|
-
const angle = i / slices * Math_default.TWO_PI;
|
|
45
|
-
const x = Math.cos(angle);
|
|
46
|
-
const y = Math.sin(angle);
|
|
47
|
-
const bottomX = x * bottomRadius;
|
|
48
|
-
const bottomY = y * bottomRadius;
|
|
49
|
-
const topX = x * topRadius;
|
|
50
|
-
const topY = y * topRadius;
|
|
51
|
-
positions[tbIndex + bottomOffset] = bottomX;
|
|
52
|
-
positions[tbIndex + bottomOffset + 1] = bottomY;
|
|
53
|
-
positions[tbIndex + bottomOffset + 2] = bottomZ;
|
|
54
|
-
positions[tbIndex + topOffset] = topX;
|
|
55
|
-
positions[tbIndex + topOffset + 1] = topY;
|
|
56
|
-
positions[tbIndex + topOffset + 2] = topZ;
|
|
57
|
-
tbIndex += 3;
|
|
58
|
-
if (fill) {
|
|
59
|
-
positions[index++] = bottomX;
|
|
60
|
-
positions[index++] = bottomY;
|
|
61
|
-
positions[index++] = bottomZ;
|
|
62
|
-
positions[index++] = topX;
|
|
63
|
-
positions[index++] = topY;
|
|
64
|
-
positions[index++] = topZ;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return positions;
|
|
68
|
-
};
|
|
69
|
-
var CylinderGeometryLibrary_default = CylinderGeometryLibrary;
|
|
70
|
-
|
|
71
|
-
export {
|
|
72
|
-
CylinderGeometryLibrary_default
|
|
73
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.122
|
|
5
|
-
*
|
|
6
|
-
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*
|
|
20
|
-
* Columbus View (Pat. Pend.)
|
|
21
|
-
*
|
|
22
|
-
* Portions licensed separately.
|
|
23
|
-
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
import {
|
|
27
|
-
Cartesian3_default,
|
|
28
|
-
Cartographic_default,
|
|
29
|
-
Ellipsoid_default
|
|
30
|
-
} from "./chunk-YFXQECWV.js";
|
|
31
|
-
import {
|
|
32
|
-
Math_default
|
|
33
|
-
} from "./chunk-XY4BATBS.js";
|
|
34
|
-
import {
|
|
35
|
-
defaultValue_default
|
|
36
|
-
} from "./chunk-7JO7GPJN.js";
|
|
37
|
-
import {
|
|
38
|
-
DeveloperError_default
|
|
39
|
-
} from "./chunk-AD63PIY6.js";
|
|
40
|
-
import {
|
|
41
|
-
defined_default
|
|
42
|
-
} from "./chunk-E63IIM5T.js";
|
|
43
|
-
|
|
44
|
-
// packages/engine/Source/Core/WebMercatorProjection.js
|
|
45
|
-
function WebMercatorProjection(ellipsoid) {
|
|
46
|
-
this._ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84);
|
|
47
|
-
this._semimajorAxis = this._ellipsoid.maximumRadius;
|
|
48
|
-
this._oneOverSemimajorAxis = 1 / this._semimajorAxis;
|
|
49
|
-
}
|
|
50
|
-
Object.defineProperties(WebMercatorProjection.prototype, {
|
|
51
|
-
/**
|
|
52
|
-
* Gets the {@link Ellipsoid}.
|
|
53
|
-
*
|
|
54
|
-
* @memberof WebMercatorProjection.prototype
|
|
55
|
-
*
|
|
56
|
-
* @type {Ellipsoid}
|
|
57
|
-
* @readonly
|
|
58
|
-
*/
|
|
59
|
-
ellipsoid: {
|
|
60
|
-
get: function() {
|
|
61
|
-
return this._ellipsoid;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
WebMercatorProjection.mercatorAngleToGeodeticLatitude = function(mercatorAngle) {
|
|
66
|
-
return Math_default.PI_OVER_TWO - 2 * Math.atan(Math.exp(-mercatorAngle));
|
|
67
|
-
};
|
|
68
|
-
WebMercatorProjection.geodeticLatitudeToMercatorAngle = function(latitude) {
|
|
69
|
-
if (latitude > WebMercatorProjection.MaximumLatitude) {
|
|
70
|
-
latitude = WebMercatorProjection.MaximumLatitude;
|
|
71
|
-
} else if (latitude < -WebMercatorProjection.MaximumLatitude) {
|
|
72
|
-
latitude = -WebMercatorProjection.MaximumLatitude;
|
|
73
|
-
}
|
|
74
|
-
const sinLatitude = Math.sin(latitude);
|
|
75
|
-
return 0.5 * Math.log((1 + sinLatitude) / (1 - sinLatitude));
|
|
76
|
-
};
|
|
77
|
-
WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI);
|
|
78
|
-
WebMercatorProjection.prototype.project = function(cartographic, result) {
|
|
79
|
-
const semimajorAxis = this._semimajorAxis;
|
|
80
|
-
const x = cartographic.longitude * semimajorAxis;
|
|
81
|
-
const y = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
|
|
82
|
-
cartographic.latitude
|
|
83
|
-
) * semimajorAxis;
|
|
84
|
-
const z = cartographic.height;
|
|
85
|
-
if (!defined_default(result)) {
|
|
86
|
-
return new Cartesian3_default(x, y, z);
|
|
87
|
-
}
|
|
88
|
-
result.x = x;
|
|
89
|
-
result.y = y;
|
|
90
|
-
result.z = z;
|
|
91
|
-
return result;
|
|
92
|
-
};
|
|
93
|
-
WebMercatorProjection.prototype.unproject = function(cartesian, result) {
|
|
94
|
-
if (!defined_default(cartesian)) {
|
|
95
|
-
throw new DeveloperError_default("cartesian is required");
|
|
96
|
-
}
|
|
97
|
-
const oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis;
|
|
98
|
-
const longitude = cartesian.x * oneOverEarthSemimajorAxis;
|
|
99
|
-
const latitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(
|
|
100
|
-
cartesian.y * oneOverEarthSemimajorAxis
|
|
101
|
-
);
|
|
102
|
-
const height = cartesian.z;
|
|
103
|
-
if (!defined_default(result)) {
|
|
104
|
-
return new Cartographic_default(longitude, latitude, height);
|
|
105
|
-
}
|
|
106
|
-
result.longitude = longitude;
|
|
107
|
-
result.latitude = latitude;
|
|
108
|
-
result.height = height;
|
|
109
|
-
return result;
|
|
110
|
-
};
|
|
111
|
-
var WebMercatorProjection_default = WebMercatorProjection;
|
|
112
|
-
|
|
113
|
-
export {
|
|
114
|
-
WebMercatorProjection_default
|
|
115
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.122
|
|
5
|
-
*
|
|
6
|
-
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*
|
|
20
|
-
* Columbus View (Pat. Pend.)
|
|
21
|
-
*
|
|
22
|
-
* Portions licensed separately.
|
|
23
|
-
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
var __create = Object.create;
|
|
27
|
-
var __defProp = Object.defineProperty;
|
|
28
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
29
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
30
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
31
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
32
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
33
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
34
|
-
}) : x)(function(x) {
|
|
35
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
36
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
37
|
-
});
|
|
38
|
-
var __glob = (map) => (path) => {
|
|
39
|
-
var fn = map[path];
|
|
40
|
-
if (fn) return fn();
|
|
41
|
-
throw new Error("Module not found in bundle: " + path);
|
|
42
|
-
};
|
|
43
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
44
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
45
|
-
};
|
|
46
|
-
var __copyProps = (to, from, except, desc) => {
|
|
47
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
48
|
-
for (let key of __getOwnPropNames(from))
|
|
49
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
50
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
51
|
-
}
|
|
52
|
-
return to;
|
|
53
|
-
};
|
|
54
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
55
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
56
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
57
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
58
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
59
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
60
|
-
mod
|
|
61
|
-
));
|
|
62
|
-
|
|
63
|
-
// packages/engine/Source/Core/defined.js
|
|
64
|
-
function defined(value) {
|
|
65
|
-
return value !== void 0 && value !== null;
|
|
66
|
-
}
|
|
67
|
-
var defined_default = defined;
|
|
68
|
-
|
|
69
|
-
export {
|
|
70
|
-
__require,
|
|
71
|
-
__glob,
|
|
72
|
-
__commonJS,
|
|
73
|
-
__toESM,
|
|
74
|
-
defined_default
|
|
75
|
-
};
|