@rtzh/engine 0.0.5 → 0.0.7
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-243UEBJF.js +1045 -0
- package/Build/Workers/chunk-2UNHFFAZ.js +352 -0
- package/Build/Workers/chunk-2Y2KA6PM.js +387 -0
- package/Build/Workers/chunk-2ZXYLPPT.js +163 -0
- package/Build/Workers/chunk-32ZGDYJY.js +3514 -0
- package/Build/Workers/chunk-3NSMZ3XW.js +1067 -0
- package/Build/Workers/chunk-3WT5VKYM.js +101 -0
- package/Build/Workers/chunk-4DIL24GG.js +1460 -0
- package/Build/Workers/chunk-4FEDW3WT.js +299 -0
- package/Build/Workers/chunk-4IXXMXPJ.js +682 -0
- package/Build/Workers/chunk-4SC4KVID.js +692 -0
- package/Build/Workers/chunk-52UUGJQ6.js +288 -0
- package/Build/Workers/chunk-53AFSDGM.js +37 -0
- package/Build/Workers/chunk-54LZ6OUD.js +1067 -0
- package/Build/Workers/chunk-54SSO7NS.js +352 -0
- package/Build/Workers/chunk-565HBO3F.js +352 -0
- package/Build/Workers/chunk-5L3PEFKO.js +629 -0
- package/Build/Workers/chunk-5RMI6LFO.js +692 -0
- package/Build/Workers/chunk-5SVTAJRH.js +837 -0
- package/Build/Workers/chunk-5VDZEVQX.js +788 -0
- package/Build/Workers/chunk-5VWFNSLF.js +44 -0
- package/Build/Workers/chunk-5W4ISZGQ.js +1483 -0
- package/Build/Workers/chunk-5ZMMQ7HE.js +37 -0
- package/Build/Workers/chunk-64VDO4BW.js +114 -0
- package/Build/Workers/chunk-6AUSOZOL.js +476 -0
- package/Build/Workers/chunk-6BIU5AL4.js +692 -0
- package/Build/Workers/chunk-6KA3AJM6.js +455 -0
- package/Build/Workers/chunk-6MYDYE24.js +280 -0
- package/Build/Workers/chunk-6RUDXAFC.js +2719 -0
- package/Build/Workers/chunk-6YSUD2OH.js +219 -0
- package/Build/Workers/chunk-6YT2LZ3Z.js +1443 -0
- package/Build/Workers/chunk-73EGVDOC.js +398 -0
- package/Build/Workers/chunk-7BOVULMD.js +44 -0
- package/Build/Workers/chunk-7KOMCIWI.js +8366 -0
- package/Build/Workers/chunk-7MMYV5PM.js +288 -0
- package/Build/Workers/chunk-7QPQGSS3.js +57 -0
- package/Build/Workers/chunk-AEURJQ3B.js +73 -0
- package/Build/Workers/chunk-AMJRLIO3.js +414 -0
- package/Build/Workers/chunk-APOATHFZ.js +138 -0
- package/Build/Workers/chunk-AVNHAFMV.js +114 -0
- package/Build/Workers/chunk-AWMYTHW4.js +101 -0
- package/Build/Workers/chunk-BCYABDWF.js +3514 -0
- package/Build/Workers/chunk-BJHSYHOQ.js +97 -0
- package/Build/Workers/chunk-BM6ZG63T.js +171 -0
- package/Build/Workers/chunk-C3G2NDXM.js +162 -0
- package/Build/Workers/chunk-CTARL7CY.js +511 -0
- package/Build/Workers/chunk-DIA4J2DB.js +497 -0
- package/Build/Workers/chunk-E3NHG3TR.js +1460 -0
- package/Build/Workers/chunk-E5BSDIGY.js +139 -0
- package/Build/Workers/chunk-EDVAQGDJ.js +2719 -0
- package/Build/Workers/chunk-EFHDO3L2.js +102 -0
- package/Build/Workers/chunk-EJVGOIOW.js +1317 -0
- package/Build/Workers/chunk-EPVJ5OOH.js +8366 -0
- package/Build/Workers/chunk-ERYOZBVC.js +171 -0
- package/Build/Workers/chunk-ET7LWDHA.js +58 -0
- package/Build/Workers/chunk-EWDHM5NC.js +37 -0
- package/Build/Workers/chunk-F4Q3VOCC.js +1317 -0
- package/Build/Workers/chunk-FCSN7XOU.js +55 -0
- package/Build/Workers/chunk-FD62YGTB.js +219 -0
- package/Build/Workers/chunk-FHM3HFYM.js +1045 -0
- package/Build/Workers/chunk-FNI64UKI.js +57 -0
- package/Build/Workers/chunk-FRUZKVBP.js +352 -0
- package/Build/Workers/chunk-FSYQE5XE.js +55 -0
- package/Build/Workers/chunk-FYW5UQ24.js +837 -0
- package/Build/Workers/chunk-FYZVCB32.js +75 -0
- package/Build/Workers/chunk-G7PGTG3P.js +387 -0
- package/Build/Workers/chunk-GAQXLBFJ.js +1483 -0
- package/Build/Workers/chunk-GEH53ULL.js +299 -0
- package/Build/Workers/chunk-GLA2PT5T.js +476 -0
- package/Build/Workers/chunk-GWLEBUVI.js +2058 -0
- package/Build/Workers/chunk-GYIGOBV2.js +439 -0
- package/Build/Workers/chunk-GZMTBQM2.js +1443 -0
- package/Build/Workers/chunk-H2MM7FMU.js +1054 -0
- package/Build/Workers/chunk-H33FCT5U.js +940 -0
- package/Build/Workers/chunk-HAR6Y2HP.js +1800 -0
- package/Build/Workers/chunk-HBL3QZ2L.js +642 -0
- package/Build/Workers/chunk-HEKLTOOR.js +1443 -0
- package/Build/Workers/chunk-HM4MH5IG.js +138 -0
- package/Build/Workers/chunk-I5JHYEIE.js +241 -0
- package/Build/Workers/chunk-IB2XQV6U.js +101 -0
- package/Build/Workers/chunk-IC2JHDCI.js +114 -0
- package/Build/Workers/chunk-IEEHNZ36.js +241 -0
- package/Build/Workers/chunk-IRG63TBY.js +55 -0
- package/Build/Workers/chunk-IXM65GBF.js +256 -0
- package/Build/Workers/chunk-IY53MZW2.js +58 -0
- package/Build/Workers/chunk-IYAZCFAC.js +642 -0
- package/Build/Workers/chunk-J2CUNLQP.js +940 -0
- package/Build/Workers/chunk-J766O3PA.js +256 -0
- package/Build/Workers/chunk-JRPAFYGJ.js +1054 -0
- package/Build/Workers/chunk-JWEZXKBE.js +73 -0
- package/Build/Workers/chunk-KFOT2YV5.js +138 -0
- package/Build/Workers/chunk-KGQGZ7PF.js +778 -0
- package/Build/Workers/chunk-KMZXZUA7.js +1460 -0
- package/Build/Workers/chunk-KOVKY3HB.js +198 -0
- package/Build/Workers/chunk-KQ4ET526.js +163 -0
- package/Build/Workers/chunk-L2QIVAZV.js +3514 -0
- package/Build/Workers/chunk-LGMONS4O.js +1317 -0
- package/Build/Workers/chunk-LJHG4PJQ.js +305 -0
- package/Build/Workers/chunk-LNS36LUZ.js +2058 -0
- package/Build/Workers/chunk-LPJHTJDQ.js +305 -0
- package/Build/Workers/chunk-LRW2QXMW.js +352 -0
- package/Build/Workers/chunk-LUUEGFLT.js +305 -0
- package/Build/Workers/chunk-LW2VGHDM.js +1800 -0
- package/Build/Workers/chunk-LXM2ZC4V.js +288 -0
- package/Build/Workers/chunk-LXMLERGC.js +1067 -0
- package/Build/Workers/chunk-MEFWVMG6.js +788 -0
- package/Build/Workers/chunk-MJVNNURF.js +368 -0
- package/Build/Workers/chunk-MWN26ZEM.js +280 -0
- package/Build/Workers/chunk-NIWB6UMY.js +198 -0
- package/Build/Workers/chunk-NJEG7WRW.js +387 -0
- package/Build/Workers/chunk-O224ZEA5.js +58 -0
- package/Build/Workers/chunk-O5ICO3AS.js +682 -0
- package/Build/Workers/chunk-O5QH7XD5.js +629 -0
- package/Build/Workers/chunk-O6T3T3V3.js +97 -0
- package/Build/Workers/chunk-OBM2JYMG.js +75 -0
- package/Build/Workers/chunk-ODZZZGXK.js +219 -0
- package/Build/Workers/chunk-OFTWEOW2.js +1483 -0
- package/Build/Workers/chunk-OIJH6LAY.js +497 -0
- package/Build/Workers/chunk-OJFVD5ZS.js +778 -0
- package/Build/Workers/chunk-OJNPKCEL.js +73 -0
- package/Build/Workers/chunk-PQLZOYZE.js +642 -0
- package/Build/Workers/chunk-PU44PXY2.js +75 -0
- package/Build/Workers/chunk-Q36VXWGP.js +57 -0
- package/Build/Workers/chunk-Q4XPVYXJ.js +476 -0
- package/Build/Workers/chunk-QGXE4VZ3.js +55 -0
- package/Build/Workers/chunk-QIEHP7O4.js +280 -0
- package/Build/Workers/chunk-QY55DT53.js +97 -0
- package/Build/Workers/chunk-R3PTQZ6H.js +44 -0
- package/Build/Workers/chunk-RJVB3K2X.js +511 -0
- package/Build/Workers/chunk-RORZNBGJ.js +299 -0
- package/Build/Workers/chunk-RRBGLANL.js +55 -0
- package/Build/Workers/chunk-RT7PY6BH.js +2719 -0
- package/Build/Workers/chunk-SAD42JSM.js +102 -0
- package/Build/Workers/chunk-SBR7MW44.js +139 -0
- package/Build/Workers/chunk-SFM3GNS2.js +682 -0
- package/Build/Workers/chunk-SKXE77AM.js +139 -0
- package/Build/Workers/chunk-SLYUIIFB.js +455 -0
- package/Build/Workers/chunk-SQSWONTJ.js +241 -0
- package/Build/Workers/chunk-SRLJWNU2.js +368 -0
- package/Build/Workers/chunk-SZELHE7Q.js +163 -0
- package/Build/Workers/chunk-T4LDJBKR.js +124 -0
- package/Build/Workers/chunk-TBASKFFL.js +124 -0
- package/Build/Workers/chunk-TDGGEIZE.js +398 -0
- package/Build/Workers/chunk-TQ63SH2Z.js +352 -0
- package/Build/Workers/chunk-U3VI26GL.js +162 -0
- package/Build/Workers/chunk-U77FLUQF.js +368 -0
- package/Build/Workers/chunk-UIYQEJ5H.js +1054 -0
- package/Build/Workers/chunk-UJ72JOGF.js +511 -0
- package/Build/Workers/chunk-UY7I27VQ.js +1800 -0
- package/Build/Workers/chunk-VLB25GGE.js +439 -0
- package/Build/Workers/chunk-VVKDT4J7.js +837 -0
- package/Build/Workers/chunk-VXDOONLH.js +162 -0
- package/Build/Workers/chunk-W4DV7TAL.js +8366 -0
- package/Build/Workers/chunk-WFTPZ3ZX.js +788 -0
- package/Build/Workers/chunk-WLIQ26XU.js +455 -0
- package/Build/Workers/chunk-WOEPS2UA.js +171 -0
- package/Build/Workers/chunk-WWLWTSMV.js +55 -0
- package/Build/Workers/chunk-WX2ZANQC.js +940 -0
- package/Build/Workers/chunk-XEB4GEXW.js +629 -0
- package/Build/Workers/chunk-XFKTM6GN.js +2058 -0
- package/Build/Workers/chunk-XKBR7TJB.js +398 -0
- package/Build/Workers/chunk-XYRT4RDI.js +1045 -0
- package/Build/Workers/chunk-XZINQPR6.js +124 -0
- package/Build/Workers/chunk-YLKTSY65.js +414 -0
- package/Build/Workers/chunk-YLSZYTTO.js +102 -0
- package/Build/Workers/chunk-YQXKIGXX.js +414 -0
- package/Build/Workers/chunk-YR3LX3PR.js +497 -0
- package/Build/Workers/chunk-Z5MHVJGN.js +778 -0
- package/Build/Workers/chunk-ZBRVFEGF.js +256 -0
- package/Build/Workers/chunk-ZCPCQJBX.js +198 -0
- package/Build/Workers/chunk-ZS7KQSEM.js +439 -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 +22 -22
- 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 +25 -25
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- 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 +5 -5
- 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 +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Source/Scene/Cesium3DTileset.js +4163 -4105
- package/Source/Scene/Model/BarycentricWireframePipelineStage.js +327 -73
- package/Source/Scene/Model/Model.js +3631 -3512
- package/Source/Scene/Model/Model3DTileContent.js +585 -568
- package/Source/Scene/Model/ModelRuntimePrimitive.js +391 -391
- package/Source/Scene/Model/WireframePipelineStage.js +122 -122
- package/Source/Shaders/Model/ModelFS.glsl +38 -2
- package/Source/Shaders/Model/ModelFS.js +38 -2
- package/Source/Shaders/Model/ModelVS.glsl +3 -0
- package/Source/Shaders/Model/ModelVS.js +3 -0
- package/index.d.ts +801 -773
- package/index.js +145 -145
- package/package.json +1 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.7
|
|
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
|
+
PolylinePipeline_default
|
|
28
|
+
} from "./chunk-YQXKIGXX.js";
|
|
29
|
+
import {
|
|
30
|
+
arrayRemoveDuplicates_default
|
|
31
|
+
} from "./chunk-O6T3T3V3.js";
|
|
32
|
+
import {
|
|
33
|
+
Cartographic_default
|
|
34
|
+
} from "./chunk-E3NHG3TR.js";
|
|
35
|
+
import {
|
|
36
|
+
Cartesian3_default
|
|
37
|
+
} from "./chunk-6YT2LZ3Z.js";
|
|
38
|
+
import {
|
|
39
|
+
Math_default
|
|
40
|
+
} from "./chunk-OIJH6LAY.js";
|
|
41
|
+
import {
|
|
42
|
+
defined_default
|
|
43
|
+
} from "./chunk-FYZVCB32.js";
|
|
44
|
+
|
|
45
|
+
// packages/engine/Source/Core/WallGeometryLibrary.js
|
|
46
|
+
var WallGeometryLibrary = {};
|
|
47
|
+
function latLonEquals(c0, c1) {
|
|
48
|
+
return Math_default.equalsEpsilon(c0.latitude, c1.latitude, Math_default.EPSILON10) && Math_default.equalsEpsilon(c0.longitude, c1.longitude, Math_default.EPSILON10);
|
|
49
|
+
}
|
|
50
|
+
var scratchCartographic1 = new Cartographic_default();
|
|
51
|
+
var scratchCartographic2 = new Cartographic_default();
|
|
52
|
+
function removeDuplicates(ellipsoid, positions, topHeights, bottomHeights) {
|
|
53
|
+
positions = arrayRemoveDuplicates_default(positions, Cartesian3_default.equalsEpsilon);
|
|
54
|
+
const length = positions.length;
|
|
55
|
+
if (length < 2) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const hasBottomHeights = defined_default(bottomHeights);
|
|
59
|
+
const hasTopHeights = defined_default(topHeights);
|
|
60
|
+
const cleanedPositions = new Array(length);
|
|
61
|
+
const cleanedTopHeights = new Array(length);
|
|
62
|
+
const cleanedBottomHeights = new Array(length);
|
|
63
|
+
const v0 = positions[0];
|
|
64
|
+
cleanedPositions[0] = v0;
|
|
65
|
+
const c0 = ellipsoid.cartesianToCartographic(v0, scratchCartographic1);
|
|
66
|
+
if (hasTopHeights) {
|
|
67
|
+
c0.height = topHeights[0];
|
|
68
|
+
}
|
|
69
|
+
cleanedTopHeights[0] = c0.height;
|
|
70
|
+
if (hasBottomHeights) {
|
|
71
|
+
cleanedBottomHeights[0] = bottomHeights[0];
|
|
72
|
+
} else {
|
|
73
|
+
cleanedBottomHeights[0] = 0;
|
|
74
|
+
}
|
|
75
|
+
const startTopHeight = cleanedTopHeights[0];
|
|
76
|
+
const startBottomHeight = cleanedBottomHeights[0];
|
|
77
|
+
let hasAllSameHeights = startTopHeight === startBottomHeight;
|
|
78
|
+
let index = 1;
|
|
79
|
+
for (let i = 1; i < length; ++i) {
|
|
80
|
+
const v1 = positions[i];
|
|
81
|
+
const c1 = ellipsoid.cartesianToCartographic(v1, scratchCartographic2);
|
|
82
|
+
if (hasTopHeights) {
|
|
83
|
+
c1.height = topHeights[i];
|
|
84
|
+
}
|
|
85
|
+
hasAllSameHeights = hasAllSameHeights && c1.height === 0;
|
|
86
|
+
if (!latLonEquals(c0, c1)) {
|
|
87
|
+
cleanedPositions[index] = v1;
|
|
88
|
+
cleanedTopHeights[index] = c1.height;
|
|
89
|
+
if (hasBottomHeights) {
|
|
90
|
+
cleanedBottomHeights[index] = bottomHeights[i];
|
|
91
|
+
} else {
|
|
92
|
+
cleanedBottomHeights[index] = 0;
|
|
93
|
+
}
|
|
94
|
+
hasAllSameHeights = hasAllSameHeights && cleanedTopHeights[index] === cleanedBottomHeights[index];
|
|
95
|
+
Cartographic_default.clone(c1, c0);
|
|
96
|
+
++index;
|
|
97
|
+
} else if (c0.height < c1.height) {
|
|
98
|
+
cleanedTopHeights[index - 1] = c1.height;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (hasAllSameHeights || index < 2) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
cleanedPositions.length = index;
|
|
105
|
+
cleanedTopHeights.length = index;
|
|
106
|
+
cleanedBottomHeights.length = index;
|
|
107
|
+
return {
|
|
108
|
+
positions: cleanedPositions,
|
|
109
|
+
topHeights: cleanedTopHeights,
|
|
110
|
+
bottomHeights: cleanedBottomHeights
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
var positionsArrayScratch = new Array(2);
|
|
114
|
+
var heightsArrayScratch = new Array(2);
|
|
115
|
+
var generateArcOptionsScratch = {
|
|
116
|
+
positions: void 0,
|
|
117
|
+
height: void 0,
|
|
118
|
+
granularity: void 0,
|
|
119
|
+
ellipsoid: void 0
|
|
120
|
+
};
|
|
121
|
+
WallGeometryLibrary.computePositions = function(ellipsoid, wallPositions, maximumHeights, minimumHeights, granularity, duplicateCorners) {
|
|
122
|
+
const o = removeDuplicates(
|
|
123
|
+
ellipsoid,
|
|
124
|
+
wallPositions,
|
|
125
|
+
maximumHeights,
|
|
126
|
+
minimumHeights
|
|
127
|
+
);
|
|
128
|
+
if (!defined_default(o)) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
wallPositions = o.positions;
|
|
132
|
+
maximumHeights = o.topHeights;
|
|
133
|
+
minimumHeights = o.bottomHeights;
|
|
134
|
+
const length = wallPositions.length;
|
|
135
|
+
const numCorners = length - 2;
|
|
136
|
+
let topPositions;
|
|
137
|
+
let bottomPositions;
|
|
138
|
+
const minDistance = Math_default.chordLength(
|
|
139
|
+
granularity,
|
|
140
|
+
ellipsoid.maximumRadius
|
|
141
|
+
);
|
|
142
|
+
const generateArcOptions = generateArcOptionsScratch;
|
|
143
|
+
generateArcOptions.minDistance = minDistance;
|
|
144
|
+
generateArcOptions.ellipsoid = ellipsoid;
|
|
145
|
+
if (duplicateCorners) {
|
|
146
|
+
let count = 0;
|
|
147
|
+
let i;
|
|
148
|
+
for (i = 0; i < length - 1; i++) {
|
|
149
|
+
count += PolylinePipeline_default.numberOfPoints(
|
|
150
|
+
wallPositions[i],
|
|
151
|
+
wallPositions[i + 1],
|
|
152
|
+
minDistance
|
|
153
|
+
) + 1;
|
|
154
|
+
}
|
|
155
|
+
topPositions = new Float64Array(count * 3);
|
|
156
|
+
bottomPositions = new Float64Array(count * 3);
|
|
157
|
+
const generateArcPositions = positionsArrayScratch;
|
|
158
|
+
const generateArcHeights = heightsArrayScratch;
|
|
159
|
+
generateArcOptions.positions = generateArcPositions;
|
|
160
|
+
generateArcOptions.height = generateArcHeights;
|
|
161
|
+
let offset = 0;
|
|
162
|
+
for (i = 0; i < length - 1; i++) {
|
|
163
|
+
generateArcPositions[0] = wallPositions[i];
|
|
164
|
+
generateArcPositions[1] = wallPositions[i + 1];
|
|
165
|
+
generateArcHeights[0] = maximumHeights[i];
|
|
166
|
+
generateArcHeights[1] = maximumHeights[i + 1];
|
|
167
|
+
const pos = PolylinePipeline_default.generateArc(generateArcOptions);
|
|
168
|
+
topPositions.set(pos, offset);
|
|
169
|
+
generateArcHeights[0] = minimumHeights[i];
|
|
170
|
+
generateArcHeights[1] = minimumHeights[i + 1];
|
|
171
|
+
bottomPositions.set(
|
|
172
|
+
PolylinePipeline_default.generateArc(generateArcOptions),
|
|
173
|
+
offset
|
|
174
|
+
);
|
|
175
|
+
offset += pos.length;
|
|
176
|
+
}
|
|
177
|
+
} else {
|
|
178
|
+
generateArcOptions.positions = wallPositions;
|
|
179
|
+
generateArcOptions.height = maximumHeights;
|
|
180
|
+
topPositions = new Float64Array(
|
|
181
|
+
PolylinePipeline_default.generateArc(generateArcOptions)
|
|
182
|
+
);
|
|
183
|
+
generateArcOptions.height = minimumHeights;
|
|
184
|
+
bottomPositions = new Float64Array(
|
|
185
|
+
PolylinePipeline_default.generateArc(generateArcOptions)
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
bottomPositions,
|
|
190
|
+
topPositions,
|
|
191
|
+
numCorners
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
var WallGeometryLibrary_default = WallGeometryLibrary;
|
|
195
|
+
|
|
196
|
+
export {
|
|
197
|
+
WallGeometryLibrary_default
|
|
198
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.7
|
|
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
|
+
defined_default
|
|
28
|
+
} from "./chunk-FYZVCB32.js";
|
|
29
|
+
|
|
30
|
+
// packages/engine/Source/Core/DeveloperError.js
|
|
31
|
+
function DeveloperError(message) {
|
|
32
|
+
this.name = "DeveloperError";
|
|
33
|
+
this.message = message;
|
|
34
|
+
let stack;
|
|
35
|
+
try {
|
|
36
|
+
throw new Error();
|
|
37
|
+
} catch (e) {
|
|
38
|
+
stack = e.stack;
|
|
39
|
+
}
|
|
40
|
+
this.stack = stack;
|
|
41
|
+
}
|
|
42
|
+
if (defined_default(Object.create)) {
|
|
43
|
+
DeveloperError.prototype = Object.create(Error.prototype);
|
|
44
|
+
DeveloperError.prototype.constructor = DeveloperError;
|
|
45
|
+
}
|
|
46
|
+
DeveloperError.prototype.toString = function() {
|
|
47
|
+
let str = `${this.name}: ${this.message}`;
|
|
48
|
+
if (defined_default(this.stack)) {
|
|
49
|
+
str += `
|
|
50
|
+
${this.stack.toString()}`;
|
|
51
|
+
}
|
|
52
|
+
return str;
|
|
53
|
+
};
|
|
54
|
+
DeveloperError.throwInstantiationError = function() {
|
|
55
|
+
throw new DeveloperError(
|
|
56
|
+
"This function defines an interface and should not be called directly."
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
var DeveloperError_default = DeveloperError;
|
|
60
|
+
|
|
61
|
+
// packages/engine/Source/Core/Check.js
|
|
62
|
+
var Check = {};
|
|
63
|
+
Check.typeOf = {};
|
|
64
|
+
function getUndefinedErrorMessage(name) {
|
|
65
|
+
return `${name} is required, actual value was undefined`;
|
|
66
|
+
}
|
|
67
|
+
function getFailedTypeErrorMessage(actual, expected, name) {
|
|
68
|
+
return `Expected ${name} to be typeof ${expected}, actual typeof was ${actual}`;
|
|
69
|
+
}
|
|
70
|
+
Check.defined = function(name, test) {
|
|
71
|
+
if (!defined_default(test)) {
|
|
72
|
+
throw new DeveloperError_default(getUndefinedErrorMessage(name));
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
Check.typeOf.func = function(name, test) {
|
|
76
|
+
if (typeof test !== "function") {
|
|
77
|
+
throw new DeveloperError_default(
|
|
78
|
+
getFailedTypeErrorMessage(typeof test, "function", name)
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
Check.typeOf.string = function(name, test) {
|
|
83
|
+
if (typeof test !== "string") {
|
|
84
|
+
throw new DeveloperError_default(
|
|
85
|
+
getFailedTypeErrorMessage(typeof test, "string", name)
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
Check.typeOf.number = function(name, test) {
|
|
90
|
+
if (typeof test !== "number") {
|
|
91
|
+
throw new DeveloperError_default(
|
|
92
|
+
getFailedTypeErrorMessage(typeof test, "number", name)
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
Check.typeOf.number.lessThan = function(name, test, limit) {
|
|
97
|
+
Check.typeOf.number(name, test);
|
|
98
|
+
if (test >= limit) {
|
|
99
|
+
throw new DeveloperError_default(
|
|
100
|
+
`Expected ${name} to be less than ${limit}, actual value was ${test}`
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
Check.typeOf.number.lessThanOrEquals = function(name, test, limit) {
|
|
105
|
+
Check.typeOf.number(name, test);
|
|
106
|
+
if (test > limit) {
|
|
107
|
+
throw new DeveloperError_default(
|
|
108
|
+
`Expected ${name} to be less than or equal to ${limit}, actual value was ${test}`
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
Check.typeOf.number.greaterThan = function(name, test, limit) {
|
|
113
|
+
Check.typeOf.number(name, test);
|
|
114
|
+
if (test <= limit) {
|
|
115
|
+
throw new DeveloperError_default(
|
|
116
|
+
`Expected ${name} to be greater than ${limit}, actual value was ${test}`
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
Check.typeOf.number.greaterThanOrEquals = function(name, test, limit) {
|
|
121
|
+
Check.typeOf.number(name, test);
|
|
122
|
+
if (test < limit) {
|
|
123
|
+
throw new DeveloperError_default(
|
|
124
|
+
`Expected ${name} to be greater than or equal to ${limit}, actual value was ${test}`
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
Check.typeOf.object = function(name, test) {
|
|
129
|
+
if (typeof test !== "object") {
|
|
130
|
+
throw new DeveloperError_default(
|
|
131
|
+
getFailedTypeErrorMessage(typeof test, "object", name)
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
Check.typeOf.bool = function(name, test) {
|
|
136
|
+
if (typeof test !== "boolean") {
|
|
137
|
+
throw new DeveloperError_default(
|
|
138
|
+
getFailedTypeErrorMessage(typeof test, "boolean", name)
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
Check.typeOf.bigint = function(name, test) {
|
|
143
|
+
if (typeof test !== "bigint") {
|
|
144
|
+
throw new DeveloperError_default(
|
|
145
|
+
getFailedTypeErrorMessage(typeof test, "bigint", name)
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
Check.typeOf.number.equals = function(name1, name2, test1, test2) {
|
|
150
|
+
Check.typeOf.number(name1, test1);
|
|
151
|
+
Check.typeOf.number(name2, test2);
|
|
152
|
+
if (test1 !== test2) {
|
|
153
|
+
throw new DeveloperError_default(
|
|
154
|
+
`${name1} must be equal to ${name2}, the actual values are ${test1} and ${test2}`
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
var Check_default = Check;
|
|
159
|
+
|
|
160
|
+
export {
|
|
161
|
+
DeveloperError_default,
|
|
162
|
+
Check_default
|
|
163
|
+
};
|