@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
- RectangleGeometryLibrary_default
28
- } from "./chunk-IELTSYPZ.js";
29
- import {
30
- GeometryOffsetAttribute_default
31
- } from "./chunk-6H33B6OL.js";
32
- import {
33
- PolygonPipeline_default
34
- } from "./chunk-WO5ZNC7S.js";
35
- import "./chunk-FVYRV2T6.js";
36
- import {
37
- IndexDatatype_default
38
- } from "./chunk-55IROWAX.js";
39
- import {
40
- GeometryAttributes_default
41
- } from "./chunk-BOV6T7FO.js";
42
- import {
43
- GeometryAttribute_default,
44
- Geometry_default,
45
- PrimitiveType_default
46
- } from "./chunk-XOVHLPKW.js";
47
- import {
48
- BoundingSphere_default
49
- } from "./chunk-OAOREOSO.js";
50
- import "./chunk-EKMWNF4U.js";
51
- import {
52
- Rectangle_default
53
- } from "./chunk-KQIZ7AFF.js";
54
- import "./chunk-POY6ZE32.js";
55
- import {
56
- ComponentDatatype_default
57
- } from "./chunk-AL22JVIA.js";
58
- import "./chunk-5VZISKJF.js";
59
- import "./chunk-UYT2PBMV.js";
60
- import {
61
- Cartographic_default,
62
- Ellipsoid_default
63
- } from "./chunk-YPGJSFOO.js";
64
- import {
65
- Cartesian3_default,
66
- Frozen_default
67
- } from "./chunk-QWV2DM66.js";
68
- import {
69
- Math_default
70
- } from "./chunk-6XJO625E.js";
71
- import {
72
- DeveloperError_default
73
- } from "./chunk-KH2OWUUA.js";
74
- import {
75
- defined_default
76
- } from "./chunk-AVSQILVI.js";
77
-
78
- // packages/engine/Source/Core/RectangleOutlineGeometry.js
79
- var bottomBoundingSphere = new BoundingSphere_default();
80
- var topBoundingSphere = new BoundingSphere_default();
81
- var positionScratch = new Cartesian3_default();
82
- var rectangleScratch = new Rectangle_default();
83
- function constructRectangle(geometry, computedOptions) {
84
- const ellipsoid = geometry._ellipsoid;
85
- const height = computedOptions.height;
86
- const width = computedOptions.width;
87
- const northCap = computedOptions.northCap;
88
- const southCap = computedOptions.southCap;
89
- let rowHeight = height;
90
- let widthMultiplier = 2;
91
- let size = 0;
92
- let corners = 4;
93
- if (northCap) {
94
- widthMultiplier -= 1;
95
- rowHeight -= 1;
96
- size += 1;
97
- corners -= 2;
98
- }
99
- if (southCap) {
100
- widthMultiplier -= 1;
101
- rowHeight -= 1;
102
- size += 1;
103
- corners -= 2;
104
- }
105
- size += widthMultiplier * width + 2 * rowHeight - corners;
106
- const positions = new Float64Array(size * 3);
107
- let posIndex = 0;
108
- let row = 0;
109
- let col;
110
- const position = positionScratch;
111
- if (northCap) {
112
- RectangleGeometryLibrary_default.computePosition(
113
- computedOptions,
114
- ellipsoid,
115
- false,
116
- row,
117
- 0,
118
- position
119
- );
120
- positions[posIndex++] = position.x;
121
- positions[posIndex++] = position.y;
122
- positions[posIndex++] = position.z;
123
- } else {
124
- for (col = 0; col < width; col++) {
125
- RectangleGeometryLibrary_default.computePosition(
126
- computedOptions,
127
- ellipsoid,
128
- false,
129
- row,
130
- col,
131
- position
132
- );
133
- positions[posIndex++] = position.x;
134
- positions[posIndex++] = position.y;
135
- positions[posIndex++] = position.z;
136
- }
137
- }
138
- col = width - 1;
139
- for (row = 1; row < height; row++) {
140
- RectangleGeometryLibrary_default.computePosition(
141
- computedOptions,
142
- ellipsoid,
143
- false,
144
- row,
145
- col,
146
- position
147
- );
148
- positions[posIndex++] = position.x;
149
- positions[posIndex++] = position.y;
150
- positions[posIndex++] = position.z;
151
- }
152
- row = height - 1;
153
- if (!southCap) {
154
- for (col = width - 2; col >= 0; col--) {
155
- RectangleGeometryLibrary_default.computePosition(
156
- computedOptions,
157
- ellipsoid,
158
- false,
159
- row,
160
- col,
161
- position
162
- );
163
- positions[posIndex++] = position.x;
164
- positions[posIndex++] = position.y;
165
- positions[posIndex++] = position.z;
166
- }
167
- }
168
- col = 0;
169
- for (row = height - 2; row > 0; row--) {
170
- RectangleGeometryLibrary_default.computePosition(
171
- computedOptions,
172
- ellipsoid,
173
- false,
174
- row,
175
- col,
176
- position
177
- );
178
- positions[posIndex++] = position.x;
179
- positions[posIndex++] = position.y;
180
- positions[posIndex++] = position.z;
181
- }
182
- const indicesSize = positions.length / 3 * 2;
183
- const indices = IndexDatatype_default.createTypedArray(
184
- positions.length / 3,
185
- indicesSize
186
- );
187
- let index = 0;
188
- for (let i = 0; i < positions.length / 3 - 1; i++) {
189
- indices[index++] = i;
190
- indices[index++] = i + 1;
191
- }
192
- indices[index++] = positions.length / 3 - 1;
193
- indices[index++] = 0;
194
- const geo = new Geometry_default({
195
- attributes: new GeometryAttributes_default(),
196
- primitiveType: PrimitiveType_default.LINES
197
- });
198
- geo.attributes.position = new GeometryAttribute_default({
199
- componentDatatype: ComponentDatatype_default.DOUBLE,
200
- componentsPerAttribute: 3,
201
- values: positions
202
- });
203
- geo.indices = indices;
204
- return geo;
205
- }
206
- function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
207
- const maxHeight = rectangleGeometry._surfaceHeight;
208
- const minHeight = rectangleGeometry._extrudedHeight;
209
- const ellipsoid = rectangleGeometry._ellipsoid;
210
- const geo = constructRectangle(rectangleGeometry, computedOptions);
211
- const height = computedOptions.height;
212
- const width = computedOptions.width;
213
- const topPositions = PolygonPipeline_default.scaleToGeodeticHeight(
214
- geo.attributes.position.values,
215
- maxHeight,
216
- ellipsoid,
217
- false
218
- );
219
- let length = topPositions.length;
220
- const positions = new Float64Array(length * 2);
221
- positions.set(topPositions);
222
- const bottomPositions = PolygonPipeline_default.scaleToGeodeticHeight(
223
- geo.attributes.position.values,
224
- minHeight,
225
- ellipsoid
226
- );
227
- positions.set(bottomPositions, length);
228
- geo.attributes.position.values = positions;
229
- const northCap = computedOptions.northCap;
230
- const southCap = computedOptions.southCap;
231
- let corners = 4;
232
- if (northCap) {
233
- corners -= 1;
234
- }
235
- if (southCap) {
236
- corners -= 1;
237
- }
238
- const indicesSize = (positions.length / 3 + corners) * 2;
239
- const indices = IndexDatatype_default.createTypedArray(
240
- positions.length / 3,
241
- indicesSize
242
- );
243
- length = positions.length / 6;
244
- let index = 0;
245
- for (let i = 0; i < length - 1; i++) {
246
- indices[index++] = i;
247
- indices[index++] = i + 1;
248
- indices[index++] = i + length;
249
- indices[index++] = i + length + 1;
250
- }
251
- indices[index++] = length - 1;
252
- indices[index++] = 0;
253
- indices[index++] = length + length - 1;
254
- indices[index++] = length;
255
- indices[index++] = 0;
256
- indices[index++] = length;
257
- let bottomCorner;
258
- if (northCap) {
259
- bottomCorner = height - 1;
260
- } else {
261
- const topRightCorner = width - 1;
262
- indices[index++] = topRightCorner;
263
- indices[index++] = topRightCorner + length;
264
- bottomCorner = width + height - 2;
265
- }
266
- indices[index++] = bottomCorner;
267
- indices[index++] = bottomCorner + length;
268
- if (!southCap) {
269
- const bottomLeftCorner = width + bottomCorner - 1;
270
- indices[index++] = bottomLeftCorner;
271
- indices[index] = bottomLeftCorner + length;
272
- }
273
- geo.indices = indices;
274
- return geo;
275
- }
276
- function RectangleOutlineGeometry(options) {
277
- options = options ?? Frozen_default.EMPTY_OBJECT;
278
- const rectangle = options.rectangle;
279
- const granularity = options.granularity ?? Math_default.RADIANS_PER_DEGREE;
280
- const ellipsoid = options.ellipsoid ?? Ellipsoid_default.default;
281
- const rotation = options.rotation ?? 0;
282
- if (!defined_default(rectangle)) {
283
- throw new DeveloperError_default("rectangle is required.");
284
- }
285
- Rectangle_default._validate(rectangle);
286
- if (rectangle.north < rectangle.south) {
287
- throw new DeveloperError_default(
288
- "options.rectangle.north must be greater than options.rectangle.south"
289
- );
290
- }
291
- const height = options.height ?? 0;
292
- const extrudedHeight = options.extrudedHeight ?? height;
293
- this._rectangle = Rectangle_default.clone(rectangle);
294
- this._granularity = granularity;
295
- this._ellipsoid = ellipsoid;
296
- this._surfaceHeight = Math.max(height, extrudedHeight);
297
- this._rotation = rotation;
298
- this._extrudedHeight = Math.min(height, extrudedHeight);
299
- this._offsetAttribute = options.offsetAttribute;
300
- this._workerName = "createRectangleOutlineGeometry";
301
- }
302
- RectangleOutlineGeometry.packedLength = Rectangle_default.packedLength + Ellipsoid_default.packedLength + 5;
303
- RectangleOutlineGeometry.pack = function(value, array, startingIndex) {
304
- if (!defined_default(value)) {
305
- throw new DeveloperError_default("value is required");
306
- }
307
- if (!defined_default(array)) {
308
- throw new DeveloperError_default("array is required");
309
- }
310
- startingIndex = startingIndex ?? 0;
311
- Rectangle_default.pack(value._rectangle, array, startingIndex);
312
- startingIndex += Rectangle_default.packedLength;
313
- Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
314
- startingIndex += Ellipsoid_default.packedLength;
315
- array[startingIndex++] = value._granularity;
316
- array[startingIndex++] = value._surfaceHeight;
317
- array[startingIndex++] = value._rotation;
318
- array[startingIndex++] = value._extrudedHeight;
319
- array[startingIndex] = value._offsetAttribute ?? -1;
320
- return array;
321
- };
322
- var scratchRectangle = new Rectangle_default();
323
- var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
324
- var scratchOptions = {
325
- rectangle: scratchRectangle,
326
- ellipsoid: scratchEllipsoid,
327
- granularity: void 0,
328
- height: void 0,
329
- rotation: void 0,
330
- extrudedHeight: void 0,
331
- offsetAttribute: void 0
332
- };
333
- RectangleOutlineGeometry.unpack = function(array, startingIndex, result) {
334
- if (!defined_default(array)) {
335
- throw new DeveloperError_default("array is required");
336
- }
337
- startingIndex = startingIndex ?? 0;
338
- const rectangle = Rectangle_default.unpack(array, startingIndex, scratchRectangle);
339
- startingIndex += Rectangle_default.packedLength;
340
- const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
341
- startingIndex += Ellipsoid_default.packedLength;
342
- const granularity = array[startingIndex++];
343
- const height = array[startingIndex++];
344
- const rotation = array[startingIndex++];
345
- const extrudedHeight = array[startingIndex++];
346
- const offsetAttribute = array[startingIndex];
347
- if (!defined_default(result)) {
348
- scratchOptions.granularity = granularity;
349
- scratchOptions.height = height;
350
- scratchOptions.rotation = rotation;
351
- scratchOptions.extrudedHeight = extrudedHeight;
352
- scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
353
- return new RectangleOutlineGeometry(scratchOptions);
354
- }
355
- result._rectangle = Rectangle_default.clone(rectangle, result._rectangle);
356
- result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
357
- result._surfaceHeight = height;
358
- result._rotation = rotation;
359
- result._extrudedHeight = extrudedHeight;
360
- result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
361
- return result;
362
- };
363
- var nwScratch = new Cartographic_default();
364
- RectangleOutlineGeometry.createGeometry = function(rectangleGeometry) {
365
- const rectangle = rectangleGeometry._rectangle;
366
- const ellipsoid = rectangleGeometry._ellipsoid;
367
- const computedOptions = RectangleGeometryLibrary_default.computeOptions(
368
- rectangle,
369
- rectangleGeometry._granularity,
370
- rectangleGeometry._rotation,
371
- 0,
372
- rectangleScratch,
373
- nwScratch
374
- );
375
- let geometry;
376
- let boundingSphere;
377
- if (Math_default.equalsEpsilon(
378
- rectangle.north,
379
- rectangle.south,
380
- Math_default.EPSILON10
381
- ) || Math_default.equalsEpsilon(
382
- rectangle.east,
383
- rectangle.west,
384
- Math_default.EPSILON10
385
- )) {
386
- return void 0;
387
- }
388
- const surfaceHeight = rectangleGeometry._surfaceHeight;
389
- const extrudedHeight = rectangleGeometry._extrudedHeight;
390
- const extrude = !Math_default.equalsEpsilon(
391
- surfaceHeight,
392
- extrudedHeight,
393
- 0,
394
- Math_default.EPSILON2
395
- );
396
- let offsetValue;
397
- if (extrude) {
398
- geometry = constructExtrudedRectangle(rectangleGeometry, computedOptions);
399
- if (defined_default(rectangleGeometry._offsetAttribute)) {
400
- const size = geometry.attributes.position.values.length / 3;
401
- let offsetAttribute = new Uint8Array(size);
402
- if (rectangleGeometry._offsetAttribute === GeometryOffsetAttribute_default.TOP) {
403
- offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
404
- } else {
405
- offsetValue = rectangleGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
406
- offsetAttribute = offsetAttribute.fill(offsetValue);
407
- }
408
- geometry.attributes.applyOffset = new GeometryAttribute_default({
409
- componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
410
- componentsPerAttribute: 1,
411
- values: offsetAttribute
412
- });
413
- }
414
- const topBS = BoundingSphere_default.fromRectangle3D(
415
- rectangle,
416
- ellipsoid,
417
- surfaceHeight,
418
- topBoundingSphere
419
- );
420
- const bottomBS = BoundingSphere_default.fromRectangle3D(
421
- rectangle,
422
- ellipsoid,
423
- extrudedHeight,
424
- bottomBoundingSphere
425
- );
426
- boundingSphere = BoundingSphere_default.union(topBS, bottomBS);
427
- } else {
428
- geometry = constructRectangle(rectangleGeometry, computedOptions);
429
- geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
430
- geometry.attributes.position.values,
431
- surfaceHeight,
432
- ellipsoid,
433
- false
434
- );
435
- if (defined_default(rectangleGeometry._offsetAttribute)) {
436
- const length = geometry.attributes.position.values.length;
437
- offsetValue = rectangleGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
438
- const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
439
- geometry.attributes.applyOffset = new GeometryAttribute_default({
440
- componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
441
- componentsPerAttribute: 1,
442
- values: applyOffset
443
- });
444
- }
445
- boundingSphere = BoundingSphere_default.fromRectangle3D(
446
- rectangle,
447
- ellipsoid,
448
- surfaceHeight
449
- );
450
- }
451
- return new Geometry_default({
452
- attributes: geometry.attributes,
453
- indices: geometry.indices,
454
- primitiveType: PrimitiveType_default.LINES,
455
- boundingSphere,
456
- offsetAttribute: rectangleGeometry._offsetAttribute
457
- });
458
- };
459
- var RectangleOutlineGeometry_default = RectangleOutlineGeometry;
460
-
461
- // packages/engine/Source/Workers/createRectangleOutlineGeometry.js
462
- function createRectangleOutlineGeometry(rectangleGeometry, offset) {
463
- if (defined_default(offset)) {
464
- rectangleGeometry = RectangleOutlineGeometry_default.unpack(
465
- rectangleGeometry,
466
- offset
467
- );
468
- }
469
- rectangleGeometry._ellipsoid = Ellipsoid_default.clone(rectangleGeometry._ellipsoid);
470
- rectangleGeometry._rectangle = Rectangle_default.clone(rectangleGeometry._rectangle);
471
- return RectangleOutlineGeometry_default.createGeometry(rectangleGeometry);
472
- }
473
- var createRectangleOutlineGeometry_default = createRectangleOutlineGeometry;
474
- export {
475
- createRectangleOutlineGeometry_default as default
476
- };