@cesium/engine 10.0.0 → 10.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 (173) hide show
  1. package/Build/Workers/chunk-2GEAGYUY.js +1477 -0
  2. package/Build/Workers/chunk-4RMIRG6T.js +1800 -0
  3. package/Build/Workers/chunk-4VFBBNQ3.js +55 -0
  4. package/Build/Workers/{chunk-GRAT5GE7.js → chunk-5BLJ5ZM6.js} +1 -1
  5. package/Build/Workers/{chunk-AVI4IUWC.js → chunk-5KWHSZYL.js} +4 -4
  6. package/Build/Workers/chunk-5O6JWQ4E.js +398 -0
  7. package/Build/Workers/chunk-65MZOUNU.js +390 -0
  8. package/Build/Workers/chunk-6D66DPRV.js +353 -0
  9. package/Build/Workers/{chunk-XD445VDH.js → chunk-6OFDHMHR.js} +1 -1
  10. package/Build/Workers/chunk-76BYYG7N.js +945 -0
  11. package/Build/Workers/chunk-A5CODJ4M.js +171 -0
  12. package/Build/Workers/chunk-ACRTCBN5.js +684 -0
  13. package/Build/Workers/{chunk-7XGC6YB2.js → chunk-B75IEX2S.js} +3 -3
  14. package/Build/Workers/chunk-BAVI3ZS2.js +39 -0
  15. package/Build/Workers/{chunk-SYCPRK3D.js → chunk-BBDZYSZB.js} +4 -4
  16. package/Build/Workers/chunk-BGE4QVG7.js +368 -0
  17. package/Build/Workers/chunk-BY3E4ONI.js +456 -0
  18. package/Build/Workers/{chunk-LCLJJ2MZ.js → chunk-C3Z23UUJ.js} +6 -6
  19. package/Build/Workers/{chunk-MDHQR3ZS.js → chunk-C45MU4GZ.js} +2 -2
  20. package/Build/Workers/{chunk-PCP4YQST.js → chunk-CF7P7K7E.js} +2 -2
  21. package/Build/Workers/chunk-D2U4RI64.js +476 -0
  22. package/Build/Workers/chunk-D4K27X2M.js +305 -0
  23. package/Build/Workers/chunk-EB7PNZTK.js +138 -0
  24. package/Build/Workers/chunk-ELI4BUOT.js +963 -0
  25. package/Build/Workers/{chunk-DOXCPOG4.js → chunk-F3NDOSTZ.js} +1 -1
  26. package/Build/Workers/{chunk-BCL4PHHT.js → chunk-FDCLACT5.js} +3 -3
  27. package/Build/Workers/chunk-FEVVHITK.js +122 -0
  28. package/Build/Workers/{chunk-GR3CDLCP.js → chunk-FOZWUH4T.js} +1 -1
  29. package/Build/Workers/chunk-FQPSOOPH.js +258 -0
  30. package/Build/Workers/chunk-G5V4GPZE.js +691 -0
  31. package/Build/Workers/chunk-GNHZH7HP.js +37 -0
  32. package/Build/Workers/{chunk-AD5HBJ2F.js → chunk-GPJR7MPQ.js} +2 -2
  33. package/Build/Workers/{chunk-4BAE4PWO.js → chunk-GWT64LKY.js} +1 -1
  34. package/Build/Workers/{chunk-STBBMQGG.js → chunk-HGEEOMSC.js} +1 -1
  35. package/Build/Workers/chunk-IUROUBPA.js +300 -0
  36. package/Build/Workers/chunk-J7MQUQJY.js +430 -0
  37. package/Build/Workers/{chunk-BJF5LOWE.js → chunk-JNLWLSTP.js} +3 -3
  38. package/Build/Workers/chunk-JYQNWIQQ.js +44 -0
  39. package/Build/Workers/{chunk-G3YR53LY.js → chunk-KV4EQHK4.js} +4 -4
  40. package/Build/Workers/chunk-LSSWVB2X.js +138 -0
  41. package/Build/Workers/chunk-LXQ5QAEJ.js +196 -0
  42. package/Build/Workers/{chunk-RJYML24O.js → chunk-MBZH7YZ7.js} +414 -439
  43. package/Build/Workers/{chunk-BDFNKFOE.js → chunk-MKXWJTFQ.js} +4 -4
  44. package/Build/Workers/chunk-MMV6TO3P.js +101 -0
  45. package/Build/Workers/chunk-N4QEHO3U.js +75 -0
  46. package/Build/Workers/chunk-NVOABL76.js +100 -0
  47. package/Build/Workers/chunk-OAPA2RTG.js +239 -0
  48. package/Build/Workers/chunk-OE4MCOC7.js +421 -0
  49. package/Build/Workers/chunk-OJF4RTJG.js +634 -0
  50. package/Build/Workers/{chunk-C2CGMAIU.js → chunk-OOMCT7OL.js} +2 -2
  51. package/Build/Workers/{chunk-VO3ACQB2.js → chunk-OWGTMVDB.js} +6 -6
  52. package/Build/Workers/chunk-OXALEQPI.js +10364 -0
  53. package/Build/Workers/chunk-OXSI7N4C.js +768 -0
  54. package/Build/Workers/chunk-PNFHVBSF.js +2716 -0
  55. package/Build/Workers/chunk-POSRARY7.js +834 -0
  56. package/Build/Workers/chunk-QYQIVZBU.js +117 -0
  57. package/Build/Workers/chunk-R3TKLC6E.js +1075 -0
  58. package/Build/Workers/chunk-R4OIEIPE.js +500 -0
  59. package/Build/Workers/{chunk-LEABCTLP.js → chunk-R4ZEWO4I.js} +1 -1
  60. package/Build/Workers/{chunk-FXIHSF7O.js → chunk-RCK55EDX.js} +3 -3
  61. package/Build/Workers/chunk-RHBWXX7C.js +629 -0
  62. package/Build/Workers/{chunk-NTXTUNEF.js → chunk-RZLZWKFN.js} +1 -1
  63. package/Build/Workers/chunk-SAPFXU5X.js +102 -0
  64. package/Build/Workers/chunk-T6LPN7RI.js +2857 -0
  65. package/Build/Workers/{chunk-5S7OLEPK.js → chunk-TBBFDFCS.js} +2 -2
  66. package/Build/Workers/chunk-TF776XCO.js +1258 -0
  67. package/Build/Workers/chunk-TGY6H6N6.js +163 -0
  68. package/Build/Workers/{chunk-L6RTJ3RE.js → chunk-UCIPJSZX.js} +2 -2
  69. package/Build/Workers/chunk-UOEUCKKU.js +59 -0
  70. package/Build/Workers/chunk-VRZ46QZ5.js +781 -0
  71. package/Build/Workers/chunk-VYWUFRRR.js +1052 -0
  72. package/Build/Workers/{chunk-JYAHOGGL.js → chunk-WVSELU6O.js} +6 -6
  73. package/Build/Workers/chunk-X2ZQ7RJR.js +287 -0
  74. package/Build/Workers/{chunk-O3JCMSS3.js → chunk-X43SJLQL.js} +44 -0
  75. package/Build/Workers/chunk-XLTOBCDI.js +220 -0
  76. package/Build/Workers/{chunk-COYFZ5VA.js → chunk-XQI7XZHX.js} +1 -1
  77. package/Build/Workers/chunk-XUOJCLOH.js +511 -0
  78. package/Build/Workers/chunk-XZZNKIEV.js +157 -0
  79. package/Build/Workers/chunk-YLYBLJ3Y.js +73 -0
  80. package/Build/Workers/{chunk-OORVMGDU.js → chunk-ZEE2EIFD.js} +1 -1
  81. package/Build/Workers/chunk-ZIKGV7EL.js +58 -0
  82. package/Build/Workers/{chunk-DGS5QNIO.js → chunk-ZU334IDQ.js} +3 -3
  83. package/Build/Workers/combineGeometry.js +22 -22
  84. package/Build/Workers/createBoxGeometry.js +16 -16
  85. package/Build/Workers/createBoxOutlineGeometry.js +14 -14
  86. package/Build/Workers/createCircleGeometry.js +24 -24
  87. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  88. package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
  89. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  90. package/Build/Workers/createCorridorGeometry.js +27 -27
  91. package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
  92. package/Build/Workers/createCylinderGeometry.js +18 -18
  93. package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
  94. package/Build/Workers/createEllipseGeometry.js +24 -24
  95. package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
  96. package/Build/Workers/createEllipsoidGeometry.js +17 -17
  97. package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
  98. package/Build/Workers/createFrustumGeometry.js +16 -16
  99. package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
  100. package/Build/Workers/createGeometry.js +22 -22
  101. package/Build/Workers/createGroundPolylineGeometry.js +20 -20
  102. package/Build/Workers/createPlaneGeometry.js +14 -14
  103. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  104. package/Build/Workers/createPolygonGeometry.js +30 -30
  105. package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
  106. package/Build/Workers/createPolylineGeometry.js +23 -23
  107. package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
  108. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
  109. package/Build/Workers/createRectangleGeometry.js +25 -25
  110. package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
  111. package/Build/Workers/createSimplePolylineGeometry.js +21 -21
  112. package/Build/Workers/createSphereGeometry.js +17 -17
  113. package/Build/Workers/createSphereOutlineGeometry.js +16 -16
  114. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  115. package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
  116. package/Build/Workers/createVectorTileGeometries.js +22 -22
  117. package/Build/Workers/createVectorTilePoints.js +12 -12
  118. package/Build/Workers/createVectorTilePolygons.js +20 -20
  119. package/Build/Workers/createVectorTilePolylines.js +13 -13
  120. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
  121. package/Build/Workers/createVerticesFromHeightmap.js +20 -20
  122. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  123. package/Build/Workers/createWallGeometry.js +22 -22
  124. package/Build/Workers/createWallOutlineGeometry.js +21 -21
  125. package/Build/Workers/decodeDraco.js +11 -11
  126. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  127. package/Build/Workers/decodeI3S.js +10 -10
  128. package/Build/Workers/transcodeKTX2.js +8 -11
  129. package/Build/Workers/transferTypedArrayTest.js +1 -1
  130. package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
  131. package/Source/Core/Ion.js +1 -1
  132. package/Source/Core/Simon1994PlanetaryPositions.js +2 -1
  133. package/Source/Core/Transforms.js +137 -2
  134. package/Source/DataSources/BillboardGraphics.js +16 -0
  135. package/Source/DataSources/BillboardVisualizer.js +7 -0
  136. package/Source/DataSources/PathVisualizer.js +4 -4
  137. package/Source/DataSources/PointGraphics.js +17 -0
  138. package/Source/DataSources/PointVisualizer.js +12 -0
  139. package/Source/DataSources/PositionProperty.js +4 -7
  140. package/Source/Renderer/AutomaticUniforms.js +1 -1
  141. package/Source/Renderer/UniformState.js +5 -11
  142. package/Source/Scene/ArcGisMapService.js +1 -1
  143. package/Source/Scene/Billboard.js +29 -2
  144. package/Source/Scene/BillboardCollection.js +49 -0
  145. package/Source/Scene/BingMapsImageryProvider.js +10 -1
  146. package/Source/Scene/ImageBasedLighting.js +2 -2
  147. package/Source/Scene/Model/Model.js +1 -1
  148. package/Source/Scene/OctahedralProjectedCubeMap.js +5 -6
  149. package/Source/Scene/PointPrimitive.js +28 -2
  150. package/Source/Scene/PointPrimitiveCollection.js +22 -9
  151. package/Source/Shaders/BillboardCollectionFS.glsl +4 -0
  152. package/Source/Shaders/BillboardCollectionFS.js +4 -0
  153. package/Source/Shaders/BillboardCollectionVS.glsl +3 -1
  154. package/Source/Shaders/BillboardCollectionVS.js +3 -1
  155. package/Source/Shaders/BrdfLutGeneratorFS.glsl +30 -13
  156. package/Source/Shaders/BrdfLutGeneratorFS.js +30 -13
  157. package/Source/Shaders/Builtin/Functions/pbrLighting.glsl +40 -39
  158. package/Source/Shaders/Builtin/Functions/pbrLighting.js +40 -39
  159. package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.glsl +1 -1
  160. package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.js +1 -1
  161. package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +23 -23
  162. package/Source/Shaders/Model/ImageBasedLightingStageFS.js +23 -23
  163. package/Source/Shaders/Model/LightingStageFS.glsl +6 -5
  164. package/Source/Shaders/Model/LightingStageFS.js +6 -5
  165. package/Source/Shaders/Model/MaterialStageFS.glsl +10 -14
  166. package/Source/Shaders/Model/MaterialStageFS.js +10 -14
  167. package/Source/Shaders/PointPrimitiveCollectionFS.glsl +4 -0
  168. package/Source/Shaders/PointPrimitiveCollectionFS.js +4 -0
  169. package/Source/Shaders/PointPrimitiveCollectionVS.glsl +9 -7
  170. package/Source/Shaders/PointPrimitiveCollectionVS.js +9 -7
  171. package/index.d.ts +74 -5
  172. package/index.js +207 -207
  173. package/package.json +3 -3
@@ -19,6 +19,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
19
19
  * @property {Property | NearFarScalar} [translucencyByDistance] A {@link NearFarScalar} Property used to set translucency based on distance from the camera.
20
20
  * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this point will be displayed.
21
21
  * @property {Property | number} [disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to.
22
+ * @property {Property | SplitDirection} [splitDirection] A Property specifying the {@link SplitDirection} split to apply to this point.
22
23
  */
23
24
 
24
25
  /**
@@ -51,6 +52,8 @@ function PointGraphics(options) {
51
52
  this._distanceDisplayConditionSubscription = undefined;
52
53
  this._disableDepthTestDistance = undefined;
53
54
  this._disableDepthTestDistanceSubscription = undefined;
55
+ this._splitDirection = undefined;
56
+ this._splitDirectionSubscription = undefined;
54
57
 
55
58
  this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT));
56
59
  }
@@ -154,6 +157,14 @@ Object.defineProperties(PointGraphics.prototype, {
154
157
  disableDepthTestDistance: createPropertyDescriptor(
155
158
  "disableDepthTestDistance"
156
159
  ),
160
+
161
+ /**
162
+ * Gets or sets the Property specifying the {@link SplitDirection} of this point.
163
+ * @memberof PointGraphics.prototype
164
+ * @type {Property|undefined}
165
+ * @default SplitDirection.NONE
166
+ */
167
+ splitDirection: createPropertyDescriptor("splitDirection"),
157
168
  });
158
169
 
159
170
  /**
@@ -176,6 +187,7 @@ PointGraphics.prototype.clone = function (result) {
176
187
  result.translucencyByDistance = this._translucencyByDistance;
177
188
  result.distanceDisplayCondition = this.distanceDisplayCondition;
178
189
  result.disableDepthTestDistance = this.disableDepthTestDistance;
190
+ result.splitDirection = this.splitDirection;
179
191
  return result;
180
192
  };
181
193
 
@@ -217,5 +229,10 @@ PointGraphics.prototype.merge = function (source) {
217
229
  this.disableDepthTestDistance,
218
230
  source.disableDepthTestDistance
219
231
  );
232
+
233
+ this.splitDirection = defaultValue(
234
+ this.splitDirection,
235
+ source.splitDirection
236
+ );
220
237
  };
221
238
  export default PointGraphics;
@@ -10,12 +10,14 @@ import createBillboardPointCallback from "../Scene/createBillboardPointCallback.
10
10
  import HeightReference from "../Scene/HeightReference.js";
11
11
  import BoundingSphereState from "./BoundingSphereState.js";
12
12
  import Property from "./Property.js";
13
+ import SplitDirection from "../Scene/SplitDirection.js";
13
14
 
14
15
  const defaultColor = Color.WHITE;
15
16
  const defaultOutlineColor = Color.BLACK;
16
17
  const defaultOutlineWidth = 0.0;
17
18
  const defaultPixelSize = 1.0;
18
19
  const defaultDisableDepthTestDistance = 0.0;
20
+ const defaultSplitDirection = SplitDirection.NONE;
19
21
 
20
22
  const colorScratch = new Color();
21
23
  const positionScratch = new Cartesian3();
@@ -192,6 +194,11 @@ PointVisualizer.prototype.update = function (time) {
192
194
  time,
193
195
  defaultDisableDepthTestDistance
194
196
  );
197
+ pointPrimitive.splitDirection = Property.getValueOrDefault(
198
+ pointGraphics._splitDirection,
199
+ time,
200
+ defaultSplitDirection
201
+ );
195
202
  } else if (defined(billboard)) {
196
203
  billboard.show = true;
197
204
  billboard.position = position;
@@ -215,6 +222,11 @@ PointVisualizer.prototype.update = function (time) {
215
222
  time,
216
223
  defaultDisableDepthTestDistance
217
224
  );
225
+ billboard.splitDirection = Property.getValueOrDefault(
226
+ pointGraphics._splitDirection,
227
+ time,
228
+ defaultSplitDirection
229
+ );
218
230
  billboard.heightReference = heightReference;
219
231
 
220
232
  const newColor = Property.getValueOrDefault(
@@ -112,13 +112,10 @@ PositionProperty.convertToReferenceFrame = function (
112
112
  return Cartesian3.clone(value, result);
113
113
  }
114
114
 
115
- let icrfToFixed = Transforms.computeIcrfToFixedMatrix(time, scratchMatrix3);
116
- if (!defined(icrfToFixed)) {
117
- icrfToFixed = Transforms.computeTemeToPseudoFixedMatrix(
118
- time,
119
- scratchMatrix3
120
- );
121
- }
115
+ const icrfToFixed = Transforms.computeIcrfToCentralBodyFixedMatrix(
116
+ time,
117
+ scratchMatrix3
118
+ );
122
119
  if (inputFrame === ReferenceFrame.INERTIAL) {
123
120
  return Matrix3.multiplyByVector(icrfToFixed, value, result);
124
121
  }
@@ -1454,7 +1454,7 @@ const AutomaticUniforms = {
1454
1454
  * // Example: For a given roughness and NdotV value, find the material's BRDF information in the red and green channels
1455
1455
  * float roughness = 0.5;
1456
1456
  * float NdotV = dot(normal, view);
1457
- * vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;
1457
+ * vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
1458
1458
  */
1459
1459
  czm_brdfLut: new AutomaticUniform({
1460
1460
  size: 1,
@@ -1305,19 +1305,13 @@ function setCamera(uniformState, camera) {
1305
1305
  );
1306
1306
  }
1307
1307
 
1308
- let transformMatrix = new Matrix3();
1308
+ const transformMatrix = new Matrix3();
1309
1309
  const sunCartographicScratch = new Cartographic();
1310
1310
  function setSunAndMoonDirections(uniformState, frameState) {
1311
- if (
1312
- !defined(
1313
- Transforms.computeIcrfToFixedMatrix(frameState.time, transformMatrix)
1314
- )
1315
- ) {
1316
- transformMatrix = Transforms.computeTemeToPseudoFixedMatrix(
1317
- frameState.time,
1318
- transformMatrix
1319
- );
1320
- }
1311
+ Transforms.computeIcrfToCentralBodyFixedMatrix(
1312
+ frameState.time,
1313
+ transformMatrix
1314
+ );
1321
1315
 
1322
1316
  let position = Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame(
1323
1317
  frameState.time,
@@ -4,7 +4,7 @@ import Resource from "../Core/Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmRcs5cw5x8CvIyg2oiotXJmY_GjoEUuuKAUvdWxusIx25kUy2AttkOs0FgosGzFJSsjafpWC40GiE5hiD0FLNSh3kxIW6w-5qqUQCEAwGY1t4yH7Fj-PjrkjPfSpw0_r2xF3lKLd0_LSmPWXCkYhqV1O67tWLNImHyr7SurJ92sA5YIG1pMJKEQU3Qv5k18p0g.AT1_sGbfSYDL";
7
+ "AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmTRbx8gaNqtBYKRq3vEnwSKnwUE1aRn2Siyo0gHWzzPwpJd-ZUeTyDgQZPqW8C6pXNLOE3bRO6-Jz3NFmp-qNquqGBQTATcCHbNsL-h9CPyMMPGsTcUvzPlIInazMfkWJNbFmqJeSzPj_1DHshXa0XCfkQn5mVxlF2dFt10Mq2bGo0HkpdpXwNQdoGwdphsLoU.AT1_CpQKgEim";
8
8
  /**
9
9
  * Default options for accessing the ArcGIS image tile service.
10
10
  *
@@ -21,6 +21,7 @@ import HorizontalOrigin from "./HorizontalOrigin.js";
21
21
  import SceneMode from "./SceneMode.js";
22
22
  import SceneTransforms from "./SceneTransforms.js";
23
23
  import VerticalOrigin from "./VerticalOrigin.js";
24
+ import SplitDirection from "./SplitDirection.js";
24
25
 
25
26
  /**
26
27
  * @typedef {object} Billboard.ConstructorOptions
@@ -49,6 +50,7 @@ import VerticalOrigin from "./VerticalOrigin.js";
49
50
  * @property {BoundingRectangle} [imageSubRegion] A {@link BoundingRectangle} Specifying the sub-region of the image to use for the billboard, rather than the entire image.
50
51
  * @property {DistanceDisplayCondition} [distanceDisplayCondition] A {@link DistanceDisplayCondition} Specifying the distance from the camera at which this billboard will be displayed.
51
52
  * @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.
53
+ * @property {SplitDirection} [splitDirection] A {@link SplitDirection} Specifying the split property of the billboard.
52
54
  */
53
55
 
54
56
  /**
@@ -250,6 +252,11 @@ function Billboard(options, billboardCollection) {
250
252
  this._outlineWidth = defaultValue(options.outlineWidth, 0.0);
251
253
 
252
254
  this._updateClamping();
255
+
256
+ this._splitDirection = defaultValue(
257
+ options.splitDirection,
258
+ SplitDirection.NONE
259
+ );
253
260
  }
254
261
 
255
262
  const SHOW_INDEX = (Billboard.SHOW_INDEX = 0);
@@ -270,7 +277,8 @@ const DISTANCE_DISPLAY_CONDITION = (Billboard.DISTANCE_DISPLAY_CONDITION = 14);
270
277
  const DISABLE_DEPTH_DISTANCE = (Billboard.DISABLE_DEPTH_DISTANCE = 15);
271
278
  Billboard.TEXTURE_COORDINATE_BOUNDS = 16;
272
279
  const SDF_INDEX = (Billboard.SDF_INDEX = 17);
273
- Billboard.NUMBER_OF_PROPERTIES = 18;
280
+ const SPLIT_DIRECTION_INDEX = (Billboard.SPLIT_DIRECTION_INDEX = 18);
281
+ Billboard.NUMBER_OF_PROPERTIES = 19;
274
282
 
275
283
  function makeDirty(billboard, propertyChanged) {
276
284
  const billboardCollection = billboard._billboardCollection;
@@ -1072,6 +1080,24 @@ Object.defineProperties(Billboard.prototype, {
1072
1080
  }
1073
1081
  },
1074
1082
  },
1083
+
1084
+ /**
1085
+ * Gets or sets the {@link SplitDirection} of this billboard.
1086
+ * @memberof Billboard.prototype
1087
+ * @type {SplitDirection}
1088
+ * @default {@link SplitDirection.NONE}
1089
+ */
1090
+ splitDirection: {
1091
+ get: function () {
1092
+ return this._splitDirection;
1093
+ },
1094
+ set: function (value) {
1095
+ if (this._splitDirection !== value) {
1096
+ this._splitDirection = value;
1097
+ makeDirty(this, SPLIT_DIRECTION_INDEX);
1098
+ }
1099
+ },
1100
+ },
1075
1101
  });
1076
1102
 
1077
1103
  Billboard.prototype.getPickId = function (context) {
@@ -1567,7 +1593,8 @@ Billboard.prototype.equals = function (other) {
1567
1593
  this._distanceDisplayCondition,
1568
1594
  other._distanceDisplayCondition
1569
1595
  ) &&
1570
- this._disableDepthTestDistance === other._disableDepthTestDistance)
1596
+ this._disableDepthTestDistance === other._disableDepthTestDistance &&
1597
+ this._splitDirection === other._splitDirection)
1571
1598
  );
1572
1599
  };
1573
1600
 
@@ -54,6 +54,7 @@ const DISTANCE_DISPLAY_CONDITION_INDEX = Billboard.DISTANCE_DISPLAY_CONDITION;
54
54
  const DISABLE_DEPTH_DISTANCE = Billboard.DISABLE_DEPTH_DISTANCE;
55
55
  const TEXTURE_COORDINATE_BOUNDS = Billboard.TEXTURE_COORDINATE_BOUNDS;
56
56
  const SDF_INDEX = Billboard.SDF_INDEX;
57
+ const SPLIT_DIRECTION_INDEX = Billboard.SPLIT_DIRECTION_INDEX;
57
58
  const NUMBER_OF_PROPERTIES = Billboard.NUMBER_OF_PROPERTIES;
58
59
 
59
60
  let attributeLocations;
@@ -71,6 +72,7 @@ const attributeLocationsBatched = {
71
72
  textureCoordinateBoundsOrLabelTranslate: 9,
72
73
  a_batchId: 10,
73
74
  sdf: 11,
75
+ splitDirection: 12,
74
76
  };
75
77
 
76
78
  const attributeLocationsInstanced = {
@@ -87,6 +89,7 @@ const attributeLocationsInstanced = {
87
89
  textureCoordinateBoundsOrLabelTranslate: 10,
88
90
  a_batchId: 11,
89
91
  sdf: 12,
92
+ splitDirection: 13,
90
93
  };
91
94
 
92
95
  /**
@@ -311,6 +314,7 @@ function BillboardCollection(options) {
311
314
  BufferUsage.STATIC_DRAW, // PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX
312
315
  BufferUsage.STATIC_DRAW, // DISTANCE_DISPLAY_CONDITION_INDEX
313
316
  BufferUsage.STATIC_DRAW, // TEXTURE_COORDINATE_BOUNDS
317
+ BufferUsage.STATIC_DRAW, // SPLIT_DIRECTION_INDEX
314
318
  ];
315
319
 
316
320
  this._highlightColor = Color.clone(Color.WHITE); // Only used by Vector3DTilePoints
@@ -777,6 +781,12 @@ function createVAF(
777
781
  componentDatatype: ComponentDatatype.FLOAT,
778
782
  usage: buffersUsage[TEXTURE_COORDINATE_BOUNDS],
779
783
  },
784
+ {
785
+ index: attributeLocations.splitDirection,
786
+ componentsPerAttribute: 1,
787
+ componentDatatype: ComponentDatatype.FLOAT,
788
+ usage: buffersUsage[SPLIT_DIRECTION_INDEX],
789
+ },
780
790
  ];
781
791
 
782
792
  // Instancing requires one non-instanced attribute.
@@ -1586,6 +1596,34 @@ function writeSDF(
1586
1596
  }
1587
1597
  }
1588
1598
 
1599
+ function writeSplitDirection(
1600
+ billboardCollection,
1601
+ frameState,
1602
+ textureAtlasCoordinates,
1603
+ vafWriters,
1604
+ billboard
1605
+ ) {
1606
+ const writer = vafWriters[attributeLocations.splitDirection];
1607
+ let direction = 0.0;
1608
+
1609
+ const split = billboard.splitDirection;
1610
+ if (defined(split)) {
1611
+ direction = split;
1612
+ }
1613
+
1614
+ let i;
1615
+ if (billboardCollection._instanced) {
1616
+ i = billboard._index;
1617
+ writer(i, direction);
1618
+ } else {
1619
+ i = billboard._index * 4;
1620
+ writer(i + 0, direction);
1621
+ writer(i + 1, direction);
1622
+ writer(i + 2, direction);
1623
+ writer(i + 3, direction);
1624
+ }
1625
+ }
1626
+
1589
1627
  function writeBillboard(
1590
1628
  billboardCollection,
1591
1629
  frameState,
@@ -1670,6 +1708,13 @@ function writeBillboard(
1670
1708
  vafWriters,
1671
1709
  billboard
1672
1710
  );
1711
+ writeSplitDirection(
1712
+ billboardCollection,
1713
+ frameState,
1714
+ textureAtlasCoordinates,
1715
+ vafWriters,
1716
+ billboard
1717
+ );
1673
1718
  }
1674
1719
 
1675
1720
  function recomputeActualPositions(
@@ -1981,6 +2026,10 @@ BillboardCollection.prototype.update = function (frameState) {
1981
2026
  writers.push(writeSDF);
1982
2027
  }
1983
2028
 
2029
+ if (properties[SPLIT_DIRECTION_INDEX]) {
2030
+ writers.push(writeSplitDirection);
2031
+ }
2032
+
1984
2033
  const numWriters = writers.length;
1985
2034
  vafWriters = this._vaf.writers;
1986
2035
 
@@ -120,7 +120,16 @@ function metadataSuccess(data, imageryProviderBuilder) {
120
120
  imageryProviderBuilder.maximumLevel = resource.zoomMax - 1;
121
121
  imageryProviderBuilder.imageUrlSubdomains = resource.imageUrlSubdomains;
122
122
  imageryProviderBuilder.imageUrlTemplate = resource.imageUrl;
123
- imageryProviderBuilder.attributionList = resource.imageryProviders;
123
+
124
+ let validProviders = resource.imageryProviders;
125
+ if (defined(resource.imageryProviders)) {
126
+ // prevent issues with the imagery API from crashing the viewer when the expected properties are not there
127
+ // See https://github.com/CesiumGS/cesium/issues/12088
128
+ validProviders = resource.imageryProviders.filter((provider) =>
129
+ provider.coverageAreas?.some((area) => defined(area.bbox))
130
+ );
131
+ }
132
+ imageryProviderBuilder.attributionList = validProviders;
124
133
  }
125
134
 
126
135
  function metadataFailure(metadataResource, error, provider) {
@@ -186,8 +186,8 @@ Object.defineProperties(ImageBasedLighting.prototype, {
186
186
  * </p>
187
187
  *
188
188
  * These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of
189
- * {@link https://github.com/google/filament/releases|Google's Filament project}. This will also generate a KTX file that can be
190
- * supplied to {@link Model#specularEnvironmentMaps}.
189
+ * {@link https://github.com/google/filament/releases|Google's Filament project}.
190
+ * Be sure to use the <code>--no-mirror</code> option in <code>cmgen</code>.
191
191
  *
192
192
  * @memberof ImageBasedLighting.prototype
193
193
  *
@@ -2251,7 +2251,7 @@ function updatePickIds(model) {
2251
2251
 
2252
2252
  // Matrix3 is a row-major constructor.
2253
2253
  // The same constructor in GLSL will produce the transpose of this.
2254
- const yUpToZUp = new Matrix3(-1, 0, 0, 0, 0, 1, 0, -1, 0);
2254
+ const yUpToZUp = new Matrix3(1, 0, 0, 0, 0, 1, 0, -1, 0);
2255
2255
 
2256
2256
  function updateReferenceMatrices(model, frameState) {
2257
2257
  const modelMatrix = defined(model._clampedModelMatrix)
@@ -337,11 +337,10 @@ OctahedralProjectedCubeMap.prototype.update = function (frameState) {
337
337
  },
338
338
  });
339
339
 
340
- // We only need up to 6 mip levels to avoid artifacts.
341
- const length = Math.min(cubeMapBuffers.length, 6);
342
- this._maximumMipmapLevel = length - 1;
343
- const cubeMaps = (this._cubeMaps = new Array(length));
344
- const mipTextures = (this._mipTextures = new Array(length));
340
+ const mipLevels = cubeMapBuffers.length;
341
+ this._maximumMipmapLevel = mipLevels - 1;
342
+ const cubeMaps = (this._cubeMaps = new Array(mipLevels));
343
+ const mipTextures = (this._mipTextures = new Array(mipLevels));
345
344
  const originalSize = cubeMapBuffers[0].positiveX.width * 2.0;
346
345
  const uniformMap = {
347
346
  originalSize: function () {
@@ -350,7 +349,7 @@ OctahedralProjectedCubeMap.prototype.update = function (frameState) {
350
349
  };
351
350
 
352
351
  // First we project each cubemap onto a flat octahedron, and write that to a texture.
353
- for (let i = 0; i < length; ++i) {
352
+ for (let i = 0; i < mipLevels; ++i) {
354
353
  // Swap +Y/-Y faces since the octahedral projection expects this order.
355
354
  const positiveY = cubeMapBuffers[i].positiveY;
356
355
  cubeMapBuffers[i].positiveY = cubeMapBuffers[i].negativeY;
@@ -11,6 +11,7 @@ import Matrix4 from "../Core/Matrix4.js";
11
11
  import NearFarScalar from "../Core/NearFarScalar.js";
12
12
  import SceneMode from "./SceneMode.js";
13
13
  import SceneTransforms from "./SceneTransforms.js";
14
+ import SplitDirection from "./SplitDirection.js";
14
15
 
15
16
  /**
16
17
  * <div class="notice">
@@ -117,6 +118,11 @@ function PointPrimitive(options, pointPrimitiveCollection) {
117
118
  this._pointPrimitiveCollection = pointPrimitiveCollection;
118
119
  this._dirty = false;
119
120
  this._index = -1; //Used only by PointPrimitiveCollection
121
+
122
+ this._splitDirection = defaultValue(
123
+ options.splitDirection,
124
+ SplitDirection.NONE
125
+ );
120
126
  }
121
127
 
122
128
  const SHOW_INDEX = (PointPrimitive.SHOW_INDEX = 0);
@@ -129,7 +135,8 @@ const SCALE_BY_DISTANCE_INDEX = (PointPrimitive.SCALE_BY_DISTANCE_INDEX = 6);
129
135
  const TRANSLUCENCY_BY_DISTANCE_INDEX = (PointPrimitive.TRANSLUCENCY_BY_DISTANCE_INDEX = 7);
130
136
  const DISTANCE_DISPLAY_CONDITION_INDEX = (PointPrimitive.DISTANCE_DISPLAY_CONDITION_INDEX = 8);
131
137
  const DISABLE_DEPTH_DISTANCE_INDEX = (PointPrimitive.DISABLE_DEPTH_DISTANCE_INDEX = 9);
132
- PointPrimitive.NUMBER_OF_PROPERTIES = 10;
138
+ const SPLIT_DIRECTION_INDEX = (PointPrimitive.SPLIT_DIRECTION_INDEX = 10);
139
+ PointPrimitive.NUMBER_OF_PROPERTIES = 11;
133
140
 
134
141
  function makeDirty(pointPrimitive, propertyChanged) {
135
142
  const pointPrimitiveCollection = pointPrimitive._pointPrimitiveCollection;
@@ -486,6 +493,24 @@ Object.defineProperties(PointPrimitive.prototype, {
486
493
  }
487
494
  },
488
495
  },
496
+
497
+ /**
498
+ * The {@link SplitDirection} to apply to this point.
499
+ * @memberof PointPrimitive.prototype
500
+ * @type {SplitDirection}
501
+ * @default {@link SplitDirection.NONE}
502
+ */
503
+ splitDirection: {
504
+ get: function () {
505
+ return this._splitDirection;
506
+ },
507
+ set: function (value) {
508
+ if (this._splitDirection !== value) {
509
+ this._splitDirection = value;
510
+ makeDirty(this, SPLIT_DIRECTION_INDEX);
511
+ }
512
+ },
513
+ },
489
514
  });
490
515
 
491
516
  PointPrimitive.prototype.getPickId = function (context) {
@@ -660,7 +685,8 @@ PointPrimitive.prototype.equals = function (other) {
660
685
  this._distanceDisplayCondition,
661
686
  other._distanceDisplayCondition
662
687
  ) &&
663
- this._disableDepthTestDistance === other._disableDepthTestDistance)
688
+ this._disableDepthTestDistance === other._disableDepthTestDistance &&
689
+ this._splitDirection === other._splitDirection)
664
690
  );
665
691
  };
666
692
 
@@ -38,6 +38,7 @@ const DISTANCE_DISPLAY_CONDITION_INDEX =
38
38
  PointPrimitive.DISTANCE_DISPLAY_CONDITION_INDEX;
39
39
  const DISABLE_DEPTH_DISTANCE_INDEX =
40
40
  PointPrimitive.DISABLE_DEPTH_DISTANCE_INDEX;
41
+ const SPLIT_DIRECTION_INDEX = PointPrimitive.SPLIT_DIRECTION_INDEX;
41
42
  const NUMBER_OF_PROPERTIES = PointPrimitive.NUMBER_OF_PROPERTIES;
42
43
 
43
44
  const attributeLocations = {
@@ -46,7 +47,7 @@ const attributeLocations = {
46
47
  compressedAttribute0: 2, // color, outlineColor, pick color
47
48
  compressedAttribute1: 3, // show, translucency by distance, some free space
48
49
  scaleByDistance: 4,
49
- distanceDisplayConditionAndDisableDepth: 5,
50
+ distanceDisplayConditionAndDisableDepthAndSplitDirection: 5,
50
51
  };
51
52
 
52
53
  /**
@@ -492,8 +493,9 @@ function createVAF(context, numberOfPointPrimitives, buffersUsage) {
492
493
  usage: buffersUsage[SCALE_BY_DISTANCE_INDEX],
493
494
  },
494
495
  {
495
- index: attributeLocations.distanceDisplayConditionAndDisableDepth,
496
- componentsPerAttribute: 3,
496
+ index:
497
+ attributeLocations.distanceDisplayConditionAndDisableDepthAndSplitDirection,
498
+ componentsPerAttribute: 4,
497
499
  componentDatatype: ComponentDatatype.FLOAT,
498
500
  usage: buffersUsage[DISTANCE_DISPLAY_CONDITION_INDEX],
499
501
  },
@@ -665,7 +667,7 @@ function writeScaleByDistance(
665
667
  writer(i, near, nearValue, far, farValue);
666
668
  }
667
669
 
668
- function writeDistanceDisplayConditionAndDepthDisable(
670
+ function writeDistanceDisplayConditionAndDepthDisableAndSplitDirection(
669
671
  pointPrimitiveCollection,
670
672
  context,
671
673
  vafWriters,
@@ -673,7 +675,10 @@ function writeDistanceDisplayConditionAndDepthDisable(
673
675
  ) {
674
676
  const i = pointPrimitive._index;
675
677
  const writer =
676
- vafWriters[attributeLocations.distanceDisplayConditionAndDisableDepth];
678
+ vafWriters[
679
+ attributeLocations
680
+ .distanceDisplayConditionAndDisableDepthAndSplitDirection
681
+ ];
677
682
  let near = 0.0;
678
683
  let far = Number.MAX_VALUE;
679
684
 
@@ -697,7 +702,12 @@ function writeDistanceDisplayConditionAndDepthDisable(
697
702
  }
698
703
  }
699
704
 
700
- writer(i, near, far, disableDepthTestDistance);
705
+ let direction = 0.0;
706
+ const split = pointPrimitive.splitDirection;
707
+ if (defined(split)) {
708
+ direction = split;
709
+ }
710
+ writer(i, near, far, disableDepthTestDistance, direction);
701
711
  }
702
712
 
703
713
  function writePointPrimitive(
@@ -730,7 +740,7 @@ function writePointPrimitive(
730
740
  vafWriters,
731
741
  pointPrimitive
732
742
  );
733
- writeDistanceDisplayConditionAndDepthDisable(
743
+ writeDistanceDisplayConditionAndDepthDisableAndSplitDirection(
734
744
  pointPrimitiveCollection,
735
745
  context,
736
746
  vafWriters,
@@ -925,9 +935,12 @@ PointPrimitiveCollection.prototype.update = function (frameState) {
925
935
 
926
936
  if (
927
937
  properties[DISTANCE_DISPLAY_CONDITION_INDEX] ||
928
- properties[DISABLE_DEPTH_DISTANCE_INDEX]
938
+ properties[DISABLE_DEPTH_DISTANCE_INDEX] ||
939
+ properties[SPLIT_DIRECTION_INDEX]
929
940
  ) {
930
- writers.push(writeDistanceDisplayConditionAndDepthDisable);
941
+ writers.push(
942
+ writeDistanceDisplayConditionAndDepthDisableAndSplitDirection
943
+ );
931
944
  }
932
945
 
933
946
  const numWriters = writers.length;
@@ -7,6 +7,7 @@ uniform vec4 u_highlightColor;
7
7
  in vec2 v_textureCoordinates;
8
8
  in vec4 v_pickColor;
9
9
  in vec4 v_color;
10
+ in float v_splitDirection;
10
11
 
11
12
  #ifdef SDF
12
13
  in vec4 v_outlineColor;
@@ -86,6 +87,9 @@ vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smo
86
87
 
87
88
  void main()
88
89
  {
90
+ if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
91
+ if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
92
+
89
93
  vec4 color = texture(u_atlas, v_textureCoordinates);
90
94
 
91
95
  #ifdef SDF
@@ -8,6 +8,7 @@ uniform vec4 u_highlightColor;\n\
8
8
  in vec2 v_textureCoordinates;\n\
9
9
  in vec4 v_pickColor;\n\
10
10
  in vec4 v_color;\n\
11
+ in float v_splitDirection;\n\
11
12
  \n\
12
13
  #ifdef SDF\n\
13
14
  in vec4 v_outlineColor;\n\
@@ -87,6 +88,9 @@ vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smo
87
88
  \n\
88
89
  void main()\n\
89
90
  {\n\
91
+ if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;\n\
92
+ if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;\n\
93
+ \n\
90
94
  vec4 color = texture(u_atlas, v_textureCoordinates);\n\
91
95
  \n\
92
96
  #ifdef SDF\n\
@@ -11,6 +11,7 @@ in vec4 scaleByDistance; // near, nearScale, far, far
11
11
  in vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale
12
12
  in vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions
13
13
  in vec2 sdf; // sdf outline color (rgb) and width (w)
14
+ in float splitDirection; // splitDirection
14
15
  #if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)
15
16
  in vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates
16
17
  #endif
@@ -28,6 +29,7 @@ out mat2 v_rotationMatrix;
28
29
 
29
30
  out vec4 v_pickColor;
30
31
  out vec4 v_color;
32
+ out float v_splitDirection;
31
33
  #ifdef SDF
32
34
  out vec4 v_outlineColor;
33
35
  out float v_outlineWidth;
@@ -430,5 +432,5 @@ if (lengthSq < disableDepthTestDistance) {
430
432
 
431
433
  v_color = color;
432
434
  v_color.a *= translucency;
433
-
435
+ v_splitDirection = splitDirection;
434
436
  }
@@ -12,6 +12,7 @@ in vec4 scaleByDistance; // near, nearScale, far, far
12
12
  in vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale\n\
13
13
  in vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions\n\
14
14
  in vec2 sdf; // sdf outline color (rgb) and width (w)\n\
15
+ in float splitDirection; // splitDirection\n\
15
16
  #if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\n\
16
17
  in vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates\n\
17
18
  #endif\n\
@@ -29,6 +30,7 @@ out mat2 v_rotationMatrix;\n\
29
30
  \n\
30
31
  out vec4 v_pickColor;\n\
31
32
  out vec4 v_color;\n\
33
+ out float v_splitDirection;\n\
32
34
  #ifdef SDF\n\
33
35
  out vec4 v_outlineColor;\n\
34
36
  out float v_outlineWidth;\n\
@@ -431,6 +433,6 @@ if (lengthSq < disableDepthTestDistance) {\n\
431
433
  \n\
432
434
  v_color = color;\n\
433
435
  v_color.a *= translucency;\n\
434
- \n\
436
+ v_splitDirection = splitDirection;\n\
435
437
  }\n\
436
438
  ";