@rtzh/engine 0.0.2 → 0.0.3

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 (113) hide show
  1. package/Source/Scene/GltfLoader.js +2 -2
  2. package/package.json +1 -1
  3. package/Build/ThirdParty/Workers/zip-web-worker.js +0 -640
  4. package/Build/Workers/chunk-245NZYCR.js +0 -124
  5. package/Build/Workers/chunk-25BA4527.js +0 -837
  6. package/Build/Workers/chunk-4HXPSZRC.js +0 -1483
  7. package/Build/Workers/chunk-4Z26IS65.js +0 -3514
  8. package/Build/Workers/chunk-55IROWAX.js +0 -139
  9. package/Build/Workers/chunk-56XTN5NJ.js +0 -1800
  10. package/Build/Workers/chunk-5VZISKJF.js +0 -629
  11. package/Build/Workers/chunk-5WAG5YKS.js +0 -368
  12. package/Build/Workers/chunk-66YGZWBI.js +0 -1317
  13. package/Build/Workers/chunk-6H33B6OL.js +0 -37
  14. package/Build/Workers/chunk-6LZBBEA7.js +0 -439
  15. package/Build/Workers/chunk-6XJO625E.js +0 -497
  16. package/Build/Workers/chunk-75UGCVME.js +0 -102
  17. package/Build/Workers/chunk-7B23DD46.js +0 -1054
  18. package/Build/Workers/chunk-7NCJH26L.js +0 -352
  19. package/Build/Workers/chunk-AIW5F22O.js +0 -352
  20. package/Build/Workers/chunk-AL22JVIA.js +0 -256
  21. package/Build/Workers/chunk-AVSQILVI.js +0 -75
  22. package/Build/Workers/chunk-B2VFNYD7.js +0 -280
  23. package/Build/Workers/chunk-BOV6T7FO.js +0 -44
  24. package/Build/Workers/chunk-DP76S3IQ.js +0 -1067
  25. package/Build/Workers/chunk-EDIUN7V3.js +0 -219
  26. package/Build/Workers/chunk-EKMWNF4U.js +0 -55
  27. package/Build/Workers/chunk-ELXGXAYS.js +0 -682
  28. package/Build/Workers/chunk-FVYRV2T6.js +0 -455
  29. package/Build/Workers/chunk-GDIBU55R.js +0 -778
  30. package/Build/Workers/chunk-HAY6YE7M.js +0 -97
  31. package/Build/Workers/chunk-I76SRIKN.js +0 -138
  32. package/Build/Workers/chunk-IELTSYPZ.js +0 -241
  33. package/Build/Workers/chunk-J4MIJCN5.js +0 -171
  34. package/Build/Workers/chunk-JFO3ELF3.js +0 -642
  35. package/Build/Workers/chunk-K4IMD7KH.js +0 -162
  36. package/Build/Workers/chunk-KFMCOG26.js +0 -692
  37. package/Build/Workers/chunk-KH2OWUUA.js +0 -163
  38. package/Build/Workers/chunk-KQIZ7AFF.js +0 -8366
  39. package/Build/Workers/chunk-KVE5EAPO.js +0 -398
  40. package/Build/Workers/chunk-OAOREOSO.js +0 -940
  41. package/Build/Workers/chunk-OFJRMGNX.js +0 -788
  42. package/Build/Workers/chunk-PLLZB3R4.js +0 -198
  43. package/Build/Workers/chunk-POY6ZE32.js +0 -2058
  44. package/Build/Workers/chunk-PV5B2YNB.js +0 -2719
  45. package/Build/Workers/chunk-Q2DXNFYW.js +0 -414
  46. package/Build/Workers/chunk-QWV2DM66.js +0 -1443
  47. package/Build/Workers/chunk-R73BHGGI.js +0 -305
  48. package/Build/Workers/chunk-S3AE3MZZ.js +0 -511
  49. package/Build/Workers/chunk-SBFTVHRW.js +0 -57
  50. package/Build/Workers/chunk-SOR7PD4V.js +0 -114
  51. package/Build/Workers/chunk-TO7TWUET.js +0 -476
  52. package/Build/Workers/chunk-TSAJNE4K.js +0 -101
  53. package/Build/Workers/chunk-TWF4XRZ6.js +0 -73
  54. package/Build/Workers/chunk-UTWLMOPM.js +0 -387
  55. package/Build/Workers/chunk-UYT2PBMV.js +0 -58
  56. package/Build/Workers/chunk-WAS3IHIQ.js +0 -288
  57. package/Build/Workers/chunk-WO5ZNC7S.js +0 -1045
  58. package/Build/Workers/chunk-X65Y2JSA.js +0 -55
  59. package/Build/Workers/chunk-XOVHLPKW.js +0 -299
  60. package/Build/Workers/chunk-YPGJSFOO.js +0 -1460
  61. package/Build/Workers/combineGeometry.js +0 -66
  62. package/Build/Workers/createBoxGeometry.js +0 -58
  63. package/Build/Workers/createBoxOutlineGeometry.js +0 -231
  64. package/Build/Workers/createCircleGeometry.js +0 -201
  65. package/Build/Workers/createCircleOutlineGeometry.js +0 -147
  66. package/Build/Workers/createCoplanarPolygonGeometry.js +0 -505
  67. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +0 -225
  68. package/Build/Workers/createCorridorGeometry.js +0 -1258
  69. package/Build/Workers/createCorridorOutlineGeometry.js +0 -563
  70. package/Build/Workers/createCylinderGeometry.js +0 -60
  71. package/Build/Workers/createCylinderOutlineGeometry.js +0 -231
  72. package/Build/Workers/createEllipseGeometry.js +0 -72
  73. package/Build/Workers/createEllipseOutlineGeometry.js +0 -65
  74. package/Build/Workers/createEllipsoidGeometry.js +0 -59
  75. package/Build/Workers/createEllipsoidOutlineGeometry.js +0 -61
  76. package/Build/Workers/createFrustumGeometry.js +0 -58
  77. package/Build/Workers/createFrustumOutlineGeometry.js +0 -234
  78. package/Build/Workers/createGeometry.js +0 -173
  79. package/Build/Workers/createGroundPolylineGeometry.js +0 -1602
  80. package/Build/Workers/createPlaneGeometry.js +0 -223
  81. package/Build/Workers/createPlaneOutlineGeometry.js +0 -124
  82. package/Build/Workers/createPolygonGeometry.js +0 -1404
  83. package/Build/Workers/createPolygonOutlineGeometry.js +0 -532
  84. package/Build/Workers/createPolylineGeometry.js +0 -491
  85. package/Build/Workers/createPolylineVolumeGeometry.js +0 -374
  86. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +0 -272
  87. package/Build/Workers/createRectangleGeometry.js +0 -1264
  88. package/Build/Workers/createRectangleOutlineGeometry.js +0 -476
  89. package/Build/Workers/createSimplePolylineGeometry.js +0 -397
  90. package/Build/Workers/createSphereGeometry.js +0 -116
  91. package/Build/Workers/createSphereOutlineGeometry.js +0 -116
  92. package/Build/Workers/createTaskProcessorWorker.js +0 -32
  93. package/Build/Workers/createVectorTileClampedPolylines.js +0 -492
  94. package/Build/Workers/createVectorTileGeometries.js +0 -387
  95. package/Build/Workers/createVectorTilePoints.js +0 -114
  96. package/Build/Workers/createVectorTilePolygons.js +0 -386
  97. package/Build/Workers/createVectorTilePolylines.js +0 -262
  98. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +0 -91
  99. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -565
  100. package/Build/Workers/createVerticesFromHeightmap.js +0 -2254
  101. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -499
  102. package/Build/Workers/createWallGeometry.js +0 -487
  103. package/Build/Workers/createWallOutlineGeometry.js +0 -335
  104. package/Build/Workers/decodeDraco.js +0 -369
  105. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +0 -2680
  106. package/Build/Workers/decodeI3S.js +0 -1339
  107. package/Build/Workers/gaussianSplatSorter.js +0 -62
  108. package/Build/Workers/gaussianSplatTextureGenerator.js +0 -68
  109. package/Build/Workers/incrementallyBuildTerrainPicker.js +0 -121
  110. package/Build/Workers/transcodeKTX2.js +0 -3463
  111. package/Build/Workers/transferTypedArrayTest.js +0 -41
  112. package/Build/Workers/upsampleQuantizedTerrainMesh.js +0 -820
  113. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +0 -95
@@ -1,476 +0,0 @@
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
- CornerType_default,
28
- PolylineVolumeGeometryLibrary_default
29
- } from "./chunk-KFMCOG26.js";
30
- import {
31
- PolylinePipeline_default
32
- } from "./chunk-Q2DXNFYW.js";
33
- import {
34
- Quaternion_default
35
- } from "./chunk-KQIZ7AFF.js";
36
- import {
37
- Cartesian3_default,
38
- Matrix3_default
39
- } from "./chunk-QWV2DM66.js";
40
- import {
41
- Math_default
42
- } from "./chunk-6XJO625E.js";
43
- import {
44
- defined_default
45
- } from "./chunk-AVSQILVI.js";
46
-
47
- // packages/engine/Source/Core/CorridorGeometryLibrary.js
48
- var CorridorGeometryLibrary = {};
49
- var scratch1 = new Cartesian3_default();
50
- var scratch2 = new Cartesian3_default();
51
- var scratch3 = new Cartesian3_default();
52
- var scratch4 = new Cartesian3_default();
53
- var scaleArray2 = [new Cartesian3_default(), new Cartesian3_default()];
54
- var cartesian1 = new Cartesian3_default();
55
- var cartesian2 = new Cartesian3_default();
56
- var cartesian3 = new Cartesian3_default();
57
- var cartesian4 = new Cartesian3_default();
58
- var cartesian5 = new Cartesian3_default();
59
- var cartesian6 = new Cartesian3_default();
60
- var cartesian7 = new Cartesian3_default();
61
- var cartesian8 = new Cartesian3_default();
62
- var cartesian9 = new Cartesian3_default();
63
- var cartesian10 = new Cartesian3_default();
64
- var quaterion = new Quaternion_default();
65
- var rotMatrix = new Matrix3_default();
66
- function computeRoundCorner(cornerPoint, startPoint, endPoint, cornerType, leftIsOutside) {
67
- const angle = Cartesian3_default.angleBetween(
68
- Cartesian3_default.subtract(startPoint, cornerPoint, scratch1),
69
- Cartesian3_default.subtract(endPoint, cornerPoint, scratch2)
70
- );
71
- const granularity = cornerType === CornerType_default.BEVELED ? 1 : Math.ceil(angle / Math_default.toRadians(5)) + 1;
72
- const size = granularity * 3;
73
- const array = new Array(size);
74
- array[size - 3] = endPoint.x;
75
- array[size - 2] = endPoint.y;
76
- array[size - 1] = endPoint.z;
77
- let m;
78
- if (leftIsOutside) {
79
- m = Matrix3_default.fromQuaternion(
80
- Quaternion_default.fromAxisAngle(
81
- Cartesian3_default.negate(cornerPoint, scratch1),
82
- angle / granularity,
83
- quaterion
84
- ),
85
- rotMatrix
86
- );
87
- } else {
88
- m = Matrix3_default.fromQuaternion(
89
- Quaternion_default.fromAxisAngle(cornerPoint, angle / granularity, quaterion),
90
- rotMatrix
91
- );
92
- }
93
- let index = 0;
94
- startPoint = Cartesian3_default.clone(startPoint, scratch1);
95
- for (let i = 0; i < granularity; i++) {
96
- startPoint = Matrix3_default.multiplyByVector(m, startPoint, startPoint);
97
- array[index++] = startPoint.x;
98
- array[index++] = startPoint.y;
99
- array[index++] = startPoint.z;
100
- }
101
- return array;
102
- }
103
- function addEndCaps(calculatedPositions) {
104
- let cornerPoint = cartesian1;
105
- let startPoint = cartesian2;
106
- let endPoint = cartesian3;
107
- let leftEdge = calculatedPositions[1];
108
- startPoint = Cartesian3_default.fromArray(
109
- calculatedPositions[1],
110
- leftEdge.length - 3,
111
- startPoint
112
- );
113
- endPoint = Cartesian3_default.fromArray(calculatedPositions[0], 0, endPoint);
114
- cornerPoint = Cartesian3_default.midpoint(startPoint, endPoint, cornerPoint);
115
- const firstEndCap = computeRoundCorner(
116
- cornerPoint,
117
- startPoint,
118
- endPoint,
119
- CornerType_default.ROUNDED,
120
- false
121
- );
122
- const length = calculatedPositions.length - 1;
123
- const rightEdge = calculatedPositions[length - 1];
124
- leftEdge = calculatedPositions[length];
125
- startPoint = Cartesian3_default.fromArray(
126
- rightEdge,
127
- rightEdge.length - 3,
128
- startPoint
129
- );
130
- endPoint = Cartesian3_default.fromArray(leftEdge, 0, endPoint);
131
- cornerPoint = Cartesian3_default.midpoint(startPoint, endPoint, cornerPoint);
132
- const lastEndCap = computeRoundCorner(
133
- cornerPoint,
134
- startPoint,
135
- endPoint,
136
- CornerType_default.ROUNDED,
137
- false
138
- );
139
- return [firstEndCap, lastEndCap];
140
- }
141
- function computeMiteredCorner(position, leftCornerDirection, lastPoint, leftIsOutside) {
142
- let cornerPoint = scratch1;
143
- if (leftIsOutside) {
144
- cornerPoint = Cartesian3_default.add(position, leftCornerDirection, cornerPoint);
145
- } else {
146
- leftCornerDirection = Cartesian3_default.negate(
147
- leftCornerDirection,
148
- leftCornerDirection
149
- );
150
- cornerPoint = Cartesian3_default.add(position, leftCornerDirection, cornerPoint);
151
- }
152
- return [
153
- cornerPoint.x,
154
- cornerPoint.y,
155
- cornerPoint.z,
156
- lastPoint.x,
157
- lastPoint.y,
158
- lastPoint.z
159
- ];
160
- }
161
- function addShiftedPositions(positions, left, scalar, calculatedPositions) {
162
- const rightPositions = new Array(positions.length);
163
- const leftPositions = new Array(positions.length);
164
- const scaledLeft = Cartesian3_default.multiplyByScalar(left, scalar, scratch1);
165
- const scaledRight = Cartesian3_default.negate(scaledLeft, scratch2);
166
- let rightIndex = 0;
167
- let leftIndex = positions.length - 1;
168
- for (let i = 0; i < positions.length; i += 3) {
169
- const pos = Cartesian3_default.fromArray(positions, i, scratch3);
170
- const rightPos = Cartesian3_default.add(pos, scaledRight, scratch4);
171
- rightPositions[rightIndex++] = rightPos.x;
172
- rightPositions[rightIndex++] = rightPos.y;
173
- rightPositions[rightIndex++] = rightPos.z;
174
- const leftPos = Cartesian3_default.add(pos, scaledLeft, scratch4);
175
- leftPositions[leftIndex--] = leftPos.z;
176
- leftPositions[leftIndex--] = leftPos.y;
177
- leftPositions[leftIndex--] = leftPos.x;
178
- }
179
- calculatedPositions.push(rightPositions, leftPositions);
180
- return calculatedPositions;
181
- }
182
- CorridorGeometryLibrary.addAttribute = function(attribute, value, front, back) {
183
- const x = value.x;
184
- const y = value.y;
185
- const z = value.z;
186
- if (defined_default(front)) {
187
- attribute[front] = x;
188
- attribute[front + 1] = y;
189
- attribute[front + 2] = z;
190
- }
191
- if (defined_default(back)) {
192
- attribute[back] = z;
193
- attribute[back - 1] = y;
194
- attribute[back - 2] = x;
195
- }
196
- };
197
- var scratchForwardProjection = new Cartesian3_default();
198
- var scratchBackwardProjection = new Cartesian3_default();
199
- CorridorGeometryLibrary.computePositions = function(params) {
200
- const granularity = params.granularity;
201
- const positions = params.positions;
202
- const ellipsoid = params.ellipsoid;
203
- const width = params.width / 2;
204
- const cornerType = params.cornerType;
205
- const saveAttributes = params.saveAttributes;
206
- let normal = cartesian1;
207
- let forward = cartesian2;
208
- let backward = cartesian3;
209
- let left = cartesian4;
210
- let cornerDirection = cartesian5;
211
- let startPoint = cartesian6;
212
- let previousPos = cartesian7;
213
- let rightPos = cartesian8;
214
- let leftPos = cartesian9;
215
- let center = cartesian10;
216
- let calculatedPositions = [];
217
- const calculatedLefts = saveAttributes ? [] : void 0;
218
- const calculatedNormals = saveAttributes ? [] : void 0;
219
- let position = positions[0];
220
- let nextPosition = positions[1];
221
- forward = Cartesian3_default.normalize(
222
- Cartesian3_default.subtract(nextPosition, position, forward),
223
- forward
224
- );
225
- normal = ellipsoid.geodeticSurfaceNormal(position, normal);
226
- left = Cartesian3_default.normalize(Cartesian3_default.cross(normal, forward, left), left);
227
- if (saveAttributes) {
228
- calculatedLefts.push(left.x, left.y, left.z);
229
- calculatedNormals.push(normal.x, normal.y, normal.z);
230
- }
231
- previousPos = Cartesian3_default.clone(position, previousPos);
232
- position = nextPosition;
233
- backward = Cartesian3_default.negate(forward, backward);
234
- let subdividedPositions;
235
- const corners = [];
236
- let i;
237
- const length = positions.length;
238
- for (i = 1; i < length - 1; i++) {
239
- normal = ellipsoid.geodeticSurfaceNormal(position, normal);
240
- nextPosition = positions[i + 1];
241
- forward = Cartesian3_default.normalize(
242
- Cartesian3_default.subtract(nextPosition, position, forward),
243
- forward
244
- );
245
- const forwardProjection = Cartesian3_default.multiplyByScalar(
246
- normal,
247
- Cartesian3_default.dot(forward, normal),
248
- scratchForwardProjection
249
- );
250
- Cartesian3_default.subtract(forward, forwardProjection, forwardProjection);
251
- Cartesian3_default.normalize(forwardProjection, forwardProjection);
252
- const backwardProjection = Cartesian3_default.multiplyByScalar(
253
- normal,
254
- Cartesian3_default.dot(backward, normal),
255
- scratchBackwardProjection
256
- );
257
- Cartesian3_default.subtract(backward, backwardProjection, backwardProjection);
258
- Cartesian3_default.normalize(backwardProjection, backwardProjection);
259
- const doCorner = !Math_default.equalsEpsilon(
260
- Math.abs(Cartesian3_default.dot(forwardProjection, backwardProjection)),
261
- 1,
262
- Math_default.EPSILON7
263
- );
264
- if (doCorner) {
265
- cornerDirection = Cartesian3_default.normalize(
266
- Cartesian3_default.add(forward, backward, cornerDirection),
267
- cornerDirection
268
- );
269
- cornerDirection = Cartesian3_default.cross(
270
- cornerDirection,
271
- normal,
272
- cornerDirection
273
- );
274
- cornerDirection = Cartesian3_default.cross(
275
- normal,
276
- cornerDirection,
277
- cornerDirection
278
- );
279
- cornerDirection = Cartesian3_default.normalize(cornerDirection, cornerDirection);
280
- const scalar = width / Math.max(
281
- 0.25,
282
- Cartesian3_default.magnitude(
283
- Cartesian3_default.cross(cornerDirection, backward, scratch1)
284
- )
285
- );
286
- const leftIsOutside = PolylineVolumeGeometryLibrary_default.angleIsGreaterThanPi(
287
- forward,
288
- backward,
289
- position,
290
- ellipsoid
291
- );
292
- cornerDirection = Cartesian3_default.multiplyByScalar(
293
- cornerDirection,
294
- scalar,
295
- cornerDirection
296
- );
297
- if (leftIsOutside) {
298
- rightPos = Cartesian3_default.add(position, cornerDirection, rightPos);
299
- center = Cartesian3_default.add(
300
- rightPos,
301
- Cartesian3_default.multiplyByScalar(left, width, center),
302
- center
303
- );
304
- leftPos = Cartesian3_default.add(
305
- rightPos,
306
- Cartesian3_default.multiplyByScalar(left, width * 2, leftPos),
307
- leftPos
308
- );
309
- scaleArray2[0] = Cartesian3_default.clone(previousPos, scaleArray2[0]);
310
- scaleArray2[1] = Cartesian3_default.clone(center, scaleArray2[1]);
311
- subdividedPositions = PolylinePipeline_default.generateArc({
312
- positions: scaleArray2,
313
- granularity,
314
- ellipsoid
315
- });
316
- calculatedPositions = addShiftedPositions(
317
- subdividedPositions,
318
- left,
319
- width,
320
- calculatedPositions
321
- );
322
- if (saveAttributes) {
323
- calculatedLefts.push(left.x, left.y, left.z);
324
- calculatedNormals.push(normal.x, normal.y, normal.z);
325
- }
326
- startPoint = Cartesian3_default.clone(leftPos, startPoint);
327
- left = Cartesian3_default.normalize(
328
- Cartesian3_default.cross(normal, forward, left),
329
- left
330
- );
331
- leftPos = Cartesian3_default.add(
332
- rightPos,
333
- Cartesian3_default.multiplyByScalar(left, width * 2, leftPos),
334
- leftPos
335
- );
336
- previousPos = Cartesian3_default.add(
337
- rightPos,
338
- Cartesian3_default.multiplyByScalar(left, width, previousPos),
339
- previousPos
340
- );
341
- if (cornerType === CornerType_default.ROUNDED || cornerType === CornerType_default.BEVELED) {
342
- corners.push({
343
- leftPositions: computeRoundCorner(
344
- rightPos,
345
- startPoint,
346
- leftPos,
347
- cornerType,
348
- leftIsOutside
349
- )
350
- });
351
- } else {
352
- corners.push({
353
- leftPositions: computeMiteredCorner(
354
- position,
355
- Cartesian3_default.negate(cornerDirection, cornerDirection),
356
- leftPos,
357
- leftIsOutside
358
- )
359
- });
360
- }
361
- } else {
362
- leftPos = Cartesian3_default.add(position, cornerDirection, leftPos);
363
- center = Cartesian3_default.add(
364
- leftPos,
365
- Cartesian3_default.negate(
366
- Cartesian3_default.multiplyByScalar(left, width, center),
367
- center
368
- ),
369
- center
370
- );
371
- rightPos = Cartesian3_default.add(
372
- leftPos,
373
- Cartesian3_default.negate(
374
- Cartesian3_default.multiplyByScalar(left, width * 2, rightPos),
375
- rightPos
376
- ),
377
- rightPos
378
- );
379
- scaleArray2[0] = Cartesian3_default.clone(previousPos, scaleArray2[0]);
380
- scaleArray2[1] = Cartesian3_default.clone(center, scaleArray2[1]);
381
- subdividedPositions = PolylinePipeline_default.generateArc({
382
- positions: scaleArray2,
383
- granularity,
384
- ellipsoid
385
- });
386
- calculatedPositions = addShiftedPositions(
387
- subdividedPositions,
388
- left,
389
- width,
390
- calculatedPositions
391
- );
392
- if (saveAttributes) {
393
- calculatedLefts.push(left.x, left.y, left.z);
394
- calculatedNormals.push(normal.x, normal.y, normal.z);
395
- }
396
- startPoint = Cartesian3_default.clone(rightPos, startPoint);
397
- left = Cartesian3_default.normalize(
398
- Cartesian3_default.cross(normal, forward, left),
399
- left
400
- );
401
- rightPos = Cartesian3_default.add(
402
- leftPos,
403
- Cartesian3_default.negate(
404
- Cartesian3_default.multiplyByScalar(left, width * 2, rightPos),
405
- rightPos
406
- ),
407
- rightPos
408
- );
409
- previousPos = Cartesian3_default.add(
410
- leftPos,
411
- Cartesian3_default.negate(
412
- Cartesian3_default.multiplyByScalar(left, width, previousPos),
413
- previousPos
414
- ),
415
- previousPos
416
- );
417
- if (cornerType === CornerType_default.ROUNDED || cornerType === CornerType_default.BEVELED) {
418
- corners.push({
419
- rightPositions: computeRoundCorner(
420
- leftPos,
421
- startPoint,
422
- rightPos,
423
- cornerType,
424
- leftIsOutside
425
- )
426
- });
427
- } else {
428
- corners.push({
429
- rightPositions: computeMiteredCorner(
430
- position,
431
- cornerDirection,
432
- rightPos,
433
- leftIsOutside
434
- )
435
- });
436
- }
437
- }
438
- backward = Cartesian3_default.negate(forward, backward);
439
- }
440
- position = nextPosition;
441
- }
442
- normal = ellipsoid.geodeticSurfaceNormal(position, normal);
443
- scaleArray2[0] = Cartesian3_default.clone(previousPos, scaleArray2[0]);
444
- scaleArray2[1] = Cartesian3_default.clone(position, scaleArray2[1]);
445
- subdividedPositions = PolylinePipeline_default.generateArc({
446
- positions: scaleArray2,
447
- granularity,
448
- ellipsoid
449
- });
450
- calculatedPositions = addShiftedPositions(
451
- subdividedPositions,
452
- left,
453
- width,
454
- calculatedPositions
455
- );
456
- if (saveAttributes) {
457
- calculatedLefts.push(left.x, left.y, left.z);
458
- calculatedNormals.push(normal.x, normal.y, normal.z);
459
- }
460
- let endPositions;
461
- if (cornerType === CornerType_default.ROUNDED) {
462
- endPositions = addEndCaps(calculatedPositions);
463
- }
464
- return {
465
- positions: calculatedPositions,
466
- corners,
467
- lefts: calculatedLefts,
468
- normals: calculatedNormals,
469
- endPositions
470
- };
471
- };
472
- var CorridorGeometryLibrary_default = CorridorGeometryLibrary;
473
-
474
- export {
475
- CorridorGeometryLibrary_default
476
- };
@@ -1,101 +0,0 @@
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
- defined_default
28
- } from "./chunk-AVSQILVI.js";
29
-
30
- // packages/engine/Source/Core/formatError.js
31
- function formatError(object) {
32
- let result;
33
- const name = object.name;
34
- const message = object.message;
35
- if (defined_default(name) && defined_default(message)) {
36
- result = `${name}: ${message}`;
37
- } else {
38
- result = object.toString();
39
- }
40
- const stack = object.stack;
41
- if (defined_default(stack)) {
42
- result += `
43
- ${stack}`;
44
- }
45
- return result;
46
- }
47
- var formatError_default = formatError;
48
-
49
- // packages/engine/Source/Workers/createTaskProcessorWorker.js
50
- function createTaskProcessorWorker(workerFunction) {
51
- async function onMessageHandler({ data }) {
52
- const transferableObjects = [];
53
- const responseMessage = {
54
- id: data.id,
55
- result: void 0,
56
- error: void 0
57
- };
58
- self.CESIUM_BASE_URL = data.baseUrl;
59
- try {
60
- const result = await workerFunction(data.parameters, transferableObjects);
61
- responseMessage.result = result;
62
- } catch (error) {
63
- if (error instanceof Error) {
64
- responseMessage.error = {
65
- name: error.name,
66
- message: error.message,
67
- stack: error.stack
68
- };
69
- } else {
70
- responseMessage.error = error;
71
- }
72
- }
73
- if (!data.canTransferArrayBuffer) {
74
- transferableObjects.length = 0;
75
- }
76
- try {
77
- postMessage(responseMessage, transferableObjects);
78
- } catch (error) {
79
- responseMessage.result = void 0;
80
- responseMessage.error = `postMessage failed with error: ${formatError_default(
81
- error
82
- )}
83
- with responseMessage: ${JSON.stringify(responseMessage)}`;
84
- postMessage(responseMessage);
85
- }
86
- }
87
- function onMessageErrorHandler(event) {
88
- postMessage({
89
- id: event.data?.id,
90
- error: `postMessage failed with error: ${JSON.stringify(event)}`
91
- });
92
- }
93
- self.onmessage = onMessageHandler;
94
- self.onmessageerror = onMessageErrorHandler;
95
- return self;
96
- }
97
- var createTaskProcessorWorker_default = createTaskProcessorWorker;
98
-
99
- export {
100
- createTaskProcessorWorker_default
101
- };
@@ -1,73 +0,0 @@
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
- Math_default
28
- } from "./chunk-6XJO625E.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
- };