@cesium/engine 21.0.1-ion.0 → 22.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.
- package/Build/Workers/{chunk-LSNF6CIP.js → chunk-2D3GLFZD.js} +12 -12
- package/Build/Workers/chunk-34YXP222.js +352 -0
- package/Build/Workers/{chunk-OLH67Z2S.js → chunk-3GL53OCU.js} +17 -18
- package/Build/Workers/{chunk-WIPOMPA5.js → chunk-5B7VZQZY.js} +6 -6
- package/Build/Workers/{chunk-NWJRIJQG.js → chunk-5T5SY63I.js} +2 -2
- package/Build/Workers/{chunk-DTYIUWZU.js → chunk-5ZF53EY6.js} +4 -4
- package/Build/Workers/{chunk-UTTKH2UG.js → chunk-6HBKE43B.js} +7 -7
- package/Build/Workers/{chunk-ZTGZMKAB.js → chunk-726NINF5.js} +16 -16
- package/Build/Workers/{chunk-L73TRTIG.js → chunk-75HAJIDT.js} +1 -1
- package/Build/Workers/{chunk-G5RX7BPJ.js → chunk-7KAXDKRU.js} +10 -10
- package/Build/Workers/chunk-7XEJGXX2.js +2759 -0
- package/Build/Workers/{chunk-ZOVMWDPW.js → chunk-A4DPJIWS.js} +18 -10
- package/Build/Workers/{chunk-UTL4WVC3.js → chunk-A6JAFSZT.js} +5 -5
- package/Build/Workers/{chunk-E6T4LSM6.js → chunk-AARZSH4V.js} +5 -5
- package/Build/Workers/{chunk-EEDSGIH7.js → chunk-AOM3FHBN.js} +6 -6
- package/Build/Workers/{chunk-WJV24LAS.js → chunk-BJSNGGBM.js} +4 -4
- package/Build/Workers/{chunk-VIDWZGD6.js → chunk-ECHAJNQJ.js} +12 -12
- package/Build/Workers/{chunk-MIFUV36K.js → chunk-EJO3NKMS.js} +1 -1
- package/Build/Workers/{chunk-ADADBRLI.js → chunk-EZ7NJXQN.js} +4 -4
- package/Build/Workers/{chunk-MJWRSKJV.js → chunk-FA3SCJDX.js} +2 -2
- package/Build/Workers/{chunk-XFS2ORSO.js → chunk-GYRDA3XK.js} +14 -14
- package/Build/Workers/{chunk-3XTJC4CV.js → chunk-H7B7FU2U.js} +7 -7
- package/Build/Workers/{chunk-HDBIC7IL.js → chunk-IGX772ZQ.js} +1 -1
- package/Build/Workers/{chunk-EHMAKCWQ.js → chunk-JDJAPBZP.js} +1 -1
- package/Build/Workers/{chunk-LK7H6V2E.js → chunk-JZFU2LEM.js} +4 -4
- package/Build/Workers/{chunk-3K4DRV7Y.js → chunk-KGLDJRSO.js} +9 -9
- package/Build/Workers/{chunk-LEFV6H2V.js → chunk-KUB64XW6.js} +11 -11
- package/Build/Workers/{chunk-26ZRRKTU.js → chunk-L7U26FFD.js} +16 -16
- package/Build/Workers/{chunk-T7WXNKIA.js → chunk-LEFQBK6H.js} +11 -11
- package/Build/Workers/{chunk-75UG66GR.js → chunk-LWJXCI3F.js} +5 -5
- package/Build/Workers/{chunk-ESPNIYL5.js → chunk-M7HRE4QR.js} +8 -8
- package/Build/Workers/{chunk-SGEAS4NZ.js → chunk-MXHRZHDF.js} +6 -6
- package/Build/Workers/{chunk-YFZMB6FZ.js → chunk-N52ZRKUE.js} +6 -6
- package/Build/Workers/{chunk-AQ4A5CMC.js → chunk-NE5JTQJP.js} +7 -7
- package/Build/Workers/{chunk-G74UMFQ4.js → chunk-NGKF5NTR.js} +5 -5
- package/Build/Workers/{chunk-TXK2FF6N.js → chunk-NHZNMTIR.js} +5 -5
- package/Build/Workers/{chunk-2PX2ULSM.js → chunk-OE22564R.js} +3 -3
- package/Build/Workers/{chunk-AGT6W3JS.js → chunk-OUBBMEWX.js} +6 -6
- package/Build/Workers/{chunk-JESBYOH5.js → chunk-P2H75UV5.js} +67 -33
- package/Build/Workers/{chunk-B56XVJRS.js → chunk-QCMRUVVF.js} +12 -12
- package/Build/Workers/{chunk-SDFGZML6.js → chunk-QSMIHPUM.js} +2 -2
- package/Build/Workers/{chunk-SF2XXYOB.js → chunk-RCCYW6E7.js} +12 -12
- package/Build/Workers/{chunk-EZJXK2UP.js → chunk-RQRODXVN.js} +4 -4
- package/Build/Workers/{chunk-WMG6UOCJ.js → chunk-SZN34LQ5.js} +10 -10
- package/Build/Workers/{chunk-XYBFMHXA.js → chunk-U4XMLGSR.js} +7 -7
- package/Build/Workers/{chunk-KGL66RWW.js → chunk-U7CX3HHE.js} +8 -8
- package/Build/Workers/{chunk-MFPT34BC.js → chunk-VCVA7BMD.js} +4 -4
- package/Build/Workers/{chunk-H3G7OYZY.js → chunk-VVZ667H6.js} +2 -2
- package/Build/Workers/{chunk-PQW63B2T.js → chunk-W4PIP5PG.js} +2 -2
- package/Build/Workers/{chunk-XPTKQIVN.js → chunk-XPVZWY4A.js} +8 -8
- package/Build/Workers/{chunk-OWCFUM4Z.js → chunk-XQ347YWU.js} +13 -13
- package/Build/Workers/{chunk-MBIUW42A.js → chunk-XZO6F23E.js} +1 -1
- package/Build/Workers/{chunk-6KX3IUUT.js → chunk-YLILBDWK.js} +2 -2
- package/Build/Workers/{chunk-RFZAUDYZ.js → chunk-YLXWC7OW.js} +4 -4
- package/Build/Workers/combineGeometry.js +21 -21
- package/Build/Workers/createBoxGeometry.js +15 -15
- package/Build/Workers/createBoxOutlineGeometry.js +13 -13
- package/Build/Workers/createCircleGeometry.js +23 -23
- package/Build/Workers/createCircleOutlineGeometry.js +16 -16
- package/Build/Workers/createCoplanarPolygonGeometry.js +30 -30
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +28 -28
- package/Build/Workers/createCorridorGeometry.js +26 -26
- package/Build/Workers/createCorridorOutlineGeometry.js +25 -25
- package/Build/Workers/createCylinderGeometry.js +17 -17
- package/Build/Workers/createCylinderOutlineGeometry.js +15 -15
- package/Build/Workers/createEllipseGeometry.js +23 -23
- package/Build/Workers/createEllipseOutlineGeometry.js +16 -16
- package/Build/Workers/createEllipsoidGeometry.js +16 -16
- package/Build/Workers/createEllipsoidOutlineGeometry.js +15 -15
- package/Build/Workers/createFrustumGeometry.js +15 -15
- package/Build/Workers/createFrustumOutlineGeometry.js +15 -15
- package/Build/Workers/createGeometry.js +24 -22
- package/Build/Workers/createGroundPolylineGeometry.js +19 -19
- package/Build/Workers/createPlaneGeometry.js +13 -13
- package/Build/Workers/createPlaneOutlineGeometry.js +12 -12
- package/Build/Workers/createPolygonGeometry.js +29 -29
- package/Build/Workers/createPolygonOutlineGeometry.js +27 -27
- package/Build/Workers/createPolylineGeometry.js +22 -22
- package/Build/Workers/createPolylineVolumeGeometry.js +28 -28
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +24 -24
- package/Build/Workers/createRectangleGeometry.js +24 -24
- package/Build/Workers/createRectangleOutlineGeometry.js +17 -17
- package/Build/Workers/createSimplePolylineGeometry.js +20 -20
- package/Build/Workers/createSphereGeometry.js +16 -16
- package/Build/Workers/createSphereOutlineGeometry.js +15 -15
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +12 -12
- package/Build/Workers/createVectorTileGeometries.js +21 -21
- package/Build/Workers/createVectorTilePoints.js +11 -11
- package/Build/Workers/createVectorTilePolygons.js +19 -19
- package/Build/Workers/createVectorTilePolylines.js +12 -12
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +88 -0
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +21 -21
- package/Build/Workers/createVerticesFromHeightmap.js +21 -21
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -277
- package/Build/Workers/createWallGeometry.js +21 -21
- package/Build/Workers/createWallOutlineGeometry.js +20 -20
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +9 -9
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/transcodeKTX2.js +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +19 -19
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +92 -0
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +2 -2
- package/Source/Core/Cesium3DTilesTerrainData.js +930 -0
- package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +1866 -0
- package/Source/Core/Cesium3DTilesTerrainProvider.js +1052 -0
- package/Source/Core/CesiumTerrainProvider.js +2 -2
- package/Source/Core/Color.js +23 -6
- package/Source/Core/EllipsoidalOccluder.js +2 -2
- package/Source/Core/FeatureDetection.js +0 -2
- package/Source/Core/GoogleEarthEnterpriseMetadata.js +1 -1
- package/Source/Core/GoogleEarthEnterpriseTerrainData.js +1 -1
- package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -1
- package/Source/Core/HeightmapTerrainData.js +10 -22
- package/Source/Core/HilbertOrder.js +0 -6
- package/Source/Core/ITwinPlatform.js +6 -6
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/IonResource.js +35 -27
- package/Source/Core/PixelFormat.js +2 -2
- package/Source/Core/QuantizedMeshTerrainData.js +23 -57
- package/Source/Core/Resource.js +15 -11
- package/Source/Core/S2Cell.js +6 -18
- package/Source/Core/TaskProcessor.js +1 -1
- package/Source/Core/TerrainData.js +2 -1
- package/Source/Core/TerrainEncoding.js +215 -38
- package/Source/Core/TerrainMesh.js +8 -8
- package/Source/Core/TerrainProvider.js +151 -0
- package/Source/Core/VRTheWorldTerrainProvider.js +2 -2
- package/Source/Core/binarySearch.js +1 -1
- package/Source/Core/createWorldBathymetryAsync.js +2 -2
- package/Source/Core/createWorldTerrainAsync.js +3 -3
- package/Source/Core/loadImageFromTypedArray.js +9 -3
- package/Source/Core/mergeSort.js +1 -1
- package/Source/DataSources/PropertyArray.js +2 -2
- package/Source/Renderer/AutomaticUniforms.js +61 -0
- package/Source/Renderer/Context.js +13 -7
- package/Source/Renderer/Pass.js +10 -9
- package/Source/Renderer/UniformState.js +12 -0
- package/Source/Renderer/VertexArray.js +1 -1
- package/Source/Scene/ArcGisMapServerImageryProvider.js +1 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Azure2DImageryProvider.js +7 -5
- package/Source/Scene/BatchTable.js +2 -2
- package/Source/Scene/BillboardCollection.js +25 -21
- package/Source/Scene/BingMapsImageryProvider.js +1 -1
- package/Source/Scene/BoundingVolumeSemantics.js +54 -62
- package/Source/Scene/Cesium3DTile.js +3 -3
- package/Source/Scene/Cesium3DTilesVoxelProvider.js +1 -1
- package/Source/Scene/Cesium3DTileset.js +1 -1
- package/Source/Scene/EdgeFramebuffer.js +245 -0
- package/Source/Scene/FrameState.js +12 -0
- package/Source/Scene/GaussianSplat3DTileContent.js +12 -16
- package/Source/Scene/GaussianSplatPrimitive.js +12 -8
- package/Source/Scene/GaussianSplatSorter.js +2 -2
- package/Source/Scene/Globe.js +1 -1
- package/Source/Scene/GlobeSurfaceTile.js +10 -4
- package/Source/Scene/GltfBufferViewLoader.js +18 -0
- package/Source/Scene/GltfLoader.js +46 -8
- package/Source/Scene/Google2DImageryProvider.js +39 -27
- package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +1 -1
- package/Source/Scene/I3SDataProvider.js +1 -1
- package/Source/Scene/I3SDecoder.js +3 -3
- package/Source/Scene/ITwinData.js +4 -4
- package/Source/Scene/ImageryLayer.js +1 -1
- package/Source/Scene/Implicit3DTileContent.js +18 -7
- package/Source/Scene/ImplicitSubtree.js +3 -3
- package/Source/Scene/ImplicitTileset.js +2 -2
- package/Source/Scene/IonImageryProvider.js +15 -84
- package/Source/Scene/IonImageryProviderFactory.js +194 -0
- package/Source/Scene/LabelCollection.js +54 -36
- package/Source/Scene/MetadataComponentType.js +5 -5
- package/Source/Scene/MetadataTableProperty.js +3 -9
- package/Source/Scene/Model/EdgeDetectionPipelineStage.js +42 -0
- package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +800 -0
- package/Source/Scene/Model/MetadataPipelineStage.js +7 -7
- package/Source/Scene/Model/ModelDrawCommand.js +69 -0
- package/Source/Scene/Model/ModelImagery.js +4 -0
- package/Source/Scene/Model/ModelRuntimeNode.js +2 -2
- package/Source/Scene/Model/ModelRuntimePrimitive.js +13 -2
- package/Source/Scene/Model/ModelSceneGraph.js +15 -3
- package/Source/Scene/Model/ModelUtility.js +0 -1
- package/Source/Scene/Model/NodeRenderResources.js +1 -1
- package/Source/Scene/Model/PrimitiveRenderResources.js +1 -1
- package/Source/Scene/OIT.js +11 -1
- package/Source/Scene/PickFramebuffer.js +13 -17
- package/Source/Scene/Picking.js +104 -80
- package/Source/Scene/QuadtreePrimitive.js +34 -26
- package/Source/Scene/QuadtreeTile.js +66 -46
- package/Source/Scene/ResourceLoaderState.js +1 -1
- package/Source/Scene/Scene.js +124 -12
- package/Source/Scene/ScreenSpaceCameraController.js +1 -1
- package/Source/Scene/SensorVolumePortionToDisplay.js +6 -6
- package/Source/Scene/SingleTileImageryProvider.js +3 -3
- package/Source/Scene/Terrain.js +5 -5
- package/Source/Scene/TileMapServiceImageryProvider.js +2 -2
- package/Source/Scene/UrlTemplateImageryProvider.js +1 -1
- package/Source/Scene/View.js +3 -0
- package/Source/Scene/VoxelPrimitive.js +196 -189
- package/Source/Scene/VoxelShape.js +2 -0
- package/Source/Scene/createWorldImageryAsync.js +1 -1
- package/Source/Shaders/BillboardCollectionFS.glsl +102 -62
- package/Source/Shaders/BillboardCollectionFS.js +102 -63
- package/Source/Shaders/BillboardCollectionVS.glsl +44 -37
- package/Source/Shaders/BillboardCollectionVS.js +45 -38
- package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileEdges.glsl +10 -0
- package/Source/Shaders/Builtin/Constants/passCesium3DTileEdges.js +12 -0
- package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +1 -1
- package/Source/Shaders/Builtin/Constants/passOpaque.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
- package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
- package/Source/Shaders/GlobeVS.glsl +1 -1
- package/Source/Shaders/GlobeVS.js +1 -1
- package/Source/Shaders/Model/EdgeDetectionStageFS.glsl +58 -0
- package/Source/Shaders/Model/EdgeDetectionStageFS.js +60 -0
- package/Source/Shaders/Model/EdgeVisibilityStageFS.glsl +83 -0
- package/Source/Shaders/Model/EdgeVisibilityStageFS.js +85 -0
- package/Source/Shaders/Model/ModelFS.glsl +5 -0
- package/Source/Shaders/Model/ModelFS.js +5 -0
- package/Source/Shaders/Model/PrimitiveOutlineStageFS.glsl +0 -1
- package/Source/Shaders/Model/PrimitiveOutlineStageFS.js +0 -1
- package/Source/Shaders/ShadowVolumeAppearanceFS.glsl +7 -15
- package/Source/Shaders/ShadowVolumeAppearanceFS.js +7 -15
- package/Source/Workers/createVerticesFromCesium3DTilesTerrain.js +46 -0
- package/Source/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +55 -0
- package/index.d.ts +281 -27
- package/index.js +176 -166
- package/package.json +2 -1
|
@@ -15,6 +15,8 @@ import CesiumMath from "./Math.js";
|
|
|
15
15
|
* @see CesiumTerrainProvider
|
|
16
16
|
* @see VRTheWorldTerrainProvider
|
|
17
17
|
* @see GoogleEarthEnterpriseTerrainProvider
|
|
18
|
+
* @see ArcGISTiledElevationTerrainProvider
|
|
19
|
+
* @see Cesium3DTilesTerrainProvider
|
|
18
20
|
*/
|
|
19
21
|
function TerrainProvider() {
|
|
20
22
|
DeveloperError.throwInstantiationError();
|
|
@@ -236,7 +238,80 @@ TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices = function (
|
|
|
236
238
|
};
|
|
237
239
|
|
|
238
240
|
/**
|
|
241
|
+
* Calculates the number of skirt vertices given the edge indices.
|
|
239
242
|
* @private
|
|
243
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} westIndicesSouthToNorth Edge indices along the west side of the tile.
|
|
244
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} southIndicesEastToWest Edge indices along the south side of the tile.
|
|
245
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} eastIndicesNorthToSouth Edge indices along the east side of the tile.
|
|
246
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} northIndicesWestToEast Edge indices along the north side of the tile.
|
|
247
|
+
* @returns {number} The number of skirt vertices.
|
|
248
|
+
*/
|
|
249
|
+
TerrainProvider.getSkirtVertexCount = function (
|
|
250
|
+
westIndicesSouthToNorth,
|
|
251
|
+
southIndicesEastToWest,
|
|
252
|
+
eastIndicesNorthToSouth,
|
|
253
|
+
northIndicesWestToEast,
|
|
254
|
+
) {
|
|
255
|
+
return (
|
|
256
|
+
westIndicesSouthToNorth.length +
|
|
257
|
+
southIndicesEastToWest.length +
|
|
258
|
+
eastIndicesNorthToSouth.length +
|
|
259
|
+
northIndicesWestToEast.length
|
|
260
|
+
);
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Compute the number of skirt indices given the number of skirt vertices.
|
|
265
|
+
* Consider a 3x3 grid of vertices. There will be 8 skirt vertices around the edge:
|
|
266
|
+
* - 16 edge triangles
|
|
267
|
+
* - 48 indices
|
|
268
|
+
*
|
|
269
|
+
* |\|\|
|
|
270
|
+
* |/| |/|
|
|
271
|
+
* |/| |/|
|
|
272
|
+
* |\|\|
|
|
273
|
+
*
|
|
274
|
+
* @private
|
|
275
|
+
* @param {number} skirtVertexCount
|
|
276
|
+
* @returns {number}
|
|
277
|
+
*/
|
|
278
|
+
TerrainProvider.getSkirtIndexCount = function (skirtVertexCount) {
|
|
279
|
+
return (skirtVertexCount - 4) * 2 * 3;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Compute the number of skirt indices given the number of skirt vertices with filled corners.
|
|
284
|
+
* Consider a 3x3 grid of vertices. There will be 8 skirt vertices around the edge:
|
|
285
|
+
* - 16 edge triangles
|
|
286
|
+
* - 4 cap triangles
|
|
287
|
+
* - 60 indices
|
|
288
|
+
*
|
|
289
|
+
* /|\|\|\
|
|
290
|
+
* |/| |/|
|
|
291
|
+
* |/| |/|
|
|
292
|
+
* \|\|\|/
|
|
293
|
+
*
|
|
294
|
+
* @private
|
|
295
|
+
* @param {number} skirtVertexCount
|
|
296
|
+
* @returns {number}
|
|
297
|
+
*/
|
|
298
|
+
TerrainProvider.getSkirtIndexCountWithFilledCorners = function (
|
|
299
|
+
skirtVertexCount,
|
|
300
|
+
) {
|
|
301
|
+
return ((skirtVertexCount - 4) * 2 + 4) * 3;
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Adds skirt indices.
|
|
306
|
+
* This does not add filled corners. Use {@link TerrainProvider.addSkirtIndicesWithFilledCorners} to add skirt indices with filled corners.
|
|
307
|
+
* @private
|
|
308
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} westIndicesSouthToNorth The indices of the vertices on the Western edge of the tile, ordered from South to North.
|
|
309
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} southIndicesEastToWest The indices of the vertices on the Southern edge of the tile, ordered from East to West.
|
|
310
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} eastIndicesNorthToSouth The indices of the vertices on the Eastern edge of the tile, ordered from North to South.
|
|
311
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} northIndicesWestToEast The indices of the vertices on the Northern edge of the tile, ordered from West to East.
|
|
312
|
+
* @param {number} vertexCount The number of vertices in the tile before adding skirt vertices.
|
|
313
|
+
* @param {Uint16Array|Uint32Array} indices The array of indices to which skirt indices are added.
|
|
314
|
+
* @param {number} offset The offset into the indices array at which to start adding skirt indices.
|
|
240
315
|
*/
|
|
241
316
|
TerrainProvider.addSkirtIndices = function (
|
|
242
317
|
westIndicesSouthToNorth,
|
|
@@ -272,6 +347,82 @@ TerrainProvider.addSkirtIndices = function (
|
|
|
272
347
|
addSkirtIndices(northIndicesWestToEast, vertexIndex, indices, offset);
|
|
273
348
|
};
|
|
274
349
|
|
|
350
|
+
/**
|
|
351
|
+
* Adds skirt indices with filled corners.
|
|
352
|
+
* @private
|
|
353
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} westIndicesSouthToNorth The indices of the vertices on the Western edge of the tile, ordered from South to North.
|
|
354
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} southIndicesEastToWest The indices of the vertices on the Southern edge of the tile, ordered from East to West.
|
|
355
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} eastIndicesNorthToSouth The indices of the vertices on the Eastern edge of the tile, ordered from North to South.
|
|
356
|
+
* @param {number[]|Uint8Array|Uint16Array|Uint32Array} northIndicesWestToEast The indices of the vertices on the Northern edge of the tile, ordered from West to East.
|
|
357
|
+
* @param {number} vertexCount The number of vertices in the tile before adding skirt vertices.
|
|
358
|
+
* @param {Uint16Array|Uint32Array} indices The array of indices to which skirt indices are added.
|
|
359
|
+
* @param {number} offset The offset into the indices array at which to start adding skirt indices.
|
|
360
|
+
*/
|
|
361
|
+
TerrainProvider.addSkirtIndicesWithFilledCorners = function (
|
|
362
|
+
westIndicesSouthToNorth,
|
|
363
|
+
southIndicesEastToWest,
|
|
364
|
+
eastIndicesNorthToSouth,
|
|
365
|
+
northIndicesWestToEast,
|
|
366
|
+
vertexCount,
|
|
367
|
+
indices,
|
|
368
|
+
offset,
|
|
369
|
+
) {
|
|
370
|
+
// Add skirt indices without filled corners
|
|
371
|
+
TerrainProvider.addSkirtIndices(
|
|
372
|
+
westIndicesSouthToNorth,
|
|
373
|
+
southIndicesEastToWest,
|
|
374
|
+
eastIndicesNorthToSouth,
|
|
375
|
+
northIndicesWestToEast,
|
|
376
|
+
vertexCount,
|
|
377
|
+
indices,
|
|
378
|
+
offset,
|
|
379
|
+
);
|
|
380
|
+
|
|
381
|
+
const skirtVertexCount = TerrainProvider.getSkirtVertexCount(
|
|
382
|
+
westIndicesSouthToNorth,
|
|
383
|
+
southIndicesEastToWest,
|
|
384
|
+
eastIndicesNorthToSouth,
|
|
385
|
+
northIndicesWestToEast,
|
|
386
|
+
);
|
|
387
|
+
const skirtIndexCountWithoutCaps =
|
|
388
|
+
TerrainProvider.getSkirtIndexCount(skirtVertexCount);
|
|
389
|
+
|
|
390
|
+
const cornerStartIdx = offset + skirtIndexCountWithoutCaps;
|
|
391
|
+
|
|
392
|
+
const cornerSWIndex = westIndicesSouthToNorth[0];
|
|
393
|
+
const cornerNWIndex = northIndicesWestToEast[0];
|
|
394
|
+
const cornerNEIndex = eastIndicesNorthToSouth[0];
|
|
395
|
+
const cornerSEIndex = southIndicesEastToWest[0];
|
|
396
|
+
|
|
397
|
+
// Indices based on edge order in addSkirtIndices
|
|
398
|
+
const westSouthIndex = vertexCount;
|
|
399
|
+
const westNorthIndex = westSouthIndex + westIndicesSouthToNorth.length - 1;
|
|
400
|
+
const southEastIndex = westNorthIndex + 1;
|
|
401
|
+
const southWestIndex = southEastIndex + southIndicesEastToWest.length - 1;
|
|
402
|
+
const eastNorthIndex = southWestIndex + 1;
|
|
403
|
+
const eastSouthIndex = eastNorthIndex + eastIndicesNorthToSouth.length - 1;
|
|
404
|
+
const northWestIndex = eastSouthIndex + 1;
|
|
405
|
+
const northEastIndex = northWestIndex + northIndicesWestToEast.length - 1;
|
|
406
|
+
|
|
407
|
+
// Connect the corner vertices with the skirt vertices extending from the corner
|
|
408
|
+
|
|
409
|
+
indices[cornerStartIdx + 0] = cornerSWIndex;
|
|
410
|
+
indices[cornerStartIdx + 1] = westSouthIndex;
|
|
411
|
+
indices[cornerStartIdx + 2] = southWestIndex;
|
|
412
|
+
|
|
413
|
+
indices[cornerStartIdx + 3] = cornerSEIndex;
|
|
414
|
+
indices[cornerStartIdx + 4] = southEastIndex;
|
|
415
|
+
indices[cornerStartIdx + 5] = eastSouthIndex;
|
|
416
|
+
|
|
417
|
+
indices[cornerStartIdx + 6] = cornerNEIndex;
|
|
418
|
+
indices[cornerStartIdx + 7] = eastNorthIndex;
|
|
419
|
+
indices[cornerStartIdx + 8] = northEastIndex;
|
|
420
|
+
|
|
421
|
+
indices[cornerStartIdx + 9] = cornerNWIndex;
|
|
422
|
+
indices[cornerStartIdx + 10] = northWestIndex;
|
|
423
|
+
indices[cornerStartIdx + 11] = westNorthIndex;
|
|
424
|
+
};
|
|
425
|
+
|
|
275
426
|
function getEdgeIndices(width, height) {
|
|
276
427
|
const westIndicesSouthToNorth = new Array(height);
|
|
277
428
|
const southIndicesEastToWest = new Array(width);
|
|
@@ -20,7 +20,7 @@ function DataRectangle(rectangle, maxLevel) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* @typedef {
|
|
23
|
+
* @typedef {object} VRTheWorldTerrainProvider.ConstructorOptions
|
|
24
24
|
*
|
|
25
25
|
* Initialization options for the VRTheWorldTerrainProvider constructor
|
|
26
26
|
*
|
|
@@ -265,7 +265,7 @@ Object.defineProperties(VRTheWorldTerrainProvider.prototype, {
|
|
|
265
265
|
* Creates a {@link TerrainProvider} that produces terrain geometry by tessellating height maps
|
|
266
266
|
* retrieved from a {@link http://vr-theworld.com/|VT MÄK VR-TheWorld server}.
|
|
267
267
|
*
|
|
268
|
-
* @param {Resource|
|
|
268
|
+
* @param {Resource|string} url The URL of the VR-TheWorld TileMap.
|
|
269
269
|
* @param {VRTheWorldTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
|
|
270
270
|
* @returns {Promise<VRTheWorldTerrainProvider>}
|
|
271
271
|
*
|
|
@@ -4,7 +4,7 @@ import Check from "./Check.js";
|
|
|
4
4
|
* Finds an item in a sorted array.
|
|
5
5
|
*
|
|
6
6
|
* @function
|
|
7
|
-
* @param {Array} array The sorted array to search.
|
|
7
|
+
* @param {Array|Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} array The sorted array to search.
|
|
8
8
|
* @param {*} itemToFind The item to find in the array.
|
|
9
9
|
* @param {binarySearchComparator} comparator The function to use to compare the item to
|
|
10
10
|
* elements in the array.
|
|
@@ -6,8 +6,8 @@ import Frozen from "./Frozen.js";
|
|
|
6
6
|
*
|
|
7
7
|
* @function
|
|
8
8
|
*
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {
|
|
9
|
+
* @param {object} [options] Object with the following properties:
|
|
10
|
+
* @param {boolean} [options.requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server if available.
|
|
11
11
|
* @returns {Promise<CesiumTerrainProvider>} A promise that resolves to the created CesiumTerrainProvider
|
|
12
12
|
*
|
|
13
13
|
* @see Ion
|
|
@@ -7,9 +7,9 @@ import Ellipsoid from "./Ellipsoid.js";
|
|
|
7
7
|
*
|
|
8
8
|
* @function
|
|
9
9
|
*
|
|
10
|
-
* @param {
|
|
11
|
-
* @param {
|
|
12
|
-
* @param {
|
|
10
|
+
* @param {object} [options] Object with the following properties:
|
|
11
|
+
* @param {boolean} [options.requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server if available.
|
|
12
|
+
* @param {boolean} [options.requestWaterMask=false] Flag that indicates if the client should request per tile water masks from the server if available.
|
|
13
13
|
* @returns {Promise<CesiumTerrainProvider>} A promise that resolves to the created CesiumTerrainProvider
|
|
14
14
|
*
|
|
15
15
|
* @see Ion
|
|
@@ -3,12 +3,18 @@ import defined from "./defined.js";
|
|
|
3
3
|
import Resource from "./Resource.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
+
* Loads an image from a typed array.
|
|
7
|
+
* @param {Object} options An object containing the following properties:
|
|
8
|
+
* @param {Uint8Array} options.uint8Array The typed array containing the image data.
|
|
9
|
+
* @param {string} options.format The MIME format of the image (e.g., "image/png").
|
|
10
|
+
* @param {Request} [options.request] The request object to use to fetch the image.
|
|
11
|
+
* @param {boolean} [options.flipY=false] Whether to flip the image vertically.
|
|
12
|
+
* @param {boolean} [options.skipColorSpaceConversion=false] Whether to skip color space conversion.
|
|
13
|
+
* @returns {Promise<HTMLImageElement|HTMLCanvasElement|ImageBitmap>|undefined} A promise that resolves to the loaded image. Returns undefined if <code>request.throttle</code> is true and the request does not have high enough priority.
|
|
6
14
|
* @private
|
|
7
15
|
*/
|
|
8
16
|
function loadImageFromTypedArray(options) {
|
|
9
|
-
const uint8Array = options
|
|
10
|
-
const format = options.format;
|
|
11
|
-
const request = options.request;
|
|
17
|
+
const { uint8Array, format, request } = options;
|
|
12
18
|
const flipY = options.flipY ?? false;
|
|
13
19
|
const skipColorSpaceConversion = options.skipColorSpaceConversion ?? false;
|
|
14
20
|
//>>includeStart('debug', pragmas.debug);
|
package/Source/Core/mergeSort.js
CHANGED
|
@@ -56,7 +56,7 @@ function sort(array, compare, userDefinedObject, start, end) {
|
|
|
56
56
|
* A stable merge sort.
|
|
57
57
|
*
|
|
58
58
|
* @function mergeSort
|
|
59
|
-
* @param {Array} array The array to sort.
|
|
59
|
+
* @param {Array|Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} array The array to sort.
|
|
60
60
|
* @param {mergeSortComparator} comparator The function to use to compare elements in the array.
|
|
61
61
|
* @param {*} [userDefinedObject] Any item to pass as the third parameter to <code>comparator</code>.
|
|
62
62
|
*
|
|
@@ -66,8 +66,8 @@ const timeScratch = new JulianDate();
|
|
|
66
66
|
* Gets the value of the property.
|
|
67
67
|
*
|
|
68
68
|
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
69
|
-
* @param {
|
|
70
|
-
* @returns {
|
|
69
|
+
* @param {object[]} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
70
|
+
* @returns {object[]} The modified result parameter, which is an array of values produced by evaluating each of the contained properties at the given time or a new instance if the result parameter was not supplied.
|
|
71
71
|
*/
|
|
72
72
|
PropertyArray.prototype.getValue = function (time, result) {
|
|
73
73
|
if (!defined(time)) {
|
|
@@ -161,6 +161,67 @@ const AutomaticUniforms = {
|
|
|
161
161
|
},
|
|
162
162
|
}),
|
|
163
163
|
|
|
164
|
+
/**
|
|
165
|
+
* An automatic GLSL uniform representing a texture containing edge IDs
|
|
166
|
+
* from the 3D Tiles edge rendering pass. Used for edge detection and
|
|
167
|
+
* avoiding z-fighting between edges and surfaces.
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* // GLSL declaration
|
|
171
|
+
* uniform sampler2D czm_edgeIdTexture;
|
|
172
|
+
*
|
|
173
|
+
* // Get the edge ID at the current fragment
|
|
174
|
+
* vec2 coords = gl_FragCoord.xy / czm_viewport.zw;
|
|
175
|
+
* vec4 edgeId = texture(czm_edgeIdTexture, coords);
|
|
176
|
+
*/
|
|
177
|
+
czm_edgeIdTexture: new AutomaticUniform({
|
|
178
|
+
size: 1,
|
|
179
|
+
datatype: WebGLConstants.SAMPLER_2D,
|
|
180
|
+
getValue: function (uniformState) {
|
|
181
|
+
return uniformState.edgeIdTexture;
|
|
182
|
+
},
|
|
183
|
+
}),
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* An automatic GLSL uniform containing the edge color texture.
|
|
187
|
+
* This texture contains the edge content rendered during the CESIUM_3D_TILE_EDGES pass.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* // GLSL declaration
|
|
191
|
+
* uniform sampler2D czm_edgeColorTexture;
|
|
192
|
+
*
|
|
193
|
+
* // Sample the edge color at the current fragment
|
|
194
|
+
* vec2 coords = gl_FragCoord.xy / czm_viewport.zw;
|
|
195
|
+
* vec4 edgeColor = texture(czm_edgeColorTexture, coords);
|
|
196
|
+
*/
|
|
197
|
+
czm_edgeColorTexture: new AutomaticUniform({
|
|
198
|
+
size: 1,
|
|
199
|
+
datatype: WebGLConstants.SAMPLER_2D,
|
|
200
|
+
getValue: function (uniformState) {
|
|
201
|
+
return uniformState.edgeColorTexture;
|
|
202
|
+
},
|
|
203
|
+
}),
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* An automatic GLSL uniform containing the packed depth texture produced by the
|
|
207
|
+
* edge visibility pass. The depth is packed via czm_packDepth and should be
|
|
208
|
+
* unpacked with czm_unpackDepth.
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* // GLSL declaration
|
|
212
|
+
* uniform sampler2D czm_edgeDepthTexture;
|
|
213
|
+
*
|
|
214
|
+
* vec2 coords = gl_FragCoord.xy / czm_viewport.zw;
|
|
215
|
+
* float d = czm_unpackDepth(texture(czm_edgeDepthTexture, coords));
|
|
216
|
+
*/
|
|
217
|
+
czm_edgeDepthTexture: new AutomaticUniform({
|
|
218
|
+
size: 1,
|
|
219
|
+
datatype: WebGLConstants.SAMPLER_2D,
|
|
220
|
+
getValue: function (uniformState) {
|
|
221
|
+
return uniformState.edgeDepthTexture;
|
|
222
|
+
},
|
|
223
|
+
}),
|
|
224
|
+
|
|
164
225
|
/**
|
|
165
226
|
* An automatic GLSL uniform representing a 4x4 model transformation matrix that
|
|
166
227
|
* transforms model coordinates to world coordinates.
|
|
@@ -356,7 +356,7 @@ function Context(canvas, options) {
|
|
|
356
356
|
this._vertexAttribDivisors.push(0);
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
this._pickObjects =
|
|
359
|
+
this._pickObjects = new Map();
|
|
360
360
|
this._nextPickColor = new Uint32Array(1);
|
|
361
361
|
|
|
362
362
|
/**
|
|
@@ -1562,7 +1562,7 @@ Context.prototype.createViewportQuadCommand = function (
|
|
|
1562
1562
|
/**
|
|
1563
1563
|
* Gets the object associated with a pick color.
|
|
1564
1564
|
*
|
|
1565
|
-
* @param {
|
|
1565
|
+
* @param {number} pickColor The unsigned 32-bit RGBA pick color
|
|
1566
1566
|
* @returns {object} The object associated with the pick color, or undefined if no object is associated with that color.
|
|
1567
1567
|
*
|
|
1568
1568
|
* @example
|
|
@@ -1575,9 +1575,15 @@ Context.prototype.getObjectByPickColor = function (pickColor) {
|
|
|
1575
1575
|
Check.defined("pickColor", pickColor);
|
|
1576
1576
|
//>>includeEnd('debug');
|
|
1577
1577
|
|
|
1578
|
-
return this._pickObjects
|
|
1578
|
+
return this._pickObjects.get(pickColor);
|
|
1579
1579
|
};
|
|
1580
1580
|
|
|
1581
|
+
/**
|
|
1582
|
+
*
|
|
1583
|
+
* @param {Map<number, object>} pickObjects
|
|
1584
|
+
* @param {number} key
|
|
1585
|
+
* @param {Color} color
|
|
1586
|
+
*/
|
|
1581
1587
|
function PickId(pickObjects, key, color) {
|
|
1582
1588
|
this._pickObjects = pickObjects;
|
|
1583
1589
|
this.key = key;
|
|
@@ -1587,16 +1593,16 @@ function PickId(pickObjects, key, color) {
|
|
|
1587
1593
|
Object.defineProperties(PickId.prototype, {
|
|
1588
1594
|
object: {
|
|
1589
1595
|
get: function () {
|
|
1590
|
-
return this._pickObjects
|
|
1596
|
+
return this._pickObjects.get(this.key);
|
|
1591
1597
|
},
|
|
1592
1598
|
set: function (value) {
|
|
1593
|
-
this._pickObjects
|
|
1599
|
+
this._pickObjects.set(this.key, value);
|
|
1594
1600
|
},
|
|
1595
1601
|
},
|
|
1596
1602
|
});
|
|
1597
1603
|
|
|
1598
1604
|
PickId.prototype.destroy = function () {
|
|
1599
|
-
|
|
1605
|
+
this._pickObjects.delete(this.key);
|
|
1600
1606
|
return undefined;
|
|
1601
1607
|
};
|
|
1602
1608
|
|
|
@@ -1633,7 +1639,7 @@ Context.prototype.createPickId = function (object) {
|
|
|
1633
1639
|
throw new RuntimeError("Out of unique Pick IDs.");
|
|
1634
1640
|
}
|
|
1635
1641
|
|
|
1636
|
-
this._pickObjects
|
|
1642
|
+
this._pickObjects.set(key, object);
|
|
1637
1643
|
return new PickId(this._pickObjects, key, Color.fromRgba(key));
|
|
1638
1644
|
};
|
|
1639
1645
|
|
package/Source/Renderer/Pass.js
CHANGED
|
@@ -15,14 +15,15 @@ const Pass = {
|
|
|
15
15
|
COMPUTE: 1,
|
|
16
16
|
GLOBE: 2,
|
|
17
17
|
TERRAIN_CLASSIFICATION: 3,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
CESIUM_3D_TILE_EDGES: 4,
|
|
19
|
+
CESIUM_3D_TILE: 5,
|
|
20
|
+
CESIUM_3D_TILE_CLASSIFICATION: 6,
|
|
21
|
+
CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW: 7,
|
|
22
|
+
OPAQUE: 8,
|
|
23
|
+
TRANSLUCENT: 9,
|
|
24
|
+
VOXELS: 10,
|
|
25
|
+
GAUSSIAN_SPLATS: 11,
|
|
26
|
+
OVERLAY: 12,
|
|
27
|
+
NUMBER_OF_PASSES: 13,
|
|
27
28
|
};
|
|
28
29
|
export default Object.freeze(Pass);
|
|
@@ -25,6 +25,18 @@ function UniformState() {
|
|
|
25
25
|
* @type {Texture}
|
|
26
26
|
*/
|
|
27
27
|
this.globeDepthTexture = undefined;
|
|
28
|
+
/**
|
|
29
|
+
* @type {Texture}
|
|
30
|
+
*/
|
|
31
|
+
this.edgeIdTexture = undefined;
|
|
32
|
+
/**
|
|
33
|
+
* @type {Texture}
|
|
34
|
+
*/
|
|
35
|
+
this.edgeColorTexture = undefined;
|
|
36
|
+
/**
|
|
37
|
+
* @type {Texture}
|
|
38
|
+
*/
|
|
39
|
+
this.edgeDepthTexture = undefined; // packed depth color attachment from edge pass
|
|
28
40
|
/**
|
|
29
41
|
* @type {number}
|
|
30
42
|
*/
|
|
@@ -178,7 +178,7 @@ function bind(gl, attributes, indexBuffer) {
|
|
|
178
178
|
*
|
|
179
179
|
* @param {object} options Object with the following properties:
|
|
180
180
|
* @param {Context} options.context The context in which the VertexArray gets created.
|
|
181
|
-
* @param {
|
|
181
|
+
* @param {object[]} options.attributes An array of attributes.
|
|
182
182
|
* @param {IndexBuffer} [options.indexBuffer] An optional index buffer.
|
|
183
183
|
*
|
|
184
184
|
* @returns {VertexArray} The vertex array, ready for use with drawing.
|
|
@@ -681,7 +681,7 @@ Object.defineProperties(ArcGisMapServerImageryProvider.prototype, {
|
|
|
681
681
|
* Creates an {@link ImageryProvider} which provides tiled imagery hosted by an ArcGIS MapServer. By default, the server's pre-cached tiles are
|
|
682
682
|
* used, if available.
|
|
683
683
|
*
|
|
684
|
-
* @param {Resource|
|
|
684
|
+
* @param {Resource|string} url The URL of the ArcGIS MapServer service.
|
|
685
685
|
* @param {ArcGisMapServerImageryProvider.ConstructorOptions} [options] Object describing initialization options.
|
|
686
686
|
* @returns {Promise<ArcGisMapServerImageryProvider>} A promise that resolves to the created ArcGisMapServerImageryProvider.
|
|
687
687
|
*
|
|
@@ -4,7 +4,7 @@ import Resource from "../Core/Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"
|
|
7
|
+
"AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmTlKbWoQXtdb-m2VclxMHo8eEPu_iyh95DPKVzeyNrKkb2zc_ICfJxY7tPEl4aVdWCyU_P18q9k6D26yO7pAVtbr3I-gxRJb412PB_FydyuNKYsVRiVLqJGaYOCYhJeY3Tv8USWG4TQVu6i2mMZ8CBE68HAd3DByIRkBcjQRnker5_UyWjO86QZxpbnykaqDtY.AT1_zMTIWhVd";
|
|
8
8
|
/**
|
|
9
9
|
* Default options for accessing the ArcGIS image tile service.
|
|
10
10
|
*
|
|
@@ -14,7 +14,7 @@ const trailingSlashRegex = /\/$/;
|
|
|
14
14
|
*
|
|
15
15
|
* @property {object} options Object with the following properties:
|
|
16
16
|
* @property {string} [options.url="https://atlas.microsoft.com/"] The Azure server url.
|
|
17
|
-
* @property {string}
|
|
17
|
+
* @property {string} options.tilesetId="microsoft.imagery" The Azure tileset ID. Valid options are {@link microsoft.imagery}, {@link microsoft.base.road}, and {@link microsoft.base.labels.road}
|
|
18
18
|
* @property {string} options.subscriptionKey The public subscription key for the imagery.
|
|
19
19
|
* @property {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
|
|
20
20
|
* @property {number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
|
|
@@ -41,13 +41,13 @@ const trailingSlashRegex = /\/$/;
|
|
|
41
41
|
*/
|
|
42
42
|
function Azure2DImageryProvider(options) {
|
|
43
43
|
options = options ?? {};
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
const maximumLevel = options.maximumLevel ?? 22;
|
|
45
|
+
const minimumLevel = options.minimumLevel ?? 0;
|
|
46
|
+
const tilesetId = options.tilesetId ?? "microsoft.imagery";
|
|
46
47
|
|
|
47
48
|
const subscriptionKey =
|
|
48
49
|
options.subscriptionKey ?? options["subscription-key"];
|
|
49
50
|
//>>includeStart('debug', pragmas.debug);
|
|
50
|
-
Check.defined("options.tilesetId", options.tilesetId);
|
|
51
51
|
Check.defined("options.subscriptionKey", subscriptionKey);
|
|
52
52
|
//>>includeEnd('debug');
|
|
53
53
|
|
|
@@ -66,7 +66,7 @@ function Azure2DImageryProvider(options) {
|
|
|
66
66
|
|
|
67
67
|
resource.setQueryParameters({
|
|
68
68
|
"api-version": "2024-04-01",
|
|
69
|
-
tilesetId:
|
|
69
|
+
tilesetId: tilesetId,
|
|
70
70
|
zoom: `{z}`,
|
|
71
71
|
x: `{x}`,
|
|
72
72
|
y: `{y}`,
|
|
@@ -83,6 +83,8 @@ function Azure2DImageryProvider(options) {
|
|
|
83
83
|
|
|
84
84
|
const provider = new UrlTemplateImageryProvider({
|
|
85
85
|
...options,
|
|
86
|
+
maximumLevel,
|
|
87
|
+
minimumLevel,
|
|
86
88
|
url: resource,
|
|
87
89
|
credit: credit,
|
|
88
90
|
});
|
|
@@ -20,7 +20,7 @@ import Texture from "../Renderer/Texture.js";
|
|
|
20
20
|
* @private
|
|
21
21
|
*
|
|
22
22
|
* @param {Context} context The context in which the batch table is created.
|
|
23
|
-
* @param {
|
|
23
|
+
* @param {object[]} attributes An array of objects describing a per instance attribute. Each object contains a datatype, components per attributes, whether it is normalized and a function name
|
|
24
24
|
* to retrieve the value in the vertex shader.
|
|
25
25
|
* @param {number} numberOfInstances The number of instances in a batch table.
|
|
26
26
|
*
|
|
@@ -131,7 +131,7 @@ Object.defineProperties(BatchTable.prototype, {
|
|
|
131
131
|
/**
|
|
132
132
|
* The attribute descriptions.
|
|
133
133
|
* @memberOf BatchTable.prototype
|
|
134
|
-
* @type {
|
|
134
|
+
* @type {object[]}
|
|
135
135
|
* @readonly
|
|
136
136
|
*/
|
|
137
137
|
attributes: {
|