@rtzh/engine 0.0.3 → 0.0.4
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/Build/ThirdParty/Workers/zip-web-worker.js +640 -0
- package/Build/Workers/chunk-245NZYCR.js +124 -0
- package/Build/Workers/chunk-25BA4527.js +837 -0
- package/Build/Workers/chunk-2APW7KRS.js +101 -0
- package/Build/Workers/chunk-2BLQ3B4Q.js +299 -0
- package/Build/Workers/chunk-2CAIFJD5.js +387 -0
- package/Build/Workers/chunk-3K2PK2OU.js +1045 -0
- package/Build/Workers/chunk-3M5CRHSG.js +288 -0
- package/Build/Workers/chunk-4HXPSZRC.js +1483 -0
- package/Build/Workers/chunk-4Z26IS65.js +3514 -0
- package/Build/Workers/chunk-55IROWAX.js +139 -0
- package/Build/Workers/chunk-56XTN5NJ.js +1800 -0
- package/Build/Workers/chunk-5BIQOSBV.js +55 -0
- package/Build/Workers/chunk-5CSRWY7L.js +280 -0
- package/Build/Workers/chunk-5QTPACZQ.js +455 -0
- package/Build/Workers/chunk-5VZISKJF.js +629 -0
- package/Build/Workers/chunk-5WAG5YKS.js +368 -0
- package/Build/Workers/chunk-64W2RXA4.js +219 -0
- package/Build/Workers/chunk-66YGZWBI.js +1317 -0
- package/Build/Workers/chunk-6H33B6OL.js +37 -0
- package/Build/Workers/chunk-6LZBBEA7.js +439 -0
- package/Build/Workers/chunk-6QVMKRJ4.js +3514 -0
- package/Build/Workers/chunk-6XJO625E.js +497 -0
- package/Build/Workers/chunk-75UGCVME.js +102 -0
- package/Build/Workers/chunk-7B23DD46.js +1054 -0
- package/Build/Workers/chunk-7NCJH26L.js +352 -0
- package/Build/Workers/chunk-ACH67MPW.js +1483 -0
- package/Build/Workers/chunk-AIW5F22O.js +352 -0
- package/Build/Workers/chunk-AL22JVIA.js +256 -0
- package/Build/Workers/chunk-AVSQILVI.js +75 -0
- package/Build/Workers/chunk-B2VFNYD7.js +280 -0
- package/Build/Workers/chunk-BJ6WXQOW.js +305 -0
- package/Build/Workers/chunk-BN4WA7LX.js +75 -0
- package/Build/Workers/chunk-BOV6T7FO.js +44 -0
- package/Build/Workers/chunk-BXBGWQ3Z.js +171 -0
- package/Build/Workers/chunk-D7TGILR3.js +1054 -0
- package/Build/Workers/chunk-DBKYAGM6.js +1800 -0
- package/Build/Workers/chunk-DEIMB3B5.js +629 -0
- package/Build/Workers/chunk-DP76S3IQ.js +1067 -0
- package/Build/Workers/chunk-DSBEWMOQ.js +1067 -0
- package/Build/Workers/chunk-E2CARZA7.js +73 -0
- package/Build/Workers/chunk-EDIUN7V3.js +219 -0
- package/Build/Workers/chunk-EISI2CR2.js +2058 -0
- package/Build/Workers/chunk-EKMWNF4U.js +55 -0
- package/Build/Workers/chunk-ELXGXAYS.js +682 -0
- package/Build/Workers/chunk-F5LAPCFC.js +1460 -0
- package/Build/Workers/chunk-FJREGHFG.js +138 -0
- package/Build/Workers/chunk-FVYRV2T6.js +455 -0
- package/Build/Workers/chunk-GDIBU55R.js +778 -0
- package/Build/Workers/chunk-HAWJ7FMN.js +8366 -0
- package/Build/Workers/chunk-HAY6YE7M.js +97 -0
- package/Build/Workers/chunk-HGIGANIQ.js +163 -0
- package/Build/Workers/chunk-HI6X33GO.js +58 -0
- package/Build/Workers/chunk-HU5P7PMU.js +1317 -0
- package/Build/Workers/chunk-I76SRIKN.js +138 -0
- package/Build/Workers/chunk-IDVURFRN.js +241 -0
- package/Build/Workers/chunk-IELTSYPZ.js +241 -0
- package/Build/Workers/chunk-J3FBVUY4.js +37 -0
- package/Build/Workers/chunk-J4MIJCN5.js +171 -0
- package/Build/Workers/chunk-JFO3ELF3.js +642 -0
- package/Build/Workers/chunk-JH27ZGLN.js +352 -0
- package/Build/Workers/chunk-JURLMTV2.js +398 -0
- package/Build/Workers/chunk-K4IMD7KH.js +162 -0
- package/Build/Workers/chunk-KBAGFNQ4.js +139 -0
- package/Build/Workers/chunk-KFMCOG26.js +692 -0
- package/Build/Workers/chunk-KH2OWUUA.js +163 -0
- package/Build/Workers/chunk-KHKSE4WQ.js +778 -0
- package/Build/Workers/chunk-KKYQRQ57.js +368 -0
- package/Build/Workers/chunk-KQIZ7AFF.js +8366 -0
- package/Build/Workers/chunk-KUAWPGSB.js +511 -0
- package/Build/Workers/chunk-KVDSJXRK.js +114 -0
- package/Build/Workers/chunk-KVE5EAPO.js +398 -0
- package/Build/Workers/chunk-KXB3AARU.js +162 -0
- package/Build/Workers/chunk-LN4NMLYY.js +55 -0
- package/Build/Workers/chunk-LPM2FVDN.js +642 -0
- package/Build/Workers/chunk-MLFVICFZ.js +102 -0
- package/Build/Workers/chunk-MQ62ZE2U.js +124 -0
- package/Build/Workers/chunk-NOH3R3YY.js +198 -0
- package/Build/Workers/chunk-OAOREOSO.js +940 -0
- package/Build/Workers/chunk-OFJRMGNX.js +788 -0
- package/Build/Workers/chunk-OOB2KZC6.js +476 -0
- package/Build/Workers/chunk-OVPPHDU7.js +97 -0
- package/Build/Workers/chunk-P7M4VYFT.js +788 -0
- package/Build/Workers/chunk-PHB5MRHM.js +439 -0
- package/Build/Workers/chunk-PLLZB3R4.js +198 -0
- package/Build/Workers/chunk-POY6ZE32.js +2058 -0
- package/Build/Workers/chunk-PV5B2YNB.js +2719 -0
- package/Build/Workers/chunk-Q2DXNFYW.js +414 -0
- package/Build/Workers/chunk-QWV2DM66.js +1443 -0
- package/Build/Workers/chunk-R73BHGGI.js +305 -0
- package/Build/Workers/chunk-S3AE3MZZ.js +511 -0
- package/Build/Workers/chunk-SBFTVHRW.js +57 -0
- package/Build/Workers/chunk-SOR7PD4V.js +114 -0
- package/Build/Workers/chunk-TDI7UQBO.js +57 -0
- package/Build/Workers/chunk-TO7TWUET.js +476 -0
- package/Build/Workers/chunk-TSAJNE4K.js +101 -0
- package/Build/Workers/chunk-TWF4XRZ6.js +73 -0
- package/Build/Workers/chunk-U364CIW4.js +682 -0
- package/Build/Workers/chunk-UOD5YNH3.js +940 -0
- package/Build/Workers/chunk-UTWLMOPM.js +387 -0
- package/Build/Workers/chunk-UUJXSLQ2.js +2719 -0
- package/Build/Workers/chunk-UYT2PBMV.js +58 -0
- package/Build/Workers/chunk-VIYQ56Z7.js +837 -0
- package/Build/Workers/chunk-VR2L2Y4Z.js +1443 -0
- package/Build/Workers/chunk-WAS3IHIQ.js +288 -0
- package/Build/Workers/chunk-WLREXLZ7.js +414 -0
- package/Build/Workers/chunk-WMGESUDW.js +497 -0
- package/Build/Workers/chunk-WO5ZNC7S.js +1045 -0
- package/Build/Workers/chunk-X65Y2JSA.js +55 -0
- package/Build/Workers/chunk-XJKMLTSH.js +692 -0
- package/Build/Workers/chunk-XOVHLPKW.js +299 -0
- package/Build/Workers/chunk-YBVMSCW4.js +352 -0
- package/Build/Workers/chunk-YPGJSFOO.js +1460 -0
- package/Build/Workers/chunk-Z356SW7E.js +256 -0
- package/Build/Workers/chunk-ZV42SJKS.js +44 -0
- package/Build/Workers/combineGeometry.js +66 -0
- package/Build/Workers/createBoxGeometry.js +58 -0
- package/Build/Workers/createBoxOutlineGeometry.js +231 -0
- package/Build/Workers/createCircleGeometry.js +201 -0
- package/Build/Workers/createCircleOutlineGeometry.js +147 -0
- package/Build/Workers/createCoplanarPolygonGeometry.js +505 -0
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +225 -0
- package/Build/Workers/createCorridorGeometry.js +1258 -0
- package/Build/Workers/createCorridorOutlineGeometry.js +563 -0
- package/Build/Workers/createCylinderGeometry.js +60 -0
- package/Build/Workers/createCylinderOutlineGeometry.js +231 -0
- package/Build/Workers/createEllipseGeometry.js +72 -0
- package/Build/Workers/createEllipseOutlineGeometry.js +65 -0
- package/Build/Workers/createEllipsoidGeometry.js +59 -0
- package/Build/Workers/createEllipsoidOutlineGeometry.js +61 -0
- package/Build/Workers/createFrustumGeometry.js +58 -0
- package/Build/Workers/createFrustumOutlineGeometry.js +234 -0
- package/Build/Workers/createGeometry.js +173 -0
- package/Build/Workers/createGroundPolylineGeometry.js +1602 -0
- package/Build/Workers/createPlaneGeometry.js +223 -0
- package/Build/Workers/createPlaneOutlineGeometry.js +124 -0
- package/Build/Workers/createPolygonGeometry.js +1404 -0
- package/Build/Workers/createPolygonOutlineGeometry.js +532 -0
- package/Build/Workers/createPolylineGeometry.js +491 -0
- package/Build/Workers/createPolylineVolumeGeometry.js +374 -0
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +272 -0
- package/Build/Workers/createRectangleGeometry.js +1264 -0
- package/Build/Workers/createRectangleOutlineGeometry.js +476 -0
- package/Build/Workers/createSimplePolylineGeometry.js +397 -0
- package/Build/Workers/createSphereGeometry.js +116 -0
- package/Build/Workers/createSphereOutlineGeometry.js +116 -0
- package/Build/Workers/createTaskProcessorWorker.js +32 -0
- package/Build/Workers/createVectorTileClampedPolylines.js +492 -0
- package/Build/Workers/createVectorTileGeometries.js +387 -0
- package/Build/Workers/createVectorTilePoints.js +114 -0
- package/Build/Workers/createVectorTilePolygons.js +386 -0
- package/Build/Workers/createVectorTilePolylines.js +262 -0
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +91 -0
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +565 -0
- package/Build/Workers/createVerticesFromHeightmap.js +2254 -0
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +499 -0
- package/Build/Workers/createWallGeometry.js +487 -0
- package/Build/Workers/createWallOutlineGeometry.js +335 -0
- package/Build/Workers/decodeDraco.js +369 -0
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +2680 -0
- package/Build/Workers/decodeI3S.js +1339 -0
- package/Build/Workers/gaussianSplatSorter.js +62 -0
- package/Build/Workers/gaussianSplatTextureGenerator.js +68 -0
- package/Build/Workers/incrementallyBuildTerrainPicker.js +121 -0
- package/Build/Workers/transcodeKTX2.js +3463 -0
- package/Build/Workers/transferTypedArrayTest.js +41 -0
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +820 -0
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +95 -0
- package/Source/Scene/GltfLoader.js +2 -2
- package/Source/Scene/Model/I3dmLoader.js +2 -2
- package/index.js +110 -110
- package/package.json +1 -1
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.1
|
|
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
|
+
Cartographic_default,
|
|
28
|
+
Ellipsoid_default
|
|
29
|
+
} from "./chunk-YPGJSFOO.js";
|
|
30
|
+
import {
|
|
31
|
+
Cartesian3_default
|
|
32
|
+
} from "./chunk-QWV2DM66.js";
|
|
33
|
+
import {
|
|
34
|
+
Math_default
|
|
35
|
+
} from "./chunk-6XJO625E.js";
|
|
36
|
+
import {
|
|
37
|
+
Check_default
|
|
38
|
+
} from "./chunk-KH2OWUUA.js";
|
|
39
|
+
import {
|
|
40
|
+
defined_default
|
|
41
|
+
} from "./chunk-AVSQILVI.js";
|
|
42
|
+
|
|
43
|
+
// packages/engine/Source/Core/EllipsoidGeodesic.js
|
|
44
|
+
function setConstants(ellipsoidGeodesic) {
|
|
45
|
+
const uSquared = ellipsoidGeodesic._uSquared;
|
|
46
|
+
const a = ellipsoidGeodesic._ellipsoid.maximumRadius;
|
|
47
|
+
const b = ellipsoidGeodesic._ellipsoid.minimumRadius;
|
|
48
|
+
const f = (a - b) / a;
|
|
49
|
+
const cosineHeading = Math.cos(ellipsoidGeodesic._startHeading);
|
|
50
|
+
const sineHeading = Math.sin(ellipsoidGeodesic._startHeading);
|
|
51
|
+
const tanU = (1 - f) * Math.tan(ellipsoidGeodesic._start.latitude);
|
|
52
|
+
const cosineU = 1 / Math.sqrt(1 + tanU * tanU);
|
|
53
|
+
const sineU = cosineU * tanU;
|
|
54
|
+
const sigma = Math.atan2(tanU, cosineHeading);
|
|
55
|
+
const sineAlpha = cosineU * sineHeading;
|
|
56
|
+
const sineSquaredAlpha = sineAlpha * sineAlpha;
|
|
57
|
+
const cosineSquaredAlpha = 1 - sineSquaredAlpha;
|
|
58
|
+
const cosineAlpha = Math.sqrt(cosineSquaredAlpha);
|
|
59
|
+
const u2Over4 = uSquared / 4;
|
|
60
|
+
const u4Over16 = u2Over4 * u2Over4;
|
|
61
|
+
const u6Over64 = u4Over16 * u2Over4;
|
|
62
|
+
const u8Over256 = u4Over16 * u4Over16;
|
|
63
|
+
const a0 = 1 + u2Over4 - 3 * u4Over16 / 4 + 5 * u6Over64 / 4 - 175 * u8Over256 / 64;
|
|
64
|
+
const a1 = 1 - u2Over4 + 15 * u4Over16 / 8 - 35 * u6Over64 / 8;
|
|
65
|
+
const a2 = 1 - 3 * u2Over4 + 35 * u4Over16 / 4;
|
|
66
|
+
const a3 = 1 - 5 * u2Over4;
|
|
67
|
+
const distanceRatio = a0 * sigma - a1 * Math.sin(2 * sigma) * u2Over4 / 2 - a2 * Math.sin(4 * sigma) * u4Over16 / 16 - a3 * Math.sin(6 * sigma) * u6Over64 / 48 - Math.sin(8 * sigma) * 5 * u8Over256 / 512;
|
|
68
|
+
const constants = ellipsoidGeodesic._constants;
|
|
69
|
+
constants.a = a;
|
|
70
|
+
constants.b = b;
|
|
71
|
+
constants.f = f;
|
|
72
|
+
constants.cosineHeading = cosineHeading;
|
|
73
|
+
constants.sineHeading = sineHeading;
|
|
74
|
+
constants.tanU = tanU;
|
|
75
|
+
constants.cosineU = cosineU;
|
|
76
|
+
constants.sineU = sineU;
|
|
77
|
+
constants.sigma = sigma;
|
|
78
|
+
constants.sineAlpha = sineAlpha;
|
|
79
|
+
constants.sineSquaredAlpha = sineSquaredAlpha;
|
|
80
|
+
constants.cosineSquaredAlpha = cosineSquaredAlpha;
|
|
81
|
+
constants.cosineAlpha = cosineAlpha;
|
|
82
|
+
constants.u2Over4 = u2Over4;
|
|
83
|
+
constants.u4Over16 = u4Over16;
|
|
84
|
+
constants.u6Over64 = u6Over64;
|
|
85
|
+
constants.u8Over256 = u8Over256;
|
|
86
|
+
constants.a0 = a0;
|
|
87
|
+
constants.a1 = a1;
|
|
88
|
+
constants.a2 = a2;
|
|
89
|
+
constants.a3 = a3;
|
|
90
|
+
constants.distanceRatio = distanceRatio;
|
|
91
|
+
}
|
|
92
|
+
function computeC(f, cosineSquaredAlpha) {
|
|
93
|
+
return f * cosineSquaredAlpha * (4 + f * (4 - 3 * cosineSquaredAlpha)) / 16;
|
|
94
|
+
}
|
|
95
|
+
function computeDeltaLambda(f, sineAlpha, cosineSquaredAlpha, sigma, sineSigma, cosineSigma, cosineTwiceSigmaMidpoint) {
|
|
96
|
+
const C = computeC(f, cosineSquaredAlpha);
|
|
97
|
+
return (1 - C) * f * sineAlpha * (sigma + C * sineSigma * (cosineTwiceSigmaMidpoint + C * cosineSigma * (2 * cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint - 1)));
|
|
98
|
+
}
|
|
99
|
+
function vincentyInverseFormula(ellipsoidGeodesic, major, minor, firstLongitude, firstLatitude, secondLongitude, secondLatitude) {
|
|
100
|
+
const eff = (major - minor) / major;
|
|
101
|
+
const l = secondLongitude - firstLongitude;
|
|
102
|
+
const u1 = Math.atan((1 - eff) * Math.tan(firstLatitude));
|
|
103
|
+
const u2 = Math.atan((1 - eff) * Math.tan(secondLatitude));
|
|
104
|
+
const cosineU1 = Math.cos(u1);
|
|
105
|
+
const sineU1 = Math.sin(u1);
|
|
106
|
+
const cosineU2 = Math.cos(u2);
|
|
107
|
+
const sineU2 = Math.sin(u2);
|
|
108
|
+
const cc = cosineU1 * cosineU2;
|
|
109
|
+
const cs = cosineU1 * sineU2;
|
|
110
|
+
const ss = sineU1 * sineU2;
|
|
111
|
+
const sc = sineU1 * cosineU2;
|
|
112
|
+
let lambda = l;
|
|
113
|
+
let lambdaDot = Math_default.TWO_PI;
|
|
114
|
+
let cosineLambda = Math.cos(lambda);
|
|
115
|
+
let sineLambda = Math.sin(lambda);
|
|
116
|
+
let sigma;
|
|
117
|
+
let cosineSigma;
|
|
118
|
+
let sineSigma;
|
|
119
|
+
let cosineSquaredAlpha;
|
|
120
|
+
let cosineTwiceSigmaMidpoint;
|
|
121
|
+
do {
|
|
122
|
+
cosineLambda = Math.cos(lambda);
|
|
123
|
+
sineLambda = Math.sin(lambda);
|
|
124
|
+
const temp = cs - sc * cosineLambda;
|
|
125
|
+
sineSigma = Math.sqrt(
|
|
126
|
+
cosineU2 * cosineU2 * sineLambda * sineLambda + temp * temp
|
|
127
|
+
);
|
|
128
|
+
cosineSigma = ss + cc * cosineLambda;
|
|
129
|
+
sigma = Math.atan2(sineSigma, cosineSigma);
|
|
130
|
+
let sineAlpha;
|
|
131
|
+
if (sineSigma === 0) {
|
|
132
|
+
sineAlpha = 0;
|
|
133
|
+
cosineSquaredAlpha = 1;
|
|
134
|
+
} else {
|
|
135
|
+
sineAlpha = cc * sineLambda / sineSigma;
|
|
136
|
+
cosineSquaredAlpha = 1 - sineAlpha * sineAlpha;
|
|
137
|
+
}
|
|
138
|
+
lambdaDot = lambda;
|
|
139
|
+
cosineTwiceSigmaMidpoint = cosineSigma - 2 * ss / cosineSquaredAlpha;
|
|
140
|
+
if (!isFinite(cosineTwiceSigmaMidpoint)) {
|
|
141
|
+
cosineTwiceSigmaMidpoint = 0;
|
|
142
|
+
}
|
|
143
|
+
lambda = l + computeDeltaLambda(
|
|
144
|
+
eff,
|
|
145
|
+
sineAlpha,
|
|
146
|
+
cosineSquaredAlpha,
|
|
147
|
+
sigma,
|
|
148
|
+
sineSigma,
|
|
149
|
+
cosineSigma,
|
|
150
|
+
cosineTwiceSigmaMidpoint
|
|
151
|
+
);
|
|
152
|
+
} while (Math.abs(lambda - lambdaDot) > Math_default.EPSILON12);
|
|
153
|
+
const uSquared = cosineSquaredAlpha * (major * major - minor * minor) / (minor * minor);
|
|
154
|
+
const A = 1 + uSquared * (4096 + uSquared * (uSquared * (320 - 175 * uSquared) - 768)) / 16384;
|
|
155
|
+
const B = uSquared * (256 + uSquared * (uSquared * (74 - 47 * uSquared) - 128)) / 1024;
|
|
156
|
+
const cosineSquaredTwiceSigmaMidpoint = cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint;
|
|
157
|
+
const deltaSigma = B * sineSigma * (cosineTwiceSigmaMidpoint + B * (cosineSigma * (2 * cosineSquaredTwiceSigmaMidpoint - 1) - B * cosineTwiceSigmaMidpoint * (4 * sineSigma * sineSigma - 3) * (4 * cosineSquaredTwiceSigmaMidpoint - 3) / 6) / 4);
|
|
158
|
+
const distance = minor * A * (sigma - deltaSigma);
|
|
159
|
+
const startHeading = Math.atan2(
|
|
160
|
+
cosineU2 * sineLambda,
|
|
161
|
+
cs - sc * cosineLambda
|
|
162
|
+
);
|
|
163
|
+
const endHeading = Math.atan2(cosineU1 * sineLambda, cs * cosineLambda - sc);
|
|
164
|
+
ellipsoidGeodesic._distance = distance;
|
|
165
|
+
ellipsoidGeodesic._startHeading = startHeading;
|
|
166
|
+
ellipsoidGeodesic._endHeading = endHeading;
|
|
167
|
+
ellipsoidGeodesic._uSquared = uSquared;
|
|
168
|
+
}
|
|
169
|
+
var scratchCart1 = new Cartesian3_default();
|
|
170
|
+
var scratchCart2 = new Cartesian3_default();
|
|
171
|
+
function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) {
|
|
172
|
+
const firstCartesian = Cartesian3_default.normalize(
|
|
173
|
+
ellipsoid.cartographicToCartesian(start, scratchCart2),
|
|
174
|
+
scratchCart1
|
|
175
|
+
);
|
|
176
|
+
const lastCartesian = Cartesian3_default.normalize(
|
|
177
|
+
ellipsoid.cartographicToCartesian(end, scratchCart2),
|
|
178
|
+
scratchCart2
|
|
179
|
+
);
|
|
180
|
+
Check_default.typeOf.number.greaterThanOrEquals(
|
|
181
|
+
"value",
|
|
182
|
+
Math.abs(
|
|
183
|
+
Math.abs(Cartesian3_default.angleBetween(firstCartesian, lastCartesian)) - Math.PI
|
|
184
|
+
),
|
|
185
|
+
0.0125
|
|
186
|
+
);
|
|
187
|
+
vincentyInverseFormula(
|
|
188
|
+
ellipsoidGeodesic,
|
|
189
|
+
ellipsoid.maximumRadius,
|
|
190
|
+
ellipsoid.minimumRadius,
|
|
191
|
+
start.longitude,
|
|
192
|
+
start.latitude,
|
|
193
|
+
end.longitude,
|
|
194
|
+
end.latitude
|
|
195
|
+
);
|
|
196
|
+
ellipsoidGeodesic._start = Cartographic_default.clone(
|
|
197
|
+
start,
|
|
198
|
+
ellipsoidGeodesic._start
|
|
199
|
+
);
|
|
200
|
+
ellipsoidGeodesic._end = Cartographic_default.clone(end, ellipsoidGeodesic._end);
|
|
201
|
+
ellipsoidGeodesic._start.height = 0;
|
|
202
|
+
ellipsoidGeodesic._end.height = 0;
|
|
203
|
+
setConstants(ellipsoidGeodesic);
|
|
204
|
+
}
|
|
205
|
+
function EllipsoidGeodesic(start, end, ellipsoid) {
|
|
206
|
+
const e = ellipsoid ?? Ellipsoid_default.default;
|
|
207
|
+
this._ellipsoid = e;
|
|
208
|
+
this._start = new Cartographic_default();
|
|
209
|
+
this._end = new Cartographic_default();
|
|
210
|
+
this._constants = {};
|
|
211
|
+
this._startHeading = void 0;
|
|
212
|
+
this._endHeading = void 0;
|
|
213
|
+
this._distance = void 0;
|
|
214
|
+
this._uSquared = void 0;
|
|
215
|
+
if (defined_default(start) && defined_default(end)) {
|
|
216
|
+
computeProperties(this, start, end, e);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
Object.defineProperties(EllipsoidGeodesic.prototype, {
|
|
220
|
+
/**
|
|
221
|
+
* Gets the ellipsoid.
|
|
222
|
+
* @memberof EllipsoidGeodesic.prototype
|
|
223
|
+
* @type {Ellipsoid}
|
|
224
|
+
* @readonly
|
|
225
|
+
*/
|
|
226
|
+
ellipsoid: {
|
|
227
|
+
get: function() {
|
|
228
|
+
return this._ellipsoid;
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
/**
|
|
232
|
+
* Gets the surface distance between the start and end point
|
|
233
|
+
* @memberof EllipsoidGeodesic.prototype
|
|
234
|
+
* @type {number}
|
|
235
|
+
* @readonly
|
|
236
|
+
*/
|
|
237
|
+
surfaceDistance: {
|
|
238
|
+
get: function() {
|
|
239
|
+
Check_default.defined("distance", this._distance);
|
|
240
|
+
return this._distance;
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
/**
|
|
244
|
+
* Gets the initial planetodetic point on the path.
|
|
245
|
+
* @memberof EllipsoidGeodesic.prototype
|
|
246
|
+
* @type {Cartographic}
|
|
247
|
+
* @readonly
|
|
248
|
+
*/
|
|
249
|
+
start: {
|
|
250
|
+
get: function() {
|
|
251
|
+
return this._start;
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
/**
|
|
255
|
+
* Gets the final planetodetic point on the path.
|
|
256
|
+
* @memberof EllipsoidGeodesic.prototype
|
|
257
|
+
* @type {Cartographic}
|
|
258
|
+
* @readonly
|
|
259
|
+
*/
|
|
260
|
+
end: {
|
|
261
|
+
get: function() {
|
|
262
|
+
return this._end;
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
/**
|
|
266
|
+
* Gets the heading at the initial point.
|
|
267
|
+
* @memberof EllipsoidGeodesic.prototype
|
|
268
|
+
* @type {number}
|
|
269
|
+
* @readonly
|
|
270
|
+
*/
|
|
271
|
+
startHeading: {
|
|
272
|
+
get: function() {
|
|
273
|
+
Check_default.defined("distance", this._distance);
|
|
274
|
+
return this._startHeading;
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
/**
|
|
278
|
+
* Gets the heading at the final point.
|
|
279
|
+
* @memberof EllipsoidGeodesic.prototype
|
|
280
|
+
* @type {number}
|
|
281
|
+
* @readonly
|
|
282
|
+
*/
|
|
283
|
+
endHeading: {
|
|
284
|
+
get: function() {
|
|
285
|
+
Check_default.defined("distance", this._distance);
|
|
286
|
+
return this._endHeading;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
EllipsoidGeodesic.prototype.setEndPoints = function(start, end) {
|
|
291
|
+
Check_default.defined("start", start);
|
|
292
|
+
Check_default.defined("end", end);
|
|
293
|
+
computeProperties(this, start, end, this._ellipsoid);
|
|
294
|
+
};
|
|
295
|
+
EllipsoidGeodesic.prototype.interpolateUsingFraction = function(fraction, result) {
|
|
296
|
+
return this.interpolateUsingSurfaceDistance(
|
|
297
|
+
this._distance * fraction,
|
|
298
|
+
result
|
|
299
|
+
);
|
|
300
|
+
};
|
|
301
|
+
EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance = function(distance, result) {
|
|
302
|
+
Check_default.defined("distance", this._distance);
|
|
303
|
+
const constants = this._constants;
|
|
304
|
+
const s = constants.distanceRatio + distance / constants.b;
|
|
305
|
+
const cosine2S = Math.cos(2 * s);
|
|
306
|
+
const cosine4S = Math.cos(4 * s);
|
|
307
|
+
const cosine6S = Math.cos(6 * s);
|
|
308
|
+
const sine2S = Math.sin(2 * s);
|
|
309
|
+
const sine4S = Math.sin(4 * s);
|
|
310
|
+
const sine6S = Math.sin(6 * s);
|
|
311
|
+
const sine8S = Math.sin(8 * s);
|
|
312
|
+
const s2 = s * s;
|
|
313
|
+
const s3 = s * s2;
|
|
314
|
+
const u8Over256 = constants.u8Over256;
|
|
315
|
+
const u2Over4 = constants.u2Over4;
|
|
316
|
+
const u6Over64 = constants.u6Over64;
|
|
317
|
+
const u4Over16 = constants.u4Over16;
|
|
318
|
+
let sigma = 2 * s3 * u8Over256 * cosine2S / 3 + s * (1 - u2Over4 + 7 * u4Over16 / 4 - 15 * u6Over64 / 4 + 579 * u8Over256 / 64 - (u4Over16 - 15 * u6Over64 / 4 + 187 * u8Over256 / 16) * cosine2S - (5 * u6Over64 / 4 - 115 * u8Over256 / 16) * cosine4S - 29 * u8Over256 * cosine6S / 16) + (u2Over4 / 2 - u4Over16 + 71 * u6Over64 / 32 - 85 * u8Over256 / 16) * sine2S + (5 * u4Over16 / 16 - 5 * u6Over64 / 4 + 383 * u8Over256 / 96) * sine4S - s2 * ((u6Over64 - 11 * u8Over256 / 2) * sine2S + 5 * u8Over256 * sine4S / 2) + (29 * u6Over64 / 96 - 29 * u8Over256 / 16) * sine6S + 539 * u8Over256 * sine8S / 1536;
|
|
319
|
+
const theta = Math.asin(Math.sin(sigma) * constants.cosineAlpha);
|
|
320
|
+
const latitude = Math.atan(constants.a / constants.b * Math.tan(theta));
|
|
321
|
+
sigma = sigma - constants.sigma;
|
|
322
|
+
const cosineTwiceSigmaMidpoint = Math.cos(2 * constants.sigma + sigma);
|
|
323
|
+
const sineSigma = Math.sin(sigma);
|
|
324
|
+
const cosineSigma = Math.cos(sigma);
|
|
325
|
+
const cc = constants.cosineU * cosineSigma;
|
|
326
|
+
const ss = constants.sineU * sineSigma;
|
|
327
|
+
const lambda = Math.atan2(
|
|
328
|
+
sineSigma * constants.sineHeading,
|
|
329
|
+
cc - ss * constants.cosineHeading
|
|
330
|
+
);
|
|
331
|
+
const l = lambda - computeDeltaLambda(
|
|
332
|
+
constants.f,
|
|
333
|
+
constants.sineAlpha,
|
|
334
|
+
constants.cosineSquaredAlpha,
|
|
335
|
+
sigma,
|
|
336
|
+
sineSigma,
|
|
337
|
+
cosineSigma,
|
|
338
|
+
cosineTwiceSigmaMidpoint
|
|
339
|
+
);
|
|
340
|
+
if (defined_default(result)) {
|
|
341
|
+
result.longitude = this._start.longitude + l;
|
|
342
|
+
result.latitude = latitude;
|
|
343
|
+
result.height = 0;
|
|
344
|
+
return result;
|
|
345
|
+
}
|
|
346
|
+
return new Cartographic_default(this._start.longitude + l, latitude, 0);
|
|
347
|
+
};
|
|
348
|
+
var EllipsoidGeodesic_default = EllipsoidGeodesic;
|
|
349
|
+
|
|
350
|
+
export {
|
|
351
|
+
EllipsoidGeodesic_default
|
|
352
|
+
};
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.1
|
|
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
|
+
WebGLConstants_default
|
|
28
|
+
} from "./chunk-5VZISKJF.js";
|
|
29
|
+
import {
|
|
30
|
+
DeveloperError_default
|
|
31
|
+
} from "./chunk-KH2OWUUA.js";
|
|
32
|
+
import {
|
|
33
|
+
defined_default
|
|
34
|
+
} from "./chunk-AVSQILVI.js";
|
|
35
|
+
|
|
36
|
+
// packages/engine/Source/Core/ComponentDatatype.js
|
|
37
|
+
var ComponentDatatype = {
|
|
38
|
+
/**
|
|
39
|
+
* 8-bit signed byte corresponding to <code>gl.BYTE</code> and the type
|
|
40
|
+
* of an element in <code>Int8Array</code>.
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @constant
|
|
44
|
+
*/
|
|
45
|
+
BYTE: WebGLConstants_default.BYTE,
|
|
46
|
+
/**
|
|
47
|
+
* 8-bit unsigned byte corresponding to <code>UNSIGNED_BYTE</code> and the type
|
|
48
|
+
* of an element in <code>Uint8Array</code>.
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @constant
|
|
52
|
+
*/
|
|
53
|
+
UNSIGNED_BYTE: WebGLConstants_default.UNSIGNED_BYTE,
|
|
54
|
+
/**
|
|
55
|
+
* 16-bit signed short corresponding to <code>SHORT</code> and the type
|
|
56
|
+
* of an element in <code>Int16Array</code>.
|
|
57
|
+
*
|
|
58
|
+
* @type {number}
|
|
59
|
+
* @constant
|
|
60
|
+
*/
|
|
61
|
+
SHORT: WebGLConstants_default.SHORT,
|
|
62
|
+
/**
|
|
63
|
+
* 16-bit unsigned short corresponding to <code>UNSIGNED_SHORT</code> and the type
|
|
64
|
+
* of an element in <code>Uint16Array</code>.
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @constant
|
|
68
|
+
*/
|
|
69
|
+
UNSIGNED_SHORT: WebGLConstants_default.UNSIGNED_SHORT,
|
|
70
|
+
/**
|
|
71
|
+
* 32-bit signed int corresponding to <code>INT</code> and the type
|
|
72
|
+
* of an element in <code>Int32Array</code>.
|
|
73
|
+
*
|
|
74
|
+
* @memberOf ComponentDatatype
|
|
75
|
+
*
|
|
76
|
+
* @type {number}
|
|
77
|
+
* @constant
|
|
78
|
+
*/
|
|
79
|
+
INT: WebGLConstants_default.INT,
|
|
80
|
+
/**
|
|
81
|
+
* 32-bit unsigned int corresponding to <code>UNSIGNED_INT</code> and the type
|
|
82
|
+
* of an element in <code>Uint32Array</code>.
|
|
83
|
+
*
|
|
84
|
+
* @memberOf ComponentDatatype
|
|
85
|
+
*
|
|
86
|
+
* @type {number}
|
|
87
|
+
* @constant
|
|
88
|
+
*/
|
|
89
|
+
UNSIGNED_INT: WebGLConstants_default.UNSIGNED_INT,
|
|
90
|
+
/**
|
|
91
|
+
* 32-bit floating-point corresponding to <code>FLOAT</code> and the type
|
|
92
|
+
* of an element in <code>Float32Array</code>.
|
|
93
|
+
*
|
|
94
|
+
* @type {number}
|
|
95
|
+
* @constant
|
|
96
|
+
*/
|
|
97
|
+
FLOAT: WebGLConstants_default.FLOAT,
|
|
98
|
+
/**
|
|
99
|
+
* 64-bit floating-point corresponding to <code>gl.DOUBLE</code> (in Desktop OpenGL;
|
|
100
|
+
* this is not supported in WebGL, and is emulated in Cesium via {@link GeometryPipeline.encodeAttribute})
|
|
101
|
+
* and the type of an element in <code>Float64Array</code>.
|
|
102
|
+
*
|
|
103
|
+
* @memberOf ComponentDatatype
|
|
104
|
+
*
|
|
105
|
+
* @type {number}
|
|
106
|
+
* @constant
|
|
107
|
+
* @default 0x140A
|
|
108
|
+
*/
|
|
109
|
+
DOUBLE: WebGLConstants_default.DOUBLE
|
|
110
|
+
};
|
|
111
|
+
ComponentDatatype.getSizeInBytes = function(componentDatatype) {
|
|
112
|
+
if (!defined_default(componentDatatype)) {
|
|
113
|
+
throw new DeveloperError_default("value is required.");
|
|
114
|
+
}
|
|
115
|
+
switch (componentDatatype) {
|
|
116
|
+
case ComponentDatatype.BYTE:
|
|
117
|
+
return Int8Array.BYTES_PER_ELEMENT;
|
|
118
|
+
case ComponentDatatype.UNSIGNED_BYTE:
|
|
119
|
+
return Uint8Array.BYTES_PER_ELEMENT;
|
|
120
|
+
case ComponentDatatype.SHORT:
|
|
121
|
+
return Int16Array.BYTES_PER_ELEMENT;
|
|
122
|
+
case ComponentDatatype.UNSIGNED_SHORT:
|
|
123
|
+
return Uint16Array.BYTES_PER_ELEMENT;
|
|
124
|
+
case ComponentDatatype.INT:
|
|
125
|
+
return Int32Array.BYTES_PER_ELEMENT;
|
|
126
|
+
case ComponentDatatype.UNSIGNED_INT:
|
|
127
|
+
return Uint32Array.BYTES_PER_ELEMENT;
|
|
128
|
+
case ComponentDatatype.FLOAT:
|
|
129
|
+
return Float32Array.BYTES_PER_ELEMENT;
|
|
130
|
+
case ComponentDatatype.DOUBLE:
|
|
131
|
+
return Float64Array.BYTES_PER_ELEMENT;
|
|
132
|
+
//>>includeStart('debug', pragmas.debug);
|
|
133
|
+
default:
|
|
134
|
+
throw new DeveloperError_default("componentDatatype is not a valid value.");
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
ComponentDatatype.fromTypedArray = function(array) {
|
|
138
|
+
if (array instanceof Int8Array) {
|
|
139
|
+
return ComponentDatatype.BYTE;
|
|
140
|
+
}
|
|
141
|
+
if (array instanceof Uint8Array) {
|
|
142
|
+
return ComponentDatatype.UNSIGNED_BYTE;
|
|
143
|
+
}
|
|
144
|
+
if (array instanceof Int16Array) {
|
|
145
|
+
return ComponentDatatype.SHORT;
|
|
146
|
+
}
|
|
147
|
+
if (array instanceof Uint16Array) {
|
|
148
|
+
return ComponentDatatype.UNSIGNED_SHORT;
|
|
149
|
+
}
|
|
150
|
+
if (array instanceof Int32Array) {
|
|
151
|
+
return ComponentDatatype.INT;
|
|
152
|
+
}
|
|
153
|
+
if (array instanceof Uint32Array) {
|
|
154
|
+
return ComponentDatatype.UNSIGNED_INT;
|
|
155
|
+
}
|
|
156
|
+
if (array instanceof Float32Array) {
|
|
157
|
+
return ComponentDatatype.FLOAT;
|
|
158
|
+
}
|
|
159
|
+
if (array instanceof Float64Array) {
|
|
160
|
+
return ComponentDatatype.DOUBLE;
|
|
161
|
+
}
|
|
162
|
+
throw new DeveloperError_default(
|
|
163
|
+
"array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array."
|
|
164
|
+
);
|
|
165
|
+
};
|
|
166
|
+
ComponentDatatype.validate = function(componentDatatype) {
|
|
167
|
+
return defined_default(componentDatatype) && (componentDatatype === ComponentDatatype.BYTE || componentDatatype === ComponentDatatype.UNSIGNED_BYTE || componentDatatype === ComponentDatatype.SHORT || componentDatatype === ComponentDatatype.UNSIGNED_SHORT || componentDatatype === ComponentDatatype.INT || componentDatatype === ComponentDatatype.UNSIGNED_INT || componentDatatype === ComponentDatatype.FLOAT || componentDatatype === ComponentDatatype.DOUBLE);
|
|
168
|
+
};
|
|
169
|
+
ComponentDatatype.createTypedArray = function(componentDatatype, valuesOrLength) {
|
|
170
|
+
if (!defined_default(componentDatatype)) {
|
|
171
|
+
throw new DeveloperError_default("componentDatatype is required.");
|
|
172
|
+
}
|
|
173
|
+
if (!defined_default(valuesOrLength)) {
|
|
174
|
+
throw new DeveloperError_default("valuesOrLength is required.");
|
|
175
|
+
}
|
|
176
|
+
switch (componentDatatype) {
|
|
177
|
+
case ComponentDatatype.BYTE:
|
|
178
|
+
return new Int8Array(valuesOrLength);
|
|
179
|
+
case ComponentDatatype.UNSIGNED_BYTE:
|
|
180
|
+
return new Uint8Array(valuesOrLength);
|
|
181
|
+
case ComponentDatatype.SHORT:
|
|
182
|
+
return new Int16Array(valuesOrLength);
|
|
183
|
+
case ComponentDatatype.UNSIGNED_SHORT:
|
|
184
|
+
return new Uint16Array(valuesOrLength);
|
|
185
|
+
case ComponentDatatype.INT:
|
|
186
|
+
return new Int32Array(valuesOrLength);
|
|
187
|
+
case ComponentDatatype.UNSIGNED_INT:
|
|
188
|
+
return new Uint32Array(valuesOrLength);
|
|
189
|
+
case ComponentDatatype.FLOAT:
|
|
190
|
+
return new Float32Array(valuesOrLength);
|
|
191
|
+
case ComponentDatatype.DOUBLE:
|
|
192
|
+
return new Float64Array(valuesOrLength);
|
|
193
|
+
//>>includeStart('debug', pragmas.debug);
|
|
194
|
+
default:
|
|
195
|
+
throw new DeveloperError_default("componentDatatype is not a valid value.");
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
ComponentDatatype.createArrayBufferView = function(componentDatatype, buffer, byteOffset, length) {
|
|
199
|
+
if (!defined_default(componentDatatype)) {
|
|
200
|
+
throw new DeveloperError_default("componentDatatype is required.");
|
|
201
|
+
}
|
|
202
|
+
if (!defined_default(buffer)) {
|
|
203
|
+
throw new DeveloperError_default("buffer is required.");
|
|
204
|
+
}
|
|
205
|
+
byteOffset = byteOffset ?? 0;
|
|
206
|
+
length = length ?? (buffer.byteLength - byteOffset) / ComponentDatatype.getSizeInBytes(componentDatatype);
|
|
207
|
+
switch (componentDatatype) {
|
|
208
|
+
case ComponentDatatype.BYTE:
|
|
209
|
+
return new Int8Array(buffer, byteOffset, length);
|
|
210
|
+
case ComponentDatatype.UNSIGNED_BYTE:
|
|
211
|
+
return new Uint8Array(buffer, byteOffset, length);
|
|
212
|
+
case ComponentDatatype.SHORT:
|
|
213
|
+
return new Int16Array(buffer, byteOffset, length);
|
|
214
|
+
case ComponentDatatype.UNSIGNED_SHORT:
|
|
215
|
+
return new Uint16Array(buffer, byteOffset, length);
|
|
216
|
+
case ComponentDatatype.INT:
|
|
217
|
+
return new Int32Array(buffer, byteOffset, length);
|
|
218
|
+
case ComponentDatatype.UNSIGNED_INT:
|
|
219
|
+
return new Uint32Array(buffer, byteOffset, length);
|
|
220
|
+
case ComponentDatatype.FLOAT:
|
|
221
|
+
return new Float32Array(buffer, byteOffset, length);
|
|
222
|
+
case ComponentDatatype.DOUBLE:
|
|
223
|
+
return new Float64Array(buffer, byteOffset, length);
|
|
224
|
+
//>>includeStart('debug', pragmas.debug);
|
|
225
|
+
default:
|
|
226
|
+
throw new DeveloperError_default("componentDatatype is not a valid value.");
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
ComponentDatatype.fromName = function(name) {
|
|
230
|
+
switch (name) {
|
|
231
|
+
case "BYTE":
|
|
232
|
+
return ComponentDatatype.BYTE;
|
|
233
|
+
case "UNSIGNED_BYTE":
|
|
234
|
+
return ComponentDatatype.UNSIGNED_BYTE;
|
|
235
|
+
case "SHORT":
|
|
236
|
+
return ComponentDatatype.SHORT;
|
|
237
|
+
case "UNSIGNED_SHORT":
|
|
238
|
+
return ComponentDatatype.UNSIGNED_SHORT;
|
|
239
|
+
case "INT":
|
|
240
|
+
return ComponentDatatype.INT;
|
|
241
|
+
case "UNSIGNED_INT":
|
|
242
|
+
return ComponentDatatype.UNSIGNED_INT;
|
|
243
|
+
case "FLOAT":
|
|
244
|
+
return ComponentDatatype.FLOAT;
|
|
245
|
+
case "DOUBLE":
|
|
246
|
+
return ComponentDatatype.DOUBLE;
|
|
247
|
+
//>>includeStart('debug', pragmas.debug);
|
|
248
|
+
default:
|
|
249
|
+
throw new DeveloperError_default("name is not a valid value.");
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
var ComponentDatatype_default = Object.freeze(ComponentDatatype);
|
|
253
|
+
|
|
254
|
+
export {
|
|
255
|
+
ComponentDatatype_default
|
|
256
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.1
|
|
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
|
+
};
|