@rtzh/engine 0.0.2 → 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.
Files changed (114) hide show
  1. package/Build/Workers/chunk-2APW7KRS.js +101 -0
  2. package/Build/Workers/chunk-2BLQ3B4Q.js +299 -0
  3. package/Build/Workers/chunk-2CAIFJD5.js +387 -0
  4. package/Build/Workers/chunk-3K2PK2OU.js +1045 -0
  5. package/Build/Workers/chunk-3M5CRHSG.js +288 -0
  6. package/Build/Workers/chunk-5BIQOSBV.js +55 -0
  7. package/Build/Workers/chunk-5CSRWY7L.js +280 -0
  8. package/Build/Workers/chunk-5QTPACZQ.js +455 -0
  9. package/Build/Workers/chunk-64W2RXA4.js +219 -0
  10. package/Build/Workers/chunk-6QVMKRJ4.js +3514 -0
  11. package/Build/Workers/chunk-ACH67MPW.js +1483 -0
  12. package/Build/Workers/chunk-BJ6WXQOW.js +305 -0
  13. package/Build/Workers/chunk-BN4WA7LX.js +75 -0
  14. package/Build/Workers/chunk-BXBGWQ3Z.js +171 -0
  15. package/Build/Workers/chunk-D7TGILR3.js +1054 -0
  16. package/Build/Workers/chunk-DBKYAGM6.js +1800 -0
  17. package/Build/Workers/chunk-DEIMB3B5.js +629 -0
  18. package/Build/Workers/chunk-DSBEWMOQ.js +1067 -0
  19. package/Build/Workers/chunk-E2CARZA7.js +73 -0
  20. package/Build/Workers/chunk-EISI2CR2.js +2058 -0
  21. package/Build/Workers/chunk-F5LAPCFC.js +1460 -0
  22. package/Build/Workers/chunk-FJREGHFG.js +138 -0
  23. package/Build/Workers/chunk-HAWJ7FMN.js +8366 -0
  24. package/Build/Workers/chunk-HGIGANIQ.js +163 -0
  25. package/Build/Workers/chunk-HI6X33GO.js +58 -0
  26. package/Build/Workers/chunk-HU5P7PMU.js +1317 -0
  27. package/Build/Workers/chunk-IDVURFRN.js +241 -0
  28. package/Build/Workers/chunk-J3FBVUY4.js +37 -0
  29. package/Build/Workers/chunk-JH27ZGLN.js +352 -0
  30. package/Build/Workers/chunk-JURLMTV2.js +398 -0
  31. package/Build/Workers/chunk-KBAGFNQ4.js +139 -0
  32. package/Build/Workers/chunk-KHKSE4WQ.js +778 -0
  33. package/Build/Workers/chunk-KKYQRQ57.js +368 -0
  34. package/Build/Workers/chunk-KUAWPGSB.js +511 -0
  35. package/Build/Workers/chunk-KVDSJXRK.js +114 -0
  36. package/Build/Workers/chunk-KXB3AARU.js +162 -0
  37. package/Build/Workers/chunk-LN4NMLYY.js +55 -0
  38. package/Build/Workers/chunk-LPM2FVDN.js +642 -0
  39. package/Build/Workers/chunk-MLFVICFZ.js +102 -0
  40. package/Build/Workers/chunk-MQ62ZE2U.js +124 -0
  41. package/Build/Workers/chunk-NOH3R3YY.js +198 -0
  42. package/Build/Workers/chunk-OOB2KZC6.js +476 -0
  43. package/Build/Workers/chunk-OVPPHDU7.js +97 -0
  44. package/Build/Workers/chunk-P7M4VYFT.js +788 -0
  45. package/Build/Workers/chunk-PHB5MRHM.js +439 -0
  46. package/Build/Workers/chunk-TDI7UQBO.js +57 -0
  47. package/Build/Workers/chunk-U364CIW4.js +682 -0
  48. package/Build/Workers/chunk-UOD5YNH3.js +940 -0
  49. package/Build/Workers/chunk-UUJXSLQ2.js +2719 -0
  50. package/Build/Workers/chunk-VIYQ56Z7.js +837 -0
  51. package/Build/Workers/chunk-VR2L2Y4Z.js +1443 -0
  52. package/Build/Workers/chunk-WLREXLZ7.js +414 -0
  53. package/Build/Workers/chunk-WMGESUDW.js +497 -0
  54. package/Build/Workers/chunk-XJKMLTSH.js +692 -0
  55. package/Build/Workers/chunk-YBVMSCW4.js +352 -0
  56. package/Build/Workers/chunk-Z356SW7E.js +256 -0
  57. package/Build/Workers/chunk-ZV42SJKS.js +44 -0
  58. package/Build/Workers/combineGeometry.js +24 -24
  59. package/Build/Workers/createBoxGeometry.js +18 -18
  60. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  61. package/Build/Workers/createCircleGeometry.js +26 -26
  62. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  63. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  64. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  65. package/Build/Workers/createCorridorGeometry.js +29 -29
  66. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  67. package/Build/Workers/createCylinderGeometry.js +20 -20
  68. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  69. package/Build/Workers/createEllipseGeometry.js +26 -26
  70. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  71. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  72. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  73. package/Build/Workers/createFrustumGeometry.js +18 -18
  74. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  75. package/Build/Workers/createGeometry.js +24 -24
  76. package/Build/Workers/createGroundPolylineGeometry.js +22 -22
  77. package/Build/Workers/createPlaneGeometry.js +16 -16
  78. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  79. package/Build/Workers/createPolygonGeometry.js +32 -32
  80. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  81. package/Build/Workers/createPolylineGeometry.js +25 -25
  82. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  83. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  84. package/Build/Workers/createRectangleGeometry.js +27 -27
  85. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  86. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  87. package/Build/Workers/createSphereGeometry.js +19 -19
  88. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  89. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  90. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  91. package/Build/Workers/createVectorTileGeometries.js +24 -24
  92. package/Build/Workers/createVectorTilePoints.js +13 -13
  93. package/Build/Workers/createVectorTilePolygons.js +22 -22
  94. package/Build/Workers/createVectorTilePolylines.js +14 -14
  95. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  96. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
  97. package/Build/Workers/createVerticesFromHeightmap.js +22 -22
  98. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  99. package/Build/Workers/createWallGeometry.js +24 -24
  100. package/Build/Workers/createWallOutlineGeometry.js +23 -23
  101. package/Build/Workers/decodeDraco.js +10 -10
  102. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  103. package/Build/Workers/decodeI3S.js +10 -10
  104. package/Build/Workers/gaussianSplatSorter.js +4 -4
  105. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  106. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  107. package/Build/Workers/transcodeKTX2.js +6 -6
  108. package/Build/Workers/transferTypedArrayTest.js +1 -1
  109. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
  110. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  111. package/Source/Scene/GltfLoader.js +2 -2
  112. package/Source/Scene/Model/I3dmLoader.js +2 -2
  113. package/index.js +110 -110
  114. package/package.json +1 -1
@@ -0,0 +1,102 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.4
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-VR2L2Y4Z.js";
29
+ import {
30
+ Check_default
31
+ } from "./chunk-HGIGANIQ.js";
32
+ import {
33
+ defined_default
34
+ } from "./chunk-BN4WA7LX.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
+ };
@@ -0,0 +1,124 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.4
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
+ OrientedBoundingBox_default
28
+ } from "./chunk-VIYQ56Z7.js";
29
+ import {
30
+ Cartesian2_default
31
+ } from "./chunk-F5LAPCFC.js";
32
+ import {
33
+ Cartesian3_default,
34
+ Matrix3_default
35
+ } from "./chunk-VR2L2Y4Z.js";
36
+ import {
37
+ Check_default
38
+ } from "./chunk-HGIGANIQ.js";
39
+
40
+ // packages/engine/Source/Core/CoplanarPolygonGeometryLibrary.js
41
+ var CoplanarPolygonGeometryLibrary = {};
42
+ var scratchIntersectionPoint = new Cartesian3_default();
43
+ var scratchXAxis = new Cartesian3_default();
44
+ var scratchYAxis = new Cartesian3_default();
45
+ var scratchZAxis = new Cartesian3_default();
46
+ var obbScratch = new OrientedBoundingBox_default();
47
+ CoplanarPolygonGeometryLibrary.validOutline = function(positions) {
48
+ Check_default.defined("positions", positions);
49
+ const orientedBoundingBox = OrientedBoundingBox_default.fromPoints(
50
+ positions,
51
+ obbScratch
52
+ );
53
+ const halfAxes = orientedBoundingBox.halfAxes;
54
+ const xAxis = Matrix3_default.getColumn(halfAxes, 0, scratchXAxis);
55
+ const yAxis = Matrix3_default.getColumn(halfAxes, 1, scratchYAxis);
56
+ const zAxis = Matrix3_default.getColumn(halfAxes, 2, scratchZAxis);
57
+ const xMag = Cartesian3_default.magnitude(xAxis);
58
+ const yMag = Cartesian3_default.magnitude(yAxis);
59
+ const zMag = Cartesian3_default.magnitude(zAxis);
60
+ return !(xMag === 0 && (yMag === 0 || zMag === 0) || yMag === 0 && zMag === 0);
61
+ };
62
+ CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments = function(positions, centerResult, planeAxis1Result, planeAxis2Result) {
63
+ Check_default.defined("positions", positions);
64
+ Check_default.defined("centerResult", centerResult);
65
+ Check_default.defined("planeAxis1Result", planeAxis1Result);
66
+ Check_default.defined("planeAxis2Result", planeAxis2Result);
67
+ const orientedBoundingBox = OrientedBoundingBox_default.fromPoints(
68
+ positions,
69
+ obbScratch
70
+ );
71
+ const halfAxes = orientedBoundingBox.halfAxes;
72
+ const xAxis = Matrix3_default.getColumn(halfAxes, 0, scratchXAxis);
73
+ const yAxis = Matrix3_default.getColumn(halfAxes, 1, scratchYAxis);
74
+ const zAxis = Matrix3_default.getColumn(halfAxes, 2, scratchZAxis);
75
+ const xMag = Cartesian3_default.magnitude(xAxis);
76
+ const yMag = Cartesian3_default.magnitude(yAxis);
77
+ const zMag = Cartesian3_default.magnitude(zAxis);
78
+ const min = Math.min(xMag, yMag, zMag);
79
+ if (xMag === 0 && (yMag === 0 || zMag === 0) || yMag === 0 && zMag === 0) {
80
+ return false;
81
+ }
82
+ let planeAxis1;
83
+ let planeAxis2;
84
+ if (min === yMag || min === zMag) {
85
+ planeAxis1 = xAxis;
86
+ }
87
+ if (min === xMag) {
88
+ planeAxis1 = yAxis;
89
+ } else if (min === zMag) {
90
+ planeAxis2 = yAxis;
91
+ }
92
+ if (min === xMag || min === yMag) {
93
+ planeAxis2 = zAxis;
94
+ }
95
+ Cartesian3_default.normalize(planeAxis1, planeAxis1Result);
96
+ Cartesian3_default.normalize(planeAxis2, planeAxis2Result);
97
+ Cartesian3_default.clone(orientedBoundingBox.center, centerResult);
98
+ return true;
99
+ };
100
+ function projectTo2D(position, center, axis1, axis2, result) {
101
+ const v = Cartesian3_default.subtract(position, center, scratchIntersectionPoint);
102
+ const x = Cartesian3_default.dot(axis1, v);
103
+ const y = Cartesian3_default.dot(axis2, v);
104
+ return Cartesian2_default.fromElements(x, y, result);
105
+ }
106
+ CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction = function(center, axis1, axis2) {
107
+ return function(positions) {
108
+ const positionResults = new Array(positions.length);
109
+ for (let i = 0; i < positions.length; i++) {
110
+ positionResults[i] = projectTo2D(positions[i], center, axis1, axis2);
111
+ }
112
+ return positionResults;
113
+ };
114
+ };
115
+ CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction = function(center, axis1, axis2) {
116
+ return function(position, result) {
117
+ return projectTo2D(position, center, axis1, axis2, result);
118
+ };
119
+ };
120
+ var CoplanarPolygonGeometryLibrary_default = CoplanarPolygonGeometryLibrary;
121
+
122
+ export {
123
+ CoplanarPolygonGeometryLibrary_default
124
+ };
@@ -0,0 +1,198 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.4
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-WLREXLZ7.js";
29
+ import {
30
+ arrayRemoveDuplicates_default
31
+ } from "./chunk-OVPPHDU7.js";
32
+ import {
33
+ Cartographic_default
34
+ } from "./chunk-F5LAPCFC.js";
35
+ import {
36
+ Cartesian3_default
37
+ } from "./chunk-VR2L2Y4Z.js";
38
+ import {
39
+ Math_default
40
+ } from "./chunk-WMGESUDW.js";
41
+ import {
42
+ defined_default
43
+ } from "./chunk-BN4WA7LX.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
+ };