@cesium/engine 22.0.0 → 22.1.0

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 (151) hide show
  1. package/Build/ThirdParty/Workers/zip-web-worker.js +10 -7
  2. package/Build/Workers/chunk-23T2IPHV.js +55 -0
  3. package/Build/Workers/{chunk-VVZ667H6.js → chunk-2AM4E2WD.js} +2 -2
  4. package/Build/Workers/{chunk-XQ347YWU.js → chunk-2MWF4IES.js} +16 -14
  5. package/Build/Workers/{chunk-75HAJIDT.js → chunk-2RCIRXNI.js} +1 -1
  6. package/Build/Workers/{chunk-RQRODXVN.js → chunk-3YTMGEXW.js} +5 -1424
  7. package/Build/Workers/{chunk-N52ZRKUE.js → chunk-4BHWJWS3.js} +6 -6
  8. package/Build/Workers/{chunk-5T5SY63I.js → chunk-5JKH4AMT.js} +2 -2
  9. package/Build/Workers/{chunk-EJO3NKMS.js → chunk-6HKAPCSO.js} +1 -1
  10. package/Build/Workers/{chunk-BJSNGGBM.js → chunk-A53R2F2L.js} +4 -4
  11. package/Build/Workers/{chunk-H7B7FU2U.js → chunk-A6YFUGJO.js} +5 -5
  12. package/Build/Workers/{chunk-VCVA7BMD.js → chunk-AJYWXC6I.js} +4 -4
  13. package/Build/Workers/{chunk-3GL53OCU.js → chunk-AOIO5VUS.js} +276 -2277
  14. package/Build/Workers/{chunk-SZN34LQ5.js → chunk-B7JRBTT6.js} +10 -10
  15. package/Build/Workers/{chunk-726NINF5.js → chunk-CHNDJRYA.js} +20 -18
  16. package/Build/Workers/{chunk-L7U26FFD.js → chunk-CJOV55CW.js} +20 -18
  17. package/Build/Workers/{chunk-NE5JTQJP.js → chunk-COGPE5Z2.js} +10 -8
  18. package/Build/Workers/{chunk-XPVZWY4A.js → chunk-CW7W27IZ.js} +12 -8
  19. package/Build/Workers/{chunk-GYRDA3XK.js → chunk-DICY26ID.js} +20 -16
  20. package/Build/Workers/{chunk-AOM3FHBN.js → chunk-DMEFNTUV.js} +69 -7
  21. package/Build/Workers/{chunk-XZO6F23E.js → chunk-DQSJEOZY.js} +1 -1
  22. package/Build/Workers/{chunk-MXHRZHDF.js → chunk-GDU4RZSZ.js} +16 -36
  23. package/Build/Workers/{chunk-JDJAPBZP.js → chunk-GKWOUMYA.js} +1 -1
  24. package/Build/Workers/{chunk-OUBBMEWX.js → chunk-GTY4K4IA.js} +9 -7
  25. package/Build/Workers/{chunk-LWJXCI3F.js → chunk-H6Q7E4BQ.js} +8 -6
  26. package/Build/Workers/{chunk-YLXWC7OW.js → chunk-HHGOFZVQ.js} +7 -5
  27. package/Build/Workers/{chunk-34YXP222.js → chunk-HXKUEOOD.js} +5 -5
  28. package/Build/Workers/{chunk-EZ7NJXQN.js → chunk-I4REFVXB.js} +4 -4
  29. package/Build/Workers/{chunk-OE22564R.js → chunk-IL5F6WEE.js} +3 -3
  30. package/Build/Workers/{chunk-QSMIHPUM.js → chunk-JKXPC5HD.js} +2 -2
  31. package/Build/Workers/{chunk-7KAXDKRU.js → chunk-KKGD7HAW.js} +13 -11
  32. package/Build/Workers/{chunk-YLILBDWK.js → chunk-KROSQJUA.js} +2 -2
  33. package/Build/Workers/{chunk-NHZNMTIR.js → chunk-L4JLDVCM.js} +5 -5
  34. package/Build/Workers/{chunk-2D3GLFZD.js → chunk-LIYMRHGR.js} +15 -13
  35. package/Build/Workers/{chunk-P2H75UV5.js → chunk-MKMZHRB3.js} +16 -11
  36. package/Build/Workers/{chunk-KUB64XW6.js → chunk-MO25ZQ2I.js} +12 -10
  37. package/Build/Workers/{chunk-ECHAJNQJ.js → chunk-O6RZEKHZ.js} +12 -12
  38. package/Build/Workers/{chunk-5ZF53EY6.js → chunk-OOCGX2OD.js} +4 -4
  39. package/Build/Workers/{chunk-NGKF5NTR.js → chunk-OXFU5HNU.js} +13 -5
  40. package/Build/Workers/{chunk-FA3SCJDX.js → chunk-P5CGIJUY.js} +2 -2
  41. package/Build/Workers/{chunk-W4PIP5PG.js → chunk-QEANVUGT.js} +2 -2
  42. package/Build/Workers/{chunk-AARZSH4V.js → chunk-QFBCIX7J.js} +8 -6
  43. package/Build/Workers/{chunk-JZFU2LEM.js → chunk-QUAH3XOT.js} +4 -4
  44. package/Build/Workers/{chunk-6HBKE43B.js → chunk-RXZDTDIY.js} +13 -9
  45. package/Build/Workers/{chunk-LEFQBK6H.js → chunk-SPA2KPH3.js} +14 -12
  46. package/Build/Workers/chunk-TDSVSW5A.js +1460 -0
  47. package/Build/Workers/{chunk-A6JAFSZT.js → chunk-UG2DPFOL.js} +8 -6
  48. package/Build/Workers/{chunk-U4XMLGSR.js → chunk-URGEDZBS.js} +7 -7
  49. package/Build/Workers/{chunk-A4DPJIWS.js → chunk-V35NQOJC.js} +8 -6
  50. package/Build/Workers/chunk-W4XUEDU5.js +2058 -0
  51. package/Build/Workers/{chunk-7XEJGXX2.js → chunk-WB4TSSBQ.js} +779 -24
  52. package/Build/Workers/{chunk-RCCYW6E7.js → chunk-WTLYD4FE.js} +19 -15
  53. package/Build/Workers/{chunk-5B7VZQZY.js → chunk-Y4ALZ4SS.js} +9 -7
  54. package/Build/Workers/{chunk-KGLDJRSO.js → chunk-YF2NVO5B.js} +19 -13
  55. package/Build/Workers/{chunk-IGX772ZQ.js → chunk-YSYSXSHF.js} +1 -1
  56. package/Build/Workers/{chunk-M7HRE4QR.js → chunk-YX562XOB.js} +15 -11
  57. package/Build/Workers/{chunk-QCMRUVVF.js → chunk-YZWA5B4R.js} +15 -13
  58. package/Build/Workers/{chunk-U7CX3HHE.js → chunk-Z6DFT4D3.js} +15 -11
  59. package/Build/Workers/combineGeometry.js +24 -21
  60. package/Build/Workers/createBoxGeometry.js +18 -15
  61. package/Build/Workers/createBoxOutlineGeometry.js +16 -13
  62. package/Build/Workers/createCircleGeometry.js +28 -24
  63. package/Build/Workers/createCircleOutlineGeometry.js +21 -17
  64. package/Build/Workers/createCoplanarPolygonGeometry.js +35 -31
  65. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +33 -29
  66. package/Build/Workers/createCorridorGeometry.js +32 -28
  67. package/Build/Workers/createCorridorOutlineGeometry.js +30 -26
  68. package/Build/Workers/createCylinderGeometry.js +20 -17
  69. package/Build/Workers/createCylinderOutlineGeometry.js +20 -16
  70. package/Build/Workers/createEllipseGeometry.js +28 -24
  71. package/Build/Workers/createEllipseOutlineGeometry.js +21 -17
  72. package/Build/Workers/createEllipsoidGeometry.js +19 -16
  73. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -15
  74. package/Build/Workers/createFrustumGeometry.js +18 -15
  75. package/Build/Workers/createFrustumOutlineGeometry.js +18 -15
  76. package/Build/Workers/createGeometry.js +25 -21
  77. package/Build/Workers/createGroundPolylineGeometry.js +25 -21
  78. package/Build/Workers/createPlaneGeometry.js +16 -13
  79. package/Build/Workers/createPlaneOutlineGeometry.js +15 -12
  80. package/Build/Workers/createPolygonGeometry.js +35 -31
  81. package/Build/Workers/createPolygonOutlineGeometry.js +32 -28
  82. package/Build/Workers/createPolylineGeometry.js +27 -23
  83. package/Build/Workers/createPolylineVolumeGeometry.js +33 -29
  84. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +29 -25
  85. package/Build/Workers/createRectangleGeometry.js +30 -26
  86. package/Build/Workers/createRectangleOutlineGeometry.js +23 -19
  87. package/Build/Workers/createSimplePolylineGeometry.js +25 -21
  88. package/Build/Workers/createSphereGeometry.js +19 -16
  89. package/Build/Workers/createSphereOutlineGeometry.js +18 -15
  90. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  91. package/Build/Workers/createVectorTileClampedPolylines.js +16 -13
  92. package/Build/Workers/createVectorTileGeometries.js +24 -21
  93. package/Build/Workers/createVectorTilePoints.js +15 -12
  94. package/Build/Workers/createVectorTilePolygons.js +24 -20
  95. package/Build/Workers/createVectorTilePolylines.js +16 -13
  96. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -22
  97. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +26 -21
  98. package/Build/Workers/createVerticesFromHeightmap.js +26 -21
  99. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +24 -19
  100. package/Build/Workers/createWallGeometry.js +26 -22
  101. package/Build/Workers/createWallOutlineGeometry.js +25 -21
  102. package/Build/Workers/decodeDraco.js +10 -10
  103. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  104. package/Build/Workers/decodeI3S.js +13 -11
  105. package/Build/Workers/gaussianSplatSorter.js +4 -4
  106. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  107. package/Build/Workers/incrementallyBuildTerrainPicker.js +121 -0
  108. package/Build/Workers/transcodeKTX2.js +6 -6
  109. package/Build/Workers/transferTypedArrayTest.js +1 -1
  110. package/Build/Workers/upsampleQuantizedTerrainMesh.js +24 -20
  111. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -22
  112. package/Source/Core/AxisAlignedBoundingBox.js +36 -0
  113. package/Source/Core/Cesium3DTilesTerrainData.js +2 -0
  114. package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +2 -0
  115. package/Source/Core/GoogleEarthEnterpriseTerrainData.js +1 -0
  116. package/Source/Core/HeightmapTerrainData.js +2 -0
  117. package/Source/Core/IntersectionTests.js +80 -0
  118. package/Source/Core/Ion.js +1 -1
  119. package/Source/Core/QuantizedMeshTerrainData.js +1 -0
  120. package/Source/Core/TerrainMesh.js +207 -0
  121. package/Source/Core/TerrainPicker.js +607 -0
  122. package/Source/Core/TexturePacker.js +27 -12
  123. package/Source/Core/Transforms.js +28 -19
  124. package/Source/DataSources/BillboardGraphics.js +1 -1
  125. package/Source/DataSources/BillboardVisualizer.js +7 -4
  126. package/Source/Renderer/Buffer.js +32 -0
  127. package/Source/Renderer/BufferUsage.js +3 -1
  128. package/Source/Renderer/Context.js +85 -7
  129. package/Source/Renderer/Sync.js +104 -0
  130. package/Source/Renderer/TextureAtlas.js +67 -27
  131. package/Source/Scene/ArcGisMapService.js +1 -1
  132. package/Source/Scene/Azure2DImageryProvider.js +96 -12
  133. package/Source/Scene/Billboard.js +75 -28
  134. package/Source/Scene/BillboardCollection.js +7 -2
  135. package/Source/Scene/BillboardTexture.js +56 -7
  136. package/Source/Scene/Globe.js +3 -1
  137. package/Source/Scene/GlobeSurfaceTile.js +18 -66
  138. package/Source/Scene/GlobeSurfaceTileProvider.js +11 -0
  139. package/Source/Scene/Google2DImageryProvider.js +10 -15
  140. package/Source/Scene/PickFramebuffer.js +124 -36
  141. package/Source/Scene/Picking.js +99 -17
  142. package/Source/Scene/Scene.js +36 -4
  143. package/Source/Scene/TerrainFillMesh.js +1 -0
  144. package/Source/Shaders/BillboardCollectionFS.glsl +22 -9
  145. package/Source/Shaders/BillboardCollectionFS.js +22 -9
  146. package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
  147. package/Source/ThirdParty/zip-module.wasm +0 -0
  148. package/Source/Workers/incrementallyBuildTerrainPicker.js +108 -0
  149. package/index.d.ts +207 -4
  150. package/index.js +28 -26
  151. package/package.json +2 -2
@@ -0,0 +1,121 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.136.0
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
+ createTaskProcessorWorker_default
28
+ } from "./chunk-2AM4E2WD.js";
29
+ import {
30
+ AxisAlignedBoundingBox_default
31
+ } from "./chunk-OXFU5HNU.js";
32
+ import "./chunk-23T2IPHV.js";
33
+ import {
34
+ Matrix4_default
35
+ } from "./chunk-W4XUEDU5.js";
36
+ import "./chunk-5JKH4AMT.js";
37
+ import {
38
+ Cartesian3_default
39
+ } from "./chunk-3YTMGEXW.js";
40
+ import "./chunk-IL5F6WEE.js";
41
+ import "./chunk-QEANVUGT.js";
42
+ import "./chunk-2RCIRXNI.js";
43
+
44
+ // packages/engine/Source/Workers/incrementallyBuildTerrainPicker.js
45
+ var scratchAABBCornerMin = new Cartesian3_default();
46
+ var scratchAABBCornerMax = new Cartesian3_default();
47
+ var scratchTrianglePoints = [
48
+ new Cartesian3_default(),
49
+ new Cartesian3_default(),
50
+ new Cartesian3_default()
51
+ ];
52
+ var scratchTriangleAABB = new AxisAlignedBoundingBox_default();
53
+ function incrementallyBuildTerrainPicker(parameters, transferableObjects) {
54
+ const aabbs = new Float64Array(parameters.aabbs);
55
+ const nodeAABBs = Array.from({ length: 4 }, (_, i) => {
56
+ const min = Cartesian3_default.unpack(aabbs, i * 6, scratchAABBCornerMin);
57
+ const max = Cartesian3_default.unpack(aabbs, i * 6 + 3, scratchAABBCornerMax);
58
+ return AxisAlignedBoundingBox_default.fromCorners(
59
+ min,
60
+ max,
61
+ new AxisAlignedBoundingBox_default()
62
+ );
63
+ });
64
+ const inverseTransformArray = new Float64Array(parameters.inverseTransform);
65
+ const inverseTransform = Matrix4_default.unpack(
66
+ inverseTransformArray,
67
+ 0,
68
+ new Matrix4_default()
69
+ );
70
+ const triangleIndices = new Uint32Array(parameters.triangleIndices);
71
+ const trianglePositions = new Float32Array(parameters.trianglePositions);
72
+ const intersectingTrianglesArrays = Array.from({ length: 4 }, () => []);
73
+ for (let j = 0; j < triangleIndices.length; j++) {
74
+ Cartesian3_default.unpack(trianglePositions, j * 9, scratchTrianglePoints[0]);
75
+ Cartesian3_default.unpack(trianglePositions, j * 9 + 3, scratchTrianglePoints[1]);
76
+ Cartesian3_default.unpack(trianglePositions, j * 9 + 6, scratchTrianglePoints[2]);
77
+ const triangleAABB = createAABBFromTriangle(
78
+ inverseTransform,
79
+ scratchTrianglePoints
80
+ );
81
+ for (let i = 0; i < 4; i++) {
82
+ const aabbsIntersect = nodeAABBs[i].intersectAxisAlignedBoundingBox(triangleAABB);
83
+ if (!aabbsIntersect) {
84
+ continue;
85
+ }
86
+ intersectingTrianglesArrays[i].push(triangleIndices[j]);
87
+ }
88
+ }
89
+ const intersectingTrianglesTypedArrays = intersectingTrianglesArrays.map(
90
+ (array) => {
91
+ const uintArray = new Uint32Array(array);
92
+ transferableObjects.push(uintArray.buffer);
93
+ return uintArray.buffer;
94
+ }
95
+ );
96
+ return {
97
+ intersectingTrianglesArrays: intersectingTrianglesTypedArrays
98
+ };
99
+ }
100
+ function createAABBFromTriangle(inverseTransform, trianglePoints) {
101
+ Matrix4_default.multiplyByPoint(
102
+ inverseTransform,
103
+ trianglePoints[0],
104
+ trianglePoints[0]
105
+ );
106
+ Matrix4_default.multiplyByPoint(
107
+ inverseTransform,
108
+ trianglePoints[1],
109
+ trianglePoints[1]
110
+ );
111
+ Matrix4_default.multiplyByPoint(
112
+ inverseTransform,
113
+ trianglePoints[2],
114
+ trianglePoints[2]
115
+ );
116
+ return AxisAlignedBoundingBox_default.fromPoints(trianglePoints, scratchTriangleAABB);
117
+ }
118
+ var incrementallyBuildTerrainPicker_default = createTaskProcessorWorker_default(incrementallyBuildTerrainPicker);
119
+ export {
120
+ incrementallyBuildTerrainPicker_default as default
121
+ };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.135.0
4
+ * Version 1.136.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -25,22 +25,22 @@
25
25
 
26
26
  import {
27
27
  createTaskProcessorWorker_default
28
- } from "./chunk-VVZ667H6.js";
28
+ } from "./chunk-2AM4E2WD.js";
29
29
  import {
30
30
  WebGLConstants_default
31
- } from "./chunk-IGX772ZQ.js";
31
+ } from "./chunk-YSYSXSHF.js";
32
32
  import {
33
33
  RuntimeError_default
34
- } from "./chunk-5T5SY63I.js";
34
+ } from "./chunk-5JKH4AMT.js";
35
35
  import {
36
36
  Check_default
37
- } from "./chunk-W4PIP5PG.js";
37
+ } from "./chunk-QEANVUGT.js";
38
38
  import {
39
39
  __commonJS,
40
40
  __require,
41
41
  __toESM,
42
42
  defined_default
43
- } from "./chunk-75HAJIDT.js";
43
+ } from "./chunk-2RCIRXNI.js";
44
44
 
45
45
  // packages/engine/Source/ThirdParty/Workers/basis_transcoder.js
46
46
  var require_basis_transcoder = __commonJS({
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.135.0
4
+ * Version 1.136.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.135.0
4
+ * Version 1.136.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -26,48 +26,52 @@
26
26
  import {
27
27
  EllipsoidalOccluder_default,
28
28
  TerrainEncoding_default
29
- } from "./chunk-P2H75UV5.js";
29
+ } from "./chunk-MKMZHRB3.js";
30
30
  import {
31
31
  createTaskProcessorWorker_default
32
- } from "./chunk-VVZ667H6.js";
32
+ } from "./chunk-2AM4E2WD.js";
33
33
  import {
34
34
  OrientedBoundingBox_default
35
- } from "./chunk-KGLDJRSO.js";
35
+ } from "./chunk-YF2NVO5B.js";
36
36
  import {
37
37
  AttributeCompression_default
38
- } from "./chunk-6HBKE43B.js";
39
- import "./chunk-U7CX3HHE.js";
40
- import "./chunk-NGKF5NTR.js";
41
- import "./chunk-AOM3FHBN.js";
42
- import "./chunk-N52ZRKUE.js";
38
+ } from "./chunk-RXZDTDIY.js";
39
+ import "./chunk-Z6DFT4D3.js";
40
+ import "./chunk-OXFU5HNU.js";
41
+ import "./chunk-DMEFNTUV.js";
42
+ import "./chunk-4BHWJWS3.js";
43
43
  import {
44
44
  IndexDatatype_default
45
- } from "./chunk-H7B7FU2U.js";
45
+ } from "./chunk-A6YFUGJO.js";
46
46
  import {
47
47
  BoundingSphere_default
48
- } from "./chunk-MXHRZHDF.js";
48
+ } from "./chunk-GDU4RZSZ.js";
49
+ import "./chunk-23T2IPHV.js";
49
50
  import {
50
51
  Rectangle_default
51
- } from "./chunk-3GL53OCU.js";
52
- import "./chunk-EZ7NJXQN.js";
53
- import "./chunk-IGX772ZQ.js";
54
- import "./chunk-5T5SY63I.js";
52
+ } from "./chunk-AOIO5VUS.js";
53
+ import "./chunk-W4XUEDU5.js";
54
+ import "./chunk-I4REFVXB.js";
55
+ import "./chunk-YSYSXSHF.js";
56
+ import "./chunk-5JKH4AMT.js";
55
57
  import {
56
58
  Cartesian2_default,
57
- Cartesian3_default,
58
59
  Cartographic_default,
59
60
  Ellipsoid_default
60
- } from "./chunk-RQRODXVN.js";
61
+ } from "./chunk-TDSVSW5A.js";
62
+ import {
63
+ Cartesian3_default
64
+ } from "./chunk-3YTMGEXW.js";
61
65
  import {
62
66
  Math_default
63
- } from "./chunk-OE22564R.js";
67
+ } from "./chunk-IL5F6WEE.js";
64
68
  import {
65
69
  Check_default,
66
70
  DeveloperError_default
67
- } from "./chunk-W4PIP5PG.js";
71
+ } from "./chunk-QEANVUGT.js";
68
72
  import {
69
73
  defined_default
70
- } from "./chunk-75HAJIDT.js";
74
+ } from "./chunk-2RCIRXNI.js";
71
75
 
72
76
  // packages/engine/Source/Core/Intersections2D.js
73
77
  var Intersections2D = {};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.135.0
4
+ * Version 1.136.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -25,29 +25,32 @@
25
25
 
26
26
  import {
27
27
  Cesium3DTilesTerrainGeometryProcessor_default
28
- } from "./chunk-7XEJGXX2.js";
29
- import "./chunk-34YXP222.js";
30
- import "./chunk-P2H75UV5.js";
28
+ } from "./chunk-WB4TSSBQ.js";
29
+ import "./chunk-HXKUEOOD.js";
30
+ import "./chunk-MKMZHRB3.js";
31
31
  import {
32
32
  createTaskProcessorWorker_default
33
- } from "./chunk-VVZ667H6.js";
34
- import "./chunk-LWJXCI3F.js";
35
- import "./chunk-KGLDJRSO.js";
36
- import "./chunk-6HBKE43B.js";
37
- import "./chunk-U7CX3HHE.js";
38
- import "./chunk-NGKF5NTR.js";
39
- import "./chunk-AOM3FHBN.js";
40
- import "./chunk-N52ZRKUE.js";
41
- import "./chunk-H7B7FU2U.js";
42
- import "./chunk-MXHRZHDF.js";
43
- import "./chunk-3GL53OCU.js";
44
- import "./chunk-EZ7NJXQN.js";
45
- import "./chunk-IGX772ZQ.js";
46
- import "./chunk-5T5SY63I.js";
47
- import "./chunk-RQRODXVN.js";
48
- import "./chunk-OE22564R.js";
49
- import "./chunk-W4PIP5PG.js";
50
- import "./chunk-75HAJIDT.js";
33
+ } from "./chunk-2AM4E2WD.js";
34
+ import "./chunk-H6Q7E4BQ.js";
35
+ import "./chunk-YF2NVO5B.js";
36
+ import "./chunk-RXZDTDIY.js";
37
+ import "./chunk-Z6DFT4D3.js";
38
+ import "./chunk-OXFU5HNU.js";
39
+ import "./chunk-DMEFNTUV.js";
40
+ import "./chunk-4BHWJWS3.js";
41
+ import "./chunk-A6YFUGJO.js";
42
+ import "./chunk-GDU4RZSZ.js";
43
+ import "./chunk-23T2IPHV.js";
44
+ import "./chunk-AOIO5VUS.js";
45
+ import "./chunk-W4XUEDU5.js";
46
+ import "./chunk-I4REFVXB.js";
47
+ import "./chunk-YSYSXSHF.js";
48
+ import "./chunk-5JKH4AMT.js";
49
+ import "./chunk-TDSVSW5A.js";
50
+ import "./chunk-3YTMGEXW.js";
51
+ import "./chunk-IL5F6WEE.js";
52
+ import "./chunk-QEANVUGT.js";
53
+ import "./chunk-2RCIRXNI.js";
51
54
 
52
55
  // packages/engine/Source/Workers/upsampleVerticesFromCesium3DTilesTerrain.js
53
56
  function upsampleVerticesFromCesium3DTilesTerrain(options, transferableObjects) {
@@ -222,6 +222,30 @@ AxisAlignedBoundingBox.intersectPlane = function (box, plane) {
222
222
  return Intersect.INTERSECTING;
223
223
  };
224
224
 
225
+ /**
226
+ * Determines whether two axis aligned bounding boxes intersect.
227
+ *
228
+ * @param {AxisAlignedBoundingBox} box first box
229
+ * @param {AxisAlignedBoundingBox} other second box
230
+ * @returns {boolean} <code>true</code> if the boxes intersect; otherwise, <code>false</code>.
231
+ */
232
+ AxisAlignedBoundingBox.intersectAxisAlignedBoundingBox = function (box, other) {
233
+ //>>includeStart('debug', pragmas.debug);
234
+ Check.defined("box", box);
235
+ Check.defined("other", other);
236
+ //>>includeEnd('debug');
237
+
238
+ // This short circuits in favor of AABBs that do not intersect.
239
+ return (
240
+ box.minimum.x <= other.maximum.x &&
241
+ box.maximum.x >= other.minimum.x &&
242
+ box.minimum.y <= other.maximum.y &&
243
+ box.maximum.y >= other.minimum.y &&
244
+ box.minimum.z <= other.maximum.z &&
245
+ box.maximum.z >= other.minimum.z
246
+ );
247
+ };
248
+
225
249
  /**
226
250
  * Duplicates this AxisAlignedBoundingBox instance.
227
251
  *
@@ -245,6 +269,18 @@ AxisAlignedBoundingBox.prototype.intersectPlane = function (plane) {
245
269
  return AxisAlignedBoundingBox.intersectPlane(this, plane);
246
270
  };
247
271
 
272
+ /**
273
+ * Determines whether some other axis aligned bounding box intersects this box.
274
+ *
275
+ * @param {AxisAlignedBoundingBox} other The other axis aligned bounding box.
276
+ * @returns {boolean} <code>true</code> if the boxes intersect; otherwise, <code>false</code>.
277
+ */
278
+ AxisAlignedBoundingBox.prototype.intersectAxisAlignedBoundingBox = function (
279
+ other,
280
+ ) {
281
+ return AxisAlignedBoundingBox.intersectAxisAlignedBoundingBox(this, other);
282
+ };
283
+
248
284
  /**
249
285
  * Compares this AxisAlignedBoundingBox against the provided AxisAlignedBoundingBox componentwise and returns
250
286
  * <code>true</code> if they are equal, <code>false</code> otherwise.
@@ -305,6 +305,7 @@ Cesium3DTilesTerrainData.prototype.createMesh = function (options) {
305
305
  vertexCountWithoutSkirts,
306
306
  minimumHeight,
307
307
  maximumHeight,
308
+ rectangle,
308
309
  boundingSphere,
309
310
  horizonOcclusionPoint,
310
311
  encoding.stride,
@@ -831,6 +832,7 @@ function upsampleMesh(
831
832
  vertexCountWithoutSkirts,
832
833
  minimumHeight,
833
834
  maximumHeight,
835
+ upsampleRectangle,
834
836
  boundingSphere,
835
837
  horizonOcclusionPoint,
836
838
  stride,
@@ -384,6 +384,7 @@ Cesium3DTilesTerrainGeometryProcessor.createMesh = async function (options) {
384
384
  vertexCountWithoutSkirts,
385
385
  minimumHeight,
386
386
  maximumHeight,
387
+ rectangle,
387
388
  BoundingSphere.clone(boundingSphere, new BoundingSphere()),
388
389
  Cartesian3.clone(horizonOcclusionPoint, new Cartesian3()),
389
390
  tempBufferStride,
@@ -1063,6 +1064,7 @@ Cesium3DTilesTerrainGeometryProcessor.upsampleMesh = function (options) {
1063
1064
  upsampledVertexCountWithoutSkirts,
1064
1065
  minimumHeight,
1065
1066
  maximumHeight,
1067
+ upsampleRectangle,
1066
1068
  BoundingSphere.clone(boundingSphere),
1067
1069
  Cartesian3.clone(horizonOcclusionPoint),
1068
1070
  upsampledVertexBufferStride,
@@ -210,6 +210,7 @@ GoogleEarthEnterpriseTerrainData.prototype.createMesh = function (options) {
210
210
  result.vertexCountWithoutSkirts,
211
211
  result.minimumHeight,
212
212
  result.maximumHeight,
213
+ rectangleScratch,
213
214
  BoundingSphere.clone(result.boundingSphere3D),
214
215
  Cartesian3.clone(result.occludeePointInScaledSpace),
215
216
  result.numberOfAttributes,
@@ -283,6 +283,7 @@ HeightmapTerrainData.prototype.createMesh = function (options) {
283
283
  vertexCountWithoutSkirts,
284
284
  result.minimumHeight,
285
285
  result.maximumHeight,
286
+ rectangle,
286
287
  BoundingSphere.clone(result.boundingSphere3D),
287
288
  Cartesian3.clone(result.occludeePointInScaledSpace),
288
289
  result.numberOfAttributes,
@@ -389,6 +390,7 @@ HeightmapTerrainData.prototype._createMeshSync = function (options) {
389
390
  vertexCountWithoutSkirts,
390
391
  result.minimumHeight,
391
392
  result.maximumHeight,
393
+ rectangle,
392
394
  result.boundingSphere3D,
393
395
  result.occludeePointInScaledSpace,
394
396
  result.encoding.stride,
@@ -495,6 +495,86 @@ IntersectionTests.rayEllipsoid = function (ray, ellipsoid) {
495
495
  return undefined;
496
496
  };
497
497
 
498
+ const scratchRayIntervalX = new Interval();
499
+ const scratchRayIntervalY = new Interval();
500
+ const scratchRayIntervalZ = new Interval();
501
+
502
+ /**
503
+ * Computes the intersection points of a ray with an axis-aligned bounding box. (axis-aligned in the same space as the ray)
504
+ *
505
+ * @param {Ray} ray The ray.
506
+ * @param {AxisAlignedBoundingBox} box The axis-aligned bounding box.
507
+ * @param {Interval | undefined} result The interval containing scalar points along the ray or undefined if there are no intersections.
508
+ */
509
+ IntersectionTests.rayAxisAlignedBoundingBox = function (ray, box, result) {
510
+ //>>includeStart('debug', pragmas.debug);
511
+ if (!defined(ray)) {
512
+ throw new DeveloperError("ray is required.");
513
+ }
514
+ if (!defined(box)) {
515
+ throw new DeveloperError("box is required.");
516
+ }
517
+ //>>includeEnd('debug');
518
+
519
+ if (!defined(result)) {
520
+ result = new Interval();
521
+ }
522
+
523
+ const tx = rayIntervalAlongAABBAxis(
524
+ ray.origin.x,
525
+ ray.direction.x,
526
+ box.minimum.x,
527
+ box.maximum.x,
528
+ scratchRayIntervalX,
529
+ );
530
+ const ty = rayIntervalAlongAABBAxis(
531
+ ray.origin.y,
532
+ ray.direction.y,
533
+ box.minimum.y,
534
+ box.maximum.y,
535
+ scratchRayIntervalY,
536
+ );
537
+ const tz = rayIntervalAlongAABBAxis(
538
+ ray.origin.z,
539
+ ray.direction.z,
540
+ box.minimum.z,
541
+ box.maximum.z,
542
+ scratchRayIntervalZ,
543
+ );
544
+
545
+ result.start = tx.start > ty.start ? tx.start : ty.start; //Get Greatest Min
546
+ result.stop = tx.stop < ty.stop ? tx.stop : ty.stop; //Get Smallest Max
547
+
548
+ if (tx.start > ty.stop || ty.start > tx.stop) {
549
+ return undefined;
550
+ }
551
+
552
+ if (result.start > tz.stop || tz.start > result.stop) {
553
+ return undefined;
554
+ }
555
+
556
+ if (tz.start > result.start) {
557
+ result.start = tz.start;
558
+ }
559
+ if (tz.stop < result.stop) {
560
+ result.stop = tz.stop;
561
+ }
562
+
563
+ return result;
564
+ };
565
+
566
+ function rayIntervalAlongAABBAxis(origin, direction, min, max, result) {
567
+ result.start = (min - origin) / direction;
568
+ result.stop = (max - origin) / direction;
569
+ if (result.stop < result.start) {
570
+ const tmp = result.stop;
571
+ result.stop = result.start;
572
+ result.start = tmp;
573
+ }
574
+
575
+ return result;
576
+ }
577
+
498
578
  function addWithCancellationCheck(left, right, tolerance) {
499
579
  const difference = left + right;
500
580
  if (
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhN2VkNDM5ZS1jMDk0LTQ3NDItOTM5ZS00MzU3M2M1MTc2ZTkiLCJpZCI6MjU5LCJpYXQiOjE3NjIxODg4MDB9.ZZG574sONzeHxsX8HJMaL_ZiGA3dh_HrOxL7DrKRcd4";
7
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxYTBmZmMzNy02NzcxLTRiMjUtYTllZS1hZmJjY2RkYjVhY2UiLCJpZCI6MjU5LCJpYXQiOjE3NjQ2MDU5OTB9.Nefln7pgRwDffoCJRJ8aaZn5iQzIPQrboLwKD2-ArDU";
8
8
  /**
9
9
  * Default settings for accessing the Cesium ion API.
10
10
  *
@@ -349,6 +349,7 @@ QuantizedMeshTerrainData.prototype.createMesh = function (options) {
349
349
  vertexCountWithoutSkirts,
350
350
  minimumHeight,
351
351
  maximumHeight,
352
+ rectangle,
352
353
  boundingSphere,
353
354
  occludeePointInScaledSpace,
354
355
  stride,