@cesium/engine 1.0.0 → 2.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 (472) hide show
  1. package/Build/Workers/{AttributeCompression-4589338a.js → AttributeCompression-b646d393.js} +1 -1
  2. package/Build/Workers/{AxisAlignedBoundingBox-bfb1234f.js → AxisAlignedBoundingBox-47525601.js} +1 -1
  3. package/Build/Workers/{BoundingRectangle-7ffc2153.js → BoundingRectangle-93b263ac.js} +1 -1
  4. package/Build/Workers/{BoxGeometry-93f344a3.js → BoxGeometry-8c4b4125.js} +1 -1
  5. package/Build/Workers/{Color-0c5aaf47.js → Color-52c60ed7.js} +1 -1
  6. package/Build/Workers/{CoplanarPolygonGeometryLibrary-6597982a.js → CoplanarPolygonGeometryLibrary-33c4c1f8.js} +1 -1
  7. package/Build/Workers/{CorridorGeometryLibrary-2119580e.js → CorridorGeometryLibrary-5039cd8e.js} +1 -1
  8. package/Build/Workers/{CylinderGeometry-f9503c6d.js → CylinderGeometry-3ac44974.js} +1 -1
  9. package/Build/Workers/{EllipseGeometry-fedf72d5.js → EllipseGeometry-a9c9b3be.js} +1 -1
  10. package/Build/Workers/{EllipseGeometryLibrary-4ea68687.js → EllipseGeometryLibrary-855d4681.js} +1 -1
  11. package/Build/Workers/{EllipseOutlineGeometry-e2ae6a35.js → EllipseOutlineGeometry-017a5929.js} +1 -1
  12. package/Build/Workers/{EllipsoidGeodesic-16de63ea.js → EllipsoidGeodesic-98c62a56.js} +1 -1
  13. package/Build/Workers/{EllipsoidGeometry-95c0330e.js → EllipsoidGeometry-826e7bce.js} +1 -1
  14. package/Build/Workers/{EllipsoidOutlineGeometry-d6d2ceec.js → EllipsoidOutlineGeometry-784dcdb5.js} +1 -1
  15. package/Build/Workers/{EllipsoidRhumbLine-ae5e65e0.js → EllipsoidRhumbLine-19756602.js} +1 -1
  16. package/Build/Workers/{EllipsoidTangentPlane-bfc674bf.js → EllipsoidTangentPlane-ed9443a1.js} +1 -1
  17. package/Build/Workers/{EncodedCartesian3-f473ea18.js → EncodedCartesian3-81f70735.js} +1 -1
  18. package/Build/Workers/{FrustumGeometry-3bf2e4eb.js → FrustumGeometry-9f1ee4d8.js} +1 -1
  19. package/Build/Workers/{GeometryAttribute-df5f473e.js → GeometryAttribute-334718f8.js} +1 -1
  20. package/Build/Workers/{GeometryInstance-aa75b4cf.js → GeometryInstance-451dc1cd.js} +1 -1
  21. package/Build/Workers/{GeometryPipeline-f0e46c42.js → GeometryPipeline-8fb0db69.js} +1 -1
  22. package/Build/Workers/{IntersectionTests-9de29d51.js → IntersectionTests-27d49265.js} +1 -1
  23. package/Build/Workers/{Matrix2-ce637455.js → Matrix2-13178034.js} +4 -2
  24. package/Build/Workers/{Matrix3-4f4df527.js → Matrix3-315394f6.js} +2 -1
  25. package/Build/Workers/{OrientedBoundingBox-d3ff3d4d.js → OrientedBoundingBox-79ee7cbb.js} +5 -5
  26. package/Build/Workers/{Plane-b81241c2.js → Plane-900aa728.js} +1 -1
  27. package/Build/Workers/{PolygonGeometryLibrary-6f4937bb.js → PolygonGeometryLibrary-6b5a29e9.js} +1 -1
  28. package/Build/Workers/PolygonPipeline-21668b3f.js +1345 -0
  29. package/Build/Workers/{PolylinePipeline-2e2b015c.js → PolylinePipeline-5e2e1b21.js} +1 -1
  30. package/Build/Workers/{PolylineVolumeGeometryLibrary-7ee1d449.js → PolylineVolumeGeometryLibrary-97f0b94e.js} +1 -1
  31. package/Build/Workers/{PrimitivePipeline-a9b7aae0.js → PrimitivePipeline-5640850a.js} +1 -1
  32. package/Build/Workers/{RectangleGeometryLibrary-9aa6c8f6.js → RectangleGeometryLibrary-d5457f7b.js} +1 -1
  33. package/Build/Workers/{TerrainEncoding-b52dcfc5.js → TerrainEncoding-bfdf2021.js} +1 -1
  34. package/Build/Workers/{Transforms-2f755df8.js → Transforms-a05e5e6e.js} +114 -83
  35. package/Build/Workers/{WallGeometryLibrary-ab19a93d.js → WallGeometryLibrary-6db0ebb6.js} +1 -1
  36. package/Build/Workers/{WebMercatorProjection-9f25de49.js → WebMercatorProjection-13a90d41.js} +1 -1
  37. package/Build/Workers/cesiumWorkerBootstrapper.js +92 -2
  38. package/Build/Workers/combineGeometry.js +1 -1
  39. package/Build/Workers/createBoxGeometry.js +1 -1
  40. package/Build/Workers/createBoxOutlineGeometry.js +1 -1
  41. package/Build/Workers/createCircleGeometry.js +1 -1
  42. package/Build/Workers/createCircleOutlineGeometry.js +1 -1
  43. package/Build/Workers/createCoplanarPolygonGeometry.js +1 -1
  44. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
  45. package/Build/Workers/createCorridorGeometry.js +1 -1
  46. package/Build/Workers/createCorridorOutlineGeometry.js +1 -1
  47. package/Build/Workers/createCylinderGeometry.js +1 -1
  48. package/Build/Workers/createCylinderOutlineGeometry.js +1 -1
  49. package/Build/Workers/createEllipseGeometry.js +1 -1
  50. package/Build/Workers/createEllipseOutlineGeometry.js +1 -1
  51. package/Build/Workers/createEllipsoidGeometry.js +1 -1
  52. package/Build/Workers/createEllipsoidOutlineGeometry.js +1 -1
  53. package/Build/Workers/createFrustumGeometry.js +1 -1
  54. package/Build/Workers/createFrustumOutlineGeometry.js +1 -1
  55. package/Build/Workers/createGeometry.js +1 -1
  56. package/Build/Workers/createGroundPolylineGeometry.js +1 -1
  57. package/Build/Workers/createPlaneGeometry.js +1 -1
  58. package/Build/Workers/createPlaneOutlineGeometry.js +1 -1
  59. package/Build/Workers/createPolygonGeometry.js +1 -1
  60. package/Build/Workers/createPolygonOutlineGeometry.js +1 -1
  61. package/Build/Workers/createPolylineGeometry.js +1 -1
  62. package/Build/Workers/createPolylineVolumeGeometry.js +1 -1
  63. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
  64. package/Build/Workers/createRectangleGeometry.js +1 -1
  65. package/Build/Workers/createRectangleOutlineGeometry.js +1 -1
  66. package/Build/Workers/createSimplePolylineGeometry.js +1 -1
  67. package/Build/Workers/createSphereGeometry.js +1 -1
  68. package/Build/Workers/createSphereOutlineGeometry.js +1 -1
  69. package/Build/Workers/createVectorTileClampedPolylines.js +1 -1
  70. package/Build/Workers/createVectorTileGeometries.js +1 -1
  71. package/Build/Workers/createVectorTilePoints.js +1 -1
  72. package/Build/Workers/createVectorTilePolygons.js +1 -1
  73. package/Build/Workers/createVectorTilePolylines.js +1 -1
  74. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
  75. package/Build/Workers/createVerticesFromHeightmap.js +7 -3
  76. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
  77. package/Build/Workers/createWallGeometry.js +1 -1
  78. package/Build/Workers/createWallOutlineGeometry.js +1 -1
  79. package/Build/Workers/decodeDraco.js +9 -1
  80. package/Build/Workers/decodeI3S.js +1 -1
  81. package/Build/Workers/package.js +25 -1
  82. package/Build/Workers/transcodeKTX2.js +22 -2
  83. package/Build/Workers/transferTypedArrayTest.js +25 -1
  84. package/Build/Workers/upsampleQuantizedTerrainMesh.js +1 -1
  85. package/README.md +14 -16
  86. package/Source/Core/EarthOrientationParameters.js +67 -63
  87. package/Source/Core/FeatureDetection.js +18 -0
  88. package/Source/Core/Ion.js +1 -2
  89. package/Source/Core/Matrix2.js +2 -1
  90. package/Source/Core/Matrix3.js +2 -1
  91. package/Source/Core/Matrix4.js +1 -0
  92. package/Source/Core/OrientedBoundingBox.js +4 -4
  93. package/Source/Core/PixelFormat.js +22 -2
  94. package/Source/Core/S2Cell.js +3 -3
  95. package/Source/Core/Transforms.js +3 -7
  96. package/Source/Core/sampleTerrain.js +5 -0
  97. package/Source/DataSources/GpxDataSource.js +4 -6
  98. package/Source/DataSources/KmlDataSource.js +3 -5
  99. package/Source/Renderer/AutomaticUniforms.js +3 -3
  100. package/Source/Renderer/Context.js +20 -12
  101. package/Source/Renderer/Pass.js +3 -2
  102. package/Source/Renderer/ShaderBuilder.js +13 -12
  103. package/Source/Renderer/ShaderSource.js +31 -26
  104. package/Source/Renderer/demodernizeShader.js +76 -0
  105. package/Source/Scene/AutoExposure.js +5 -5
  106. package/Source/Scene/BatchTable.js +5 -5
  107. package/Source/Scene/BillboardCollection.js +2 -2
  108. package/Source/Scene/BingMapsImageryProvider.js +1 -1
  109. package/Source/Scene/Cesium3DTile.js +8 -2
  110. package/Source/Scene/Cesium3DTileBatchTable.js +28 -28
  111. package/Source/Scene/Cesium3DTileContentType.js +19 -0
  112. package/Source/Scene/Cesium3DTilesVoxelProvider.js +494 -0
  113. package/Source/Scene/Cesium3DTileset.js +6 -1
  114. package/Source/Scene/Cesium3DTilesetMetadata.js +2 -2
  115. package/Source/Scene/ClassificationPrimitive.js +3 -8
  116. package/Source/Scene/ContentMetadata.js +2 -2
  117. package/Source/Scene/DebugAppearance.js +7 -9
  118. package/Source/Scene/DebugInspector.js +5 -5
  119. package/Source/Scene/DepthPlane.js +0 -6
  120. package/Source/Scene/DerivedCommand.js +15 -22
  121. package/Source/Scene/EllipsoidPrimitive.js +0 -7
  122. package/Source/Scene/Expression.js +1 -1
  123. package/Source/Scene/Globe.js +10 -0
  124. package/Source/Scene/GlobeSurfaceTileProvider.js +7 -0
  125. package/Source/Scene/GlobeTranslucencyState.js +6 -6
  126. package/Source/Scene/GltfImageLoader.js +1 -1
  127. package/Source/Scene/GltfVertexBufferLoader.js +10 -2
  128. package/Source/Scene/GroundPolylinePrimitive.js +2 -4
  129. package/Source/Scene/GroupMetadata.js +2 -2
  130. package/Source/Scene/ImplicitMetadataView.js +2 -2
  131. package/Source/Scene/ImplicitSubtreeCache.js +127 -0
  132. package/Source/Scene/ImplicitSubtreeMetadata.js +2 -2
  133. package/Source/Scene/ImplicitTileset.js +3 -2
  134. package/Source/Scene/InvertClassification.js +9 -10
  135. package/Source/Scene/KeyframeNode.js +47 -0
  136. package/Source/Scene/Material.js +6 -6
  137. package/Source/Scene/Megatexture.js +490 -0
  138. package/Source/Scene/MetadataClass.js +60 -25
  139. package/Source/Scene/MetadataClassProperty.js +132 -68
  140. package/Source/Scene/MetadataComponentType.js +78 -57
  141. package/Source/Scene/MetadataEnum.js +59 -23
  142. package/Source/Scene/MetadataEnumValue.js +49 -15
  143. package/Source/Scene/MetadataSchema.js +53 -24
  144. package/Source/Scene/MetadataSchemaLoader.js +2 -2
  145. package/Source/Scene/MetadataSemantic.js +8 -0
  146. package/Source/Scene/MetadataTableProperty.js +2 -2
  147. package/Source/Scene/MetadataType.js +6 -14
  148. package/Source/Scene/Model/CustomShader.js +1 -1
  149. package/Source/Scene/Model/FeatureIdPipelineStage.js +4 -4
  150. package/Source/Scene/Model/GeoJsonLoader.js +1 -1
  151. package/Source/Scene/Model/LightingModel.js +1 -1
  152. package/Source/Scene/Model/MetadataPipelineStage.js +1 -1
  153. package/Source/Scene/Model/Model.js +2 -3
  154. package/Source/Scene/Model/PickingPipelineStage.js +1 -1
  155. package/Source/Scene/Model/buildDrawCommand.js +19 -11
  156. package/Source/Scene/OIT.js +211 -119
  157. package/Source/Scene/PickDepth.js +2 -2
  158. package/Source/Scene/PointCloud.js +12 -12
  159. package/Source/Scene/PointCloudEyeDomeLighting.js +9 -4
  160. package/Source/Scene/PolylineCollection.js +2 -7
  161. package/Source/Scene/PolylineMaterialAppearance.js +2 -3
  162. package/Source/Scene/PostProcessStage.js +13 -13
  163. package/Source/Scene/PostProcessStageLibrary.js +3 -3
  164. package/Source/Scene/Primitive.js +22 -31
  165. package/Source/Scene/PropertyAttribute.js +2 -2
  166. package/Source/Scene/PropertyAttributeProperty.js +2 -2
  167. package/Source/Scene/PropertyTable.js +2 -2
  168. package/Source/Scene/PropertyTexture.js +2 -2
  169. package/Source/Scene/PropertyTextureProperty.js +2 -2
  170. package/Source/Scene/ResourceCache.js +9 -1
  171. package/Source/Scene/ResourceCacheKey.js +9 -1
  172. package/Source/Scene/Scene.js +17 -0
  173. package/Source/Scene/ShadowMap.js +7 -7
  174. package/Source/Scene/ShadowMapShader.js +9 -9
  175. package/Source/Scene/ShadowVolumeAppearance.js +1 -1
  176. package/Source/Scene/SpatialNode.js +375 -0
  177. package/Source/Scene/StructuralMetadata.js +2 -2
  178. package/Source/Scene/TextureAtlas.js +5 -3
  179. package/Source/Scene/TileMetadata.js +2 -2
  180. package/Source/Scene/TilesetMetadata.js +2 -2
  181. package/Source/Scene/Vector3DTilePolylines.js +1 -1
  182. package/Source/Scene/Vector3DTilePrimitive.js +2 -2
  183. package/Source/Scene/VoxelBoxShape.js +527 -0
  184. package/Source/Scene/VoxelContent.js +169 -0
  185. package/Source/Scene/VoxelCylinderShape.js +937 -0
  186. package/Source/Scene/VoxelEllipsoidShape.js +945 -0
  187. package/Source/Scene/VoxelPrimitive.js +1919 -0
  188. package/Source/Scene/VoxelProvider.js +255 -0
  189. package/Source/Scene/VoxelRenderResources.js +224 -0
  190. package/Source/Scene/VoxelShape.js +152 -0
  191. package/Source/Scene/VoxelShapeType.js +105 -0
  192. package/Source/Scene/VoxelTraversal.js +1144 -0
  193. package/Source/Scene/buildVoxelDrawCommands.js +116 -0
  194. package/Source/Scene/computeFlyToLocationForRectangle.js +10 -1
  195. package/Source/Scene/createElevationBandMaterial.js +10 -15
  196. package/Source/Scene/getClipAndStyleCode.js +1 -1
  197. package/Source/Scene/getClippingFunction.js +3 -3
  198. package/Source/Scene/parseBatchTable.js +18 -2
  199. package/Source/Scene/preprocess3DTileContent.js +8 -0
  200. package/Source/Scene/processVoxelProperties.js +455 -0
  201. package/Source/Shaders/AdjustTranslucentFS.glsl +9 -6
  202. package/Source/Shaders/AdjustTranslucentFS.js +9 -6
  203. package/Source/Shaders/Appearances/AllMaterialAppearanceFS.glsl +7 -7
  204. package/Source/Shaders/Appearances/AllMaterialAppearanceFS.js +7 -7
  205. package/Source/Shaders/Appearances/AllMaterialAppearanceVS.glsl +12 -12
  206. package/Source/Shaders/Appearances/AllMaterialAppearanceVS.js +12 -12
  207. package/Source/Shaders/Appearances/BasicMaterialAppearanceFS.glsl +4 -4
  208. package/Source/Shaders/Appearances/BasicMaterialAppearanceFS.js +4 -4
  209. package/Source/Shaders/Appearances/BasicMaterialAppearanceVS.glsl +6 -6
  210. package/Source/Shaders/Appearances/BasicMaterialAppearanceVS.js +6 -6
  211. package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceFS.glsl +5 -5
  212. package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceFS.js +5 -5
  213. package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceVS.glsl +7 -7
  214. package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceVS.js +7 -7
  215. package/Source/Shaders/Appearances/PerInstanceColorAppearanceFS.glsl +4 -4
  216. package/Source/Shaders/Appearances/PerInstanceColorAppearanceFS.js +4 -4
  217. package/Source/Shaders/Appearances/PerInstanceColorAppearanceVS.glsl +8 -8
  218. package/Source/Shaders/Appearances/PerInstanceColorAppearanceVS.js +8 -8
  219. package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceFS.glsl +2 -2
  220. package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceFS.js +2 -2
  221. package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceVS.glsl +5 -5
  222. package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceVS.js +5 -5
  223. package/Source/Shaders/Appearances/PolylineColorAppearanceVS.glsl +10 -10
  224. package/Source/Shaders/Appearances/PolylineColorAppearanceVS.js +10 -10
  225. package/Source/Shaders/Appearances/PolylineMaterialAppearanceVS.glsl +12 -12
  226. package/Source/Shaders/Appearances/PolylineMaterialAppearanceVS.js +12 -12
  227. package/Source/Shaders/Appearances/TexturedMaterialAppearanceFS.glsl +5 -5
  228. package/Source/Shaders/Appearances/TexturedMaterialAppearanceFS.js +5 -5
  229. package/Source/Shaders/Appearances/TexturedMaterialAppearanceVS.glsl +8 -8
  230. package/Source/Shaders/Appearances/TexturedMaterialAppearanceVS.js +8 -8
  231. package/Source/Shaders/BillboardCollectionFS.glsl +15 -15
  232. package/Source/Shaders/BillboardCollectionFS.js +15 -15
  233. package/Source/Shaders/BillboardCollectionVS.glsl +24 -24
  234. package/Source/Shaders/BillboardCollectionVS.js +24 -24
  235. package/Source/Shaders/BrdfLutGeneratorFS.glsl +2 -2
  236. package/Source/Shaders/BrdfLutGeneratorFS.js +2 -2
  237. package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
  238. package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
  239. package/Source/Shaders/Builtin/Constants/passVoxels.glsl +9 -0
  240. package/Source/Shaders/Builtin/Constants/passVoxels.js +11 -0
  241. package/Source/Shaders/Builtin/CzmBuiltins.js +19 -15
  242. package/Source/Shaders/Builtin/Functions/depthClamp.glsl +3 -3
  243. package/Source/Shaders/Builtin/Functions/depthClamp.js +3 -3
  244. package/Source/Shaders/Builtin/Functions/getWaterNoise.glsl +4 -4
  245. package/Source/Shaders/Builtin/Functions/getWaterNoise.js +4 -4
  246. package/Source/Shaders/Builtin/Functions/phong.glsl +1 -1
  247. package/Source/Shaders/Builtin/Functions/phong.js +1 -1
  248. package/Source/Shaders/Builtin/Functions/readDepth.glsl +1 -1
  249. package/Source/Shaders/Builtin/Functions/readDepth.js +1 -1
  250. package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.glsl +5 -5
  251. package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.js +5 -5
  252. package/Source/Shaders/Builtin/Functions/shadowDepthCompare.glsl +3 -3
  253. package/Source/Shaders/Builtin/Functions/shadowDepthCompare.js +3 -3
  254. package/Source/Shaders/Builtin/Functions/tangentToEyeSpaceMatrix.glsl +1 -1
  255. package/Source/Shaders/Builtin/Functions/tangentToEyeSpaceMatrix.js +1 -1
  256. package/Source/Shaders/Builtin/Functions/textureCube.glsl +17 -0
  257. package/Source/Shaders/Builtin/Functions/textureCube.js +18 -0
  258. package/Source/Shaders/Builtin/Functions/translateRelativeToEye.glsl +2 -2
  259. package/Source/Shaders/Builtin/Functions/translateRelativeToEye.js +2 -2
  260. package/Source/Shaders/Builtin/Functions/vertexLogDepth.glsl +2 -2
  261. package/Source/Shaders/Builtin/Functions/vertexLogDepth.js +2 -2
  262. package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.glsl +55 -43
  263. package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.js +55 -43
  264. package/Source/Shaders/Builtin/Functions/writeDepthClamp.glsl +5 -8
  265. package/Source/Shaders/Builtin/Functions/writeDepthClamp.js +5 -8
  266. package/Source/Shaders/Builtin/Functions/writeLogDepth.glsl +6 -6
  267. package/Source/Shaders/Builtin/Functions/writeLogDepth.js +6 -6
  268. package/Source/Shaders/CloudCollectionFS.glsl +18 -18
  269. package/Source/Shaders/CloudCollectionFS.js +18 -18
  270. package/Source/Shaders/CloudCollectionVS.glsl +11 -11
  271. package/Source/Shaders/CloudCollectionVS.js +11 -11
  272. package/Source/Shaders/CloudNoiseFS.glsl +5 -5
  273. package/Source/Shaders/CloudNoiseFS.js +5 -5
  274. package/Source/Shaders/CloudNoiseVS.glsl +2 -2
  275. package/Source/Shaders/CloudNoiseVS.js +2 -2
  276. package/Source/Shaders/CompareAndPackTranslucentDepth.glsl +4 -4
  277. package/Source/Shaders/CompareAndPackTranslucentDepth.js +4 -4
  278. package/Source/Shaders/CompositeOITFS.glsl +6 -6
  279. package/Source/Shaders/CompositeOITFS.js +6 -6
  280. package/Source/Shaders/DepthPlaneFS.glsl +2 -2
  281. package/Source/Shaders/DepthPlaneFS.js +2 -2
  282. package/Source/Shaders/DepthPlaneVS.glsl +2 -2
  283. package/Source/Shaders/DepthPlaneVS.js +2 -2
  284. package/Source/Shaders/EllipsoidFS.glsl +5 -13
  285. package/Source/Shaders/EllipsoidFS.js +6 -14
  286. package/Source/Shaders/EllipsoidVS.glsl +2 -2
  287. package/Source/Shaders/EllipsoidVS.js +2 -2
  288. package/Source/Shaders/FXAA3_11.glsl +4 -4
  289. package/Source/Shaders/FXAA3_11.js +4 -4
  290. package/Source/Shaders/GlobeFS.glsl +17 -16
  291. package/Source/Shaders/GlobeFS.js +17 -16
  292. package/Source/Shaders/GlobeVS.glsl +17 -17
  293. package/Source/Shaders/GlobeVS.js +17 -17
  294. package/Source/Shaders/Materials/AspectRampMaterial.glsl +1 -1
  295. package/Source/Shaders/Materials/AspectRampMaterial.js +1 -1
  296. package/Source/Shaders/Materials/BumpMapMaterial.glsl +3 -3
  297. package/Source/Shaders/Materials/BumpMapMaterial.js +3 -3
  298. package/Source/Shaders/Materials/ElevationBandMaterial.glsl +3 -3
  299. package/Source/Shaders/Materials/ElevationBandMaterial.js +3 -3
  300. package/Source/Shaders/Materials/ElevationContourMaterial.glsl +2 -1
  301. package/Source/Shaders/Materials/ElevationContourMaterial.js +2 -1
  302. package/Source/Shaders/Materials/ElevationRampMaterial.glsl +1 -1
  303. package/Source/Shaders/Materials/ElevationRampMaterial.js +1 -1
  304. package/Source/Shaders/Materials/GridMaterial.glsl +3 -2
  305. package/Source/Shaders/Materials/GridMaterial.js +3 -2
  306. package/Source/Shaders/Materials/NormalMapMaterial.glsl +1 -1
  307. package/Source/Shaders/Materials/NormalMapMaterial.js +1 -1
  308. package/Source/Shaders/Materials/PolylineArrowMaterial.glsl +3 -2
  309. package/Source/Shaders/Materials/PolylineArrowMaterial.js +3 -2
  310. package/Source/Shaders/Materials/PolylineDashMaterial.glsl +1 -1
  311. package/Source/Shaders/Materials/PolylineDashMaterial.js +1 -1
  312. package/Source/Shaders/Materials/PolylineOutlineMaterial.glsl +1 -1
  313. package/Source/Shaders/Materials/PolylineOutlineMaterial.js +1 -1
  314. package/Source/Shaders/Materials/SlopeRampMaterial.glsl +1 -1
  315. package/Source/Shaders/Materials/SlopeRampMaterial.js +1 -1
  316. package/Source/Shaders/Materials/Water.glsl +1 -1
  317. package/Source/Shaders/Materials/Water.js +1 -1
  318. package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +3 -3
  319. package/Source/Shaders/Model/ImageBasedLightingStageFS.js +3 -3
  320. package/Source/Shaders/Model/MaterialStageFS.glsl +10 -10
  321. package/Source/Shaders/Model/MaterialStageFS.js +10 -10
  322. package/Source/Shaders/Model/ModelClippingPlanesStageFS.glsl +3 -3
  323. package/Source/Shaders/Model/ModelClippingPlanesStageFS.js +3 -3
  324. package/Source/Shaders/Model/ModelFS.glsl +1 -1
  325. package/Source/Shaders/Model/ModelFS.js +1 -1
  326. package/Source/Shaders/Model/PrimitiveOutlineStageFS.glsl +3 -3
  327. package/Source/Shaders/Model/PrimitiveOutlineStageFS.js +3 -3
  328. package/Source/Shaders/Model/SelectedFeatureIdStageCommon.glsl +1 -1
  329. package/Source/Shaders/Model/SelectedFeatureIdStageCommon.js +1 -1
  330. package/Source/Shaders/OctahedralProjectionAtlasFS.glsl +8 -8
  331. package/Source/Shaders/OctahedralProjectionAtlasFS.js +8 -8
  332. package/Source/Shaders/OctahedralProjectionFS.glsl +4 -4
  333. package/Source/Shaders/OctahedralProjectionFS.js +4 -4
  334. package/Source/Shaders/OctahedralProjectionVS.glsl +3 -3
  335. package/Source/Shaders/OctahedralProjectionVS.js +3 -3
  336. package/Source/Shaders/PointPrimitiveCollectionFS.glsl +6 -6
  337. package/Source/Shaders/PointPrimitiveCollectionFS.js +6 -6
  338. package/Source/Shaders/PointPrimitiveCollectionVS.glsl +17 -14
  339. package/Source/Shaders/PointPrimitiveCollectionVS.js +17 -14
  340. package/Source/Shaders/PolylineFS.glsl +3 -3
  341. package/Source/Shaders/PolylineFS.js +3 -3
  342. package/Source/Shaders/PolylineShadowVolumeFS.glsl +12 -16
  343. package/Source/Shaders/PolylineShadowVolumeFS.js +12 -16
  344. package/Source/Shaders/PolylineShadowVolumeMorphFS.glsl +8 -8
  345. package/Source/Shaders/PolylineShadowVolumeMorphFS.js +8 -8
  346. package/Source/Shaders/PolylineShadowVolumeMorphVS.glsl +20 -20
  347. package/Source/Shaders/PolylineShadowVolumeMorphVS.js +20 -20
  348. package/Source/Shaders/PolylineShadowVolumeVS.glsl +20 -20
  349. package/Source/Shaders/PolylineShadowVolumeVS.js +20 -20
  350. package/Source/Shaders/PolylineVS.glsl +17 -17
  351. package/Source/Shaders/PolylineVS.js +17 -17
  352. package/Source/Shaders/PostProcessStages/AcesTonemappingStage.glsl +4 -4
  353. package/Source/Shaders/PostProcessStages/AcesTonemappingStage.js +4 -4
  354. package/Source/Shaders/PostProcessStages/AdditiveBlend.glsl +4 -4
  355. package/Source/Shaders/PostProcessStages/AdditiveBlend.js +4 -4
  356. package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.glsl +4 -4
  357. package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.js +4 -4
  358. package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.glsl +4 -4
  359. package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.js +4 -4
  360. package/Source/Shaders/PostProcessStages/BlackAndWhite.glsl +4 -4
  361. package/Source/Shaders/PostProcessStages/BlackAndWhite.js +4 -4
  362. package/Source/Shaders/PostProcessStages/BloomComposite.glsl +5 -5
  363. package/Source/Shaders/PostProcessStages/BloomComposite.js +5 -5
  364. package/Source/Shaders/PostProcessStages/BrightPass.glsl +3 -3
  365. package/Source/Shaders/PostProcessStages/BrightPass.js +3 -3
  366. package/Source/Shaders/PostProcessStages/Brightness.glsl +3 -3
  367. package/Source/Shaders/PostProcessStages/Brightness.js +3 -3
  368. package/Source/Shaders/PostProcessStages/CompositeTranslucentClassification.glsl +5 -5
  369. package/Source/Shaders/PostProcessStages/CompositeTranslucentClassification.js +5 -5
  370. package/Source/Shaders/PostProcessStages/ContrastBias.glsl +3 -3
  371. package/Source/Shaders/PostProcessStages/ContrastBias.js +3 -3
  372. package/Source/Shaders/PostProcessStages/DepthOfField.glsl +2 -2
  373. package/Source/Shaders/PostProcessStages/DepthOfField.js +2 -2
  374. package/Source/Shaders/PostProcessStages/DepthView.glsl +2 -2
  375. package/Source/Shaders/PostProcessStages/DepthView.js +2 -2
  376. package/Source/Shaders/PostProcessStages/DepthViewPacked.glsl +3 -3
  377. package/Source/Shaders/PostProcessStages/DepthViewPacked.js +3 -3
  378. package/Source/Shaders/PostProcessStages/EdgeDetection.glsl +7 -7
  379. package/Source/Shaders/PostProcessStages/EdgeDetection.js +7 -7
  380. package/Source/Shaders/PostProcessStages/FXAA.glsl +3 -3
  381. package/Source/Shaders/PostProcessStages/FXAA.js +3 -3
  382. package/Source/Shaders/PostProcessStages/FilmicTonemapping.glsl +4 -4
  383. package/Source/Shaders/PostProcessStages/FilmicTonemapping.js +4 -4
  384. package/Source/Shaders/PostProcessStages/GaussianBlur1D.glsl +5 -5
  385. package/Source/Shaders/PostProcessStages/GaussianBlur1D.js +5 -5
  386. package/Source/Shaders/PostProcessStages/LensFlare.glsl +13 -13
  387. package/Source/Shaders/PostProcessStages/LensFlare.js +13 -13
  388. package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.glsl +4 -4
  389. package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.js +4 -4
  390. package/Source/Shaders/PostProcessStages/NightVision.glsl +3 -3
  391. package/Source/Shaders/PostProcessStages/NightVision.js +3 -3
  392. package/Source/Shaders/PostProcessStages/PassThrough.glsl +2 -2
  393. package/Source/Shaders/PostProcessStages/PassThrough.js +2 -2
  394. package/Source/Shaders/PostProcessStages/PassThroughDepth.glsl +2 -2
  395. package/Source/Shaders/PostProcessStages/PassThroughDepth.js +2 -2
  396. package/Source/Shaders/PostProcessStages/PointCloudEyeDomeLighting.glsl +7 -9
  397. package/Source/Shaders/PostProcessStages/PointCloudEyeDomeLighting.js +8 -10
  398. package/Source/Shaders/PostProcessStages/ReinhardTonemapping.glsl +4 -4
  399. package/Source/Shaders/PostProcessStages/ReinhardTonemapping.js +4 -4
  400. package/Source/Shaders/PostProcessStages/Silhouette.glsl +4 -4
  401. package/Source/Shaders/PostProcessStages/Silhouette.js +4 -4
  402. package/Source/Shaders/ReprojectWebMercatorFS.glsl +2 -2
  403. package/Source/Shaders/ReprojectWebMercatorFS.js +2 -2
  404. package/Source/Shaders/ReprojectWebMercatorVS.glsl +3 -3
  405. package/Source/Shaders/ReprojectWebMercatorVS.js +3 -3
  406. package/Source/Shaders/ShadowVolumeAppearanceFS.glsl +19 -23
  407. package/Source/Shaders/ShadowVolumeAppearanceFS.js +20 -24
  408. package/Source/Shaders/ShadowVolumeAppearanceVS.glsl +12 -12
  409. package/Source/Shaders/ShadowVolumeAppearanceVS.js +12 -12
  410. package/Source/Shaders/ShadowVolumeFS.glsl +2 -6
  411. package/Source/Shaders/ShadowVolumeFS.js +3 -7
  412. package/Source/Shaders/SkyAtmosphereFS.glsl +6 -6
  413. package/Source/Shaders/SkyAtmosphereFS.js +6 -6
  414. package/Source/Shaders/SkyAtmosphereVS.glsl +6 -6
  415. package/Source/Shaders/SkyAtmosphereVS.js +6 -6
  416. package/Source/Shaders/SkyBoxFS.glsl +3 -3
  417. package/Source/Shaders/SkyBoxFS.js +3 -3
  418. package/Source/Shaders/SkyBoxVS.glsl +2 -2
  419. package/Source/Shaders/SkyBoxVS.js +2 -2
  420. package/Source/Shaders/SunFS.glsl +3 -3
  421. package/Source/Shaders/SunFS.js +3 -3
  422. package/Source/Shaders/SunTextureFS.glsl +2 -2
  423. package/Source/Shaders/SunTextureFS.js +2 -2
  424. package/Source/Shaders/SunVS.glsl +2 -2
  425. package/Source/Shaders/SunVS.js +2 -2
  426. package/Source/Shaders/Vector3DTileClampedPolylinesFS.glsl +9 -13
  427. package/Source/Shaders/Vector3DTileClampedPolylinesFS.js +9 -13
  428. package/Source/Shaders/Vector3DTileClampedPolylinesVS.glsl +12 -12
  429. package/Source/Shaders/Vector3DTileClampedPolylinesVS.js +12 -12
  430. package/Source/Shaders/Vector3DTilePolylinesVS.glsl +5 -5
  431. package/Source/Shaders/Vector3DTilePolylinesVS.js +5 -5
  432. package/Source/Shaders/VectorTileVS.glsl +2 -2
  433. package/Source/Shaders/VectorTileVS.js +2 -2
  434. package/Source/Shaders/ViewportQuadFS.glsl +2 -2
  435. package/Source/Shaders/ViewportQuadFS.js +2 -2
  436. package/Source/Shaders/ViewportQuadVS.glsl +3 -3
  437. package/Source/Shaders/ViewportQuadVS.js +3 -3
  438. package/Source/Shaders/Voxels/IntersectBox.glsl +79 -0
  439. package/Source/Shaders/Voxels/IntersectBox.js +81 -0
  440. package/Source/Shaders/Voxels/IntersectClippingPlanes.glsl +70 -0
  441. package/Source/Shaders/Voxels/IntersectClippingPlanes.js +72 -0
  442. package/Source/Shaders/Voxels/IntersectCylinder.glsl +273 -0
  443. package/Source/Shaders/Voxels/IntersectCylinder.js +275 -0
  444. package/Source/Shaders/Voxels/IntersectDepth.glsl +23 -0
  445. package/Source/Shaders/Voxels/IntersectDepth.js +25 -0
  446. package/Source/Shaders/Voxels/IntersectEllipsoid.glsl +347 -0
  447. package/Source/Shaders/Voxels/IntersectEllipsoid.js +349 -0
  448. package/Source/Shaders/Voxels/Intersection.glsl +54 -0
  449. package/Source/Shaders/Voxels/Intersection.js +56 -0
  450. package/Source/Shaders/Voxels/IntersectionUtils.glsl +151 -0
  451. package/Source/Shaders/Voxels/IntersectionUtils.js +153 -0
  452. package/Source/Shaders/Voxels/Megatexture.glsl +136 -0
  453. package/Source/Shaders/Voxels/Megatexture.js +138 -0
  454. package/Source/Shaders/Voxels/Octree.glsl +221 -0
  455. package/Source/Shaders/Voxels/Octree.js +223 -0
  456. package/Source/Shaders/Voxels/VoxelFS.glsl +150 -0
  457. package/Source/Shaders/Voxels/VoxelFS.js +152 -0
  458. package/Source/Shaders/Voxels/VoxelVS.glsl +11 -0
  459. package/Source/Shaders/Voxels/VoxelVS.js +13 -0
  460. package/Source/Shaders/Voxels/convertUvToBox.glsl +16 -0
  461. package/Source/Shaders/Voxels/convertUvToBox.js +18 -0
  462. package/Source/Shaders/Voxels/convertUvToCylinder.glsl +75 -0
  463. package/Source/Shaders/Voxels/convertUvToCylinder.js +77 -0
  464. package/Source/Shaders/Voxels/convertUvToEllipsoid.glsl +130 -0
  465. package/Source/Shaders/Voxels/convertUvToEllipsoid.js +132 -0
  466. package/Source/ThirdParty/Workers/z-worker-pako.js +0 -0
  467. package/Source/WorkersES6/decodeDraco.js +9 -1
  468. package/index.d.ts +3148 -2297
  469. package/index.js +1118 -1085
  470. package/package.json +3 -4
  471. package/Build/Workers/PolygonPipeline-774a8aaf.js +0 -1341
  472. package/Source/Renderer/modernizeShader.js +0 -242
@@ -1,4 +1,28 @@
1
- undefined
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.102
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
2
26
  if (typeof self === "undefined") {
3
27
  self = {};
4
28
  }
@@ -1,4 +1,4 @@
1
- define(['./AttributeCompression-4589338a', './Transforms-2f755df8', './Matrix2-ce637455', './Matrix3-4f4df527', './defaultValue-0a909f67', './TerrainEncoding-b52dcfc5', './IndexDatatype-a55ceaa1', './Check-666ab1a0', './Math-2dbd6b93', './OrientedBoundingBox-d3ff3d4d', './createTaskProcessorWorker', './ComponentDatatype-f7b11d02', './WebGLConstants-a8cc3e8c', './combine-ca22a614', './RuntimeError-06c93819', './EllipsoidTangentPlane-bfc674bf', './AxisAlignedBoundingBox-bfb1234f', './IntersectionTests-9de29d51', './Plane-b81241c2'], (function (AttributeCompression, Transforms, Matrix2, Matrix3, defaultValue, TerrainEncoding, IndexDatatype, Check, Math$1, OrientedBoundingBox, createTaskProcessorWorker, ComponentDatatype, WebGLConstants, combine, RuntimeError, EllipsoidTangentPlane, AxisAlignedBoundingBox, IntersectionTests, Plane) { 'use strict';
1
+ define(['./AttributeCompression-b646d393', './Transforms-a05e5e6e', './Matrix2-13178034', './Matrix3-315394f6', './defaultValue-0a909f67', './TerrainEncoding-bfdf2021', './IndexDatatype-a55ceaa1', './Check-666ab1a0', './Math-2dbd6b93', './OrientedBoundingBox-79ee7cbb', './createTaskProcessorWorker', './ComponentDatatype-f7b11d02', './WebGLConstants-a8cc3e8c', './combine-ca22a614', './RuntimeError-06c93819', './EllipsoidTangentPlane-ed9443a1', './AxisAlignedBoundingBox-47525601', './IntersectionTests-27d49265', './Plane-900aa728'], (function (AttributeCompression, Transforms, Matrix2, Matrix3, defaultValue, TerrainEncoding, IndexDatatype, Check, Math$1, OrientedBoundingBox, createTaskProcessorWorker, ComponentDatatype, WebGLConstants, combine, RuntimeError, EllipsoidTangentPlane, AxisAlignedBoundingBox, IntersectionTests, Plane) { 'use strict';
2
2
 
3
3
  /**
4
4
  * Contains functions for operating on 2D triangles.
package/README.md CHANGED
@@ -1,15 +1,20 @@
1
1
  # @cesium/engine
2
2
 
3
- ![Cesium](https://github.com/CesiumGS/cesium/wiki/logos/Cesium_Logo_Color.jpg)
4
-
5
3
  [![Build Status](https://travis-ci.com/CesiumGS/cesium.svg?branch=main)](https://travis-ci.com/CesiumGS/cesium)
6
- [![npm](https://img.shields.io/npm/v/cesium/engine)](https://www.npmjs.com/package/@cesium/engine)
4
+ [![npm](https://img.shields.io/npm/v/@cesium/engine)](https://www.npmjs.com/package/@cesium/engine)
7
5
  [![Docs](https://img.shields.io/badge/docs-online-orange.svg)](https://cesium.com/learn/)
8
6
 
9
- CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics, and is cross-platform, cross-browser, and tuned for dynamic-data visualization.
7
+ ![Cesium](https://github.com/CesiumGS/cesium/wiki/logos/Cesium_Logo_Color.jpg)
8
+
9
+ [CesiumJS](../../README.md) is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics, and is cross-platform, cross-browser, and tuned for dynamic-data visualization.
10
+
11
+ `@cesium/engine` includes cesiumJS's core, rendering, and data APIs. Here you'll find terrain and imagery engines, support for 3D Tiles and 3D models, geometries, and vector data.
12
+
13
+ ---
10
14
 
11
- [Examples](https://sandcastle.cesium.com/)
12
- :earth_africa: [Docs](https://cesium.com/learn/cesiumjs-learn/) :earth_asia: [Website](https://cesium.com/cesiumjs) :earth_americas: [Forum](https://community.cesium.com/)
15
+ [**Examples**](https://sandcastle.cesium.com/) :earth_asia: [**Docs**](https://cesium.com/learn/cesiumjs-learn/) :earth_americas: [**Website**](https://cesium.com/cesiumjs) :earth_africa: [**Forum**](https://community.cesium.com/) :earth_asia: [**User Stories**](https://cesium.com/user-stories/)
16
+
17
+ ---
13
18
 
14
19
  ## Install
15
20
 
@@ -29,14 +34,7 @@ yarn add @cesium/engine
29
34
 
30
35
  ## Usage
31
36
 
32
- ```js
33
- import * as Cesium from "@cesium/engine";
34
- import "@cesium/engine/Source/Widget/CesiumWidget.css";
35
-
36
- const cesiumWidget = new Cesium.CesiumWidget("cesiumContainer");
37
- ```
38
-
39
- Or, import individual modules to benefit from tree shaking optmtimizations through most build tools:
37
+ Import individual modules to benefit from tree shaking optimizations through most build tools:
40
38
 
41
39
  ```js
42
40
  import { CesiumWidget } from "@cesium/engine";
@@ -45,7 +43,7 @@ import "@cesium/engine/Source/Widget/CesiumWidget.css";
45
43
  const cesiumWidget = new CesiumWidget("cesiumContainer");
46
44
  ```
47
45
 
48
- See our [Quickstart Guide](https://cesium.com/learn/cesiumjs-learn/cesiumjs-quickstart/) for more information on getting a Cesium app up and running.
46
+ See our [Quickstart Guide](https://cesium.com/learn/cesiumjs-learn/cesiumjs-quickstart/) for more information on getting a CesiumJS app up and running.
49
47
 
50
48
  ## Community
51
49
 
@@ -53,6 +51,6 @@ Have questions? Ask them on the [community forum](https://community.cesium.com/)
53
51
 
54
52
  Interested in contributing? See [CONTRIBUTING.md](../../CONTRIBUTING.md). :heart:
55
53
 
56
- ### License
54
+ ## License
57
55
 
58
56
  [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). CesiumJS is free for both commercial and non-commercial use.
@@ -1,4 +1,5 @@
1
1
  import binarySearch from "./binarySearch.js";
2
+ import Check from "./Check.js";
2
3
  import defaultValue from "./defaultValue.js";
3
4
  import defined from "./defined.js";
4
5
  import EarthOrientationParametersSample from "./EarthOrientationParametersSample.js";
@@ -14,15 +15,12 @@ import TimeStandard from "./TimeStandard.js";
14
15
  * These Earth Orientation Parameters (EOP) are primarily used in the transformation from
15
16
  * the International Celestial Reference Frame (ICRF) to the International Terrestrial
16
17
  * Reference Frame (ITRF).
18
+ * This object is normally not instantiated directly, use {@link EarthOrientationParameters.fromUrl}.
17
19
  *
18
20
  * @alias EarthOrientationParameters
19
21
  * @constructor
20
22
  *
21
23
  * @param {Object} [options] Object with the following properties:
22
- * @param {Resource|String} [options.url] The URL from which to obtain EOP data. If neither this
23
- * parameter nor options.data is specified, all EOP values are assumed
24
- * to be 0.0. If options.data is specified, this parameter is
25
- * ignored.
26
24
  * @param {Object} [options.data] The actual EOP data. If neither this
27
25
  * parameter nor options.data is specified, all EOP values are assumed
28
26
  * to be 0.0.
@@ -32,22 +30,6 @@ import TimeStandard from "./TimeStandard.js";
32
30
  * new leap seconds should be handled correctly in the context
33
31
  * of the EOP data but otherwise ignored.
34
32
  *
35
- * @example
36
- * // An example EOP data file, EOP.json:
37
- * {
38
- * "columnNames" : ["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],
39
- * "samples" : [
40
- * "2011-07-01T00:00:00Z",55743.0,2.117957047295119e-7,2.111518721609984e-6,-0.2908948,-2.956e-4,3.393695767766752e-11,3.3452143996557983e-10,34.0,
41
- * "2011-07-02T00:00:00Z",55744.0,2.193297093339541e-7,2.115460256837405e-6,-0.29065,-1.824e-4,-8.241832578862112e-11,5.623838700870617e-10,34.0,
42
- * "2011-07-03T00:00:00Z",55745.0,2.262286080161428e-7,2.1191157519929706e-6,-0.2905572,1.9e-6,-3.490658503988659e-10,6.981317007977318e-10,34.0
43
- * ]
44
- * }
45
- *
46
- * @example
47
- * // Loading the EOP data
48
- * const eop = new Cesium.EarthOrientationParameters({ url : 'Data/EOP.json' });
49
- * Cesium.Transforms.earthOrientationParameters = eop;
50
- *
51
33
  * @private
52
34
  */
53
35
  function EarthOrientationParameters(options) {
@@ -67,27 +49,11 @@ function EarthOrientationParameters(options) {
67
49
  this._columnCount = 0;
68
50
  this._lastIndex = -1;
69
51
 
70
- this._downloadPromise = undefined;
71
- this._dataError = undefined;
72
-
73
52
  this._addNewLeapSeconds = defaultValue(options.addNewLeapSeconds, true);
74
53
 
75
54
  if (defined(options.data)) {
76
55
  // Use supplied EOP data.
77
56
  onDataReady(this, options.data);
78
- } else if (defined(options.url)) {
79
- const resource = Resource.createIfNeeded(options.url);
80
-
81
- // Download EOP data.
82
- const that = this;
83
- this._downloadPromise = resource
84
- .fetchJson()
85
- .then(function (eopData) {
86
- onDataReady(that, eopData);
87
- })
88
- .catch(function () {
89
- that._dataError = `An error occurred while retrieving the EOP data from the URL ${resource.url}.`;
90
- });
91
57
  } else {
92
58
  // Use all zeros for EOP data.
93
59
  onDataReady(this, {
@@ -107,13 +73,64 @@ function EarthOrientationParameters(options) {
107
73
  }
108
74
  }
109
75
 
76
+ /**
77
+ *
78
+ * @param {Resource|String} [url] The URL from which to obtain EOP data. If neither this
79
+ * parameter nor options.data is specified, all EOP values are assumed
80
+ * to be 0.0. If options.data is specified, this parameter is
81
+ * ignored.
82
+ * @param {Object} [options] Object with the following properties:
83
+ * @param {Boolean} [options.addNewLeapSeconds=true] True if leap seconds that
84
+ * are specified in the EOP data but not in {@link JulianDate.leapSeconds}
85
+ * should be added to {@link JulianDate.leapSeconds}. False if
86
+ * new leap seconds should be handled correctly in the context
87
+ * of the EOP data but otherwise ignored.
88
+ *
89
+ * @example
90
+ * // An example EOP data file, EOP.json:
91
+ * {
92
+ * "columnNames" : ["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],
93
+ * "samples" : [
94
+ * "2011-07-01T00:00:00Z",55743.0,2.117957047295119e-7,2.111518721609984e-6,-0.2908948,-2.956e-4,3.393695767766752e-11,3.3452143996557983e-10,34.0,
95
+ * "2011-07-02T00:00:00Z",55744.0,2.193297093339541e-7,2.115460256837405e-6,-0.29065,-1.824e-4,-8.241832578862112e-11,5.623838700870617e-10,34.0,
96
+ * "2011-07-03T00:00:00Z",55745.0,2.262286080161428e-7,2.1191157519929706e-6,-0.2905572,1.9e-6,-3.490658503988659e-10,6.981317007977318e-10,34.0
97
+ * ]
98
+ * }
99
+ *
100
+ * @example
101
+ * // Loading the EOP data
102
+ * const eop = await Cesium.EarthOrientationParameters.fromUrl('Data/EOP.json');
103
+ * Cesium.Transforms.earthOrientationParameters = eop;
104
+ */
105
+ EarthOrientationParameters.fromUrl = async function (url, options) {
106
+ //>>includeStart('debug', pragmas.debug);
107
+ Check.defined("url", url);
108
+ //>>includeEnd('debug');
109
+
110
+ options = defaultValue(options, defaultValue.EMPTY_OBJECT);
111
+
112
+ const resource = Resource.createIfNeeded(url);
113
+
114
+ // Download EOP data.
115
+ let eopData;
116
+ try {
117
+ eopData = await resource.fetchJson();
118
+ } catch (e) {
119
+ throw new RuntimeError(
120
+ `An error occurred while retrieving the EOP data from the URL ${resource.url}.`
121
+ );
122
+ }
123
+
124
+ return new EarthOrientationParameters({
125
+ addNewLeapSeconds: options.addNewLeapSeconds,
126
+ data: eopData,
127
+ });
128
+ };
129
+
110
130
  /**
111
131
  * A default {@link EarthOrientationParameters} instance that returns zero for all EOP values.
112
132
  */
113
133
  EarthOrientationParameters.NONE = Object.freeze({
114
- getPromiseToLoad: function () {
115
- return Promise.resolve();
116
- },
117
134
  compute: function (date, result) {
118
135
  if (!defined(result)) {
119
136
  result = new EarthOrientationParametersSample(0.0, 0.0, 0.0, 0.0, 0.0);
@@ -128,16 +145,6 @@ EarthOrientationParameters.NONE = Object.freeze({
128
145
  },
129
146
  });
130
147
 
131
- /**
132
- * Gets a promise that, when resolved, indicates that the EOP data has been loaded and is
133
- * ready to use.
134
- *
135
- * @returns {Promise<void>} The promise.
136
- */
137
- EarthOrientationParameters.prototype.getPromiseToLoad = function () {
138
- return Promise.resolve(this._downloadPromise);
139
- };
140
-
141
148
  /**
142
149
  * Computes the Earth Orientation Parameters (EOP) for a given date by interpolating.
143
150
  * If the EOP data has not yet been download, this method returns undefined.
@@ -151,15 +158,11 @@ EarthOrientationParameters.prototype.getPromiseToLoad = function () {
151
158
  *
152
159
  * @exception {RuntimeError} The loaded EOP data has an error and cannot be used.
153
160
  *
154
- * @see EarthOrientationParameters#getPromiseToLoad
161
+ * @see EarthOrientationParameters#fromUrl
155
162
  */
156
163
  EarthOrientationParameters.prototype.compute = function (date, result) {
157
164
  // We cannot compute until the samples are available.
158
165
  if (!defined(this._samples)) {
159
- if (defined(this._dataError)) {
160
- throw new RuntimeError(this._dataError);
161
- }
162
-
163
166
  return undefined;
164
167
  }
165
168
 
@@ -237,15 +240,15 @@ function compareLeapSecondDates(leapSecond, dateToFind) {
237
240
 
238
241
  function onDataReady(eop, eopData) {
239
242
  if (!defined(eopData.columnNames)) {
240
- eop._dataError =
241
- "Error in loaded EOP data: The columnNames property is required.";
242
- return;
243
+ throw new RuntimeError(
244
+ "Error in loaded EOP data: The columnNames property is required."
245
+ );
243
246
  }
244
247
 
245
248
  if (!defined(eopData.samples)) {
246
- eop._dataError =
247
- "Error in loaded EOP data: The samples property is required.";
248
- return;
249
+ throw new RuntimeError(
250
+ "Error in loaded EOP data: The samples property is required."
251
+ );
249
252
  }
250
253
 
251
254
  const dateColumn = eopData.columnNames.indexOf("modifiedJulianDateUtc");
@@ -277,9 +280,9 @@ function onDataReady(eop, eopData) {
277
280
  yCelestialPoleOffsetRadiansColumn < 0 ||
278
281
  taiMinusUtcSecondsColumn < 0
279
282
  ) {
280
- eop._dataError =
281
- "Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";
282
- return;
283
+ throw new RuntimeError(
284
+ "Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns"
285
+ );
283
286
  }
284
287
 
285
288
  const samples = (eop._samples = eopData.samples);
@@ -428,4 +431,5 @@ function interpolate(eop, dates, samples, date, before, after, result) {
428
431
  );
429
432
  return result;
430
433
  }
434
+
431
435
  export default EarthOrientationParameters;
@@ -1,3 +1,4 @@
1
+ import Check from "./Check.js";
1
2
  import defaultValue from "./defaultValue.js";
2
3
  import defined from "./defined.js";
3
4
  import DeveloperError from "./DeveloperError.js";
@@ -408,4 +409,21 @@ FeatureDetection.supportsWebWorkers = function () {
408
409
  FeatureDetection.supportsWebAssembly = function () {
409
410
  return typeof WebAssembly !== "undefined";
410
411
  };
412
+
413
+ /**
414
+ * Detects whether the current browser supports a WebGL2 rendering context for the specified scene.
415
+ *
416
+ * @param {Scene} scene the Cesium scene specifying the rendering context
417
+ * @returns {Boolean} true if the browser supports a WebGL2 rendering context, false if not.
418
+ *
419
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext|WebGL2RenderingContext}
420
+ */
421
+ FeatureDetection.supportsWebgl2 = function (scene) {
422
+ //>>includeStart('debug', pragmas.debug);
423
+ Check.defined("scene", scene);
424
+ //>>includeEnd('debug');
425
+
426
+ return scene.context.webgl2;
427
+ };
428
+
411
429
  export default FeatureDetection;
@@ -4,8 +4,7 @@ import Resource from "./Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmMmM4Yzc0YS02ZTM4LTQwODItOGI4ZC04OTI3Yzk5MjJlMGEiLCJpZCI6MjU5LCJpYXQiOjE2Njk5MDUxNDh9.tcSYhz3-NLfuOdb1w9wHOw-Ps85-AyR_mBYRHDifEi8";
8
-
7
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3NTUwMzYxOS04YmYzLTRkMzAtYjIyMy03ZmY3MjExZWNiNzciLCJpZCI6MjU5LCJpYXQiOjE2NzUyNzM5NjF9.rR_X1Phio3WgkIiwLJfSPMVTJEdSHKzj6GY9oNwttfo";
9
8
  /**
10
9
  * Default settings for accessing the Cesium ion API.
11
10
  *
@@ -613,6 +613,7 @@ const scaleScratch4 = new Cartesian2();
613
613
  *
614
614
  * @param {Matrix2} matrix The matrix.
615
615
  * @param {Matrix2} rotation The rotation matrix.
616
+ * @param {Matrix2} result The object onto which to store the result.
616
617
  * @returns {Matrix2} The modified result parameter.
617
618
  *
618
619
  * @see Matrix2.fromRotation
@@ -782,7 +783,7 @@ Matrix2.multiplyByScalar = function (matrix, scalar, result) {
782
783
  * Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.
783
784
  *
784
785
  * @param {Matrix2} matrix The matrix on the left-hand side.
785
- * @param {Number} scale The non-uniform scale on the right-hand side.
786
+ * @param {Cartesian2} scale The non-uniform scale on the right-hand side.
786
787
  * @param {Matrix2} result The object onto which to store the result.
787
788
  * @returns {Matrix2} The modified result parameter.
788
789
  *
@@ -974,6 +974,7 @@ const scaleScratch4 = new Cartesian3();
974
974
  *
975
975
  * @param {Matrix3} matrix The matrix.
976
976
  * @param {Matrix3} rotation The rotation matrix.
977
+ * @param {Matrix3} result The object onto which to store the result.
977
978
  * @returns {Matrix3} The modified result parameter.
978
979
  *
979
980
  * @see Matrix3.getRotation
@@ -1193,7 +1194,7 @@ Matrix3.multiplyByScalar = function (matrix, scalar, result) {
1193
1194
  * Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.
1194
1195
  *
1195
1196
  * @param {Matrix3} matrix The matrix on the left-hand side.
1196
- * @param {Number} scale The non-uniform scale on the right-hand side.
1197
+ * @param {Cartesian3} scale The non-uniform scale on the right-hand side.
1197
1198
  * @param {Matrix3} result The object onto which to store the result.
1198
1199
  * @returns {Matrix3} The modified result parameter.
1199
1200
  *
@@ -1633,6 +1633,7 @@ const scaleScratch4 = new Cartesian3();
1633
1633
  *
1634
1634
  * @param {Matrix4} matrix The matrix.
1635
1635
  * @param {Matrix3} rotation The rotation matrix.
1636
+ * @param {Matrix4} result The object onto which to store the result.
1636
1637
  * @returns {Matrix4} The modified result parameter.
1637
1638
  *
1638
1639
  * @see Matrix4.fromRotation
@@ -18,13 +18,13 @@ import Rectangle from "./Rectangle.js";
18
18
 
19
19
  /**
20
20
  * Creates an instance of an OrientedBoundingBox.
21
- * An OrientedBoundingBox of some object is a closed and convex cuboid. It can provide a tighter bounding volume than {@link BoundingSphere} or {@link AxisAlignedBoundingBox} in many cases.
21
+ * An OrientedBoundingBox of some object is a closed and convex rectangular cuboid. It can provide a tighter bounding volume than {@link BoundingSphere} or {@link AxisAlignedBoundingBox} in many cases.
22
22
  * @alias OrientedBoundingBox
23
23
  * @constructor
24
24
  *
25
25
  * @param {Cartesian3} [center=Cartesian3.ZERO] The center of the box.
26
26
  * @param {Matrix3} [halfAxes=Matrix3.ZERO] The three orthogonal half-axes of the bounding box.
27
- * Equivalently, the transformation matrix, to rotate and scale a 0x0x0
27
+ * Equivalently, the transformation matrix, to rotate and scale a 1x1x1
28
28
  * cube centered at the origin.
29
29
  *
30
30
  *
@@ -334,7 +334,7 @@ const scratchPlane = new Plane(Cartesian3.UNIT_X, 0.0);
334
334
  * @param {OrientedBoundingBox} [result] The object onto which to store the result.
335
335
  * @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided.
336
336
  *
337
- * @exception {DeveloperError} rectangle.width must be between 0 and pi.
337
+ * @exception {DeveloperError} rectangle.width must be between 0 and 2 * pi.
338
338
  * @exception {DeveloperError} rectangle.height must be between 0 and pi.
339
339
  * @exception {DeveloperError} ellipsoid must be an ellipsoid of revolution (<code>radii.x == radii.y</code>)
340
340
  */
@@ -350,7 +350,7 @@ OrientedBoundingBox.fromRectangle = function (
350
350
  throw new DeveloperError("rectangle is required");
351
351
  }
352
352
  if (rectangle.width < 0.0 || rectangle.width > CesiumMath.TWO_PI) {
353
- throw new DeveloperError("Rectangle width must be between 0 and 2*pi");
353
+ throw new DeveloperError("Rectangle width must be between 0 and 2 * pi");
354
354
  }
355
355
  if (rectangle.height < 0.0 || rectangle.height > CesiumMath.PI) {
356
356
  throw new DeveloperError("Rectangle height must be between 0 and pi");
@@ -31,6 +31,22 @@ const PixelFormat = {
31
31
  */
32
32
  ALPHA: WebGLConstants.ALPHA,
33
33
 
34
+ /**
35
+ * A pixel format containing a red channel
36
+ *
37
+ * @type {Number}
38
+ * @constant
39
+ */
40
+ RED: WebGLConstants.RED,
41
+
42
+ /**
43
+ * A pixel format containing red and green channels.
44
+ *
45
+ * @type {Number}
46
+ * @constant
47
+ */
48
+ RG: WebGLConstants.RG,
49
+
34
50
  /**
35
51
  * A pixel format containing red, green, and blue channels.
36
52
  *
@@ -178,8 +194,10 @@ PixelFormat.componentsLength = function (pixelFormat) {
178
194
  case PixelFormat.RGBA:
179
195
  return 4;
180
196
  case PixelFormat.LUMINANCE_ALPHA:
197
+ case PixelFormat.RG:
181
198
  return 2;
182
199
  case PixelFormat.ALPHA:
200
+ case PixelFormat.RED:
183
201
  case PixelFormat.LUMINANCE:
184
202
  return 1;
185
203
  default:
@@ -195,6 +213,8 @@ PixelFormat.validate = function (pixelFormat) {
195
213
  pixelFormat === PixelFormat.DEPTH_COMPONENT ||
196
214
  pixelFormat === PixelFormat.DEPTH_STENCIL ||
197
215
  pixelFormat === PixelFormat.ALPHA ||
216
+ pixelFormat === PixelFormat.RED ||
217
+ pixelFormat === PixelFormat.RG ||
198
218
  pixelFormat === PixelFormat.RGB ||
199
219
  pixelFormat === PixelFormat.RGBA ||
200
220
  pixelFormat === PixelFormat.LUMINANCE ||
@@ -469,7 +489,7 @@ PixelFormat.toInternalFormat = function (pixelFormat, pixelDatatype, context) {
469
489
  return WebGLConstants.RGB32F;
470
490
  case PixelFormat.RG:
471
491
  return WebGLConstants.RG32F;
472
- case PixelFormat.R:
492
+ case PixelFormat.RED:
473
493
  return WebGLConstants.R32F;
474
494
  }
475
495
  }
@@ -482,7 +502,7 @@ PixelFormat.toInternalFormat = function (pixelFormat, pixelDatatype, context) {
482
502
  return WebGLConstants.RGB16F;
483
503
  case PixelFormat.RG:
484
504
  return WebGLConstants.RG16F;
485
- case PixelFormat.R:
505
+ case PixelFormat.RED:
486
506
  return WebGLConstants.R16F;
487
507
  }
488
508
  }
@@ -264,7 +264,7 @@ S2Cell.getIdFromToken = function (token) {
264
264
  * Converts a 64-bit S2 cell ID to an S2 cell token.
265
265
  *
266
266
  * @param {BigInt} [cellId] The S2 cell ID.
267
- * @returns {BigInt} Returns hexadecimal representation of an S2CellId.
267
+ * @returns {string} Returns hexadecimal representation of an S2CellId.
268
268
  * @private
269
269
  */
270
270
  S2Cell.getTokenFromId = function (cellId) {
@@ -378,7 +378,7 @@ S2Cell.prototype.getParentAtLevel = function (level) {
378
378
  * Get center of the S2 cell.
379
379
  *
380
380
  * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
381
- * @returns {Cartesian} The position of center of the S2 cell.
381
+ * @returns {Cartesian3} The position of center of the S2 cell.
382
382
  * @private
383
383
  */
384
384
  S2Cell.prototype.getCenter = function (ellipsoid) {
@@ -400,7 +400,7 @@ S2Cell.prototype.getCenter = function (ellipsoid) {
400
400
  *
401
401
  * @param {Number} index An integer index of the vertex. Must be in the range [0-3].
402
402
  * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
403
- * @returns {Cartesian} The position of the vertex of the S2 cell.
403
+ * @returns {Cartesian3} The position of the vertex of the S2 cell.
404
404
  * @private
405
405
  */
406
406
  S2Cell.prototype.getVertex = function (index, ellipsoid) {
@@ -659,9 +659,8 @@ const j2000ttDays = 2451545.0;
659
659
  *
660
660
  * @example
661
661
  * const interval = new Cesium.TimeInterval(...);
662
- * Promise.resolve(Cesium.Transforms.preloadIcrfFixed(interval)).then(function() {
663
- * // the data is now loaded
664
- * });
662
+ * await Cesium.Transforms.preloadIcrfFixed(interval));
663
+ * // the data is now loaded
665
664
  *
666
665
  * @see Transforms.computeIcrfToFixedMatrix
667
666
  * @see Transforms.computeFixedToIcrfMatrix
@@ -672,15 +671,12 @@ Transforms.preloadIcrfFixed = function (timeInterval) {
672
671
  const stopDayTT = timeInterval.stop.dayNumber;
673
672
  const stopSecondTT = timeInterval.stop.secondsOfDay + ttMinusTai;
674
673
 
675
- const xysPromise = Transforms.iau2006XysData.preload(
674
+ return Transforms.iau2006XysData.preload(
676
675
  startDayTT,
677
676
  startSecondTT,
678
677
  stopDayTT,
679
678
  stopSecondTT
680
679
  );
681
- const eopPromise = Transforms.earthOrientationParameters.getPromiseToLoad();
682
-
683
- return Promise.all([xysPromise, eopPromise]);
684
680
  };
685
681
 
686
682
  /**
@@ -1,4 +1,5 @@
1
1
  import Check from "./Check.js";
2
+ import defined from "./defined.js";
2
3
 
3
4
  /**
4
5
  * Initiates a terrain height query for an array of {@link Cartographic} positions by
@@ -132,6 +133,10 @@ function doSampling(terrainProvider, level, positions) {
132
133
  const tileRequestSet = {}; // A unique set
133
134
  for (i = 0; i < positions.length; ++i) {
134
135
  const xy = tilingScheme.positionToTileXY(positions[i], level);
136
+ if (!defined(xy)) {
137
+ continue;
138
+ }
139
+
135
140
  const key = xy.toString();
136
141
 
137
142
  if (!tileRequestSet.hasOwnProperty(key)) {
@@ -41,11 +41,9 @@ const autolinker = new Autolinker({
41
41
  stripPrefix: false,
42
42
  email: false,
43
43
  replaceFn: function (linker, match) {
44
- if (!match.protocolUrlMatch) {
45
- // Prevent matching of non-explicit urls.
46
- // i.e. foo.id won't match but http://foo.id will
47
- return false;
48
- }
44
+ //Prevent matching of non-explicit urls.
45
+ //i.e. foo.id won't match but http://foo.id will
46
+ return match.urlMatchType === "scheme" || match.urlMatchType === "www";
49
47
  },
50
48
  });
51
49
 
@@ -754,7 +752,7 @@ function GpxDataSource() {
754
752
  this._error = new Event();
755
753
  this._loading = new Event();
756
754
  this._clock = undefined;
757
- this._entityCollection = new EntityCollection();
755
+ this._entityCollection = new EntityCollection(this);
758
756
  this._entityCluster = new EntityCluster();
759
757
  this._name = undefined;
760
758
  this._version = undefined;
@@ -143,11 +143,9 @@ const autolinker = new Autolinker({
143
143
  stripPrefix: false,
144
144
  email: false,
145
145
  replaceFn: function (match) {
146
- if (!match.protocolUrlMatch) {
147
- //Prevent matching of non-explicit urls.
148
- //i.e. foo.id won't match but http://foo.id will
149
- return false;
150
- }
146
+ //Prevent matching of non-explicit urls.
147
+ //i.e. foo.id won't match but http://foo.id will
148
+ return match.urlMatchType === "scheme" || match.urlMatchType === "www";
151
149
  },
152
150
  });
153
151
 
@@ -151,7 +151,7 @@ const AutomaticUniforms = {
151
151
  *
152
152
  * // Get the depth at the current fragment
153
153
  * vec2 coords = gl_FragCoord.xy / czm_viewport.zw;
154
- * float depth = czm_unpackDepth(texture2D(czm_globeDepthTexture, coords));
154
+ * float depth = czm_unpackDepth(texture(czm_globeDepthTexture, coords));
155
155
  */
156
156
  czm_globeDepthTexture: new AutomaticUniform({
157
157
  size: 1,
@@ -1400,7 +1400,7 @@ const AutomaticUniforms = {
1400
1400
  * // Example: For a given roughness and NdotV value, find the material's BRDF information in the red and green channels
1401
1401
  * float roughness = 0.5;
1402
1402
  * float NdotV = dot(normal, view);
1403
- * vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;
1403
+ * vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;
1404
1404
  */
1405
1405
  czm_brdfLut: new AutomaticUniform({
1406
1406
  size: 1,
@@ -1419,7 +1419,7 @@ const AutomaticUniforms = {
1419
1419
  *
1420
1420
  * // Example: Create a perfect reflection of the environment map on a model
1421
1421
  * float reflected = reflect(view, normal);
1422
- * vec4 reflectedColor = textureCube(czm_environmentMap, reflected);
1422
+ * vec4 reflectedColor = texture(czm_environmentMap, reflected);
1423
1423
  */
1424
1424
  czm_environmentMap: new AutomaticUniform({
1425
1425
  size: 1,