@cesium/engine 14.0.0 → 15.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 (156) hide show
  1. package/Build/Workers/{chunk-EWDGNOJE.js → chunk-25TOENEE.js} +7 -7
  2. package/Build/Workers/{chunk-OMXHEJTK.js → chunk-2AVIUB5H.js} +2 -2
  3. package/Build/Workers/{chunk-LJBJM6VI.js → chunk-3JZGPJMZ.js} +6 -6
  4. package/Build/Workers/{chunk-DT5NFR5C.js → chunk-3LHBH4TC.js} +7 -7
  5. package/Build/Workers/{chunk-3QLSKXKF.js → chunk-3LZF23RY.js} +6 -6
  6. package/Build/Workers/{chunk-ED6GLQTK.js → chunk-5S2B46UQ.js} +1 -1
  7. package/Build/Workers/{chunk-B4GSRXE3.js → chunk-67ONR44K.js} +6 -6
  8. package/Build/Workers/{chunk-LOZ4NKY3.js → chunk-6EDBC234.js} +11 -11
  9. package/Build/Workers/{chunk-7ZB2RVIQ.js → chunk-6EV4VOET.js} +10 -10
  10. package/Build/Workers/{chunk-KHWLAQVA.js → chunk-7ITUZTFH.js} +1 -1
  11. package/Build/Workers/{chunk-JHBPC4LK.js → chunk-ARVZCY6X.js} +7 -7
  12. package/Build/Workers/{chunk-FFBJDW4A.js → chunk-B2UQN3DH.js} +6 -6
  13. package/Build/Workers/{chunk-VCNOFQYH.js → chunk-B2Y4ZS6X.js} +9 -9
  14. package/Build/Workers/{chunk-Q4ZVWJXX.js → chunk-BD2TPFGC.js} +5 -5
  15. package/Build/Workers/{chunk-K4AH3TDT.js → chunk-CHX2K5AC.js} +10 -10
  16. package/Build/Workers/{chunk-3LYROPON.js → chunk-CJGVEABL.js} +13 -13
  17. package/Build/Workers/{chunk-KSYBJA4M.js → chunk-DYJHEP3B.js} +5 -5
  18. package/Build/Workers/{chunk-CI2HEJFC.js → chunk-E3H7AVMK.js} +13 -13
  19. package/Build/Workers/{chunk-F4CUH4MR.js → chunk-EZNAJPP5.js} +4 -4
  20. package/Build/Workers/{chunk-YJX7X577.js → chunk-F7ZI463G.js} +15 -15
  21. package/Build/Workers/{chunk-HEZHXDYB.js → chunk-FMZ5CX6V.js} +1 -1
  22. package/Build/Workers/{chunk-G3BVMPWG.js → chunk-FRAWHNSR.js} +2 -2
  23. package/Build/Workers/{chunk-J7IH4EYI.js → chunk-GGV2XJHE.js} +7 -7
  24. package/Build/Workers/{chunk-5KWRW7YL.js → chunk-GK4QU6QI.js} +2 -2
  25. package/Build/Workers/{chunk-77XPS7ZA.js → chunk-HYPB7FAV.js} +10 -10
  26. package/Build/Workers/{chunk-MVM4JV5U.js → chunk-I4HO2ED2.js} +9 -9
  27. package/Build/Workers/{chunk-FX4R4MTH.js → chunk-IGINOLDX.js} +6 -6
  28. package/Build/Workers/{chunk-PWF4EY5P.js → chunk-ISQSYLZY.js} +4 -4
  29. package/Build/Workers/{chunk-7UHKH6M3.js → chunk-JZAMRL5I.js} +6 -6
  30. package/Build/Workers/{chunk-HUFQVUMY.js → chunk-K5G2WELR.js} +7 -7
  31. package/Build/Workers/{chunk-5S5OOA6U.js → chunk-L5SO4Y5V.js} +1 -1
  32. package/Build/Workers/{chunk-LNSWJ43X.js → chunk-LCMJQVIF.js} +11 -11
  33. package/Build/Workers/{chunk-WVNLSTOF.js → chunk-MWJW37I7.js} +2 -2
  34. package/Build/Workers/{chunk-ZGFIT57T.js → chunk-NAGMYRDW.js} +27 -20
  35. package/Build/Workers/{chunk-SDIDRZDG.js → chunk-OYO6TKMU.js} +7 -7
  36. package/Build/Workers/{chunk-HKHQ3EDR.js → chunk-PUTA3AE2.js} +4 -4
  37. package/Build/Workers/{chunk-JPDKYBLF.js → chunk-Q5BHMNKU.js} +13 -13
  38. package/Build/Workers/{chunk-XK4OP6VA.js → chunk-QTEX3Y4V.js} +17 -17
  39. package/Build/Workers/{chunk-TVL3F7IU.js → chunk-QZKN2RXM.js} +1 -1
  40. package/Build/Workers/{chunk-Z3QWTHI7.js → chunk-RO2Z3LCR.js} +14 -14
  41. package/Build/Workers/{chunk-N2XAJBC6.js → chunk-RRN6LRDX.js} +12 -12
  42. package/Build/Workers/{chunk-FYGLNDKG.js → chunk-SLIA3GQP.js} +7 -7
  43. package/Build/Workers/{chunk-7EO56M5R.js → chunk-TFCOEX3W.js} +2 -2
  44. package/Build/Workers/{chunk-KM6MITPF.js → chunk-TU6ZXHVU.js} +5 -5
  45. package/Build/Workers/{chunk-LS3KVHYY.js → chunk-VJ2PDF64.js} +6 -6
  46. package/Build/Workers/{chunk-D7ZBZPHV.js → chunk-VMVPONIV.js} +5 -5
  47. package/Build/Workers/{chunk-3PIZQT3I.js → chunk-WPXU45PH.js} +4 -4
  48. package/Build/Workers/{chunk-WEHZP4SE.js → chunk-XDHM4G3P.js} +7 -7
  49. package/Build/Workers/{chunk-TY4DKOWR.js → chunk-XED3RXKO.js} +2 -2
  50. package/Build/Workers/{chunk-ZMNLEL6W.js → chunk-YNYCGTQH.js} +5 -5
  51. package/Build/Workers/{chunk-4CHMVQTQ.js → chunk-Z4SI54EB.js} +4 -4
  52. package/Build/Workers/{chunk-3JBEPBPL.js → chunk-ZVDLC3T4.js} +13 -13
  53. package/Build/Workers/combineGeometry.js +22 -22
  54. package/Build/Workers/createBoxGeometry.js +16 -16
  55. package/Build/Workers/createBoxOutlineGeometry.js +14 -14
  56. package/Build/Workers/createCircleGeometry.js +24 -24
  57. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  58. package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
  59. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  60. package/Build/Workers/createCorridorGeometry.js +27 -27
  61. package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
  62. package/Build/Workers/createCylinderGeometry.js +18 -18
  63. package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
  64. package/Build/Workers/createEllipseGeometry.js +24 -24
  65. package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
  66. package/Build/Workers/createEllipsoidGeometry.js +17 -17
  67. package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
  68. package/Build/Workers/createFrustumGeometry.js +16 -16
  69. package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
  70. package/Build/Workers/createGeometry.js +22 -22
  71. package/Build/Workers/createGroundPolylineGeometry.js +20 -20
  72. package/Build/Workers/createPlaneGeometry.js +14 -14
  73. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  74. package/Build/Workers/createPolygonGeometry.js +30 -30
  75. package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
  76. package/Build/Workers/createPolylineGeometry.js +23 -23
  77. package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
  78. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
  79. package/Build/Workers/createRectangleGeometry.js +25 -25
  80. package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
  81. package/Build/Workers/createSimplePolylineGeometry.js +21 -21
  82. package/Build/Workers/createSphereGeometry.js +17 -17
  83. package/Build/Workers/createSphereOutlineGeometry.js +16 -16
  84. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  85. package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
  86. package/Build/Workers/createVectorTileGeometries.js +22 -22
  87. package/Build/Workers/createVectorTilePoints.js +12 -12
  88. package/Build/Workers/createVectorTilePolygons.js +20 -20
  89. package/Build/Workers/createVectorTilePolylines.js +13 -13
  90. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
  91. package/Build/Workers/createVerticesFromHeightmap.js +20 -20
  92. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  93. package/Build/Workers/createWallGeometry.js +22 -22
  94. package/Build/Workers/createWallOutlineGeometry.js +21 -21
  95. package/Build/Workers/decodeDraco.js +11 -11
  96. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  97. package/Build/Workers/decodeI3S.js +10 -10
  98. package/Build/Workers/transcodeKTX2.js +50 -43
  99. package/Build/Workers/transferTypedArrayTest.js +1 -1
  100. package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
  101. package/Source/Core/EllipsoidRhumbLine.js +1 -1
  102. package/Source/Core/Ion.js +1 -1
  103. package/Source/Core/PolygonGeometryLibrary.js +26 -4
  104. package/Source/Core/TexturePacker.js +166 -0
  105. package/Source/DataSources/BillboardVisualizer.js +3 -3
  106. package/Source/DataSources/EntityCluster.js +44 -19
  107. package/Source/Renderer/Context.js +0 -4
  108. package/Source/Renderer/Texture.js +6 -5
  109. package/Source/Renderer/TextureAtlas.js +802 -0
  110. package/Source/Scene/ArcGisMapService.js +1 -1
  111. package/Source/Scene/Billboard.js +86 -141
  112. package/Source/Scene/BillboardCollection.js +132 -202
  113. package/Source/Scene/BillboardLoadState.js +44 -0
  114. package/Source/Scene/BillboardTexture.js +348 -0
  115. package/Source/Scene/Camera.js +2 -2
  116. package/Source/Scene/Cesium3DTilesVoxelProvider.js +380 -126
  117. package/Source/Scene/Cesium3DTilesetStatistics.js +0 -1
  118. package/Source/Scene/Expression.js +1 -0
  119. package/Source/Scene/GltfLoader.js +5 -7
  120. package/Source/Scene/ImplicitSubtree.js +2 -0
  121. package/Source/Scene/KeyframeNode.js +16 -2
  122. package/Source/Scene/LabelCollection.js +212 -182
  123. package/Source/Scene/Megatexture.js +145 -81
  124. package/Source/Scene/Model/CustomShader.js +0 -2
  125. package/Source/Scene/Model/Model.js +1 -1
  126. package/Source/Scene/Model/ModelUtility.js +5 -1
  127. package/Source/Scene/Scene.js +39 -15
  128. package/Source/Scene/ScreenSpaceCameraController.js +0 -8
  129. package/Source/Scene/SpatialNode.js +4 -11
  130. package/Source/Scene/Vector3DTilePoints.js +2 -5
  131. package/Source/Scene/VoxelBoxShape.js +12 -5
  132. package/Source/Scene/VoxelCell.js +6 -5
  133. package/Source/Scene/VoxelContent.js +171 -107
  134. package/Source/Scene/VoxelCylinderShape.js +65 -58
  135. package/Source/Scene/VoxelEllipsoidShape.js +15 -5
  136. package/Source/Scene/VoxelMetadataOrder.js +12 -0
  137. package/Source/Scene/VoxelPrimitive.js +122 -54
  138. package/Source/Scene/VoxelProvider.js +34 -29
  139. package/Source/Scene/VoxelRenderResources.js +30 -7
  140. package/Source/Scene/VoxelShape.js +10 -3
  141. package/Source/Scene/VoxelTraversal.js +264 -180
  142. package/Source/Scene/processVoxelProperties.js +3 -0
  143. package/Source/Shaders/GlobeFS.glsl +10 -1
  144. package/Source/Shaders/GlobeFS.js +10 -1
  145. package/Source/Shaders/Voxels/Megatexture.glsl +4 -16
  146. package/Source/Shaders/Voxels/Megatexture.js +4 -16
  147. package/Source/Shaders/Voxels/Octree.glsl +44 -7
  148. package/Source/Shaders/Voxels/Octree.js +44 -7
  149. package/Source/Shaders/Voxels/VoxelFS.glsl +9 -15
  150. package/Source/Shaders/Voxels/VoxelFS.js +9 -15
  151. package/Source/Shaders/Voxels/convertUvToCylinder.glsl +15 -15
  152. package/Source/Shaders/Voxels/convertUvToCylinder.js +15 -15
  153. package/index.d.ts +176 -79
  154. package/index.js +413 -409
  155. package/package.json +2 -2
  156. package/Source/Scene/TextureAtlas.js +0 -558
@@ -0,0 +1,166 @@
1
+ import BoundingRectangle from "./BoundingRectangle.js";
2
+ import Check from "./Check.js";
3
+ import defined from "./defined.js";
4
+
5
+ /**
6
+ * @typedef {object} TexturePacker.PackableObject
7
+ * Any object, such as an <code>Image</code> with the following properties:
8
+ * @private
9
+ * @property {number} width The width of the image, or other object, usually in pixels
10
+ * @property {number} height The height of the image, or other object, usually in pixels
11
+ */
12
+
13
+ /**
14
+ * A texture atlas is recursively broken down into regions of space called nodes.
15
+ * Nodes contain either an image reference or child nodes.
16
+ * @private
17
+ * @constructor
18
+ * @param {object} options An options object with the following properties:
19
+ * @param {number} options.x The x-offset of the texture node
20
+ * @param {number} options.y The y-offset of the texture node
21
+ * @param {number} options.width The width of the texture node
22
+ * @param {number} options.height The width of the texture node
23
+ */
24
+ function TextureNode({ x, y, width, height }) {
25
+ /**
26
+ * @type {BoundingRectangle}
27
+ */
28
+ this.rectangle = new BoundingRectangle(x, y, width, height);
29
+
30
+ /**
31
+ * @type {TextureNode|undefined}
32
+ */
33
+ this.childNode1 = undefined;
34
+ /**
35
+ * @type {TextureNode|undefined}
36
+ */
37
+ this.childNode2 = undefined;
38
+
39
+ /**
40
+ * Identifier referencing an image or packed data
41
+ * @type {number|undefined}
42
+ */
43
+ this.index = undefined;
44
+ }
45
+
46
+ /**
47
+ * Typically used with {@link TextureAtlas} to calculate efficient regions of the larger areas to store images or other data. Typically, all units are specified in pixels.
48
+ * @alias TexturePacker
49
+ * @constructor
50
+ * @private
51
+ * @param {options} options Object with the following properties:
52
+ * @param {number} options.width Width of the atlas, in pixels
53
+ * @param {number} options.height Height of atlas, in pixels
54
+ * @param {number} options.borderPadding Amount of border padding, in pixels
55
+ */
56
+ function TexturePacker({ width, height, borderPadding }) {
57
+ this._width = width;
58
+ this._height = height;
59
+
60
+ this._borderPadding = borderPadding;
61
+
62
+ this._root = new TextureNode({
63
+ x: borderPadding,
64
+ y: borderPadding,
65
+ width: width - 2 * borderPadding,
66
+ height: height - 2 * borderPadding,
67
+ });
68
+ }
69
+
70
+ /**
71
+ * Inserts the given object into the next available region based on it's dimensions. Where convenient, it's most efficient to pack items largest to smallest.
72
+ * @private
73
+ * @param {number} index An identifier referencing the image or other stored data
74
+ * @param {TexturePacker.PackableObject} packableObject An object, such as an <code>Image</code>, with <code>width</code> and <code>height</code> properties in pixels.
75
+ * @returns {TextureNode|undefined} The created region, or <code>undefined</code> if there is no region large enough to accommodate the object's dimensions.
76
+ */
77
+ TexturePacker.prototype.pack = function (index, { width, height }) {
78
+ //>>includeStart('debug', pragmas.debug);
79
+ Check.typeOf.number.greaterThanOrEquals("index", index, 0);
80
+ Check.typeOf.number.greaterThanOrEquals("image.width", width, 1);
81
+ Check.typeOf.number.greaterThanOrEquals("image.height", height, 1);
82
+ //>>includeEnd('debug');
83
+
84
+ const node = this._findNode(this._root, { width, height });
85
+ if (!defined(node)) {
86
+ return;
87
+ }
88
+
89
+ node.index = index;
90
+ return node;
91
+ };
92
+
93
+ // A recursive function that finds the best place to insert
94
+ // a new image based on existing image 'nodes'.
95
+ // Inspired by: http://blackpawn.com/texts/lightmaps/default.html
96
+ TexturePacker.prototype._findNode = function (node, { width, height }) {
97
+ if (!defined(node)) {
98
+ return undefined;
99
+ }
100
+
101
+ // Leaf node
102
+ if (!defined(node.childNode1) && !defined(node.childNode2)) {
103
+ if (defined(node.index)) {
104
+ // Node already contains an image: Skip it.
105
+ return undefined;
106
+ }
107
+
108
+ const { rectangle } = node;
109
+
110
+ const nodeWidth = rectangle.width;
111
+ const nodeHeight = rectangle.height;
112
+ const widthDifference = nodeWidth - width;
113
+ const heightDifference = nodeHeight - height;
114
+
115
+ // Node is smaller than the image.
116
+ if (widthDifference < 0 || heightDifference < 0) {
117
+ return undefined;
118
+ }
119
+
120
+ // If the node is the same size as the image, return the node
121
+ if (widthDifference === 0 && heightDifference === 0) {
122
+ return node;
123
+ }
124
+
125
+ // Vertical split (childNode1 = left half, childNode2 = right half).
126
+ if (widthDifference > heightDifference) {
127
+ node.childNode1 = new TextureNode({
128
+ x: rectangle.x,
129
+ y: rectangle.y,
130
+ width,
131
+ height: nodeHeight,
132
+ });
133
+ node.childNode2 = new TextureNode({
134
+ x: rectangle.x + width,
135
+ y: rectangle.y,
136
+ width: widthDifference,
137
+ height: nodeHeight,
138
+ });
139
+
140
+ return this._findNode(node.childNode1, { width, height });
141
+ }
142
+
143
+ // Horizontal split (childNode1 = bottom half, childNode2 = top half).
144
+ node.childNode1 = new TextureNode({
145
+ x: rectangle.x,
146
+ y: rectangle.y,
147
+ width: nodeWidth,
148
+ height,
149
+ });
150
+ node.childNode2 = new TextureNode({
151
+ x: rectangle.x,
152
+ y: rectangle.y + height,
153
+ width: nodeWidth,
154
+ height: heightDifference,
155
+ });
156
+ return this._findNode(node.childNode1, { width, height });
157
+ }
158
+
159
+ // If not a leaf node
160
+ return (
161
+ this._findNode(node.childNode1, { width, height }) ||
162
+ this._findNode(node.childNode2, { width, height })
163
+ );
164
+ };
165
+
166
+ export default TexturePacker;
@@ -126,12 +126,12 @@ BillboardVisualizer.prototype.update = function (time) {
126
126
  if (!defined(billboard)) {
127
127
  billboard = cluster.getBillboard(entity);
128
128
  billboard.id = entity;
129
- billboard.image = undefined;
130
129
  item.billboard = billboard;
130
+ item.textureValue = undefined;
131
131
  }
132
132
 
133
133
  billboard.show = show;
134
- if (!defined(billboard.image) || item.textureValue !== textureValue) {
134
+ if (item.textureValue !== textureValue) {
135
135
  billboard.image = textureValue;
136
136
  item.textureValue = textureValue;
137
137
  }
@@ -233,7 +233,7 @@ BillboardVisualizer.prototype.update = function (time) {
233
233
  boundingRectangleScratch,
234
234
  );
235
235
  if (defined(subRegion)) {
236
- billboard.setImageSubRegion(billboard._imageId, subRegion);
236
+ billboard.setImageSubRegion(billboard.image, subRegion);
237
237
  }
238
238
  }
239
239
  return true;
@@ -610,6 +610,25 @@ Object.defineProperties(EntityCluster.prototype, {
610
610
  this._clusterPoints = value;
611
611
  },
612
612
  },
613
+
614
+ /**
615
+ * Returns true when all clustered data has been rendered.
616
+ * @memberof EntityCluster.prototype
617
+ * @type {boolean}
618
+ * @readonly
619
+ * @private
620
+ */
621
+ ready: {
622
+ get: function () {
623
+ return (
624
+ !this._enabledDirty &&
625
+ !this._clusterDirty &&
626
+ (!defined(this._billboardCollection) ||
627
+ this._billboardCollection.ready) &&
628
+ (!defined(this._labelCollection) || this._labelCollection.ready)
629
+ );
630
+ },
631
+ },
613
632
  });
614
633
 
615
634
  function createGetEntity(
@@ -866,28 +885,30 @@ EntityCluster.prototype.update = function (frameState) {
866
885
  // the glyphs haven't been created so the screen space bounding boxes
867
886
  // are incorrect.
868
887
  let commandList;
888
+ const labelCollection = this._labelCollection;
869
889
  if (
870
- defined(this._labelCollection) &&
871
- this._labelCollection.length > 0 &&
872
- this._labelCollection.get(0)._glyphs.length === 0
890
+ defined(labelCollection) &&
891
+ labelCollection.length > 0 &&
892
+ !labelCollection.ready
873
893
  ) {
874
894
  commandList = frameState.commandList;
875
895
  frameState.commandList = [];
876
- this._labelCollection.update(frameState);
896
+ labelCollection.update(frameState);
877
897
  frameState.commandList = commandList;
878
898
  }
879
899
 
880
- // If clustering is enabled before the billboard collection is updated,
900
+ // If clustering is enabled before the billboard collections are updated,
881
901
  // the images haven't been added to the image atlas so the screen space bounding boxes
882
902
  // are incorrect.
903
+ const billboardCollection = this._billboardCollection;
883
904
  if (
884
- defined(this._billboardCollection) &&
885
- this._billboardCollection.length > 0 &&
886
- !defined(this._billboardCollection.get(0).width)
905
+ defined(billboardCollection) &&
906
+ billboardCollection.length > 0 &&
907
+ !billboardCollection.ready
887
908
  ) {
888
909
  commandList = frameState.commandList;
889
910
  frameState.commandList = [];
890
- this._billboardCollection.update(frameState);
911
+ billboardCollection.update(frameState);
891
912
  frameState.commandList = commandList;
892
913
  }
893
914
 
@@ -898,8 +919,12 @@ EntityCluster.prototype.update = function (frameState) {
898
919
  }
899
920
 
900
921
  if (this._clusterDirty) {
901
- this._clusterDirty = false;
902
922
  this._cluster();
923
+
924
+ // Unless all existing billboards and labels were clustered, clustering will need to execute again next frame
925
+ this._clusterDirty =
926
+ (defined(labelCollection) && !labelCollection.ready) ||
927
+ (defined(billboardCollection) && !billboardCollection.ready);
903
928
  }
904
929
 
905
930
  if (defined(this._clusterLabelCollection)) {
@@ -912,11 +937,11 @@ EntityCluster.prototype.update = function (frameState) {
912
937
  this._clusterPointCollection.update(frameState);
913
938
  }
914
939
 
915
- if (defined(this._labelCollection)) {
916
- this._labelCollection.update(frameState);
940
+ if (defined(labelCollection)) {
941
+ labelCollection.update(frameState);
917
942
  }
918
- if (defined(this._billboardCollection)) {
919
- this._billboardCollection.update(frameState);
943
+ if (defined(billboardCollection)) {
944
+ billboardCollection.update(frameState);
920
945
  }
921
946
  if (defined(this._pointCollection)) {
922
947
  this._pointCollection.update(frameState);
@@ -932,6 +957,11 @@ EntityCluster.prototype.update = function (frameState) {
932
957
  * </p>
933
958
  */
934
959
  EntityCluster.prototype.destroy = function () {
960
+ if (defined(this._removeEventListener)) {
961
+ this._removeEventListener();
962
+ this._removeEventListener = undefined;
963
+ }
964
+
935
965
  this._labelCollection =
936
966
  this._labelCollection && this._labelCollection.destroy();
937
967
  this._billboardCollection =
@@ -947,11 +977,6 @@ EntityCluster.prototype.destroy = function () {
947
977
  this._clusterPointCollection =
948
978
  this._clusterPointCollection && this._clusterPointCollection.destroy();
949
979
 
950
- if (defined(this._removeEventListener)) {
951
- this._removeEventListener();
952
- this._removeEventListener = undefined;
953
- }
954
-
955
980
  this._labelCollection = undefined;
956
981
  this._billboardCollection = undefined;
957
982
  this._pointCollection = undefined;
@@ -4,7 +4,6 @@ import ComponentDatatype from "../Core/ComponentDatatype.js";
4
4
  import createGuid from "../Core/createGuid.js";
5
5
  import defaultValue from "../Core/defaultValue.js";
6
6
  import defined from "../Core/defined.js";
7
- import deprecationWarning from "../Core/deprecationWarning.js";
8
7
  import destroyObject from "../Core/destroyObject.js";
9
8
  import DeveloperError from "../Core/DeveloperError.js";
10
9
  import Geometry from "../Core/Geometry.js";
@@ -1671,7 +1670,4 @@ Context.prototype.destroy = function () {
1671
1670
  return destroyObject(this);
1672
1671
  };
1673
1672
 
1674
- // Used for specs.
1675
- Context._deprecationWarning = deprecationWarning;
1676
-
1677
1673
  export default Context;
@@ -23,7 +23,7 @@ import TextureMinificationFilter from "./TextureMinificationFilter.js";
23
23
  * @property {PixelDatatype} [pixelDatatype=PixelDatatype.UNSIGNED_BYTE] The data type of each pixel.
24
24
  * @property {boolean} [flipY=true] If true, the source values will be read as if the y-axis is inverted (y=0 at the top).
25
25
  * @property {boolean} [skipColorSpaceConversion=false] If true, color space conversions will be skipped when reading the texel values.
26
- * @property {Sampler} [sampler] Information about how to sample the cubemap texture.
26
+ * @property {Sampler} [sampler] Information about how to sample the texture.
27
27
  * @property {number} [width] The pixel width of the texture. If not supplied, must be available from the source.
28
28
  * @property {number} [height] The pixel height of the texture. If not supplied, must be available from the source.
29
29
  * @property {boolean} [preMultiplyAlpha] If true, the alpha channel will be multiplied into the other channels.
@@ -704,7 +704,8 @@ Object.defineProperties(Texture.prototype, {
704
704
  * coordinates in both directions, uses linear filtering for both magnification and minification,
705
705
  * and uses a maximum anisotropy of 1.0.
706
706
  * @memberof Texture.prototype
707
- * @type {object}
707
+ * @type {Sampler}
708
+ * @private
708
709
  */
709
710
  sampler: {
710
711
  get: function () {
@@ -842,7 +843,7 @@ function setupSampler(texture, sampler) {
842
843
  * @exception {DeveloperError} xOffset + source.width must be less than or equal to width.
843
844
  * @exception {DeveloperError} yOffset + source.height must be less than or equal to height.
844
845
  * @exception {DeveloperError} This texture was destroyed, i.e., destroy() was called.
845
- *
846
+ * @private
846
847
  * @example
847
848
  * texture.copyFrom({
848
849
  * source: {
@@ -965,7 +966,7 @@ Texture.prototype.copyFrom = function (options) {
965
966
  * @param {number} [framebufferYOffset=0] optional
966
967
  * @param {number} [width=width] optional
967
968
  * @param {number} [height=height] optional
968
- *
969
+ * @private
969
970
  * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.
970
971
  * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.
971
972
  * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.
@@ -1060,7 +1061,7 @@ Texture.prototype.copyFromFramebuffer = function (
1060
1061
 
1061
1062
  /**
1062
1063
  * @param {MipmapHint} [hint=MipmapHint.DONT_CARE] optional.
1063
- *
1064
+ * @private
1064
1065
  * @exception {DeveloperError} Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.
1065
1066
  * @exception {DeveloperError} Cannot call generateMipmap when the texture pixel format is a compressed format.
1066
1067
  * @exception {DeveloperError} hint is invalid.