@cesium/engine 7.0.0 → 9.0.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 (200) hide show
  1. package/Build/ThirdParty/Workers/z-worker-pako.js +1 -5
  2. package/Build/Workers/{chunk-7XEAYGZK.js → chunk-24YTYWNB.js} +10 -10
  3. package/Build/Workers/{chunk-IQBYFRVW.js → chunk-2632RVPI.js} +7 -7
  4. package/Build/Workers/chunk-2KACWKS4.js +501 -0
  5. package/Build/Workers/{chunk-QZAD5O7I.js → chunk-2XPLH3JY.js} +7 -7
  6. package/Build/Workers/{chunk-JY5YEZFA.js → chunk-2ZBL3MVO.js} +8 -8
  7. package/Build/Workers/{chunk-ZK5JOS3D.js → chunk-3NCVAGDA.js} +14 -14
  8. package/Build/Workers/{chunk-AR5DNBJ4.js → chunk-5R6VWLMH.js} +6 -6
  9. package/Build/Workers/{chunk-PTQQUQC3.js → chunk-5TIV3L26.js} +13 -13
  10. package/Build/Workers/{chunk-BZP4T2JJ.js → chunk-6WF3KIF5.js} +10 -10
  11. package/Build/Workers/{chunk-5WQ523AW.js → chunk-73FKKY52.js} +5 -5
  12. package/Build/Workers/{chunk-F6SE42BK.js → chunk-7COR472O.js} +15 -472
  13. package/Build/Workers/{chunk-72SANQJV.js → chunk-ADOVHYWO.js} +9 -5
  14. package/Build/Workers/{chunk-5YLJ77FF.js → chunk-BCU2LH5T.js} +12 -11
  15. package/Build/Workers/{chunk-4EBHOMFX.js → chunk-C3XBUYBO.js} +17 -17
  16. package/Build/Workers/{chunk-IX2JCCNM.js → chunk-C6OI26DR.js} +1 -1
  17. package/Build/Workers/{chunk-2HJWSU7B.js → chunk-CO35JNNE.js} +4 -4
  18. package/Build/Workers/{chunk-OVLG3FRS.js → chunk-DGDUKCJJ.js} +6 -6
  19. package/Build/Workers/{chunk-DTAIXKTO.js → chunk-DPUSFA7S.js} +6 -6
  20. package/Build/Workers/{chunk-R5X4OQT4.js → chunk-E6WXPSJS.js} +7 -7
  21. package/Build/Workers/{chunk-VK3EJHWI.js → chunk-EOXYZ34O.js} +2 -2
  22. package/Build/Workers/{chunk-RAEV7K66.js → chunk-EPKE7GE3.js} +5 -5
  23. package/Build/Workers/{chunk-GV56Q4LU.js → chunk-GFA4SMXV.js} +11 -11
  24. package/Build/Workers/{chunk-NKPBIX7F.js → chunk-GXUXEOE2.js} +1 -1
  25. package/Build/Workers/{chunk-NY3K4IM3.js → chunk-HBQPB6IH.js} +12 -12
  26. package/Build/Workers/{chunk-6HZQPRUS.js → chunk-I37B3MZ2.js} +1 -1
  27. package/Build/Workers/{chunk-VRGFV2UO.js → chunk-L4BW3RUA.js} +10 -10
  28. package/Build/Workers/{chunk-6VJVYK2V.js → chunk-LAQP3SCC.js} +2 -2
  29. package/Build/Workers/{chunk-PNBGBETF.js → chunk-LQJ5FFFR.js} +10 -10
  30. package/Build/Workers/{chunk-UAEW6HKG.js → chunk-M2AYBTNH.js} +13 -13
  31. package/Build/Workers/{chunk-YUCVWAY6.js → chunk-MWV7IZK4.js} +7 -7
  32. package/Build/Workers/{chunk-JXDC723O.js → chunk-N4KXMWQU.js} +2 -2
  33. package/Build/Workers/{chunk-XWXM2O2R.js → chunk-NP2GYYE5.js} +6 -6
  34. package/Build/Workers/{chunk-GEJTYLCO.js → chunk-NZWNZA6S.js} +5 -5
  35. package/Build/Workers/{chunk-LZGHD6NY.js → chunk-P2YAAMT2.js} +15 -15
  36. package/Build/Workers/{chunk-S6SKF6DT.js → chunk-P4XKB3QZ.js} +5 -5
  37. package/Build/Workers/{chunk-U2VCRRQW.js → chunk-PXB7T27O.js} +6 -6
  38. package/Build/Workers/{chunk-RV7ZYPFT.js → chunk-QCQUZGXI.js} +4 -4
  39. package/Build/Workers/{chunk-JJ4VBOQ3.js → chunk-QKBGRKKG.js} +4 -4
  40. package/Build/Workers/{chunk-ODW7WYM4.js → chunk-RMOEYCZW.js} +2 -2
  41. package/Build/Workers/{chunk-ZUA2UUNV.js → chunk-RSJXEO2A.js} +2 -2
  42. package/Build/Workers/{chunk-UDO6BFSF.js → chunk-RV7ZOSS6.js} +13 -13
  43. package/Build/Workers/{chunk-LZ7JIV3K.js → chunk-SE4PXOEA.js} +17 -17
  44. package/Build/Workers/{chunk-S4MAZ3SS.js → chunk-SS4ESNE3.js} +2 -2
  45. package/Build/Workers/{chunk-AIPU2VSX.js → chunk-TJBU6GML.js} +6 -6
  46. package/Build/Workers/{chunk-5M3U6ZMA.js → chunk-TZORKRNK.js} +1 -1
  47. package/Build/Workers/{chunk-MY3VNFGQ.js → chunk-VR5RBW52.js} +7 -7
  48. package/Build/Workers/{chunk-FP6GYBFX.js → chunk-WHUSTDIB.js} +10 -10
  49. package/Build/Workers/{chunk-5HDYHG3F.js → chunk-X2F6BEPY.js} +13 -13
  50. package/Build/Workers/{chunk-WZU2YLWG.js → chunk-X6XOMPWL.js} +3 -3
  51. package/Build/Workers/{chunk-UGK3FCDY.js → chunk-YDVSBWEO.js} +1 -1
  52. package/Build/Workers/{chunk-46UD5ABS.js → chunk-YV4H2Y7M.js} +4 -4
  53. package/Build/Workers/{chunk-WBQCVXR3.js → chunk-Z7FQLK6N.js} +4 -4
  54. package/Build/Workers/{chunk-L2ZN645J.js → chunk-ZNVSKMQ2.js} +6 -6
  55. package/Build/Workers/{chunk-JCNXK6EL.js → chunk-ZYPTP7GS.js} +11 -11
  56. package/Build/Workers/combineGeometry.js +24 -23
  57. package/Build/Workers/createBoxGeometry.js +18 -17
  58. package/Build/Workers/createBoxOutlineGeometry.js +16 -15
  59. package/Build/Workers/createCircleGeometry.js +26 -25
  60. package/Build/Workers/createCircleOutlineGeometry.js +19 -18
  61. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -32
  62. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -30
  63. package/Build/Workers/createCorridorGeometry.js +29 -28
  64. package/Build/Workers/createCorridorOutlineGeometry.js +28 -27
  65. package/Build/Workers/createCylinderGeometry.js +20 -19
  66. package/Build/Workers/createCylinderOutlineGeometry.js +18 -17
  67. package/Build/Workers/createEllipseGeometry.js +26 -25
  68. package/Build/Workers/createEllipseOutlineGeometry.js +19 -18
  69. package/Build/Workers/createEllipsoidGeometry.js +19 -18
  70. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -17
  71. package/Build/Workers/createFrustumGeometry.js +18 -17
  72. package/Build/Workers/createFrustumOutlineGeometry.js +18 -17
  73. package/Build/Workers/createGeometry.js +54 -33
  74. package/Build/Workers/createGroundPolylineGeometry.js +22 -21
  75. package/Build/Workers/createPlaneGeometry.js +16 -15
  76. package/Build/Workers/createPlaneOutlineGeometry.js +15 -14
  77. package/Build/Workers/createPolygonGeometry.js +33 -32
  78. package/Build/Workers/createPolygonOutlineGeometry.js +30 -29
  79. package/Build/Workers/createPolylineGeometry.js +25 -24
  80. package/Build/Workers/createPolylineVolumeGeometry.js +31 -30
  81. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -26
  82. package/Build/Workers/createRectangleGeometry.js +27 -26
  83. package/Build/Workers/createRectangleOutlineGeometry.js +20 -19
  84. package/Build/Workers/createSimplePolylineGeometry.js +23 -22
  85. package/Build/Workers/createSphereGeometry.js +19 -18
  86. package/Build/Workers/createSphereOutlineGeometry.js +18 -17
  87. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  88. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  89. package/Build/Workers/createVectorTileGeometries.js +24 -23
  90. package/Build/Workers/createVectorTilePoints.js +12 -12
  91. package/Build/Workers/createVectorTilePolygons.js +22 -21
  92. package/Build/Workers/createVectorTilePolylines.js +14 -14
  93. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -21
  94. package/Build/Workers/createVerticesFromHeightmap.js +22 -21
  95. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -18
  96. package/Build/Workers/createWallGeometry.js +24 -23
  97. package/Build/Workers/createWallOutlineGeometry.js +23 -22
  98. package/Build/Workers/decodeDraco.js +11 -11
  99. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  100. package/Build/Workers/decodeI3S.js +601 -92
  101. package/Build/Workers/transcodeKTX2.js +7 -7
  102. package/Build/Workers/transferTypedArrayTest.js +1 -1
  103. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -21
  104. package/Source/Core/Check.d.ts +127 -0
  105. package/Source/Core/Check.js +0 -1
  106. package/Source/Core/Ellipsoid.js +6 -0
  107. package/Source/Core/Geometry.js +1 -1
  108. package/Source/Core/IntersectionTests.js +6 -3
  109. package/Source/Core/Ion.js +1 -1
  110. package/Source/Core/PixelFormat.js +5 -0
  111. package/Source/Core/PolygonGeometry.js +1 -1
  112. package/Source/Core/Transforms.js +3 -0
  113. package/Source/Core/VerticalExaggeration.js +2 -1
  114. package/Source/Core/srgbToLinear.js +32 -0
  115. package/Source/DataSources/CzmlDataSource.js +51 -23
  116. package/Source/DataSources/DataSourceDisplay.js +27 -0
  117. package/Source/DataSources/Entity.js +20 -2
  118. package/Source/DataSources/GeometryUpdaterSet.js +114 -0
  119. package/Source/DataSources/GeometryVisualizer.js +19 -83
  120. package/Source/Renderer/Context.js +10 -0
  121. package/Source/Renderer/ContextLimits.js +2 -0
  122. package/Source/Renderer/demodernizeShader.js +4 -1
  123. package/Source/Scene/ArcGisMapService.js +1 -1
  124. package/Source/Scene/Axis.js +12 -7
  125. package/Source/Scene/Billboard.js +32 -0
  126. package/Source/Scene/BillboardCollection.js +1 -1
  127. package/Source/Scene/BingMapsImageryProvider.js +4 -0
  128. package/Source/Scene/Camera.js +46 -4
  129. package/Source/Scene/Cesium3DTilesVoxelProvider.js +2 -9
  130. package/Source/Scene/Cesium3DTileset.js +10 -7
  131. package/Source/Scene/Cesium3DTilesetBaseTraversal.js +2 -4
  132. package/Source/Scene/FrameState.js +5 -0
  133. package/Source/Scene/Globe.js +0 -67
  134. package/Source/Scene/GlobeTranslucencyState.js +1 -1
  135. package/Source/Scene/GltfPipeline/updateVersion.js +69 -68
  136. package/Source/Scene/I3SDataProvider.js +270 -53
  137. package/Source/Scene/I3SDecoder.js +8 -1
  138. package/Source/Scene/I3SFeature.js +2 -5
  139. package/Source/Scene/I3SField.js +136 -31
  140. package/Source/Scene/I3SGeometry.js +70 -2
  141. package/Source/Scene/I3SLayer.js +55 -10
  142. package/Source/Scene/I3SNode.js +175 -18
  143. package/Source/Scene/I3SStatistics.js +94 -0
  144. package/Source/Scene/I3SSublayer.js +176 -0
  145. package/Source/Scene/I3SSymbology.js +337 -0
  146. package/Source/Scene/KeyframeNode.js +1 -1
  147. package/Source/Scene/Label.js +33 -0
  148. package/Source/Scene/LabelCollection.js +2 -1
  149. package/Source/Scene/Model/pickModel.js +25 -7
  150. package/Source/Scene/PickFramebuffer.js +37 -2
  151. package/Source/Scene/Picking.js +113 -39
  152. package/Source/Scene/Primitive.js +6 -5
  153. package/Source/Scene/Scene.js +126 -42
  154. package/Source/Scene/ScreenSpaceCameraController.js +21 -7
  155. package/Source/Scene/SensorVolumePortionToDisplay.js +69 -0
  156. package/Source/Scene/SpatialNode.js +12 -19
  157. package/Source/Scene/StructuralMetadata.js +1 -1
  158. package/Source/Scene/VoxelBoxShape.js +67 -6
  159. package/Source/Scene/VoxelCell.js +273 -0
  160. package/Source/Scene/VoxelCylinderShape.js +117 -163
  161. package/Source/Scene/VoxelEllipsoidShape.js +255 -304
  162. package/Source/Scene/VoxelPrimitive.js +109 -15
  163. package/Source/Scene/VoxelRenderResources.js +12 -3
  164. package/Source/Scene/VoxelShape.js +7 -4
  165. package/Source/Scene/VoxelTraversal.js +76 -54
  166. package/Source/Scene/buildVoxelDrawCommands.js +23 -0
  167. package/Source/Scene/createGooglePhotorealistic3DTileset.js +1 -0
  168. package/Source/Scene/processVoxelProperties.js +3 -0
  169. package/Source/Shaders/Voxels/IntersectBox.glsl +21 -47
  170. package/Source/Shaders/Voxels/IntersectBox.js +21 -47
  171. package/Source/Shaders/Voxels/IntersectClippingPlanes.glsl +1 -1
  172. package/Source/Shaders/Voxels/IntersectClippingPlanes.js +1 -1
  173. package/Source/Shaders/Voxels/IntersectCylinder.glsl +76 -203
  174. package/Source/Shaders/Voxels/IntersectCylinder.js +76 -203
  175. package/Source/Shaders/Voxels/IntersectEllipsoid.glsl +220 -229
  176. package/Source/Shaders/Voxels/IntersectEllipsoid.js +220 -229
  177. package/Source/Shaders/Voxels/IntersectLongitude.glsl +102 -0
  178. package/Source/Shaders/Voxels/IntersectLongitude.js +104 -0
  179. package/Source/Shaders/Voxels/IntersectionUtils.glsl +33 -11
  180. package/Source/Shaders/Voxels/IntersectionUtils.js +33 -11
  181. package/Source/Shaders/Voxels/Megatexture.glsl +1 -2
  182. package/Source/Shaders/Voxels/Megatexture.js +1 -2
  183. package/Source/Shaders/Voxels/Octree.glsl +14 -9
  184. package/Source/Shaders/Voxels/Octree.js +14 -9
  185. package/Source/Shaders/Voxels/VoxelFS.glsl +128 -40
  186. package/Source/Shaders/Voxels/VoxelFS.js +128 -40
  187. package/Source/Shaders/Voxels/VoxelUtils.glsl +31 -0
  188. package/Source/Shaders/Voxels/VoxelUtils.js +33 -0
  189. package/Source/Shaders/Voxels/convertUvToBox.glsl +24 -3
  190. package/Source/Shaders/Voxels/convertUvToBox.js +24 -4
  191. package/Source/Shaders/Voxels/convertUvToCylinder.glsl +64 -40
  192. package/Source/Shaders/Voxels/convertUvToCylinder.js +64 -40
  193. package/Source/Shaders/Voxels/convertUvToEllipsoid.glsl +100 -91
  194. package/Source/Shaders/Voxels/convertUvToEllipsoid.js +100 -91
  195. package/Source/ThirdParty/Workers/z-worker-pako.js +1 -1
  196. package/Source/Workers/createGeometry.js +40 -11
  197. package/Source/Workers/decodeI3S.js +720 -94
  198. package/index.d.ts +542 -40
  199. package/index.js +75 -66
  200. package/package.json +2 -2
@@ -0,0 +1,114 @@
1
+ import destroyObject from "../Core/destroyObject.js";
2
+ import Event from "../Core/Event.js";
3
+ import EventHelper from "../Core/EventHelper.js";
4
+ import BoxGeometryUpdater from "./BoxGeometryUpdater.js";
5
+ import CorridorGeometryUpdater from "./CorridorGeometryUpdater.js";
6
+ import CylinderGeometryUpdater from "./CylinderGeometryUpdater.js";
7
+ import EllipseGeometryUpdater from "./EllipseGeometryUpdater.js";
8
+ import EllipsoidGeometryUpdater from "./EllipsoidGeometryUpdater.js";
9
+ import PlaneGeometryUpdater from "./PlaneGeometryUpdater.js";
10
+ import PolygonGeometryUpdater from "./PolygonGeometryUpdater.js";
11
+ import PolylineVolumeGeometryUpdater from "./PolylineVolumeGeometryUpdater.js";
12
+ import RectangleGeometryUpdater from "./RectangleGeometryUpdater.js";
13
+ import WallGeometryUpdater from "./WallGeometryUpdater.js";
14
+
15
+ /** @type {GeometryUpdater[]} */
16
+ const geometryUpdaters = [
17
+ BoxGeometryUpdater,
18
+ CylinderGeometryUpdater,
19
+ CorridorGeometryUpdater,
20
+ EllipseGeometryUpdater,
21
+ EllipsoidGeometryUpdater,
22
+ PlaneGeometryUpdater,
23
+ PolygonGeometryUpdater,
24
+ PolylineVolumeGeometryUpdater,
25
+ RectangleGeometryUpdater,
26
+ WallGeometryUpdater,
27
+ ];
28
+
29
+ /**
30
+ * Manages a set of "updater" classes for the {@link GeometryVisualizer} for each entity
31
+ *
32
+ * @private
33
+ * @param {Entity} entity
34
+ * @param {Scene} scene
35
+ */
36
+ function GeometryUpdaterSet(entity, scene) {
37
+ this.entity = entity;
38
+ this.scene = scene;
39
+ const updaters = new Array(geometryUpdaters.length);
40
+ const geometryChanged = new Event();
41
+ const eventHelper = new EventHelper();
42
+ for (let i = 0; i < updaters.length; i++) {
43
+ const updater = new geometryUpdaters[i](entity, scene);
44
+ eventHelper.add(updater.geometryChanged, (geometry) => {
45
+ geometryChanged.raiseEvent(geometry);
46
+ });
47
+ updaters[i] = updater;
48
+ }
49
+ this.updaters = updaters;
50
+ this.geometryChanged = geometryChanged;
51
+ this.eventHelper = eventHelper;
52
+
53
+ this._removeEntitySubscription = entity.definitionChanged.addEventListener(
54
+ GeometryUpdaterSet.prototype._onEntityPropertyChanged,
55
+ this
56
+ );
57
+ }
58
+
59
+ GeometryUpdaterSet.prototype._onEntityPropertyChanged = function (
60
+ entity,
61
+ propertyName,
62
+ newValue,
63
+ oldValue
64
+ ) {
65
+ const updaters = this.updaters;
66
+ for (let i = 0; i < updaters.length; i++) {
67
+ updaters[i]._onEntityPropertyChanged(
68
+ entity,
69
+ propertyName,
70
+ newValue,
71
+ oldValue
72
+ );
73
+ }
74
+ };
75
+
76
+ GeometryUpdaterSet.prototype.forEach = function (callback) {
77
+ const updaters = this.updaters;
78
+ for (let i = 0; i < updaters.length; i++) {
79
+ callback(updaters[i]);
80
+ }
81
+ };
82
+
83
+ GeometryUpdaterSet.prototype.destroy = function () {
84
+ this.eventHelper.removeAll();
85
+ const updaters = this.updaters;
86
+ for (let i = 0; i < updaters.length; i++) {
87
+ updaters[i].destroy();
88
+ }
89
+ this._removeEntitySubscription();
90
+ destroyObject(this);
91
+ };
92
+
93
+ /**
94
+ * Add the provided updater to the default list of updaters if not already included
95
+ * @param {GeometryUpdater} updater
96
+ */
97
+ GeometryUpdaterSet.registerUpdater = function (updater) {
98
+ if (!geometryUpdaters.includes(updater)) {
99
+ geometryUpdaters.push(updater);
100
+ }
101
+ };
102
+
103
+ /**
104
+ * Remove the provided updater from the default list of updaters if included
105
+ * @param {GeometryUpdater} updater
106
+ */
107
+ GeometryUpdaterSet.unregisterUpdater = function (updater) {
108
+ if (geometryUpdaters.includes(updater)) {
109
+ const index = geometryUpdaters.indexOf(updater);
110
+ geometryUpdaters.splice(index, 1);
111
+ }
112
+ };
113
+
114
+ export default GeometryUpdaterSet;
@@ -4,105 +4,23 @@ import Check from "../Core/Check.js";
4
4
  import defaultValue from "../Core/defaultValue.js";
5
5
  import defined from "../Core/defined.js";
6
6
  import destroyObject from "../Core/destroyObject.js";
7
- import Event from "../Core/Event.js";
8
- import EventHelper from "../Core/EventHelper.js";
9
7
  import ClassificationType from "../Scene/ClassificationType.js";
10
8
  import MaterialAppearance from "../Scene/MaterialAppearance.js";
11
9
  import PerInstanceColorAppearance from "../Scene/PerInstanceColorAppearance.js";
12
10
  import ShadowMode from "../Scene/ShadowMode.js";
13
11
  import BoundingSphereState from "./BoundingSphereState.js";
14
- import BoxGeometryUpdater from "./BoxGeometryUpdater.js";
15
12
  import ColorMaterialProperty from "./ColorMaterialProperty.js";
16
- import CorridorGeometryUpdater from "./CorridorGeometryUpdater.js";
17
- import CylinderGeometryUpdater from "./CylinderGeometryUpdater.js";
18
13
  import DynamicGeometryBatch from "./DynamicGeometryBatch.js";
19
- import EllipseGeometryUpdater from "./EllipseGeometryUpdater.js";
20
- import EllipsoidGeometryUpdater from "./EllipsoidGeometryUpdater.js";
21
14
  import Entity from "./Entity.js";
22
- import PlaneGeometryUpdater from "./PlaneGeometryUpdater.js";
23
- import PolygonGeometryUpdater from "./PolygonGeometryUpdater.js";
24
- import PolylineVolumeGeometryUpdater from "./PolylineVolumeGeometryUpdater.js";
25
- import RectangleGeometryUpdater from "./RectangleGeometryUpdater.js";
15
+ import GeometryUpdaterSet from "./GeometryUpdaterSet.js";
26
16
  import StaticGeometryColorBatch from "./StaticGeometryColorBatch.js";
27
17
  import StaticGeometryPerMaterialBatch from "./StaticGeometryPerMaterialBatch.js";
28
18
  import StaticGroundGeometryColorBatch from "./StaticGroundGeometryColorBatch.js";
29
19
  import StaticGroundGeometryPerMaterialBatch from "./StaticGroundGeometryPerMaterialBatch.js";
30
20
  import StaticOutlineGeometryBatch from "./StaticOutlineGeometryBatch.js";
31
- import WallGeometryUpdater from "./WallGeometryUpdater.js";
32
21
 
33
22
  const emptyArray = [];
34
23
 
35
- const geometryUpdaters = [
36
- BoxGeometryUpdater,
37
- CylinderGeometryUpdater,
38
- CorridorGeometryUpdater,
39
- EllipseGeometryUpdater,
40
- EllipsoidGeometryUpdater,
41
- PlaneGeometryUpdater,
42
- PolygonGeometryUpdater,
43
- PolylineVolumeGeometryUpdater,
44
- RectangleGeometryUpdater,
45
- WallGeometryUpdater,
46
- ];
47
-
48
- function GeometryUpdaterSet(entity, scene) {
49
- this.entity = entity;
50
- this.scene = scene;
51
- const updaters = new Array(geometryUpdaters.length);
52
- const geometryChanged = new Event();
53
- function raiseEvent(geometry) {
54
- geometryChanged.raiseEvent(geometry);
55
- }
56
- const eventHelper = new EventHelper();
57
- for (let i = 0; i < updaters.length; i++) {
58
- const updater = new geometryUpdaters[i](entity, scene);
59
- eventHelper.add(updater.geometryChanged, raiseEvent);
60
- updaters[i] = updater;
61
- }
62
- this.updaters = updaters;
63
- this.geometryChanged = geometryChanged;
64
- this.eventHelper = eventHelper;
65
-
66
- this._removeEntitySubscription = entity.definitionChanged.addEventListener(
67
- GeometryUpdaterSet.prototype._onEntityPropertyChanged,
68
- this
69
- );
70
- }
71
-
72
- GeometryUpdaterSet.prototype._onEntityPropertyChanged = function (
73
- entity,
74
- propertyName,
75
- newValue,
76
- oldValue
77
- ) {
78
- const updaters = this.updaters;
79
- for (let i = 0; i < updaters.length; i++) {
80
- updaters[i]._onEntityPropertyChanged(
81
- entity,
82
- propertyName,
83
- newValue,
84
- oldValue
85
- );
86
- }
87
- };
88
-
89
- GeometryUpdaterSet.prototype.forEach = function (callback) {
90
- const updaters = this.updaters;
91
- for (let i = 0; i < updaters.length; i++) {
92
- callback(updaters[i]);
93
- }
94
- };
95
-
96
- GeometryUpdaterSet.prototype.destroy = function () {
97
- this.eventHelper.removeAll();
98
- const updaters = this.updaters;
99
- for (let i = 0; i < updaters.length; i++) {
100
- updaters[i].destroy();
101
- }
102
- this._removeEntitySubscription();
103
- destroyObject(this);
104
- };
105
-
106
24
  /**
107
25
  * A general purpose visualizer for geometry represented by {@link Primitive} instances.
108
26
  * @alias GeometryVisualizer
@@ -293,6 +211,24 @@ function GeometryVisualizer(
293
211
  );
294
212
  }
295
213
 
214
+ /**
215
+ * Add the provided updater to the default list of updaters if not already included
216
+ * @private
217
+ * @param {GeometryUpdater} updater
218
+ */
219
+ GeometryVisualizer.registerUpdater = function (updater) {
220
+ GeometryUpdaterSet.registerUpdater(updater);
221
+ };
222
+
223
+ /**
224
+ * Remove the provided updater from the default list of updaters if included
225
+ * @private
226
+ * @param {GeometryUpdater} updater
227
+ */
228
+ GeometryVisualizer.unregisterUpdater = function (updater) {
229
+ GeometryUpdaterSet.unregisterUpdater(updater);
230
+ };
231
+
296
232
  /**
297
233
  * Updates all of the primitives created by this visualizer to match their
298
234
  * Entity counterpart at the given time.
@@ -1432,6 +1432,16 @@ Context.prototype.endFrame = function () {
1432
1432
  }
1433
1433
  };
1434
1434
 
1435
+ /**
1436
+ * @private
1437
+ * @param {object} readState An object with the following properties:
1438
+ * @param {number} [readState.x=0] The x offset of the rectangle to read from.
1439
+ * @param {number} [readState.y=0] The y offset of the rectangle to read from.
1440
+ * @param {number} [readState.width=gl.drawingBufferWidth] The width of the rectangle to read from.
1441
+ * @param {number} [readState.height=gl.drawingBufferHeight] The height of the rectangle to read from.
1442
+ * @param {Framebuffer} [readState.framebuffer] The framebuffer to read from. If undefined, the read will be from the default framebuffer.
1443
+ * @returns {Uint8Array|Uint16Array|Float32Array|Uint32Array} The pixels in the specified rectangle.
1444
+ */
1435
1445
  Context.prototype.readPixels = function (readState) {
1436
1446
  const gl = this._gl;
1437
1447
 
@@ -1,4 +1,6 @@
1
1
  /**
2
+ * These are set in the constructor for {@link Context}
3
+ *
2
4
  * @private
3
5
  */
4
6
  const ContextLimits = {
@@ -26,7 +26,10 @@ function demodernizeShader(input, isFragmentShader) {
26
26
 
27
27
  if (isFragmentShader) {
28
28
  // Replace the in with varying.
29
- output = output.replaceAll(/(in)\s+(vec\d|mat\d|float)/g, `varying $2`);
29
+ output = output.replaceAll(
30
+ /\n\s*(in)\s+(vec\d|mat\d|float)/g,
31
+ `\nvarying $2`
32
+ );
30
33
 
31
34
  if (/out_FragData_(\d+)/.test(output)) {
32
35
  output = `#extension GL_EXT_draw_buffers : enable\n${output}`;
@@ -4,7 +4,7 @@ import Resource from "../Core/Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "AAPK997c8ac9b63f486188c3bede0b85ba5b2SiLv1qk7ZCEiBYZ_1i90XplcyGpzezMhO7wTadCKmemjXjb1Mtj112fAt6gbfL-";
7
+ "AAPK3b7fccd1509046758d03c6641e404040gQG5edfR9eun2VcwtbXJKNbQjIZ7ma2vUd9ulqZK4lo3R_DJIAhwoGW9p86JNauB";
8
8
  /**
9
9
  * Default options for accessing the ArcGIS image tile service.
10
10
  *
@@ -1,5 +1,4 @@
1
1
  import Check from "../Core/Check.js";
2
- import CesiumMath from "../Core/Math.js";
3
2
  import Matrix3 from "../Core/Matrix3.js";
4
3
  import Matrix4 from "../Core/Matrix4.js";
5
4
 
@@ -41,7 +40,8 @@ const Axis = {
41
40
  * @constant
42
41
  */
43
42
  Axis.Y_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
44
- Matrix3.fromRotationX(CesiumMath.PI_OVER_TWO)
43
+ // Rotation about PI/2 around the X-axis
44
+ Matrix3.fromArray([1, 0, 0, 0, 0, 1, 0, -1, 0])
45
45
  );
46
46
 
47
47
  /**
@@ -51,7 +51,8 @@ Axis.Y_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
51
51
  * @constant
52
52
  */
53
53
  Axis.Z_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
54
- Matrix3.fromRotationX(-CesiumMath.PI_OVER_TWO)
54
+ // Rotation about -PI/2 around the X-axis
55
+ Matrix3.fromArray([1, 0, 0, 0, 0, -1, 0, 1, 0])
55
56
  );
56
57
 
57
58
  /**
@@ -61,7 +62,8 @@ Axis.Z_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
61
62
  * @constant
62
63
  */
63
64
  Axis.X_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
64
- Matrix3.fromRotationY(-CesiumMath.PI_OVER_TWO)
65
+ // Rotation about -PI/2 around the Y-axis
66
+ Matrix3.fromArray([0, 0, 1, 0, 1, 0, -1, 0, 0])
65
67
  );
66
68
 
67
69
  /**
@@ -71,7 +73,8 @@ Axis.X_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
71
73
  * @constant
72
74
  */
73
75
  Axis.Z_UP_TO_X_UP = Matrix4.fromRotationTranslation(
74
- Matrix3.fromRotationY(CesiumMath.PI_OVER_TWO)
76
+ // Rotation about PI/2 around the Y-axis
77
+ Matrix3.fromArray([0, 0, -1, 0, 1, 0, 1, 0, 0])
75
78
  );
76
79
 
77
80
  /**
@@ -81,7 +84,8 @@ Axis.Z_UP_TO_X_UP = Matrix4.fromRotationTranslation(
81
84
  * @constant
82
85
  */
83
86
  Axis.X_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
84
- Matrix3.fromRotationZ(CesiumMath.PI_OVER_TWO)
87
+ // Rotation about PI/2 around the Z-axis
88
+ Matrix3.fromArray([0, 1, 0, -1, 0, 0, 0, 0, 1])
85
89
  );
86
90
 
87
91
  /**
@@ -91,7 +95,8 @@ Axis.X_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
91
95
  * @constant
92
96
  */
93
97
  Axis.Y_UP_TO_X_UP = Matrix4.fromRotationTranslation(
94
- Matrix3.fromRotationZ(-CesiumMath.PI_OVER_TWO)
98
+ // Rotation about -PI/2 around the Z-axis
99
+ Matrix3.fromArray([0, -1, 0, 1, 0, 0, 0, 0, 1])
95
100
  );
96
101
 
97
102
  /**
@@ -22,6 +22,35 @@ import SceneMode from "./SceneMode.js";
22
22
  import SceneTransforms from "./SceneTransforms.js";
23
23
  import VerticalOrigin from "./VerticalOrigin.js";
24
24
 
25
+ /**
26
+ * @typedef {object} Billboard.ConstructorOptions
27
+ *
28
+ * Initialization options for the first param of Billboard constructor
29
+ *
30
+ * @property {Cartesian3} position The cartesian position of the billboard.
31
+ * @property {string} [id] A user-defined object to return when the billboard is picked with {@link Scene#pick}.
32
+ * @property {boolean} [show=true] Determines if this billboard will be shown.
33
+ * @property {string | HTMLCanvasElement} [image] A loaded HTMLImageElement, ImageData, or a url to an image to use for the billboard.
34
+ * @property {number} [scale=1.0] A number specifying the uniform scale that is multiplied with the billboard's image size in pixels.
35
+ * @property {Cartesian2} [pixelOffset=Cartesian2.ZERO] A {@link Cartesian2} Specifying the pixel offset in screen space from the origin of this billboard.
36
+ * @property {Cartesian3} [eyeOffset=Cartesian3.ZERO] A {@link Cartesian3} Specifying the 3D Cartesian offset applied to this billboard in eye coordinates.
37
+ * @property {HorizontalOrigin} [horizontalOrigin=HorizontalOrigin.CENTER] A {@link HorizontalOrigin} Specifying the horizontal origin of this billboard.
38
+ * @property {VerticalOrigin} [verticalOrigin=VerticalOrigin.CENTER] A {@link VerticalOrigin} Specifying the vertical origin of this billboard.
39
+ * @property {HeightReference} [heightReference=HeightReference.NONE] A {@link HeightReference} Specifying the height reference of this billboard.
40
+ * @property {Color} [color=Color.WHITE] A {@link Color} Specifying the color that is multiplied with the billboard's texture.
41
+ * @property {number} [rotation=0] A number specifying the rotation angle in radians.
42
+ * @property {Cartesian3} [alignedAxis=Cartesian3.ZERO] A {@link Cartesian3} Specifying the aligned axis in world space.
43
+ * @property {boolean} [sizeInMeters] A boolean specifying if the billboard size is in meters or pixels.
44
+ * @property {number} [width] A number specifying the width of the billboard. If undefined, the image width will be used.
45
+ * @property {number} [height] A number specifying the height of the billboard. If undefined, the image height will be used.
46
+ * @property {NearFarScalar} [scaleByDistance] A {@link NearFarScalar} Specifying near and far scaling properties of a Billboard based on the billboard's distance from the camera.
47
+ * @property {NearFarScalar} [translucencyByDistance] A {@link NearFarScalar} Specifying near and far translucency properties of a Billboard based on the billboard's distance from the camera.
48
+ * @property {NearFarScalar} [pixelOffsetScaleByDistance] A {@link NearFarScalar} Specifying near and far pixel offset scaling properties of a Billboard based on the billboard's distance from the camera.
49
+ * @property {BoundingRectangle} [imageSubRegion] A {@link BoundingRectangle} Specifying the sub-region of the image to use for the billboard, rather than the entire image.
50
+ * @property {DistanceDisplayCondition} [distanceDisplayCondition] A {@link DistanceDisplayCondition} Specifying the distance from the camera at which this billboard will be displayed.
51
+ * @property {number} [disableDepthTestDistance] A number specifying the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
52
+ */
53
+
25
54
  /**
26
55
  * <div class="notice">
27
56
  * A billboard is created and its initial
@@ -56,6 +85,9 @@ import VerticalOrigin from "./VerticalOrigin.js";
56
85
  * @internalConstructor
57
86
  * @class
58
87
  *
88
+ * @param {Billboard.ConstructorOptions} options Object describing initialization options
89
+ * @param {BillboardCollection} billboardCollection Instance of BillboardCollection
90
+ *
59
91
  * @demo {@link https://sandcastle.cesium.com/index.html?src=Billboards.html|Cesium Sandcastle Billboard Demo}
60
92
  */
61
93
  function Billboard(options, billboardCollection) {
@@ -426,7 +426,7 @@ function destroyBillboards(billboards) {
426
426
  * Creates and adds a billboard with the specified initial properties to the collection.
427
427
  * The added billboard is returned so it can be modified or removed from the collection later.
428
428
  *
429
- * @param {object}[options] A template describing the billboard's properties as shown in Example 1.
429
+ * @param {Billboard.ConstructorOptions}[options] A template describing the billboard's properties as shown in Example 1.
430
430
  * @returns {Billboard} The billboard that was added to the collection.
431
431
  *
432
432
  * @performance Calling <code>add</code> is expected constant time. However, the collection's vertex buffer
@@ -500,6 +500,10 @@ BingMapsImageryProvider.fromUrl = async function (url, options) {
500
500
  queryParameters.mapLayer = options.mapLayer;
501
501
  }
502
502
 
503
+ if (defined(options.culture)) {
504
+ queryParameters.culture = options.culture;
505
+ }
506
+
503
507
  const metadataResource = resource.getDerivedResource({
504
508
  url: `REST/v1/Imagery/Metadata/${mapStyle}`,
505
509
  queryParameters: queryParameters,
@@ -217,6 +217,7 @@ function Camera(scene) {
217
217
  this._changedDirection = undefined;
218
218
  this._changedFrustum = undefined;
219
219
  this._changedHeading = undefined;
220
+ this._changedRoll = undefined;
220
221
 
221
222
  /**
222
223
  * The amount the camera has to change before the <code>changed</code> event is raised. The value is a percentage in the [0, 1] range.
@@ -380,25 +381,55 @@ Camera.prototype._updateCameraChanged = function () {
380
381
 
381
382
  const percentageChanged = camera.percentageChanged;
382
383
 
384
+ // check heading
383
385
  const currentHeading = camera.heading;
384
386
 
385
387
  if (!defined(camera._changedHeading)) {
386
388
  camera._changedHeading = currentHeading;
387
389
  }
388
390
 
389
- let delta =
391
+ let headingDelta =
390
392
  Math.abs(camera._changedHeading - currentHeading) % CesiumMath.TWO_PI;
391
- delta = delta > CesiumMath.PI ? CesiumMath.TWO_PI - delta : delta;
393
+ headingDelta =
394
+ headingDelta > CesiumMath.PI
395
+ ? CesiumMath.TWO_PI - headingDelta
396
+ : headingDelta;
392
397
 
393
398
  // Since delta is computed as the shortest distance between two angles
394
399
  // the percentage is relative to the half circle.
395
- const headingChangedPercentage = delta / Math.PI;
400
+ const headingChangedPercentage = headingDelta / Math.PI;
396
401
 
397
402
  if (headingChangedPercentage > percentageChanged) {
398
- camera._changed.raiseEvent(headingChangedPercentage);
399
403
  camera._changedHeading = currentHeading;
400
404
  }
401
405
 
406
+ // check roll
407
+ const currentRoll = camera.roll;
408
+
409
+ if (!defined(camera._changedRoll)) {
410
+ camera._changedRoll = currentRoll;
411
+ }
412
+
413
+ let rollDelta =
414
+ Math.abs(camera._changedRoll - currentRoll) % CesiumMath.TWO_PI;
415
+ rollDelta =
416
+ rollDelta > CesiumMath.PI ? CesiumMath.TWO_PI - rollDelta : rollDelta;
417
+
418
+ // Since delta is computed as the shortest distance between two angles
419
+ // the percentage is relative to the half circle.
420
+ const rollChangedPercentage = rollDelta / Math.PI;
421
+
422
+ if (rollChangedPercentage > percentageChanged) {
423
+ camera._changedRoll = currentRoll;
424
+ }
425
+ if (
426
+ rollChangedPercentage > percentageChanged ||
427
+ headingChangedPercentage > percentageChanged
428
+ ) {
429
+ camera._changed.raiseEvent(
430
+ Math.max(rollChangedPercentage, headingChangedPercentage)
431
+ );
432
+ }
402
433
  if (camera._mode === SceneMode.SCENE2D) {
403
434
  if (!defined(camera._changedFrustum)) {
404
435
  camera._changedPosition = Cartesian3.clone(
@@ -1233,6 +1264,11 @@ const scratchSetViewMatrix3 = new Matrix3();
1233
1264
  const scratchSetViewCartographic = new Cartographic();
1234
1265
 
1235
1266
  function setView3D(camera, position, hpr) {
1267
+ //>>includeStart('debug', pragmas.debug);
1268
+ if (isNaN(position.x) || isNaN(position.y) || isNaN(position.z)) {
1269
+ throw new DeveloperError("position has a NaN component");
1270
+ }
1271
+ //>>includeEnd('debug');
1236
1272
  const currentTransform = Matrix4.clone(
1237
1273
  camera.transform,
1238
1274
  scratchSetViewTransform1
@@ -1473,6 +1509,12 @@ Camera.prototype.setView = function (options) {
1473
1509
  destination,
1474
1510
  scratchSetViewCartesian
1475
1511
  );
1512
+ //>>includeStart('debug', pragmas.debug);
1513
+ // destination.z may be null in 2D, but .x and .y should be numeric
1514
+ if (isNaN(destination.x) || isNaN(destination.y)) {
1515
+ throw new DeveloperError(`destination has a NaN component`);
1516
+ }
1517
+ //>>includeEnd('debug');
1476
1518
  convert = false;
1477
1519
  }
1478
1520
 
@@ -247,15 +247,8 @@ function getEllipsoidShape(region) {
247
247
 
248
248
  const shapeTransform = Matrix4.fromScale(Ellipsoid.WGS84.radii);
249
249
 
250
- const minBoundsX = west;
251
- const maxBoundsX = east;
252
- const minBoundsY = south;
253
- const maxBoundsY = north;
254
- const minBoundsZ = minHeight;
255
- const maxBoundsZ = maxHeight;
256
-
257
- const minBounds = new Cartesian3(minBoundsX, minBoundsY, minBoundsZ);
258
- const maxBounds = new Cartesian3(maxBoundsX, maxBoundsY, maxBoundsZ);
250
+ const minBounds = new Cartesian3(west, south, minHeight);
251
+ const maxBounds = new Cartesian3(east, north, maxHeight);
259
252
 
260
253
  return {
261
254
  shape: VoxelShapeType.ELLIPSOID,
@@ -112,7 +112,7 @@ import Ray from "../Core/Ray.js";
112
112
  * @property {string|number} [instanceFeatureIdLabel="instanceFeatureId_0"] Label of the instance feature ID set used for picking and styling. If instanceFeatureIdLabel is set to an integer N, it is converted to the string "instanceFeatureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
113
113
  * @property {boolean} [showCreditsOnScreen=false] Whether to display the credits of this tileset on screen.
114
114
  * @property {SplitDirection} [splitDirection=SplitDirection.NONE] The {@link SplitDirection} split to apply to this tileset.
115
- * @property {boolean} [disableCollision=false] Whether to turn off collisions for camera collisions or picking. While this is <code>true</code> the camera will be allowed to go in or below the tileset surface if {@link ScreenSpaceCameraController#enableCollisionDetection} is true.
115
+ * @property {boolean} [enableCollision=false] When <code>true</code>, enables collisions for camera or CPU picking. While this is <code>true</code> the camera will be prevented from going below the tileset surface if {@link ScreenSpaceCameraController#enableCollisionDetection} is true.
116
116
  * @property {boolean} [projectTo2D=false] Whether to accurately project the tileset to 2D. If this is true, the tileset will be projected accurately to 2D, but it will use more memory to do so. If this is false, the tileset will use less memory and will still render in 2D / CV mode, but its projected positions may be inaccurate. This cannot be set after the tileset has been created.
117
117
  * @property {boolean} [enablePick=false] Whether to allow collision and CPU picking with <code>pick</code> when using WebGL 1. If using WebGL 2 or above, this option will be ignored. If using WebGL 1 and this is true, the <code>pick</code> operation will work correctly, but it will use more memory to do so. If running with WebGL 1 and this is false, the model will use less memory, but <code>pick</code> will always return <code>undefined</code>. This cannot be set after the tileset has loaded.
118
118
  * @property {string} [debugHeatmapTilePropertyName] The tile variable to colorize as a heatmap. All rendered tiles will be colorized relative to each other's specified variable value.
@@ -155,11 +155,11 @@ import Ray from "../Core/Ray.js";
155
155
  * }
156
156
  *
157
157
  * @example
158
- * // Allow camera to go inside and under 3D tileset
158
+ * // Turn on camera collisions with the tileset.
159
159
  * try {
160
160
  * const tileset = await Cesium.Cesium3DTileset.fromUrl(
161
161
  * "http://localhost:8002/tilesets/Seattle/tileset.json",
162
- * { disableCollision: true }
162
+ * { enableCollision: true }
163
163
  * );
164
164
  * scene.primitives.add(tileset);
165
165
  * } catch (error) {
@@ -864,13 +864,12 @@ function Cesium3DTileset(options) {
864
864
  );
865
865
 
866
866
  /**
867
- * Whether to turn off collisions for camera collisions or picking. While this is <code>true</code> the camera will be allowed to go in or below the tileset surface if {@link ScreenSpaceCameraController#enableCollisionDetection} is true.
867
+ * If <code>true</code>, allows collisions for camera collisions or picking. While this is <code>true</code> the camera will be prevented from going in or below the tileset surface if {@link ScreenSpaceCameraController#enableCollisionDetection} is true. This can have performance implecations if the tileset contains tile with a larger number of vertices.
868
868
  *
869
869
  * @type {boolean}
870
870
  * @default false
871
871
  */
872
- this.disableCollision = defaultValue(options.disableCollision, false);
873
-
872
+ this.enableCollision = defaultValue(options.enableCollision, false);
874
873
  this._projectTo2D = defaultValue(options.projectTo2D, false);
875
874
  this._enablePick = defaultValue(options.enablePick, false);
876
875
 
@@ -2639,11 +2638,15 @@ const scratchUpdateHeightCartographic = new Cartographic();
2639
2638
  const scratchUpdateHeightCartographic2 = new Cartographic();
2640
2639
  const scratchUpdateHeightCartesian = new Cartesian3();
2641
2640
  function processUpdateHeight(tileset, tile, frameState) {
2641
+ if (!tileset.enableCollision || !tileset.show) {
2642
+ return;
2643
+ }
2644
+
2642
2645
  const heightCallbackData = tileset._addHeightCallbacks;
2643
2646
  const boundingSphere = tile.boundingSphere;
2644
2647
 
2645
2648
  for (const callbackData of heightCallbackData) {
2646
- // No need to upadate if the tile was already visible last frame
2649
+ // No need to update if the tile was already visible last frame
2647
2650
  if (callbackData.invoked || tile._wasSelectedLastFrame) {
2648
2651
  continue;
2649
2652
  }
@@ -271,12 +271,10 @@ function executeEmptyTraversal(root, frameState) {
271
271
 
272
272
  // Only traverse if the tile is empty - traversal stops at descendants with content
273
273
  const traverse = !tile.hasRenderableContent && canTraverse(tile);
274
- const emptyLeaf = !tile.hasRenderableContent && tile.children.length === 0;
275
274
 
276
275
  // Traversal stops but the tile does not have content yet
277
276
  // There will be holes if the parent tries to refine to its children, so don't refine
278
- // One exception: a parent may refine even if one of its descendants is an empty leaf
279
- if (!traverse && !tile.contentAvailable && !emptyLeaf) {
277
+ if (!traverse && !tile.contentAvailable) {
280
278
  allDescendantsLoaded = false;
281
279
  }
282
280
 
@@ -295,7 +293,7 @@ function executeEmptyTraversal(root, frameState) {
295
293
  }
296
294
  }
297
295
 
298
- return allDescendantsLoaded;
296
+ return root.hasEmptyContent || allDescendantsLoaded;
299
297
  }
300
298
 
301
299
  export default Cesium3DTilesetBaseTraversal;
@@ -182,6 +182,7 @@ function FrameState(context, creditDisplay, jobScheduler) {
182
182
  * @type {object}
183
183
  * @property {boolean} render <code>true</code> if the primitive should update for a render pass, <code>false</code> otherwise.
184
184
  * @property {boolean} pick <code>true</code> if the primitive should update for a picking pass, <code>false</code> otherwise.
185
+ * @property {boolean} pickVoxel <code>true</code> if the primitive should update for a voxel picking pass, <code>false</code> otherwise.
185
186
  * @property {boolean} depth <code>true</code> if the primitive should update for a depth only pass, <code>false</code> otherwise.
186
187
  * @property {boolean} postProcess <code>true</code> if the primitive should update for a per-feature post-process pass, <code>false</code> otherwise.
187
188
  * @property {boolean} offscreen <code>true</code> if the primitive should update for an offscreen pass, <code>false</code> otherwise.
@@ -199,6 +200,10 @@ function FrameState(context, creditDisplay, jobScheduler) {
199
200
  * @default false
200
201
  */
201
202
  pick: false,
203
+ /**
204
+ * @default false
205
+ */
206
+ pickVoxel: false,
202
207
  /**
203
208
  * @default false
204
209
  */