@cesium/engine 22.2.0 → 23.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 (282) hide show
  1. package/Build/Workers/{chunk-YFEZPDAY.js → chunk-2GL2EUEE.js} +11 -11
  2. package/Build/Workers/{chunk-A3NUMZBG.js → chunk-2WI4HGJU.js} +6 -6
  3. package/Build/Workers/{chunk-3JB2X2PR.js → chunk-36LBFITA.js} +665 -366
  4. package/Build/Workers/{chunk-VSZ5DB2W.js → chunk-3B65YFXC.js} +1 -1
  5. package/Build/Workers/{chunk-PSHZAHFE.js → chunk-4LGFX2P5.js} +11 -11
  6. package/Build/Workers/{chunk-AMWXJ5A7.js → chunk-4UNQX2MP.js} +2 -2
  7. package/Build/Workers/{chunk-LDSQMLRC.js → chunk-52K3GJKG.js} +3 -3
  8. package/Build/Workers/{chunk-MSTAVM2N.js → chunk-56OHFSLH.js} +10 -10
  9. package/Build/Workers/{chunk-IWOSJVFQ.js → chunk-5A7YSAXT.js} +14 -14
  10. package/Build/Workers/{chunk-PMDPP22G.js → chunk-5JP5FG7U.js} +7 -7
  11. package/Build/Workers/{chunk-DIJ7IG5D.js → chunk-5R7SBUTW.js} +10 -10
  12. package/Build/Workers/chunk-5VKZVPO5.js +1829 -0
  13. package/Build/Workers/{chunk-L2FSBEW2.js → chunk-6FVFM2KB.js} +5 -5
  14. package/Build/Workers/{chunk-G6WQA27G.js → chunk-6SLGTBB2.js} +5 -5
  15. package/Build/Workers/{chunk-3HUEBDFC.js → chunk-7KRN6JPQ.js} +14 -14
  16. package/Build/Workers/{chunk-GMHDOQPH.js → chunk-AA33B6PU.js} +4 -4
  17. package/Build/Workers/{chunk-7CDQUIP5.js → chunk-AP6XWET5.js} +8 -8
  18. package/Build/Workers/{chunk-IVN5HSOI.js → chunk-APDKMX7W.js} +6 -6
  19. package/Build/Workers/{chunk-72LZ3FN6.js → chunk-ARCFIOKA.js} +12 -12
  20. package/Build/Workers/{chunk-UBJYWGMV.js → chunk-BNBD2YZK.js} +16 -16
  21. package/Build/Workers/{chunk-VGH2CSC7.js → chunk-DT5SJBKA.js} +29 -15
  22. package/Build/Workers/{chunk-ED4UXMYY.js → chunk-ESD4IEOU.js} +5 -5
  23. package/Build/Workers/{chunk-JFN2DQHY.js → chunk-FSDVXW7M.js} +5 -5
  24. package/Build/Workers/{chunk-JERDRSEI.js → chunk-G3YT7M7A.js} +1 -1
  25. package/Build/Workers/{chunk-NY3CWLIZ.js → chunk-GN5NEUDT.js} +8 -8
  26. package/Build/Workers/{chunk-O3GWUTWM.js → chunk-HYLEKKO5.js} +1 -1
  27. package/Build/Workers/{chunk-64PJ4MTB.js → chunk-HYTFXWMY.js} +7 -7
  28. package/Build/Workers/{chunk-FPRM6PCE.js → chunk-IFA7VHHP.js} +560 -306
  29. package/Build/Workers/{chunk-FM5XPC2E.js → chunk-IYVDOB5V.js} +4 -4
  30. package/Build/Workers/{chunk-P7ISUYLW.js → chunk-JUGY5AZN.js} +4 -4
  31. package/Build/Workers/{chunk-JONWM4IO.js → chunk-KPYU6YZG.js} +1 -1
  32. package/Build/Workers/{chunk-JUOSYFXT.js → chunk-L7RDJ4V7.js} +1 -1
  33. package/Build/Workers/{chunk-MWGB6DLR.js → chunk-LDQWNMEC.js} +1 -1
  34. package/Build/Workers/{chunk-C6FTHSJA.js → chunk-MQJG522T.js} +6 -6
  35. package/Build/Workers/{chunk-WH4HDRGN.js → chunk-MT5M7RLZ.js} +2 -2
  36. package/Build/Workers/{chunk-4ZQN7M7E.js → chunk-N4AWE7TZ.js} +10 -10
  37. package/Build/Workers/{chunk-SDUH3N6G.js → chunk-NAYRNPEP.js} +4 -4
  38. package/Build/Workers/{chunk-7OPRTZBT.js → chunk-NNHU33JK.js} +7 -7
  39. package/Build/Workers/{chunk-CQCEPC6N.js → chunk-NQCAZU7S.js} +13 -13
  40. package/Build/Workers/{chunk-35J4D6PX.js → chunk-NUYLNQKV.js} +2 -2
  41. package/Build/Workers/{chunk-I45CATZK.js → chunk-OC6X22PG.js} +9 -9
  42. package/Build/Workers/{chunk-7MGTX4WP.js → chunk-OHBM4YG4.js} +12 -12
  43. package/Build/Workers/{chunk-DCR62BCO.js → chunk-OMXN7YF4.js} +12 -12
  44. package/Build/Workers/{chunk-XPNY2VY3.js → chunk-OQ3EAJNW.js} +2 -2
  45. package/Build/Workers/{chunk-4I7BCCNU.js → chunk-OQBPOKPZ.js} +6 -6
  46. package/Build/Workers/{chunk-2JNPWPLE.js → chunk-PQVNT5CJ.js} +6 -6
  47. package/Build/Workers/{chunk-K64RQCRK.js → chunk-QA24Q62E.js} +17 -17
  48. package/Build/Workers/{chunk-K6BXEBAF.js → chunk-QQX7S5QT.js} +17 -17
  49. package/Build/Workers/{chunk-2YVTOY5Z.js → chunk-QTOHIXGF.js} +10 -10
  50. package/Build/Workers/{chunk-4MCPC4TE.js → chunk-R7M4XNPP.js} +8 -8
  51. package/Build/Workers/{chunk-C35SJ4QP.js → chunk-SGKTBHFQ.js} +13 -13
  52. package/Build/Workers/{chunk-BKYJBTHW.js → chunk-SQTRWKO2.js} +5 -5
  53. package/Build/Workers/{chunk-I4D5IP46.js → chunk-T43FXHNC.js} +7 -7
  54. package/Build/Workers/{chunk-QO6Z5UJE.js → chunk-UEEGWJJP.js} +2 -2
  55. package/Build/Workers/{chunk-ZUWF63QU.js → chunk-WKXDCVBO.js} +4 -4
  56. package/Build/Workers/{chunk-N5MNKWED.js → chunk-Y5AJSEEN.js} +2 -2
  57. package/Build/Workers/{chunk-V26Y7ZQL.js → chunk-ZIW5FCIW.js} +37 -27
  58. package/Build/Workers/combineGeometry.js +24 -24
  59. package/Build/Workers/createBoxGeometry.js +18 -18
  60. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  61. package/Build/Workers/createCircleGeometry.js +26 -26
  62. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  63. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  64. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  65. package/Build/Workers/createCorridorGeometry.js +29 -29
  66. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  67. package/Build/Workers/createCylinderGeometry.js +20 -20
  68. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  69. package/Build/Workers/createEllipseGeometry.js +26 -26
  70. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  71. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  72. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  73. package/Build/Workers/createFrustumGeometry.js +18 -18
  74. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  75. package/Build/Workers/createGeometry.js +24 -24
  76. package/Build/Workers/createGroundPolylineGeometry.js +22 -22
  77. package/Build/Workers/createPlaneGeometry.js +16 -16
  78. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  79. package/Build/Workers/createPolygonGeometry.js +32 -32
  80. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  81. package/Build/Workers/createPolylineGeometry.js +25 -25
  82. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  83. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  84. package/Build/Workers/createRectangleGeometry.js +27 -27
  85. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  86. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  87. package/Build/Workers/createSphereGeometry.js +19 -19
  88. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  89. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  90. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  91. package/Build/Workers/createVectorTileGeometries.js +24 -24
  92. package/Build/Workers/createVectorTilePoints.js +13 -13
  93. package/Build/Workers/createVectorTilePolygons.js +22 -22
  94. package/Build/Workers/createVectorTilePolylines.js +14 -14
  95. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  96. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
  97. package/Build/Workers/createVerticesFromHeightmap.js +22 -22
  98. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  99. package/Build/Workers/createWallGeometry.js +24 -24
  100. package/Build/Workers/createWallOutlineGeometry.js +23 -23
  101. package/Build/Workers/decodeDraco.js +10 -10
  102. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  103. package/Build/Workers/decodeI3S.js +10 -10
  104. package/Build/Workers/gaussianSplatSorter.js +4 -4
  105. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  106. package/Build/Workers/incrementallyBuildTerrainPicker.js +20 -12
  107. package/Build/Workers/transcodeKTX2.js +6 -6
  108. package/Build/Workers/transferTypedArrayTest.js +1 -1
  109. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
  110. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  111. package/Source/Core/AttributeCompression.js +53 -6
  112. package/Source/Core/BoxGeometry.js +1 -1
  113. package/Source/Core/Cartesian2.js +689 -684
  114. package/Source/Core/Cartesian3.js +1044 -1043
  115. package/Source/Core/Cartesian4.js +816 -813
  116. package/Source/Core/CornerType.js +1 -1
  117. package/Source/Core/CorridorGeometry.js +1 -1
  118. package/Source/Core/FeatureDetection.js +1 -32
  119. package/Source/Core/Geometry.js +1 -1
  120. package/Source/Core/GoogleMaps.js +23 -2
  121. package/Source/Core/IntersectionTests.js +2 -2
  122. package/Source/Core/Ion.js +1 -1
  123. package/Source/Core/OpenCageGeocoderService.js +2 -3
  124. package/Source/Core/PinBuilder.js +1 -1
  125. package/Source/Core/PolygonGeometry.js +1 -1
  126. package/Source/Core/PolylineGeometry.js +1 -1
  127. package/Source/Core/PolylineVolumeGeometry.js +1 -1
  128. package/Source/Core/RectangleGeometry.js +1 -1
  129. package/Source/Core/ScreenSpaceEventHandler.js +4 -8
  130. package/Source/Core/TerrainMesh.js +11 -8
  131. package/Source/Core/TerrainPicker.js +24 -7
  132. package/Source/Core/VideoSynchronizer.js +1 -1
  133. package/Source/Core/WallGeometry.js +1 -1
  134. package/Source/Core/globalTypes.js +16 -0
  135. package/Source/Core/writeTextToCanvas.js +40 -86
  136. package/Source/DataSources/BillboardGraphics.js +1 -1
  137. package/Source/DataSources/BoxGraphics.js +1 -1
  138. package/Source/DataSources/CallbackPositionProperty.js +1 -1
  139. package/Source/DataSources/CorridorGraphics.js +1 -1
  140. package/Source/DataSources/CzmlDataSource.js +1 -1
  141. package/Source/DataSources/EllipseGraphics.js +1 -1
  142. package/Source/DataSources/EllipsoidGraphics.js +1 -1
  143. package/Source/DataSources/Entity.js +1 -1
  144. package/Source/DataSources/EntityCluster.js +2 -2
  145. package/Source/DataSources/GeoJsonDataSource.js +2 -2
  146. package/Source/DataSources/GpxDataSource.js +1 -1
  147. package/Source/DataSources/KmlDataSource.js +1 -1
  148. package/Source/DataSources/KmlTour.js +1 -1
  149. package/Source/DataSources/LabelGraphics.js +1 -1
  150. package/Source/DataSources/ModelGraphics.js +1 -1
  151. package/Source/DataSources/PlaneGraphics.js +1 -1
  152. package/Source/DataSources/PolygonGraphics.js +1 -1
  153. package/Source/DataSources/PolylineGraphics.js +1 -1
  154. package/Source/DataSources/PolylineVolumeGraphics.js +1 -1
  155. package/Source/DataSources/RectangleGraphics.js +1 -1
  156. package/Source/DataSources/WallGraphics.js +1 -1
  157. package/Source/DataSources/exportKml.js +1 -1
  158. package/Source/Renderer/Context.js +11 -10
  159. package/Source/Renderer/ContextLimits.js +66 -33
  160. package/Source/Renderer/ShaderDestination.js +54 -13
  161. package/Source/Renderer/ShaderSource.js +19 -18
  162. package/Source/Renderer/Texture.js +1 -1
  163. package/Source/Renderer/Texture3D.js +166 -7
  164. package/Source/Renderer/TextureAtlas.js +2 -2
  165. package/Source/Scene/Appearance.js +1 -1
  166. package/Source/Scene/ArcGisMapService.js +1 -1
  167. package/Source/Scene/Billboard.js +8 -5
  168. package/Source/Scene/BillboardCollection.js +65 -26
  169. package/Source/Scene/BillboardTexture.js +4 -1
  170. package/Source/Scene/BufferLoader.js +65 -74
  171. package/Source/Scene/Camera.js +13 -2
  172. package/Source/Scene/ClippingPlaneCollection.js +2 -2
  173. package/Source/Scene/CloudCollection.js +2 -2
  174. package/Source/Scene/CubeMapPanorama.js +351 -0
  175. package/Source/Scene/CumulusCloud.js +1 -1
  176. package/Source/Scene/DerivedCommand.js +8 -31
  177. package/Source/Scene/DracoLoader.js +79 -78
  178. package/Source/Scene/DynamicEnvironmentMapManager.js +41 -26
  179. package/Source/Scene/EquirectangularPanorama.js +264 -0
  180. package/Source/Scene/Fog.js +1 -1
  181. package/Source/Scene/FrameState.js +7 -0
  182. package/Source/Scene/GaussianSplatPrimitive.js +907 -168
  183. package/Source/Scene/Globe.js +3 -10
  184. package/Source/Scene/GlobeSurfaceShaderSet.js +36 -32
  185. package/Source/Scene/GltfBufferViewLoader.js +109 -118
  186. package/Source/Scene/GltfDracoLoader.js +167 -176
  187. package/Source/Scene/GltfImageLoader.js +91 -101
  188. package/Source/Scene/GltfIndexBufferLoader.js +228 -241
  189. package/Source/Scene/GltfJsonLoader.js +90 -99
  190. package/Source/Scene/GltfLoader.js +323 -324
  191. package/Source/Scene/GltfSpzLoader.js +127 -134
  192. package/Source/Scene/GltfStructuralMetadataLoader.js +181 -186
  193. package/Source/Scene/GltfTextureLoader.js +217 -231
  194. package/Source/Scene/GltfVertexBufferLoader.js +267 -276
  195. package/Source/Scene/GoogleStreetViewCubeMapPanoramaProvider.js +341 -0
  196. package/Source/Scene/ImageBasedLighting.js +2 -2
  197. package/Source/Scene/ImageryLayerCollection.js +2 -2
  198. package/Source/Scene/ImageryProvider.js +2 -2
  199. package/Source/Scene/Label.js +7 -5
  200. package/Source/Scene/LabelCollection.js +60 -2
  201. package/Source/Scene/Material.js +1 -1
  202. package/Source/Scene/MaterialAppearance.js +1 -1
  203. package/Source/Scene/Megatexture.js +174 -242
  204. package/Source/Scene/MetadataClassProperty.js +212 -7
  205. package/Source/Scene/MetadataComponentType.js +162 -127
  206. package/Source/Scene/MetadataSchemaLoader.js +60 -67
  207. package/Source/Scene/MetadataTable.js +14 -0
  208. package/Source/Scene/MetadataTableProperty.js +14 -0
  209. package/Source/Scene/Model/B3dmLoader.js +216 -224
  210. package/Source/Scene/Model/CustomShader.js +6 -1
  211. package/Source/Scene/Model/CustomShaderPipelineStage.js +122 -7
  212. package/Source/Scene/Model/GeoJsonLoader.js +53 -61
  213. package/Source/Scene/Model/GeometryPipelineStage.js +17 -3
  214. package/Source/Scene/Model/I3dmLoader.js +232 -240
  215. package/Source/Scene/Model/MaterialPipelineStage.js +17 -0
  216. package/Source/Scene/Model/MetadataPipelineStage.js +438 -22
  217. package/Source/Scene/Model/Model.js +1 -1
  218. package/Source/Scene/Model/PntsLoader.js +78 -89
  219. package/Source/Scene/ModelComponents.js +10 -0
  220. package/Source/Scene/Panorama.js +53 -0
  221. package/Source/Scene/PanoramaProvider.js +43 -0
  222. package/Source/Scene/ParticleSystem.js +2 -2
  223. package/Source/Scene/PointPrimitive.js +1 -1
  224. package/Source/Scene/PointPrimitiveCollection.js +14 -22
  225. package/Source/Scene/Polyline.js +0 -1
  226. package/Source/Scene/PolylineCollection.js +1 -4
  227. package/Source/Scene/PolylineColorAppearance.js +1 -6
  228. package/Source/Scene/PolylineMaterialAppearance.js +1 -6
  229. package/Source/Scene/PostProcessStageCollection.js +1 -1
  230. package/Source/Scene/PropertyTable.js +43 -0
  231. package/Source/Scene/PropertyTexture.js +1 -1
  232. package/Source/Scene/PropertyTextureProperty.js +0 -97
  233. package/Source/Scene/QuadtreePrimitive.js +6 -3
  234. package/Source/Scene/ResourceLoader.js +84 -92
  235. package/Source/Scene/Scene.js +12 -0
  236. package/Source/Scene/ShadowMap.js +1 -2
  237. package/Source/Scene/SkyBox.js +29 -164
  238. package/Source/Scene/StructuralMetadata.js +18 -3
  239. package/Source/Scene/Vector3DTileClampedPolylines.js +1 -5
  240. package/Source/Scene/Vector3DTilePolylines.js +1 -5
  241. package/Source/Scene/VoxelPrimitive.js +16 -33
  242. package/Source/Scene/VoxelRenderResources.js +1 -8
  243. package/Source/Scene/VoxelTraversal.js +16 -61
  244. package/Source/Scene/WebMapTileServiceImageryProvider.js +1 -1
  245. package/Source/Scene/createElevationBandMaterial.js +1 -1
  246. package/Source/Scene/parseStructuralMetadata.js +244 -0
  247. package/Source/Scene/processVoxelProperties.js +1 -1
  248. package/Source/Shaders/BillboardCollectionFS.glsl +66 -40
  249. package/Source/Shaders/BillboardCollectionFS.js +67 -40
  250. package/Source/Shaders/BillboardCollectionVS.glsl +22 -31
  251. package/Source/Shaders/BillboardCollectionVS.js +22 -31
  252. package/Source/Shaders/Builtin/CzmBuiltins.js +4 -0
  253. package/Source/Shaders/Builtin/Functions/columbusViewMorph.glsl +8 -1
  254. package/Source/Shaders/Builtin/Functions/columbusViewMorph.js +8 -1
  255. package/Source/Shaders/Builtin/Functions/decodeRGB8.glsl +22 -0
  256. package/Source/Shaders/Builtin/Functions/decodeRGB8.js +24 -0
  257. package/Source/Shaders/Builtin/Functions/unpackTexture.glsl +35 -0
  258. package/Source/Shaders/Builtin/Functions/unpackTexture.js +37 -0
  259. package/Source/Shaders/CubeMapPanoramaVS.glsl +11 -0
  260. package/Source/Shaders/CubeMapPanoramaVS.js +13 -0
  261. package/Source/Shaders/Model/MetadataStageFS.glsl +2 -1
  262. package/Source/Shaders/Model/MetadataStageFS.js +2 -1
  263. package/Source/Shaders/Model/MetadataStageVS.glsl +2 -1
  264. package/Source/Shaders/Model/MetadataStageVS.js +2 -1
  265. package/Source/Shaders/Model/ModelFS.glsl +9 -1
  266. package/Source/Shaders/Model/ModelFS.js +9 -1
  267. package/Source/Shaders/Model/ModelVS.glsl +4 -2
  268. package/Source/Shaders/Model/ModelVS.js +4 -2
  269. package/Source/Shaders/PointPrimitiveCollectionVS.glsl +8 -39
  270. package/Source/Shaders/PointPrimitiveCollectionVS.js +8 -39
  271. package/Source/Shaders/Voxels/IntersectionUtils.glsl +1 -1
  272. package/Source/Shaders/Voxels/IntersectionUtils.js +1 -1
  273. package/Source/Shaders/Voxels/Megatexture.glsl +15 -83
  274. package/Source/Shaders/Voxels/Megatexture.js +15 -83
  275. package/Source/Shaders/Voxels/Octree.glsl +6 -9
  276. package/Source/Shaders/Voxels/Octree.js +6 -9
  277. package/Source/Widget/CesiumWidget.js +1 -1
  278. package/Source/Workers/incrementallyBuildTerrainPicker.js +16 -2
  279. package/index.d.ts +582 -193
  280. package/index.js +91 -83
  281. package/package.json +2 -1
  282. package/Build/Workers/chunk-ZGWX2R5I.js +0 -1443
@@ -0,0 +1,341 @@
1
+ import DeveloperError from "../Core/DeveloperError.js";
2
+ import defined from "../Core/defined.js";
3
+ import Resource from "../Core/Resource.js";
4
+ import Cartesian3 from "../Core/Cartesian3.js";
5
+ import Cartographic from "../Core/Cartographic.js";
6
+ import Matrix3 from "../Core/Matrix3.js";
7
+ import Matrix4 from "../Core/Matrix4.js";
8
+ import CesiumMath from "../Core/Math.js";
9
+ import Transforms from "../Core/Transforms.js";
10
+ import Frozen from "../Core/Frozen.js";
11
+ import Ellipsoid from "../Core/Ellipsoid.js";
12
+ import GoogleMaps from "../Core/GoogleMaps.js";
13
+ import CubeMapPanorama from "./CubeMapPanorama.js";
14
+
15
+ const DEFAULT_TILE_SIZE = 600;
16
+
17
+ /**
18
+ * <div class="notice">
19
+ * This object is normally not instantiated directly, use {@link GoogleStreetViewCubeMapPanoramaProvider.fromUrl}.
20
+ * </div>
21
+ *
22
+ *
23
+ * Creates a {@link PanoramaProvider} which provides imagery from {@link https://developers.google.com/maps/documentation/streetview|Google Street View Static API} to be displayed in a panorama.
24
+ *
25
+ * @alias GoogleStreetViewCubeMapPanoramaProvider
26
+ * @constructor
27
+ *
28
+ * @see CubeMapPanorama
29
+ *
30
+ * @demo {@link https://sandcastle.cesium.com/index.html?id=google-streetview-panorama|Cesium Sandcastle Google Streetview Panorama}
31
+ *
32
+ */
33
+ function GoogleStreetViewCubeMapPanoramaProvider(options) {
34
+ options = options ?? Frozen.EMPTY_OBJECT;
35
+ this._key = defined(options.key) ? options.key : GoogleMaps.defaultApiKey;
36
+
37
+ this._baseResource = Resource.createIfNeeded(
38
+ options.url ?? GoogleMaps.streetViewStaticApiEndpoint,
39
+ );
40
+
41
+ this._metadataResource = this._baseResource.getDerivedResource({
42
+ url: "streetview/metadata",
43
+ });
44
+
45
+ this._tileSize = options.tileSize ?? DEFAULT_TILE_SIZE;
46
+ }
47
+
48
+ Object.defineProperties(GoogleStreetViewCubeMapPanoramaProvider.prototype, {});
49
+
50
+ /**
51
+ * Gets the panorama primitive for a requested position and orientation.
52
+ * @param {object} options Object with the following properties:
53
+ * @param {Cartographic} options.cartographic The position to place the panorama in the scene.
54
+ * @param {string} [options.panoId] The panoramaId identifier for the image in the Google API. If not provided this will be looked up for the provided cartographic location.
55
+ * @param {number} [options.tileSize] - Optional tile size override (square).
56
+ * @param {string} [options.signature] - Optional signature for signed URLs. See {@link https://developers.google.com/maps/documentation/streetview/digital-signature} for more information.
57
+ * @param {Credit|string} [options.credit] A credit for the data source, which is displayed on the canvas.
58
+ *
59
+ * @returns {CubeMapPanorama} The panorama primitive textured with imagery.
60
+ *
61
+ * @example
62
+ *
63
+ * const provider = await Cesium.GoogleStreetViewCubeMapPanoramaProvider.fromUrl({
64
+ * key: 'your Google Streetview Static api key'
65
+ * })
66
+ *
67
+ * const panoIdObject = provider.getNearestPanoId(position);
68
+ * const position = Cartographic.fromDegrees(panoIdObject.location.lng, panoIdObject.location.lat, 0);
69
+ *
70
+ * const primitive = await provider.loadPanorama({
71
+ * cartographic: position,
72
+ * panoId: panoIdObject.panoId
73
+ * });
74
+ * viewer.scene.primitive.add(primitive);
75
+ *
76
+ */
77
+ GoogleStreetViewCubeMapPanoramaProvider.prototype.loadPanorama =
78
+ async function (options) {
79
+ const cartographic = options.cartographic;
80
+ //>>includeStart('debug', pragmas.debug);
81
+ if (!defined(options.cartographic)) {
82
+ throw new DeveloperError("options.cartographic is required.");
83
+ }
84
+ //>>includeEnd('debug');
85
+
86
+ const tileSize = options.tileSize ?? this._tileSize;
87
+ const tileSizeString = `${tileSize}x${tileSize}`;
88
+
89
+ const signature = options.signature;
90
+
91
+ let { panoId } = options;
92
+
93
+ if (!defined(panoId)) {
94
+ const panoIdObject = await this.getNearestPanoId(cartographic);
95
+ panoId = panoIdObject.panoId;
96
+ }
97
+
98
+ const credit = GoogleMaps.getDefaultCredit();
99
+
100
+ const posObj = Cartesian3.fromDegrees(
101
+ CesiumMath.toDegrees(cartographic.longitude),
102
+ CesiumMath.toDegrees(cartographic.latitude),
103
+ 0,
104
+ );
105
+
106
+ const facePromises = [
107
+ this._loadFaceImage({
108
+ heading: 0,
109
+ pitch: 0,
110
+ tileSizeString,
111
+ panoId,
112
+ signature,
113
+ }),
114
+ this._loadFaceImage({
115
+ heading: 180,
116
+ pitch: 0,
117
+ tileSizeString,
118
+ panoId,
119
+ signature,
120
+ }),
121
+ this._loadFaceImage({
122
+ heading: -90,
123
+ pitch: -90,
124
+ tileSizeString,
125
+ panoId,
126
+ signature,
127
+ }),
128
+ this._loadFaceImage({
129
+ heading: -90,
130
+ pitch: 90,
131
+ tileSizeString,
132
+ panoId,
133
+ signature,
134
+ }),
135
+ this._loadFaceImage({
136
+ heading: 270,
137
+ pitch: 0,
138
+ tileSizeString,
139
+ panoId,
140
+ signature,
141
+ }),
142
+ this._loadFaceImage({
143
+ heading: 90,
144
+ pitch: 0,
145
+ tileSizeString,
146
+ panoId,
147
+ signature,
148
+ }),
149
+ ];
150
+
151
+ const [positiveX, negativeX, positiveY, negativeY, positiveZ, negativeZ] =
152
+ await Promise.all(facePromises);
153
+
154
+ const northDownEastToFixedFrameTransform =
155
+ Transforms.localFrameToFixedFrameGenerator("north", "down");
156
+
157
+ const transform = Matrix4.getMatrix3(
158
+ northDownEastToFixedFrameTransform(posObj, Ellipsoid.default),
159
+ new Matrix3(),
160
+ );
161
+
162
+ const panorama = new CubeMapPanorama({
163
+ sources: {
164
+ positiveX,
165
+ negativeX,
166
+ positiveY,
167
+ negativeY,
168
+ positiveZ,
169
+ negativeZ,
170
+ },
171
+ transform: transform,
172
+ credit,
173
+ });
174
+
175
+ return panorama;
176
+ };
177
+
178
+ /**
179
+ * Gets the panoIds for the given cartographic location. See {@link https://developers.google.com/maps/documentation/tile/streetview#panoid-search}.
180
+
181
+ * @param {Cartographic} position The position to search for the nearest panoId.
182
+ * @param {number} [radius=50] The radius in meters to search for the nearest panoId.
183
+ *
184
+ * @returns {Object} an object containing a panoId, latitude, and longitude of the closest panorama
185
+ *
186
+ * @example
187
+ *
188
+ * const provider = await Cesium.GoogleStreetViewCubeMapPanoramaProvider.fromUrl({
189
+ * key: 'your Google Streetview Static api key'
190
+ * })
191
+ * const panoIds = provider.getNearestPanoId(position);
192
+ */
193
+ GoogleStreetViewCubeMapPanoramaProvider.prototype.getNearestPanoId =
194
+ async function (position, radius) {
195
+ //>>includeStart('debug', pragmas.debug);
196
+ if (!defined(position)) {
197
+ throw new DeveloperError("position is required.");
198
+ }
199
+ //>>includeEnd('debug');
200
+
201
+ const pos = [
202
+ CesiumMath.toDegrees(position.latitude),
203
+ CesiumMath.toDegrees(position.longitude),
204
+ ];
205
+ const posString = pos.join(",");
206
+
207
+ const resource = this._metadataResource.getDerivedResource({
208
+ queryParameters: {
209
+ key: this._key,
210
+ location: posString,
211
+ radius: radius ?? 50,
212
+ },
213
+ });
214
+
215
+ const panoIdObject = await resource.fetchJson();
216
+
217
+ if (panoIdObject.status !== "OK") {
218
+ throw new DeveloperError(
219
+ `GoogleStreetViewCubeMapPanoramaProvider metadata error: ${panoIdObject.status}`,
220
+ );
221
+ }
222
+ return {
223
+ panoId: panoIdObject.pano_id,
224
+ latitude: panoIdObject.location.lat,
225
+ longitude: panoIdObject.location.lng,
226
+ };
227
+ };
228
+
229
+ /**
230
+ * Gets metadata for panoId. See {@link https://developers.google.com/maps/documentation/tile/streetview#metadata_response} for response object.
231
+ * @param {string} panoId
232
+ *
233
+ * @returns {object} object containing metadata for the panoId.
234
+ *
235
+ * @example
236
+ * const panoIdObject = provider.getNearestPanoId(position);
237
+ * const panoIdMetadata = provider.getPanoIdMetadata(panoIdObject.panoId);
238
+ *
239
+ */
240
+ GoogleStreetViewCubeMapPanoramaProvider.prototype.getPanoIdMetadata =
241
+ async function (panoId) {
242
+ const resource = this._metadataResource.getDerivedResource({
243
+ queryParameters: {
244
+ key: this._key,
245
+ pano: panoId,
246
+ },
247
+ });
248
+
249
+ const panoIdObject = await resource.fetchJson();
250
+
251
+ if (panoIdObject.status !== "OK") {
252
+ throw new DeveloperError(
253
+ `GoogleStreetViewCubeMapPanoramaProvider metadata error: ${panoIdObject.status}`,
254
+ );
255
+ }
256
+ return panoIdObject;
257
+ };
258
+
259
+ GoogleStreetViewCubeMapPanoramaProvider.prototype._loadFaceImage =
260
+ async function (options) {
261
+ const url = this._buildFaceUrl(options);
262
+
263
+ try {
264
+ return await Resource.fetchImage({
265
+ url,
266
+ preferImageBitmap: true,
267
+ flipY: true,
268
+ });
269
+ } catch (error) {
270
+ throw new DeveloperError(`Failed to load Street View face image: ${url}`);
271
+ }
272
+ };
273
+
274
+ GoogleStreetViewCubeMapPanoramaProvider.prototype._buildFaceUrl = function (
275
+ options,
276
+ ) {
277
+ const { heading, pitch, tileSizeString, panoId, signature } = options;
278
+ const resource = this._baseResource.getDerivedResource({
279
+ queryParameters: {
280
+ size: tileSizeString,
281
+ pano: panoId,
282
+ heading,
283
+ pitch,
284
+ key: this._key,
285
+ ...(defined(signature) && { signature }),
286
+ },
287
+ });
288
+
289
+ return resource.url;
290
+ };
291
+
292
+ /**
293
+ * Creates a {@link PanoramaProvider} which provides cube face images from the {@link https://developers.google.com/maps/documentation/streetview|Google Street View Static API}.
294
+ * @param {object} options Object with the following properties:
295
+ * @param {string} [options.key=GoogleMaps.defaultStreetViewStaticApiKey] Your API key to access Google Street View Static API. See {@link https://developers.google.com/maps/documentation/javascript/get-api-key} for instructions on how to create your own key. If undefined, defaults to {@link GoogleMaps.defaultStreetViewStaticApiKey}. If that value is unavailable, falls back to {@link GoogleMaps.defaultApiKey}.
296
+ * @param {string|Resource} [options.url=GoogleMaps.streetViewStaticApiEndpoint] The URL to access Google Street View Static API. See {@link https://developers.google.com/maps/documentation/streetview/overview} for more information.
297
+ * @param {number} [options.tileSize=600] Default width and height (in pixels) of each square tile.
298
+ * @param {Credit|string} [options.credit] A credit for the data source, which is displayed on the canvas.
299
+ *
300
+ * @returns {Promise<GoogleStreetViewCubeMapPanoramaProvider>} A promise that resolves to the created GoogleStreetViewCubeMapPanoramaProvider.'
301
+ *
302
+ * @example
303
+ * const provider = await Cesium.GoogleStreetViewCubeMapPanoramaProvider.fromUrl({
304
+ * key: 'your Google Streetview Static api key'
305
+ * })
306
+ */
307
+ GoogleStreetViewCubeMapPanoramaProvider.fromUrl = async function (options) {
308
+ options = options ?? {};
309
+ options.key =
310
+ options.key ??
311
+ GoogleMaps.defaultStreetViewStaticApiKey ??
312
+ GoogleMaps.defaultApiKey;
313
+ if (
314
+ !defined(options.key) &&
315
+ !defined(GoogleMaps.defaultStreetViewStaticApiKey) &&
316
+ !defined(GoogleMaps.defaultApiKey)
317
+ ) {
318
+ throw new DeveloperError(
319
+ "options.key, GoogleMaps.defaultStreetViewStaticApiKey or GoogleMaps.defaultApiKey is required.",
320
+ );
321
+ }
322
+
323
+ return new GoogleStreetViewCubeMapPanoramaProvider({
324
+ ...options,
325
+ });
326
+ };
327
+
328
+ GoogleStreetViewCubeMapPanoramaProvider._parseMetadata = function (
329
+ panoIdMetadata,
330
+ ) {
331
+ const cartographic = Cartographic.fromDegrees(
332
+ panoIdMetadata.location.lng,
333
+ panoIdMetadata.location.lat,
334
+ 0,
335
+ );
336
+ return {
337
+ cartographic,
338
+ };
339
+ };
340
+
341
+ export default GoogleStreetViewCubeMapPanoramaProvider;
@@ -162,7 +162,7 @@ Object.defineProperties(ImageBasedLighting.prototype, {
162
162
  * @memberof ImageBasedLighting.prototype
163
163
  *
164
164
  * @type {Cartesian3[]}
165
- * @demo {@link https://sandcastle.cesium.com/index.html?src=Image-Based Lighting.html|Sandcastle Image Based Lighting Demo}
165
+ * @demo {@link https://sandcastle.cesium.com/index.html?id=image-based-lighting|Sandcastle Image Based Lighting Demo}
166
166
  * @see {@link https://graphics.stanford.edu/papers/envmap/envmap.pdf|An Efficient Representation for Irradiance Environment Maps}
167
167
  */
168
168
  sphericalHarmonicCoefficients: {
@@ -187,7 +187,7 @@ Object.defineProperties(ImageBasedLighting.prototype, {
187
187
  * A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
188
188
  *
189
189
  * @memberof ImageBasedLighting.prototype
190
- * @demo {@link https://sandcastle.cesium.com/index.html?src=Image-Based Lighting.html|Sandcastle Image Based Lighting Demo}
190
+ * @demo {@link https://sandcastle.cesium.com/index.html?id=image-based-lighting|Sandcastle Image Based Lighting Demo}
191
191
  * @type {string}
192
192
  * @see ImageBasedLighting#sphericalHarmonicCoefficients
193
193
  */
@@ -13,8 +13,8 @@ import ImageryLayer from "./ImageryLayer.js";
13
13
  * @constructor
14
14
  * @see {@link Scene#imageryLayers} for manipulating imagery layers on the globe.
15
15
  * @see {@link Cesium3DTileset#imageryLayers} for manipulating imagery layers on a 3D tileset.
16
- * @demo {@link https://sandcastle.cesium.com/index.html?src=Imagery%20Adjustment.html|Cesium Sandcastle Imagery Adjustment Demo}
17
- * @demo {@link https://sandcastle.cesium.com/index.html?src=Imagery%20Layers%20Manipulation.html|Cesium Sandcastle Imagery Manipulation Demo}
16
+ * @demo {@link https://sandcastle.cesium.com/index.html?id=imagery-adjustment|Cesium Sandcastle Imagery Adjustment Demo}
17
+ * @demo {@link https://sandcastle.cesium.com/index.html?id=imagery-layers-manipulation|Cesium Sandcastle Imagery Manipulation Demo}
18
18
  */
19
19
  function ImageryLayerCollection() {
20
20
  this._layers = [];
@@ -39,8 +39,8 @@ import Resource from "../Core/Resource.js";
39
39
  * @see WebMapServiceImageryProvider
40
40
  * @see WebMapTileServiceImageryProvider
41
41
  *
42
- * @demo {@link https://sandcastle.cesium.com/index.html?src=Imagery%20Layers.html|Cesium Sandcastle Imagery Layers Demo}
43
- * @demo {@link https://sandcastle.cesium.com/index.html?src=Imagery%20Layers%20Manipulation.html|Cesium Sandcastle Imagery Manipulation Demo}
42
+ * @demo {@link https://sandcastle.cesium.com/index.html?id=imagery-layers|Cesium Sandcastle Imagery Layers Demo}
43
+ * @demo {@link https://sandcastle.cesium.com/index.html?id=imagery-layers-manipulation|Cesium Sandcastle Imagery Manipulation Demo}
44
44
  */
45
45
  function ImageryProvider() {
46
46
  DeveloperError.throwInstantiationError();
@@ -112,7 +112,7 @@ function parseFont(label) {
112
112
  * @property {NearFarScalar} [pixelOffsetScaleByDistance] A {@link NearFarScalar} specifying near and far pixel offset scaling properties of the label based on the label's distance from the camera.
113
113
  * @property {NearFarScalar} [scaleByDistance] A {@link NearFarScalar} specifying near and far scaling properties of the label based on the label's distance from the camera.
114
114
  * @property {DistanceDisplayCondition} [distanceDisplayCondition] A {@link DistanceDisplayCondition} specifying at what distance from the camera that this label will be displayed.
115
- * @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.
115
+ * @property {number} [disableDepthTestDistance] The distance from the camera, beyond which, depth testing is disabled—to, for example, prevent clipping against terrain.
116
116
  */
117
117
 
118
118
  /**
@@ -134,7 +134,7 @@ function parseFont(label) {
134
134
  * @see LabelCollection
135
135
  * @see LabelCollection#add
136
136
  *
137
- * @demo {@link https://sandcastle.cesium.com/index.html?src=Labels.html|Cesium Sandcastle Labels Demo}
137
+ * @demo {@link https://sandcastle.cesium.com/index.html?id=labels|Cesium Sandcastle Labels Demo}
138
138
  */
139
139
  function Label(options, labelCollection) {
140
140
  options = options ?? Frozen.EMPTY_OBJECT;
@@ -1048,10 +1048,12 @@ Object.defineProperties(Label.prototype, {
1048
1048
  },
1049
1049
 
1050
1050
  /**
1051
- * Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
1052
- * When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
1051
+ * Gets or sets the distance from the camera, beyond which, depth testing is disabled—to, for example, prevent clipping against terrain.
1052
+ * When set to <code>undefined</code> or
1053
+ * <code>0</code>, the depth test is always applied. When set to Number.<code>POSITIVE_INFINITY</code>, the depth test is never applied.
1053
1054
  * @memberof Label.prototype
1054
- * @type {number}
1055
+ * @type {number|undefined}
1056
+ * @default undefined
1055
1057
  */
1056
1058
  disableDepthTestDistance: {
1057
1059
  get: function () {
@@ -19,6 +19,7 @@ import SDFSettings from "./SDFSettings.js";
19
19
  import TextureAtlas from "../Renderer/TextureAtlas.js";
20
20
  import VerticalOrigin from "./VerticalOrigin.js";
21
21
  import GraphemeSplitter from "grapheme-splitter";
22
+ import { Check } from "@cesium/engine";
22
23
 
23
24
  /**
24
25
  * A glyph represents a single character in label.
@@ -593,7 +594,8 @@ function destroyLabel(labelCollection, label) {
593
594
  * is used for rendering both opaque and translucent labels. However, if either all of the labels are completely opaque or all are completely translucent,
594
595
  * setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
595
596
  * @param {boolean} [options.show=true] Determines if the labels in the collection will be shown.
596
- *
597
+ * @param {number} [options.coarseDepthTestDistance] The distance from the camera, beyond which, labels are depth-tested against an approximation of the globe ellipsoid rather than against the full globe depth buffer. If unspecified, the default value is determined relative to the value of {@link Ellipsoid.default}.
598
+ * @param {number} [options.threePointDepthTestDistance] The distance from the camera, within which, lables with a {@link Label#heightReference} value of {@link HeightReference.CLAMP_TO_GROUND} or {@link HeightReference.CLAMP_TO_TERRAIN} are depth tested against three key points. This ensures that if any key point of the label is visible, the whole label will be visible. If unspecified, the default value is determined relative to the value of {@link Ellipsoid.default}.
597
599
  * @performance For best performance, prefer a few collections, each with many labels, to
598
600
  * many collections with only a few labels each. Avoid having collections where some
599
601
  * labels change every frame and others do not; instead, create one or more collections
@@ -604,7 +606,7 @@ function destroyLabel(labelCollection, label) {
604
606
  * @see Label
605
607
  * @see BillboardCollection
606
608
  *
607
- * @demo {@link https://sandcastle.cesium.com/index.html?src=Labels.html|Cesium Sandcastle Labels Demo}
609
+ * @demo {@link https://sandcastle.cesium.com/index.html?id=labels|Cesium Sandcastle Labels Demo}
608
610
  *
609
611
  * @example
610
612
  * // Create a label collection with two labels
@@ -629,6 +631,8 @@ function LabelCollection(options) {
629
631
  textureAtlas: new TextureAtlas({
630
632
  initialSize: whitePixelSize,
631
633
  }),
634
+ coarseDepthTestDistance: options.coarseDepthTestDistance,
635
+ threePointDepthTestDistance: options.threePointDepthTestDistance,
632
636
  });
633
637
  this._backgroundBillboardCollection = backgroundBillboardCollection;
634
638
  this._backgroundBillboardTexture = new BillboardTexture(
@@ -638,6 +642,8 @@ function LabelCollection(options) {
638
642
  this._glyphBillboardCollection = new BillboardCollection({
639
643
  scene: this._scene,
640
644
  batchTable: this._batchTable,
645
+ coarseDepthTestDistance: options.coarseDepthTestDistance,
646
+ threePointDepthTestDistance: options.threePointDepthTestDistance,
641
647
  });
642
648
  this._glyphBillboardCollection._sdf = true;
643
649
 
@@ -759,6 +765,58 @@ Object.defineProperties(LabelCollection.prototype, {
759
765
  return this._glyphBillboardCollection.ready;
760
766
  },
761
767
  },
768
+
769
+ /**
770
+ * The distance from the camera, beyond which, labels are depth-tested against an approximation of
771
+ * the globe ellipsoid rather than against the full globe depth buffer. When set to <code>0</code>, the
772
+ * approximate depth test is always applied. When set to <code>Number.POSITIVE_INFINITY</code>, the
773
+ * approximate depth test is never applied.
774
+ * <br/><br/>
775
+ * This setting only applies when a label's {@link Label#disableDepthTestDistance} value would
776
+ * otherwise allow depth testing—i.e., distance from the camera to the label is less than the
777
+ * label's {@link Label#disableDepthTestDistance} value.
778
+ * @memberof LabelCollection.prototype
779
+ * @type {number}
780
+ */
781
+ coarseDepthTestDistance: {
782
+ get: function () {
783
+ return this._backgroundBillboardCollection.coarseDepthTestDistance;
784
+ },
785
+ set: function (value) {
786
+ //>>includeStart('debug', pragmas.debug);
787
+ Check.typeOf.number("coarseDepthTestDistance", value);
788
+ //>>includeEnd('debug');
789
+ this._backgroundBillboardCollection.coarseDepthTestDistance = value;
790
+ this._glyphBillboardCollection.coarseDepthTestDistance = value;
791
+ },
792
+ },
793
+
794
+ /**
795
+ * The distance from the camera, within which, labels with a {@link Label#heightReference} value
796
+ * of {@link HeightReference.CLAMP_TO_GROUND} or {@link HeightReference.CLAMP_TO_TERRAIN} are depth tested
797
+ * against three key points. This ensures that if any key point of the label is visible, the whole
798
+ * label will be visible. When set to <code>0</code>, this feature is disabled and portions of a
799
+ * label behind terrain be clipped.
800
+ * <br/><br/>
801
+ * This setting only applies when a labels's {@link Label#disableDepthTestDistance} value would
802
+ * otherwise allow depth testing—i.e., distance from the camera to the label is less than the
803
+ * labels's {@link Label#disableDepthTestDistance} value.
804
+ * @see {@link https://cesium.com/blog/2018/07/30/billboards-on-terrain-improvements/|Billboards and Labels on Terrain Improvements}
805
+ * @memberof LabelCollection.prototype
806
+ * @type {number}
807
+ */
808
+ threePointDepthTestDistance: {
809
+ get: function () {
810
+ return this._backgroundBillboardCollection.threePointDepthTestDistance;
811
+ },
812
+ set: function (value) {
813
+ //>>includeStart('debug', pragmas.debug);
814
+ Check.typeOf.number("threePointDepthTestDistance", value);
815
+ //>>includeEnd('debug');
816
+ this._backgroundBillboardCollection.threePointDepthTestDistance = value;
817
+ this._glyphBillboardCollection.threePointDepthTestDistance = value;
818
+ },
819
+ },
762
820
  });
763
821
 
764
822
  /**
@@ -250,7 +250,7 @@ import WaterMaterial from "../Shaders/Materials/Water.js";
250
250
  * @exception {DeveloperError} strict: shader source does not use material.
251
251
  *
252
252
  * @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric wiki page} for a more detailed options of Fabric.
253
- * @demo {@link https://sandcastle.cesium.com/index.html?src=Materials.html|Cesium Sandcastle Materials Demo}
253
+ * @demo {@link https://sandcastle.cesium.com/index.html?id=materials|Cesium Sandcastle Materials Demo}
254
254
  *
255
255
  * @example
256
256
  * // Create a color material with fromType:
@@ -29,7 +29,7 @@ import Material from "./Material.js";
29
29
  * @param {object} [options.renderState] Optional render state to override the default render state.
30
30
  *
31
31
  * @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
32
- * @demo {@link https://sandcastle.cesium.com/index.html?src=Materials.html|Cesium Sandcastle Material Appearance Demo}
32
+ * @demo {@link https://sandcastle.cesium.com/index.html?id=materials|Cesium Sandcastle Material Appearance Demo}
33
33
  *
34
34
  * @example
35
35
  * const primitive = new Cesium.Primitive({