@hztxi/cesium-engine 25.0.1 → 25.0.2
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/Workers/chunk-27UNFKLP.js +78 -0
- package/Build/Workers/chunk-2NIRC5FH.js +398 -0
- package/Build/Workers/chunk-2YHL3RU5.js +162 -0
- package/Build/Workers/chunk-36Y4HYYW.js +1067 -0
- package/Build/Workers/chunk-3EB75M2K.js +2342 -0
- package/Build/Workers/chunk-3HGZ7PIQ.js +1483 -0
- package/Build/Workers/chunk-4A34KHP2.js +138 -0
- package/Build/Workers/chunk-4GKVVYGC.js +124 -0
- package/Build/Workers/chunk-4NOKV4XU.js +301 -0
- package/Build/Workers/chunk-4VMEH443.js +754 -0
- package/Build/Workers/chunk-4VO5KZVX.js +693 -0
- package/Build/Workers/chunk-53ITLB2Q.js +288 -0
- package/Build/Workers/chunk-5523YTNX.js +352 -0
- package/Build/Workers/chunk-562MM6RC.js +682 -0
- package/Build/Workers/chunk-5BQXC3BP.js +837 -0
- package/Build/Workers/chunk-5DHF2GEC.js +497 -0
- package/Build/Workers/chunk-5RSLOB22.js +511 -0
- package/Build/Workers/chunk-5SLGYIPO.js +454 -0
- package/Build/Workers/chunk-65RILO72.js +76 -0
- package/Build/Workers/chunk-6A74XDJV.js +1054 -0
- package/Build/Workers/chunk-6CAFY3E7.js +280 -0
- package/Build/Workers/chunk-6IWHUZUQ.js +959 -0
- package/Build/Workers/chunk-6ROOPL5F.js +455 -0
- package/Build/Workers/chunk-6SQMSSOR.js +352 -0
- package/Build/Workers/chunk-6SZK4XE5.js +1800 -0
- package/Build/Workers/chunk-6XE6USHI.js +280 -0
- package/Build/Workers/chunk-6YMLC7BS.js +1067 -0
- package/Build/Workers/chunk-7QXAVVZH.js +9230 -0
- package/Build/Workers/chunk-A4AIHOC7.js +476 -0
- package/Build/Workers/chunk-AFBRALW3.js +3620 -0
- package/Build/Workers/chunk-AGANEUZR.js +305 -0
- package/Build/Workers/chunk-AIA3JN4E.js +171 -0
- package/Build/Workers/chunk-AJ4TSZQD.js +352 -0
- package/Build/Workers/chunk-ANB53XEA.js +198 -0
- package/Build/Workers/chunk-AWP7JHXS.js +58 -0
- package/Build/Workers/chunk-B2MY5ZT4.js +241 -0
- package/Build/Workers/chunk-BVOP4FBU.js +778 -0
- package/Build/Workers/chunk-CUJKQD6C.js +1287 -0
- package/Build/Workers/chunk-DOJQOYSZ.js +1344 -0
- package/Build/Workers/chunk-DSOWTJU3.js +3201 -0
- package/Build/Workers/chunk-E4SAHWMA.js +1992 -0
- package/Build/Workers/chunk-EJES53XD.js +147 -0
- package/Build/Workers/chunk-FEMEGP72.js +97 -0
- package/Build/Workers/chunk-FPUTHLEQ.js +73 -0
- package/Build/Workers/chunk-FSGWPS5K.js +102 -0
- package/Build/Workers/chunk-FVGN2Y5F.js +414 -0
- package/Build/Workers/chunk-FYOTKGMD.js +38 -0
- package/Build/Workers/chunk-FYOU33DL.js +454 -0
- package/Build/Workers/chunk-FZQTWCZX.js +138 -0
- package/Build/Workers/chunk-G7QZ6W7K.js +56 -0
- package/Build/Workers/chunk-GBYWJNH6.js +455 -0
- package/Build/Workers/chunk-H62GX37Y.js +414 -0
- package/Build/Workers/chunk-HA42BW2W.js +73 -0
- package/Build/Workers/chunk-HGDGYWXB.js +368 -0
- package/Build/Workers/chunk-HLCNW67V.js +162 -0
- package/Build/Workers/chunk-HPRR2MW2.js +9230 -0
- package/Build/Workers/chunk-JHL6DEKL.js +1287 -0
- package/Build/Workers/chunk-KGNDVO6V.js +497 -0
- package/Build/Workers/chunk-KKXT553B.js +2719 -0
- package/Build/Workers/chunk-KM3TU6SW.js +101 -0
- package/Build/Workers/chunk-LANT2AAI.js +398 -0
- package/Build/Workers/chunk-LC2DM3UY.js +352 -0
- package/Build/Workers/chunk-LFVZBOFT.js +140 -0
- package/Build/Workers/chunk-M3YCBXY6.js +97 -0
- package/Build/Workers/chunk-MNKWZJLE.js +754 -0
- package/Build/Workers/chunk-MR7LJQY3.js +1344 -0
- package/Build/Workers/chunk-MVCGWYYA.js +693 -0
- package/Build/Workers/chunk-N4ECLSTH.js +163 -0
- package/Build/Workers/chunk-NG6PINOD.js +973 -0
- package/Build/Workers/chunk-NOOOB6XR.js +76 -0
- package/Build/Workers/chunk-NRIECATP.js +124 -0
- package/Build/Workers/chunk-OI6UMRBT.js +368 -0
- package/Build/Workers/chunk-OJMOQSS5.js +387 -0
- package/Build/Workers/chunk-PEK6L3A2.js +102 -0
- package/Build/Workers/chunk-PLMDKE2G.js +57 -0
- package/Build/Workers/chunk-R3E7ZNXL.js +44 -0
- package/Build/Workers/chunk-RGNURFR5.js +1992 -0
- package/Build/Workers/chunk-RHVCL4BF.js +3620 -0
- package/Build/Workers/chunk-S7NAPXAR.js +305 -0
- package/Build/Workers/chunk-SAFIA66W.js +140 -0
- package/Build/Workers/chunk-SLZBHAWM.js +837 -0
- package/Build/Workers/chunk-SOD6C4T2.js +682 -0
- package/Build/Workers/chunk-SOMBAQ6X.js +3201 -0
- package/Build/Workers/chunk-SOOUWXOJ.js +198 -0
- package/Build/Workers/chunk-SZONDGD2.js +778 -0
- package/Build/Workers/chunk-TT3NOX52.js +257 -0
- package/Build/Workers/chunk-TT6EXCGT.js +387 -0
- package/Build/Workers/chunk-UQABUNQP.js +301 -0
- package/Build/Workers/chunk-UUN6ELAF.js +476 -0
- package/Build/Workers/chunk-VDJVNJXW.js +2342 -0
- package/Build/Workers/chunk-VU2OEFZS.js +511 -0
- package/Build/Workers/chunk-VYTIQ2Y2.js +630 -0
- package/Build/Workers/chunk-W5MRHFMR.js +288 -0
- package/Build/Workers/chunk-WHJCVALR.js +241 -0
- package/Build/Workers/chunk-WKB3ASRI.js +973 -0
- package/Build/Workers/chunk-WLDDKODU.js +44 -0
- package/Build/Workers/chunk-X4A7LVKE.js +219 -0
- package/Build/Workers/chunk-XFMCNWLM.js +2719 -0
- package/Build/Workers/chunk-XGU44EOV.js +219 -0
- package/Build/Workers/chunk-XIIIDBAK.js +171 -0
- package/Build/Workers/chunk-XLMFFASL.js +1483 -0
- package/Build/Workers/chunk-Y2TJP7FF.js +959 -0
- package/Build/Workers/chunk-Y7LAUPYL.js +1054 -0
- package/Build/Workers/chunk-YMIPCEQ6.js +1800 -0
- package/Build/Workers/chunk-YQVAKERA.js +57 -0
- package/Build/Workers/chunk-YWXQX4RS.js +147 -0
- package/Build/Workers/chunk-ZOMW6KCQ.js +56 -0
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +16 -16
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipseGeometry.js +26 -26
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
- package/Build/Workers/createEllipsoidGeometry.js +19 -19
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
- package/Build/Workers/createFrustumGeometry.js +18 -18
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
- package/Build/Workers/createGeometry.js +24 -24
- package/Build/Workers/createGroundPolylineGeometry.js +23 -23
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createPolylineGeometry.js +25 -25
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
- package/Build/Workers/createSimplePolylineGeometry.js +23 -23
- package/Build/Workers/createSphereGeometry.js +19 -19
- package/Build/Workers/createSphereOutlineGeometry.js +18 -18
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -24
- package/Build/Workers/createVectorTilePoints.js +13 -13
- package/Build/Workers/createVectorTilePolygons.js +22 -22
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -26
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +23 -23
- package/Build/Workers/createVerticesFromHeightmap.js +25 -25
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +21 -21
- package/Build/Workers/createWallGeometry.js +24 -24
- package/Build/Workers/createWallOutlineGeometry.js +23 -23
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +29 -29
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
- package/Build/Workers/transcodeKTX2.js +7 -7
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +23 -23
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -26
- package/Source/DataSources/PolylineGeometryUpdater.js +65 -15
- package/Source/Scene/GroundPolylinePrimitive.js +64 -19
- package/Source/Scene/Primitive.js +21 -2
- package/Source/ThirdParty/zip-module.wasm +0 -0
- package/index.js +3 -3
- package/package.json +10 -10
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.141.2
|
|
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-RGNURFR5.js";
|
|
30
|
+
import {
|
|
31
|
+
Cartesian3_default
|
|
32
|
+
} from "./chunk-VDJVNJXW.js";
|
|
33
|
+
import {
|
|
34
|
+
Math_default
|
|
35
|
+
} from "./chunk-KGNDVO6V.js";
|
|
36
|
+
import {
|
|
37
|
+
DeveloperError_default
|
|
38
|
+
} from "./chunk-N4ECLSTH.js";
|
|
39
|
+
import {
|
|
40
|
+
defined_default
|
|
41
|
+
} from "./chunk-27UNFKLP.js";
|
|
42
|
+
|
|
43
|
+
// packages/engine/Source/Core/WebMercatorProjection.js
|
|
44
|
+
var WebMercatorProjection = class _WebMercatorProjection {
|
|
45
|
+
/**
|
|
46
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
|
|
47
|
+
*/
|
|
48
|
+
constructor(ellipsoid) {
|
|
49
|
+
this._ellipsoid = ellipsoid ?? Ellipsoid_default.WGS84;
|
|
50
|
+
this._semimajorAxis = this._ellipsoid.maximumRadius;
|
|
51
|
+
this._oneOverSemimajorAxis = 1 / this._semimajorAxis;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Gets the {@link Ellipsoid}.
|
|
55
|
+
*
|
|
56
|
+
* @type {Ellipsoid}
|
|
57
|
+
* @readonly
|
|
58
|
+
*/
|
|
59
|
+
get ellipsoid() {
|
|
60
|
+
return this._ellipsoid;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Converts a Mercator angle, in the range -PI to PI, to a geodetic latitude
|
|
64
|
+
* in the range -PI/2 to PI/2.
|
|
65
|
+
*
|
|
66
|
+
* @param {number} mercatorAngle The angle to convert.
|
|
67
|
+
* @returns {number} The geodetic latitude in radians.
|
|
68
|
+
*/
|
|
69
|
+
static mercatorAngleToGeodeticLatitude(mercatorAngle) {
|
|
70
|
+
return Math_default.PI_OVER_TWO - 2 * Math.atan(Math.exp(-mercatorAngle));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Converts a geodetic latitude in radians, in the range -PI/2 to PI/2, to a Mercator
|
|
74
|
+
* angle in the range -PI to PI.
|
|
75
|
+
*
|
|
76
|
+
* @param {number} latitude The geodetic latitude in radians.
|
|
77
|
+
* @returns {number} The Mercator angle.
|
|
78
|
+
*/
|
|
79
|
+
static geodeticLatitudeToMercatorAngle(latitude) {
|
|
80
|
+
if (latitude > _WebMercatorProjection.MaximumLatitude) {
|
|
81
|
+
latitude = _WebMercatorProjection.MaximumLatitude;
|
|
82
|
+
} else if (latitude < -_WebMercatorProjection.MaximumLatitude) {
|
|
83
|
+
latitude = -_WebMercatorProjection.MaximumLatitude;
|
|
84
|
+
}
|
|
85
|
+
const sinLatitude = Math.sin(latitude);
|
|
86
|
+
return 0.5 * Math.log((1 + sinLatitude) / (1 - sinLatitude));
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Converts geodetic ellipsoid coordinates, in radians, to the equivalent Web Mercator
|
|
90
|
+
* X, Y, Z coordinates expressed in meters and returned in a {@link Cartesian3}. The height
|
|
91
|
+
* is copied unmodified to the Z coordinate.
|
|
92
|
+
*
|
|
93
|
+
* @param {Cartographic} cartographic The cartographic coordinates in radians.
|
|
94
|
+
* @param {Cartesian3} [result] The instance to which to copy the result, or undefined if a
|
|
95
|
+
* new instance should be created.
|
|
96
|
+
* @returns {Cartesian3} The equivalent web mercator X, Y, Z coordinates, in meters.
|
|
97
|
+
*/
|
|
98
|
+
project(cartographic, result) {
|
|
99
|
+
const semimajorAxis = this._semimajorAxis;
|
|
100
|
+
const x = cartographic.longitude * semimajorAxis;
|
|
101
|
+
const y = _WebMercatorProjection.geodeticLatitudeToMercatorAngle(
|
|
102
|
+
cartographic.latitude
|
|
103
|
+
) * semimajorAxis;
|
|
104
|
+
const z = cartographic.height;
|
|
105
|
+
if (!defined_default(result)) {
|
|
106
|
+
return new Cartesian3_default(x, y, z);
|
|
107
|
+
}
|
|
108
|
+
result.x = x;
|
|
109
|
+
result.y = y;
|
|
110
|
+
result.z = z;
|
|
111
|
+
return result;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Converts Web Mercator X, Y coordinates, expressed in meters, to a {@link Cartographic}
|
|
115
|
+
* containing geodetic ellipsoid coordinates. The Z coordinate is copied unmodified to the
|
|
116
|
+
* height.
|
|
117
|
+
*
|
|
118
|
+
* @param {Cartesian3} cartesian The web mercator Cartesian position to unrproject with height (z) in meters.
|
|
119
|
+
* @param {Cartographic} [result] The instance to which to copy the result, or undefined if a
|
|
120
|
+
* new instance should be created.
|
|
121
|
+
* @returns {Cartographic} The equivalent cartographic coordinates.
|
|
122
|
+
*/
|
|
123
|
+
unproject(cartesian, result) {
|
|
124
|
+
if (!defined_default(cartesian)) {
|
|
125
|
+
throw new DeveloperError_default("cartesian is required");
|
|
126
|
+
}
|
|
127
|
+
const oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis;
|
|
128
|
+
const longitude = cartesian.x * oneOverEarthSemimajorAxis;
|
|
129
|
+
const latitude = _WebMercatorProjection.mercatorAngleToGeodeticLatitude(
|
|
130
|
+
cartesian.y * oneOverEarthSemimajorAxis
|
|
131
|
+
);
|
|
132
|
+
const height = cartesian.z;
|
|
133
|
+
if (!defined_default(result)) {
|
|
134
|
+
return new Cartographic_default(longitude, latitude, height);
|
|
135
|
+
}
|
|
136
|
+
result.longitude = longitude;
|
|
137
|
+
result.latitude = latitude;
|
|
138
|
+
result.height = height;
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI);
|
|
143
|
+
var WebMercatorProjection_default = WebMercatorProjection;
|
|
144
|
+
|
|
145
|
+
export {
|
|
146
|
+
WebMercatorProjection_default
|
|
147
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.141.2
|
|
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-KGNDVO6V.js";
|
|
29
|
+
import {
|
|
30
|
+
Check_default
|
|
31
|
+
} from "./chunk-N4ECLSTH.js";
|
|
32
|
+
import {
|
|
33
|
+
defined_default
|
|
34
|
+
} from "./chunk-27UNFKLP.js";
|
|
35
|
+
|
|
36
|
+
// packages/engine/Source/Core/arrayRemoveDuplicates.js
|
|
37
|
+
var removeDuplicatesEpsilon = Math_default.EPSILON10;
|
|
38
|
+
function arrayRemoveDuplicates(values, equalsEpsilon, wrapAround, removedIndices) {
|
|
39
|
+
Check_default.defined("equalsEpsilon", equalsEpsilon);
|
|
40
|
+
if (!defined_default(values)) {
|
|
41
|
+
return void 0;
|
|
42
|
+
}
|
|
43
|
+
wrapAround = wrapAround ?? false;
|
|
44
|
+
const storeRemovedIndices = defined_default(removedIndices);
|
|
45
|
+
const length = values.length;
|
|
46
|
+
if (length < 2) {
|
|
47
|
+
return values;
|
|
48
|
+
}
|
|
49
|
+
let i;
|
|
50
|
+
let v0 = values[0];
|
|
51
|
+
let v1;
|
|
52
|
+
let cleanedValues;
|
|
53
|
+
let lastCleanIndex = 0;
|
|
54
|
+
let removedIndexLCI = -1;
|
|
55
|
+
for (i = 1; i < length; ++i) {
|
|
56
|
+
v1 = values[i];
|
|
57
|
+
if (equalsEpsilon(v0, v1, removeDuplicatesEpsilon)) {
|
|
58
|
+
if (!defined_default(cleanedValues)) {
|
|
59
|
+
cleanedValues = values.slice(0, i);
|
|
60
|
+
lastCleanIndex = i - 1;
|
|
61
|
+
removedIndexLCI = 0;
|
|
62
|
+
}
|
|
63
|
+
if (storeRemovedIndices) {
|
|
64
|
+
removedIndices.push(i);
|
|
65
|
+
}
|
|
66
|
+
} else {
|
|
67
|
+
if (defined_default(cleanedValues)) {
|
|
68
|
+
cleanedValues.push(v1);
|
|
69
|
+
lastCleanIndex = i;
|
|
70
|
+
if (storeRemovedIndices) {
|
|
71
|
+
removedIndexLCI = removedIndices.length;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
v0 = v1;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (wrapAround && equalsEpsilon(values[0], values[length - 1], removeDuplicatesEpsilon)) {
|
|
78
|
+
if (storeRemovedIndices) {
|
|
79
|
+
if (defined_default(cleanedValues)) {
|
|
80
|
+
removedIndices.splice(removedIndexLCI, 0, lastCleanIndex);
|
|
81
|
+
} else {
|
|
82
|
+
removedIndices.push(length - 1);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (defined_default(cleanedValues)) {
|
|
86
|
+
cleanedValues.length -= 1;
|
|
87
|
+
} else {
|
|
88
|
+
cleanedValues = values.slice(0, -1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return defined_default(cleanedValues) ? cleanedValues : values;
|
|
92
|
+
}
|
|
93
|
+
var arrayRemoveDuplicates_default = arrayRemoveDuplicates;
|
|
94
|
+
|
|
95
|
+
export {
|
|
96
|
+
arrayRemoveDuplicates_default
|
|
97
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.141.2
|
|
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-KGNDVO6V.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
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.141.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
|
+
Cartesian3_default
|
|
28
|
+
} from "./chunk-3EB75M2K.js";
|
|
29
|
+
import {
|
|
30
|
+
Check_default
|
|
31
|
+
} from "./chunk-6JM3OV5P.js";
|
|
32
|
+
import {
|
|
33
|
+
defined_default
|
|
34
|
+
} from "./chunk-AMW7Q4HY.js";
|
|
35
|
+
|
|
36
|
+
// packages/engine/Source/Core/EncodedCartesian3.js
|
|
37
|
+
function EncodedCartesian3() {
|
|
38
|
+
this.high = Cartesian3_default.clone(Cartesian3_default.ZERO);
|
|
39
|
+
this.low = Cartesian3_default.clone(Cartesian3_default.ZERO);
|
|
40
|
+
}
|
|
41
|
+
EncodedCartesian3.encode = function(value, result) {
|
|
42
|
+
Check_default.typeOf.number("value", value);
|
|
43
|
+
if (!defined_default(result)) {
|
|
44
|
+
result = {
|
|
45
|
+
high: 0,
|
|
46
|
+
low: 0
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
let doubleHigh;
|
|
50
|
+
if (value >= 0) {
|
|
51
|
+
doubleHigh = Math.floor(value / 65536) * 65536;
|
|
52
|
+
result.high = doubleHigh;
|
|
53
|
+
result.low = value - doubleHigh;
|
|
54
|
+
} else {
|
|
55
|
+
doubleHigh = Math.floor(-value / 65536) * 65536;
|
|
56
|
+
result.high = -doubleHigh;
|
|
57
|
+
result.low = value + doubleHigh;
|
|
58
|
+
}
|
|
59
|
+
return result;
|
|
60
|
+
};
|
|
61
|
+
var scratchEncode = {
|
|
62
|
+
high: 0,
|
|
63
|
+
low: 0
|
|
64
|
+
};
|
|
65
|
+
EncodedCartesian3.fromCartesian = function(cartesian, result) {
|
|
66
|
+
Check_default.typeOf.object("cartesian", cartesian);
|
|
67
|
+
if (!defined_default(result)) {
|
|
68
|
+
result = new EncodedCartesian3();
|
|
69
|
+
}
|
|
70
|
+
const high = result.high;
|
|
71
|
+
const low = result.low;
|
|
72
|
+
EncodedCartesian3.encode(cartesian.x, scratchEncode);
|
|
73
|
+
high.x = scratchEncode.high;
|
|
74
|
+
low.x = scratchEncode.low;
|
|
75
|
+
EncodedCartesian3.encode(cartesian.y, scratchEncode);
|
|
76
|
+
high.y = scratchEncode.high;
|
|
77
|
+
low.y = scratchEncode.low;
|
|
78
|
+
EncodedCartesian3.encode(cartesian.z, scratchEncode);
|
|
79
|
+
high.z = scratchEncode.high;
|
|
80
|
+
low.z = scratchEncode.low;
|
|
81
|
+
return result;
|
|
82
|
+
};
|
|
83
|
+
var encodedP = new EncodedCartesian3();
|
|
84
|
+
EncodedCartesian3.writeElements = function(cartesian, cartesianArray, index) {
|
|
85
|
+
Check_default.defined("cartesianArray", cartesianArray);
|
|
86
|
+
Check_default.typeOf.number("index", index);
|
|
87
|
+
Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
|
|
88
|
+
EncodedCartesian3.fromCartesian(cartesian, encodedP);
|
|
89
|
+
const high = encodedP.high;
|
|
90
|
+
const low = encodedP.low;
|
|
91
|
+
cartesianArray[index] = high.x;
|
|
92
|
+
cartesianArray[index + 1] = high.y;
|
|
93
|
+
cartesianArray[index + 2] = high.z;
|
|
94
|
+
cartesianArray[index + 3] = low.x;
|
|
95
|
+
cartesianArray[index + 4] = low.y;
|
|
96
|
+
cartesianArray[index + 5] = low.z;
|
|
97
|
+
};
|
|
98
|
+
var EncodedCartesian3_default = EncodedCartesian3;
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
EncodedCartesian3_default
|
|
102
|
+
};
|