@cesium/engine 21.0.1 → 22.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/ThirdParty/Workers/zip-web-worker.js +10 -7
- package/Build/Workers/chunk-23T2IPHV.js +55 -0
- package/Build/Workers/{chunk-TGJQMEL4.js → chunk-2AM4E2WD.js} +2 -2
- package/Build/Workers/{chunk-4CORGH7N.js → chunk-2MWF4IES.js} +16 -14
- package/Build/Workers/{chunk-3RKX3UFI.js → chunk-2RCIRXNI.js} +1 -1
- package/Build/Workers/{chunk-LV3G32QE.js → chunk-3YTMGEXW.js} +5 -1424
- package/Build/Workers/{chunk-PJAA7QSC.js → chunk-4BHWJWS3.js} +6 -6
- package/Build/Workers/{chunk-FE565QHX.js → chunk-5JKH4AMT.js} +2 -2
- package/Build/Workers/{chunk-KZ7GDSAJ.js → chunk-6HKAPCSO.js} +1 -1
- package/Build/Workers/{chunk-VVALNLSH.js → chunk-A53R2F2L.js} +4 -4
- package/Build/Workers/{chunk-KVB73ECP.js → chunk-A6YFUGJO.js} +7 -7
- package/Build/Workers/{chunk-QNOIRRJK.js → chunk-AJYWXC6I.js} +4 -4
- package/Build/Workers/{chunk-UKA7OISV.js → chunk-AOIO5VUS.js} +282 -2284
- package/Build/Workers/{chunk-OBS5EMZ6.js → chunk-B7JRBTT6.js} +10 -10
- package/Build/Workers/{chunk-5YXA47QD.js → chunk-CHNDJRYA.js} +20 -18
- package/Build/Workers/{chunk-X3ZV3XNO.js → chunk-CJOV55CW.js} +20 -18
- package/Build/Workers/{chunk-W6I3LNPF.js → chunk-COGPE5Z2.js} +10 -8
- package/Build/Workers/{chunk-2QPH5QDK.js → chunk-CW7W27IZ.js} +14 -10
- package/Build/Workers/{chunk-MXOGBWMP.js → chunk-DICY26ID.js} +20 -16
- package/Build/Workers/{chunk-W6KMV4F5.js → chunk-DMEFNTUV.js} +69 -7
- package/Build/Workers/{chunk-T7HU6E7G.js → chunk-DQSJEOZY.js} +1 -1
- package/Build/Workers/{chunk-ASVODZNK.js → chunk-GDU4RZSZ.js} +16 -36
- package/Build/Workers/{chunk-MQPDOWGH.js → chunk-GKWOUMYA.js} +1 -1
- package/Build/Workers/{chunk-A2SP2EJZ.js → chunk-GTY4K4IA.js} +9 -7
- package/Build/Workers/{chunk-KEPPNSBL.js → chunk-H6Q7E4BQ.js} +8 -6
- package/Build/Workers/{chunk-JG3C3LPY.js → chunk-HHGOFZVQ.js} +7 -5
- package/Build/Workers/chunk-HXKUEOOD.js +352 -0
- package/Build/Workers/{chunk-UFSYRVC5.js → chunk-I4REFVXB.js} +4 -4
- package/Build/Workers/{chunk-LU7DLY2L.js → chunk-IL5F6WEE.js} +3 -3
- package/Build/Workers/{chunk-RVRN4KDB.js → chunk-JKXPC5HD.js} +2 -2
- package/Build/Workers/{chunk-CBPNIEGH.js → chunk-KKGD7HAW.js} +13 -11
- package/Build/Workers/{chunk-DTKSVIH5.js → chunk-KROSQJUA.js} +2 -2
- package/Build/Workers/{chunk-42EJCSIV.js → chunk-L4JLDVCM.js} +5 -5
- package/Build/Workers/{chunk-LPKJSIMD.js → chunk-LIYMRHGR.js} +15 -13
- package/Build/Workers/{chunk-J2XQVKVH.js → chunk-MKMZHRB3.js} +74 -35
- package/Build/Workers/{chunk-CSDYSXBI.js → chunk-MO25ZQ2I.js} +14 -12
- package/Build/Workers/{chunk-3YNW5K6O.js → chunk-O6RZEKHZ.js} +12 -12
- package/Build/Workers/{chunk-RR3NCT4R.js → chunk-OOCGX2OD.js} +4 -4
- package/Build/Workers/{chunk-XG54SG4O.js → chunk-OXFU5HNU.js} +13 -5
- package/Build/Workers/{chunk-P2UKEFCK.js → chunk-P5CGIJUY.js} +2 -2
- package/Build/Workers/{chunk-DBHL2UVG.js → chunk-QEANVUGT.js} +2 -2
- package/Build/Workers/{chunk-2SI7DEW5.js → chunk-QFBCIX7J.js} +8 -6
- package/Build/Workers/{chunk-DDXI6UYW.js → chunk-QUAH3XOT.js} +4 -4
- package/Build/Workers/{chunk-PZUZCAX3.js → chunk-RXZDTDIY.js} +13 -9
- package/Build/Workers/{chunk-YZ3RCE45.js → chunk-SPA2KPH3.js} +14 -12
- package/Build/Workers/chunk-TDSVSW5A.js +1460 -0
- package/Build/Workers/{chunk-G3CKZ34K.js → chunk-UG2DPFOL.js} +8 -6
- package/Build/Workers/{chunk-IKUOV6DO.js → chunk-URGEDZBS.js} +7 -7
- package/Build/Workers/{chunk-U2GR5FDL.js → chunk-V35NQOJC.js} +21 -11
- package/Build/Workers/chunk-W4XUEDU5.js +2058 -0
- package/Build/Workers/chunk-WB4TSSBQ.js +3514 -0
- package/Build/Workers/{chunk-EBDZDBJN.js → chunk-WTLYD4FE.js} +19 -15
- package/Build/Workers/{chunk-WQZL6CA2.js → chunk-Y4ALZ4SS.js} +9 -7
- package/Build/Workers/{chunk-DAJKOQW6.js → chunk-YF2NVO5B.js} +19 -13
- package/Build/Workers/{chunk-XJVRYJVZ.js → chunk-YSYSXSHF.js} +1 -1
- package/Build/Workers/{chunk-YNOVMSUX.js → chunk-YX562XOB.js} +15 -11
- package/Build/Workers/{chunk-J3KPR6DJ.js → chunk-YZWA5B4R.js} +15 -13
- package/Build/Workers/{chunk-NYYQZ3LH.js → chunk-Z6DFT4D3.js} +15 -11
- package/Build/Workers/combineGeometry.js +24 -21
- package/Build/Workers/createBoxGeometry.js +18 -15
- package/Build/Workers/createBoxOutlineGeometry.js +16 -13
- package/Build/Workers/createCircleGeometry.js +28 -24
- package/Build/Workers/createCircleOutlineGeometry.js +21 -17
- package/Build/Workers/createCoplanarPolygonGeometry.js +35 -31
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +33 -29
- package/Build/Workers/createCorridorGeometry.js +32 -28
- package/Build/Workers/createCorridorOutlineGeometry.js +30 -26
- package/Build/Workers/createCylinderGeometry.js +20 -17
- package/Build/Workers/createCylinderOutlineGeometry.js +20 -16
- package/Build/Workers/createEllipseGeometry.js +28 -24
- package/Build/Workers/createEllipseOutlineGeometry.js +21 -17
- package/Build/Workers/createEllipsoidGeometry.js +19 -16
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -15
- package/Build/Workers/createFrustumGeometry.js +18 -15
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -15
- package/Build/Workers/createGeometry.js +28 -22
- package/Build/Workers/createGroundPolylineGeometry.js +25 -21
- package/Build/Workers/createPlaneGeometry.js +16 -13
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -12
- package/Build/Workers/createPolygonGeometry.js +35 -31
- package/Build/Workers/createPolygonOutlineGeometry.js +32 -28
- package/Build/Workers/createPolylineGeometry.js +27 -23
- package/Build/Workers/createPolylineVolumeGeometry.js +33 -29
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +29 -25
- package/Build/Workers/createRectangleGeometry.js +30 -26
- package/Build/Workers/createRectangleOutlineGeometry.js +23 -19
- package/Build/Workers/createSimplePolylineGeometry.js +25 -21
- package/Build/Workers/createSphereGeometry.js +19 -16
- package/Build/Workers/createSphereOutlineGeometry.js +18 -15
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +16 -13
- package/Build/Workers/createVectorTileGeometries.js +24 -21
- package/Build/Workers/createVectorTilePoints.js +15 -12
- package/Build/Workers/createVectorTilePolygons.js +24 -20
- package/Build/Workers/createVectorTilePolylines.js +16 -13
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +91 -0
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +28 -23
- package/Build/Workers/createVerticesFromHeightmap.js +28 -23
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +26 -279
- package/Build/Workers/createWallGeometry.js +26 -22
- package/Build/Workers/createWallOutlineGeometry.js +25 -21
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +13 -11
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/incrementallyBuildTerrainPicker.js +121 -0
- package/Build/Workers/transcodeKTX2.js +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +24 -20
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +95 -0
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +2 -2
- package/Source/Core/AxisAlignedBoundingBox.js +36 -0
- package/Source/Core/Cesium3DTilesTerrainData.js +932 -0
- package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +1868 -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 +2 -1
- package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -1
- package/Source/Core/HeightmapTerrainData.js +12 -22
- package/Source/Core/HilbertOrder.js +0 -6
- package/Source/Core/ITwinPlatform.js +6 -6
- package/Source/Core/IntersectionTests.js +80 -0
- 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 +24 -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 +215 -8
- package/Source/Core/TerrainPicker.js +607 -0
- package/Source/Core/TerrainProvider.js +151 -0
- package/Source/Core/TexturePacker.js +27 -12
- package/Source/Core/Transforms.js +28 -19
- 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/BillboardGraphics.js +1 -1
- package/Source/DataSources/BillboardVisualizer.js +7 -4
- package/Source/DataSources/PropertyArray.js +2 -2
- package/Source/Renderer/AutomaticUniforms.js +61 -0
- package/Source/Renderer/Buffer.js +32 -0
- package/Source/Renderer/BufferUsage.js +3 -1
- package/Source/Renderer/Context.js +98 -14
- package/Source/Renderer/Pass.js +10 -9
- package/Source/Renderer/Sync.js +104 -0
- package/Source/Renderer/TextureAtlas.js +67 -27
- 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 +99 -13
- package/Source/Scene/BatchTable.js +2 -2
- package/Source/Scene/Billboard.js +75 -28
- package/Source/Scene/BillboardCollection.js +24 -15
- package/Source/Scene/BillboardTexture.js +56 -7
- 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 +4 -2
- package/Source/Scene/GlobeSurfaceTile.js +28 -70
- package/Source/Scene/GlobeSurfaceTileProvider.js +11 -0
- package/Source/Scene/GltfBufferViewLoader.js +18 -0
- package/Source/Scene/GltfLoader.js +46 -8
- package/Source/Scene/Google2DImageryProvider.js +48 -41
- 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 +134 -50
- package/Source/Scene/Picking.js +195 -89
- 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 +160 -16
- 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/TerrainFillMesh.js +1 -0
- 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 +115 -62
- package/Source/Shaders/BillboardCollectionFS.js +115 -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/ThirdParty/Workers/zip-web-worker.js +1 -1
- package/Source/ThirdParty/zip-module.wasm +0 -0
- package/Source/Workers/createVerticesFromCesium3DTilesTerrain.js +46 -0
- package/Source/Workers/incrementallyBuildTerrainPicker.js +108 -0
- package/Source/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +55 -0
- package/index.d.ts +488 -31
- package/index.js +202 -190
- package/package.json +3 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import defined from "../Core/defined.js";
|
|
2
2
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
3
3
|
import Rectangle from "../Core/Rectangle.js";
|
|
4
|
+
import Cartographic from "../Core/Cartographic.js";
|
|
4
5
|
import QuadtreeTileLoadState from "./QuadtreeTileLoadState.js";
|
|
5
6
|
import TileSelectionResult from "./TileSelectionResult.js";
|
|
6
7
|
|
|
@@ -107,8 +108,10 @@ function QuadtreeTile(options) {
|
|
|
107
108
|
this._distance = 0.0;
|
|
108
109
|
this._loadPriority = 0.0;
|
|
109
110
|
|
|
110
|
-
this._customData =
|
|
111
|
-
this.
|
|
111
|
+
this._customData = new Set();
|
|
112
|
+
this._customDataIterator = undefined;
|
|
113
|
+
this._addedCustomData = [];
|
|
114
|
+
this._removedCustomData = [];
|
|
112
115
|
this._lastSelectionResult = TileSelectionResult.NONE;
|
|
113
116
|
this._lastSelectionResultFrame = undefined;
|
|
114
117
|
this._loadedCallbacks = {};
|
|
@@ -265,7 +268,7 @@ QuadtreeTile.prototype._getCacheKey = function (
|
|
|
265
268
|
* @param {number} maximumScreenSpaceError The maximum screen-space error, in pixels, that is allowed.
|
|
266
269
|
* A higher maximum error will render fewer tiles and improve performance, while a lower
|
|
267
270
|
* value will improve visual quality.
|
|
268
|
-
* @returns {
|
|
271
|
+
* @returns {object|undefined} The cached position data or undefined if not found.
|
|
269
272
|
*/
|
|
270
273
|
QuadtreeTile.prototype.getPositionCacheEntry = function (
|
|
271
274
|
cartographic,
|
|
@@ -285,7 +288,7 @@ QuadtreeTile.prototype.getPositionCacheEntry = function (
|
|
|
285
288
|
* @param {number} maximumScreenSpaceError The maximum screen-space error, in pixels, that is allowed.
|
|
286
289
|
* A higher maximum error will render fewer tiles and improve performance, while a lower
|
|
287
290
|
* value will improve visual quality.
|
|
288
|
-
* @param {
|
|
291
|
+
* @param {object} value - The object to be cached.
|
|
289
292
|
*/
|
|
290
293
|
QuadtreeTile.prototype.setPositionCacheEntry = function (
|
|
291
294
|
cartographic,
|
|
@@ -311,52 +314,69 @@ QuadtreeTile.prototype.clearPositionCache = function () {
|
|
|
311
314
|
}
|
|
312
315
|
};
|
|
313
316
|
|
|
314
|
-
QuadtreeTile.prototype.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
removed
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
let i;
|
|
322
|
-
let data;
|
|
323
|
-
let rectangle;
|
|
324
|
-
|
|
325
|
-
if (defined(added) && defined(removed)) {
|
|
326
|
-
customData = customData.filter(function (value) {
|
|
327
|
-
return removed.indexOf(value) === -1;
|
|
328
|
-
});
|
|
329
|
-
this._customData = customData;
|
|
330
|
-
|
|
331
|
-
rectangle = this._rectangle;
|
|
332
|
-
for (i = 0; i < added.length; ++i) {
|
|
333
|
-
data = added[i];
|
|
334
|
-
if (Rectangle.contains(rectangle, data.positionCartographic)) {
|
|
335
|
-
customData.push(data);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
317
|
+
QuadtreeTile.prototype.updateCustomData = function () {
|
|
318
|
+
const added = this._addedCustomData;
|
|
319
|
+
const removed = this._removedCustomData;
|
|
320
|
+
if (added.length === 0 && removed.length === 0) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
338
323
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
for (i = 0; i < parentCustomData.length; ++i) {
|
|
349
|
-
data = parentCustomData[i];
|
|
350
|
-
if (Rectangle.contains(rectangle, data.positionCartographic)) {
|
|
351
|
-
customData.push(data);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
324
|
+
const customData = this.customData;
|
|
325
|
+
for (let i = 0; i < added.length; ++i) {
|
|
326
|
+
const data = added[i];
|
|
327
|
+
customData.add(data);
|
|
328
|
+
|
|
329
|
+
const child = childTileAtPosition(this, data.positionCartographic);
|
|
330
|
+
child._addedCustomData.push(data);
|
|
331
|
+
}
|
|
332
|
+
this._addedCustomData.length = 0;
|
|
354
333
|
|
|
355
|
-
|
|
334
|
+
for (let i = 0; i < removed.length; ++i) {
|
|
335
|
+
const data = removed[i];
|
|
336
|
+
if (customData.has(data)) {
|
|
337
|
+
customData.delete(data);
|
|
356
338
|
}
|
|
339
|
+
|
|
340
|
+
const child = childTileAtPosition(this, data.positionCartographic);
|
|
341
|
+
child._removedCustomData.push(data);
|
|
357
342
|
}
|
|
343
|
+
this._removedCustomData.length = 0;
|
|
358
344
|
};
|
|
359
345
|
|
|
346
|
+
const splitPointScratch = new Cartographic();
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Determines which child tile that contains the specified position. Assumes the position is within
|
|
350
|
+
* the bounds of the parent tile.
|
|
351
|
+
* @private
|
|
352
|
+
* @param {QuadtreeTile} tile - The parent tile.
|
|
353
|
+
* @param {Cartographic} positionCartographic - The cartographic position.
|
|
354
|
+
* @returns {QuadtreeTile} The child tile that contains the position.
|
|
355
|
+
*/
|
|
356
|
+
function childTileAtPosition(tile, positionCartographic) {
|
|
357
|
+
// Can't assume that a given tiling scheme divides a parent into four tiles at its rectangle's center.
|
|
358
|
+
// But we can safely take any child tile's rectangle and take its center-facing corner as the parent's split point.
|
|
359
|
+
const nwChildRectangle = tile.northwestChild.rectangle;
|
|
360
|
+
const tileSplitPoint = Rectangle.southeast(
|
|
361
|
+
nwChildRectangle,
|
|
362
|
+
splitPointScratch,
|
|
363
|
+
);
|
|
364
|
+
|
|
365
|
+
const x = positionCartographic.longitude >= tileSplitPoint.longitude ? 1 : 0;
|
|
366
|
+
const y = positionCartographic.latitude < tileSplitPoint.latitude ? 1 : 0;
|
|
367
|
+
|
|
368
|
+
switch (y * 2 + x) {
|
|
369
|
+
case 0:
|
|
370
|
+
return tile.northwestChild;
|
|
371
|
+
case 1:
|
|
372
|
+
return tile.northeastChild;
|
|
373
|
+
case 2:
|
|
374
|
+
return tile.southwestChild;
|
|
375
|
+
default:
|
|
376
|
+
return tile.southeastChild;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
360
380
|
Object.defineProperties(QuadtreeTile.prototype, {
|
|
361
381
|
/**
|
|
362
382
|
* Gets the tiling scheme used to tile the surface.
|
|
@@ -522,9 +542,9 @@ Object.defineProperties(QuadtreeTile.prototype, {
|
|
|
522
542
|
},
|
|
523
543
|
|
|
524
544
|
/**
|
|
525
|
-
*
|
|
545
|
+
* A set of objects associated with this tile.
|
|
526
546
|
* @memberof QuadtreeTile.prototype
|
|
527
|
-
* @type {
|
|
547
|
+
* @type {Set}
|
|
528
548
|
*/
|
|
529
549
|
customData: {
|
|
530
550
|
get: function () {
|
package/Source/Scene/Scene.js
CHANGED
|
@@ -761,6 +761,15 @@ function Scene(options) {
|
|
|
761
761
|
*/
|
|
762
762
|
this.light = new SunLight();
|
|
763
763
|
|
|
764
|
+
/**
|
|
765
|
+
* Whether or not to enable edge visibility rendering for 3D tiles.
|
|
766
|
+
* When enabled, creates a framebuffer with multiple render targets
|
|
767
|
+
* for advanced edge detection and visibility techniques.
|
|
768
|
+
* @type {boolean}
|
|
769
|
+
* @default false
|
|
770
|
+
*/
|
|
771
|
+
this._enableEdgeVisibility = false;
|
|
772
|
+
|
|
764
773
|
// Give frameState, camera, and screen space camera controller initial state before rendering
|
|
765
774
|
updateFrameNumber(this, 0.0, JulianDate.now());
|
|
766
775
|
this.updateFrameState();
|
|
@@ -1350,7 +1359,7 @@ Object.defineProperties(Scene.prototype, {
|
|
|
1350
1359
|
*
|
|
1351
1360
|
* @memberof Scene.prototype
|
|
1352
1361
|
*
|
|
1353
|
-
* @type {
|
|
1362
|
+
* @type {object | undefined}
|
|
1354
1363
|
* @readonly
|
|
1355
1364
|
*
|
|
1356
1365
|
* @default undefined
|
|
@@ -2567,6 +2576,48 @@ function performTranslucent3DTilesClassification(
|
|
|
2567
2576
|
);
|
|
2568
2577
|
}
|
|
2569
2578
|
|
|
2579
|
+
function performCesium3DTileEdgesPass(scene, passState, frustumCommands) {
|
|
2580
|
+
scene.context.uniformState.updatePass(Pass.CESIUM_3D_TILE_EDGES);
|
|
2581
|
+
|
|
2582
|
+
const originalFramebuffer = passState.framebuffer;
|
|
2583
|
+
|
|
2584
|
+
scene.context.uniformState.edgeColorTexture = scene.context.defaultTexture;
|
|
2585
|
+
scene.context.uniformState.edgeIdTexture = scene.context.defaultTexture;
|
|
2586
|
+
scene.context.uniformState.edgeDepthTexture = scene.context.defaultTexture;
|
|
2587
|
+
|
|
2588
|
+
// Set edge framebuffer for rendering
|
|
2589
|
+
if (
|
|
2590
|
+
scene._enableEdgeVisibility &&
|
|
2591
|
+
defined(scene._view) &&
|
|
2592
|
+
defined(scene._view.edgeFramebuffer)
|
|
2593
|
+
) {
|
|
2594
|
+
passState.framebuffer = scene._view.edgeFramebuffer.framebuffer;
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
// performPass
|
|
2598
|
+
const commands = frustumCommands.commands[Pass.CESIUM_3D_TILE_EDGES];
|
|
2599
|
+
const commandCount = frustumCommands.indices[Pass.CESIUM_3D_TILE_EDGES];
|
|
2600
|
+
|
|
2601
|
+
// clear edge framebuffer
|
|
2602
|
+
if (
|
|
2603
|
+
scene._enableEdgeVisibility &&
|
|
2604
|
+
defined(scene._view) &&
|
|
2605
|
+
defined(scene._view.edgeFramebuffer)
|
|
2606
|
+
) {
|
|
2607
|
+
const clearCommand = scene._view.edgeFramebuffer.getClearCommand(
|
|
2608
|
+
new Color(0.0, 0.0, 0.0, 0.0),
|
|
2609
|
+
);
|
|
2610
|
+
clearCommand.execute(scene.context, passState);
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
// Then execute edge rendering commands
|
|
2614
|
+
for (let j = 0; j < commandCount; ++j) {
|
|
2615
|
+
executeCommand(commands[j], scene, passState);
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
passState.framebuffer = originalFramebuffer;
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2570
2621
|
/**
|
|
2571
2622
|
* Execute the draw commands for all the render passes.
|
|
2572
2623
|
*
|
|
@@ -2709,6 +2760,48 @@ function executeCommands(scene, passState) {
|
|
|
2709
2760
|
}
|
|
2710
2761
|
|
|
2711
2762
|
let commandCount;
|
|
2763
|
+
|
|
2764
|
+
// Draw edges FIRST - before binding textures to avoid feedback loop
|
|
2765
|
+
performCesium3DTileEdgesPass(scene, passState, frustumCommands);
|
|
2766
|
+
|
|
2767
|
+
if (
|
|
2768
|
+
scene._enableEdgeVisibility &&
|
|
2769
|
+
defined(scene._view) &&
|
|
2770
|
+
defined(scene._view.edgeFramebuffer)
|
|
2771
|
+
) {
|
|
2772
|
+
// Get edge color texture (attachment 0)
|
|
2773
|
+
const colorTexture = scene._view.edgeFramebuffer.colorTexture;
|
|
2774
|
+
if (defined(colorTexture)) {
|
|
2775
|
+
scene.context.uniformState.edgeColorTexture = colorTexture;
|
|
2776
|
+
} else {
|
|
2777
|
+
scene.context.uniformState.edgeColorTexture =
|
|
2778
|
+
scene.context.defaultTexture;
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
// Get edge ID texture (attachment 1)
|
|
2782
|
+
const idTexture = scene._view.edgeFramebuffer.idTexture;
|
|
2783
|
+
if (defined(idTexture)) {
|
|
2784
|
+
scene.context.uniformState.edgeIdTexture = idTexture;
|
|
2785
|
+
} else {
|
|
2786
|
+
scene.context.uniformState.edgeIdTexture = scene.context.defaultTexture;
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2789
|
+
// Get edge depth texture (attachment 2)
|
|
2790
|
+
const edgeDepthTexture = scene._view.edgeFramebuffer.depthTexture;
|
|
2791
|
+
if (defined(edgeDepthTexture)) {
|
|
2792
|
+
scene.context.uniformState.edgeDepthTexture = edgeDepthTexture;
|
|
2793
|
+
} else {
|
|
2794
|
+
scene.context.uniformState.edgeDepthTexture =
|
|
2795
|
+
scene.context.defaultTexture;
|
|
2796
|
+
}
|
|
2797
|
+
} else {
|
|
2798
|
+
scene.context.uniformState.edgeColorTexture =
|
|
2799
|
+
scene.context.defaultTexture;
|
|
2800
|
+
scene.context.uniformState.edgeIdTexture = scene.context.defaultTexture;
|
|
2801
|
+
scene.context.uniformState.edgeDepthTexture =
|
|
2802
|
+
scene.context.defaultTexture;
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2712
2805
|
if (!useInvertClassification || picking || renderTranslucentDepthForPick) {
|
|
2713
2806
|
// Common/fastest path. Draw 3D Tiles and classification normally.
|
|
2714
2807
|
|
|
@@ -3595,9 +3688,20 @@ function updateShadowMaps(scene) {
|
|
|
3595
3688
|
function updateAndRenderPrimitives(scene) {
|
|
3596
3689
|
const frameState = scene._frameState;
|
|
3597
3690
|
|
|
3691
|
+
// Reset per-frame edge visibility request flag before primitives update
|
|
3692
|
+
frameState.edgeVisibilityRequested = false;
|
|
3693
|
+
|
|
3598
3694
|
scene._groundPrimitives.update(frameState);
|
|
3599
3695
|
scene._primitives.update(frameState);
|
|
3600
3696
|
|
|
3697
|
+
// If any primitive requested edge visibility this frame, flip the scene flag lazily.
|
|
3698
|
+
if (
|
|
3699
|
+
frameState.edgeVisibilityRequested &&
|
|
3700
|
+
scene._enableEdgeVisibility === false
|
|
3701
|
+
) {
|
|
3702
|
+
scene._enableEdgeVisibility = true;
|
|
3703
|
+
}
|
|
3704
|
+
|
|
3601
3705
|
updateDebugFrustumPlanes(scene);
|
|
3602
3706
|
updateShadowMaps(scene);
|
|
3603
3707
|
|
|
@@ -3714,6 +3818,13 @@ function updateAndClearFramebuffers(scene, passState, clearColor) {
|
|
|
3714
3818
|
|
|
3715
3819
|
const useInvertClassification = (environmentState.useInvertClassification =
|
|
3716
3820
|
!picking && defined(passState.framebuffer) && scene.invertClassification);
|
|
3821
|
+
|
|
3822
|
+
// Update edge framebuffer for 3D tile edge rendering
|
|
3823
|
+
const useEdgeFramebuffer = !picking && scene._enableEdgeVisibility;
|
|
3824
|
+
if (useEdgeFramebuffer) {
|
|
3825
|
+
view.edgeFramebuffer.update(context, view.viewport, scene._hdr);
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3717
3828
|
if (useInvertClassification) {
|
|
3718
3829
|
let depthFramebuffer;
|
|
3719
3830
|
if (frameState.invertClassificationColor.alpha === 1.0) {
|
|
@@ -3821,14 +3932,15 @@ function callAfterRenderFunctions(scene) {
|
|
|
3821
3932
|
// Functions are queued up during primitive update and executed here in case
|
|
3822
3933
|
// the function modifies scene state that should remain constant over the frame.
|
|
3823
3934
|
const functions = scene._frameState.afterRender;
|
|
3824
|
-
|
|
3825
|
-
|
|
3935
|
+
const functionsCpy = functions.slice(); // Snapshot before iterate allows callbacks to add functions for next frame
|
|
3936
|
+
functions.length = 0;
|
|
3937
|
+
|
|
3938
|
+
for (let i = 0; i < functionsCpy.length; ++i) {
|
|
3939
|
+
const shouldRequestRender = functionsCpy[i]();
|
|
3826
3940
|
if (shouldRequestRender) {
|
|
3827
3941
|
scene.requestRender();
|
|
3828
3942
|
}
|
|
3829
3943
|
}
|
|
3830
|
-
|
|
3831
|
-
functions.length = 0;
|
|
3832
3944
|
}
|
|
3833
3945
|
|
|
3834
3946
|
function getGlobeHeight(scene) {
|
|
@@ -4399,12 +4511,44 @@ Scene.prototype.clampLineWidth = function (width) {
|
|
|
4399
4511
|
* @param {Cartesian2} windowPosition Window coordinates to perform picking on.
|
|
4400
4512
|
* @param {number} [width=3] Width of the pick rectangle.
|
|
4401
4513
|
* @param {number} [height=3] Height of the pick rectangle.
|
|
4402
|
-
* @returns {
|
|
4514
|
+
* @returns {object | undefined} Object containing the picked primitive or <code>undefined</code> if nothing is at the location.
|
|
4403
4515
|
*/
|
|
4404
4516
|
Scene.prototype.pick = function (windowPosition, width, height) {
|
|
4405
|
-
|
|
4517
|
+
// Picking one object, result is either [object] or []
|
|
4518
|
+
return this._picking.pick(this, windowPosition, width, height, 1)[0];
|
|
4406
4519
|
};
|
|
4407
4520
|
|
|
4521
|
+
/**
|
|
4522
|
+
* Performs the same operation as Scene.pick but asynchonosly without blocking the main render thread.
|
|
4523
|
+
* Requires WebGL2 else using fallback.
|
|
4524
|
+
*
|
|
4525
|
+
* @example
|
|
4526
|
+
* // On mouse over, color the feature yellow.
|
|
4527
|
+
* handler.setInputAction(function(movement) {
|
|
4528
|
+
* const feature = scene.pickAsync(movement.endPosition).then(function(feature) {
|
|
4529
|
+
* if (feature instanceof Cesium.Cesium3DTileFeature) {
|
|
4530
|
+
* feature.color = Cesium.Color.YELLOW;
|
|
4531
|
+
* }
|
|
4532
|
+
* });
|
|
4533
|
+
* }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
|
|
4534
|
+
*
|
|
4535
|
+
* @param {Cartesian2} windowPosition Window coordinates to perform picking on.
|
|
4536
|
+
* @param {number} [width=3] Width of the pick rectangle.
|
|
4537
|
+
* @param {number} [height=3] Height of the pick rectangle.
|
|
4538
|
+
* @returns {Promise<Object | undefined>} Object containing the picked primitive or <code>undefined</code> if nothing is at the location.
|
|
4539
|
+
*
|
|
4540
|
+
* @see Scene#pick
|
|
4541
|
+
*/
|
|
4542
|
+
Scene.prototype.pickAsync = async function (windowPosition, width, height) {
|
|
4543
|
+
const result = await this._picking.pickAsync(
|
|
4544
|
+
this,
|
|
4545
|
+
windowPosition,
|
|
4546
|
+
width,
|
|
4547
|
+
height,
|
|
4548
|
+
1,
|
|
4549
|
+
);
|
|
4550
|
+
return result[0];
|
|
4551
|
+
};
|
|
4408
4552
|
/**
|
|
4409
4553
|
* Returns a {@link VoxelCell} for the voxel sample rendered at a particular window coordinate,
|
|
4410
4554
|
* or <code>undefined</code> if no voxel is rendered at that position.
|
|
@@ -4674,7 +4818,7 @@ function updateRequestRenderModeDeferCheckPass(scene) {
|
|
|
4674
4818
|
* @private
|
|
4675
4819
|
*
|
|
4676
4820
|
* @param {Ray} ray The ray.
|
|
4677
|
-
* @param {
|
|
4821
|
+
* @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
|
|
4678
4822
|
* @param {number} [width=0.1] Width of the intersection volume in meters.
|
|
4679
4823
|
* @returns {object | undefined} An object containing the object and position of the first intersection or <code>undefined</code> if there are no intersections.
|
|
4680
4824
|
*
|
|
@@ -4699,9 +4843,9 @@ Scene.prototype.pickFromRay = function (ray, objectsToExclude, width) {
|
|
|
4699
4843
|
*
|
|
4700
4844
|
* @param {Ray} ray The ray.
|
|
4701
4845
|
* @param {number} [limit=Number.MAX_VALUE] If supplied, stop finding intersections after this many intersections.
|
|
4702
|
-
* @param {
|
|
4846
|
+
* @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
|
|
4703
4847
|
* @param {number} [width=0.1] Width of the intersection volume in meters.
|
|
4704
|
-
* @returns {
|
|
4848
|
+
* @returns {object[]} List of objects containing the object and position of each intersection.
|
|
4705
4849
|
*
|
|
4706
4850
|
* @exception {DeveloperError} Ray intersections are only supported in 3D mode.
|
|
4707
4851
|
*/
|
|
@@ -4727,7 +4871,7 @@ Scene.prototype.drillPickFromRay = function (
|
|
|
4727
4871
|
* @private
|
|
4728
4872
|
*
|
|
4729
4873
|
* @param {Ray} ray The ray.
|
|
4730
|
-
* @param {
|
|
4874
|
+
* @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
|
|
4731
4875
|
* @param {number} [width=0.1] Width of the intersection volume in meters.
|
|
4732
4876
|
* @returns {Promise<object>} A promise that resolves to an object containing the object and position of the first intersection.
|
|
4733
4877
|
*
|
|
@@ -4754,7 +4898,7 @@ Scene.prototype.pickFromRayMostDetailed = function (
|
|
|
4754
4898
|
*
|
|
4755
4899
|
* @param {Ray} ray The ray.
|
|
4756
4900
|
* @param {number} [limit=Number.MAX_VALUE] If supplied, stop finding intersections after this many intersections.
|
|
4757
|
-
* @param {
|
|
4901
|
+
* @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to exclude from the ray intersection.
|
|
4758
4902
|
* @param {number} [width=0.1] Width of the intersection volume in meters.
|
|
4759
4903
|
* @returns {Promise<Object[]>} A promise that resolves to a list of objects containing the object and position of each intersection.
|
|
4760
4904
|
*
|
|
@@ -4785,7 +4929,7 @@ Scene.prototype.drillPickFromRayMostDetailed = function (
|
|
|
4785
4929
|
* </p>
|
|
4786
4930
|
*
|
|
4787
4931
|
* @param {Cartographic} position The cartographic position to sample height from.
|
|
4788
|
-
* @param {
|
|
4932
|
+
* @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not sample height from.
|
|
4789
4933
|
* @param {number} [width=0.1] Width of the intersection volume in meters.
|
|
4790
4934
|
* @returns {number | undefined} The height. This may be <code>undefined</code> if there was no scene geometry to sample height from.
|
|
4791
4935
|
*
|
|
@@ -4815,7 +4959,7 @@ Scene.prototype.sampleHeight = function (position, objectsToExclude, width) {
|
|
|
4815
4959
|
* </p>
|
|
4816
4960
|
*
|
|
4817
4961
|
* @param {Cartesian3} cartesian The cartesian position.
|
|
4818
|
-
* @param {
|
|
4962
|
+
* @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not clamp to.
|
|
4819
4963
|
* @param {number} [width=0.1] Width of the intersection volume in meters.
|
|
4820
4964
|
* @param {Cartesian3} [result] An optional object to return the clamped position.
|
|
4821
4965
|
* @returns {Cartesian3 | undefined} The modified result parameter or a new Cartesian3 instance if one was not provided. This may be <code>undefined</code> if there was no scene geometry to clamp to.
|
|
@@ -4855,7 +4999,7 @@ Scene.prototype.clampToHeight = function (
|
|
|
4855
4999
|
* the height is set to <code>undefined</code>.
|
|
4856
5000
|
*
|
|
4857
5001
|
* @param {Cartographic[]} positions The cartographic positions to update with sampled heights.
|
|
4858
|
-
* @param {
|
|
5002
|
+
* @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not sample height from.
|
|
4859
5003
|
* @param {number} [width=0.1] Width of the intersection volume in meters.
|
|
4860
5004
|
* @returns {Promise<Array<Cartographic | undefined>>} A promise that resolves to the provided list of positions when the query has completed. Positions may become <code>undefined</code> if the height cannot be determined.
|
|
4861
5005
|
*
|
|
@@ -4895,7 +5039,7 @@ Scene.prototype.sampleHeightMostDetailed = function (
|
|
|
4895
5039
|
* can be sampled at that location, or another error occurs, the element in the array is set to undefined.
|
|
4896
5040
|
*
|
|
4897
5041
|
* @param {Cartesian3[]} cartesians The cartesian positions to update with clamped positions.
|
|
4898
|
-
* @param {
|
|
5042
|
+
* @param {object[]} [objectsToExclude] A list of primitives, entities, or 3D Tiles features to not clamp to.
|
|
4899
5043
|
* @param {number} [width=0.1] Width of the intersection volume in meters.
|
|
4900
5044
|
* @returns {Promise<Array<Cartesian3 | undefined>>} A promise that resolves to the provided list of positions when the query has completed. Positions may become <code>undefined</code> if they cannot be clamped.
|
|
4901
5045
|
*
|
|
@@ -3,27 +3,27 @@ import DeveloperError from "../Core/DeveloperError.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Constants used to indicated what part of the sensor volume to display.
|
|
5
5
|
*
|
|
6
|
-
* @enum {
|
|
6
|
+
* @enum {number}
|
|
7
7
|
*/
|
|
8
8
|
const SensorVolumePortionToDisplay = {
|
|
9
9
|
/**
|
|
10
10
|
* 0x0000. Display the complete sensor volume.
|
|
11
11
|
*
|
|
12
|
-
* @type {
|
|
12
|
+
* @type {number}
|
|
13
13
|
* @constant
|
|
14
14
|
*/
|
|
15
15
|
COMPLETE: 0x0000,
|
|
16
16
|
/**
|
|
17
17
|
* 0x0001. Display the portion of the sensor volume that lies below the true horizon of the ellipsoid.
|
|
18
18
|
*
|
|
19
|
-
* @type {
|
|
19
|
+
* @type {number}
|
|
20
20
|
* @constant
|
|
21
21
|
*/
|
|
22
22
|
BELOW_ELLIPSOID_HORIZON: 0x0001,
|
|
23
23
|
/**
|
|
24
24
|
* 0x0002. Display the portion of the sensor volume that lies above the true horizon of the ellipsoid.
|
|
25
25
|
*
|
|
26
|
-
* @type {
|
|
26
|
+
* @type {number}
|
|
27
27
|
* @constant
|
|
28
28
|
*/
|
|
29
29
|
ABOVE_ELLIPSOID_HORIZON: 0x0002,
|
|
@@ -34,7 +34,7 @@ const SensorVolumePortionToDisplay = {
|
|
|
34
34
|
*
|
|
35
35
|
* @param {SensorVolumePortionToDisplay} portionToDisplay The value to validate.
|
|
36
36
|
*
|
|
37
|
-
* @returns {
|
|
37
|
+
* @returns {boolean} <code>true</code> if the provided value is a valid enumeration value; otherwise, <code>false</code>.
|
|
38
38
|
*/
|
|
39
39
|
SensorVolumePortionToDisplay.validate = function (portionToDisplay) {
|
|
40
40
|
return (
|
|
@@ -49,7 +49,7 @@ SensorVolumePortionToDisplay.validate = function (portionToDisplay) {
|
|
|
49
49
|
*
|
|
50
50
|
* @param {SensorVolumePortionToDisplay} portionToDisplay The value to be converted to its corresponding enumeration string.
|
|
51
51
|
*
|
|
52
|
-
* @returns {
|
|
52
|
+
* @returns {string} The enumeration string corresponding to the value.
|
|
53
53
|
*/
|
|
54
54
|
SensorVolumePortionToDisplay.toString = function (portionToDisplay) {
|
|
55
55
|
switch (portionToDisplay) {
|
|
@@ -283,18 +283,18 @@ async function doRequest(resource, provider, previousError) {
|
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
/**
|
|
286
|
-
* @typedef {
|
|
286
|
+
* @typedef {object} SingleTileImageryProvider.fromUrlOptions
|
|
287
287
|
*
|
|
288
288
|
* Initialization options for the SingleTileImageryProvider constructor when using SingleTileImageryProvider.fromUrl
|
|
289
289
|
*
|
|
290
290
|
* @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
|
|
291
|
-
* @property {Credit|
|
|
291
|
+
* @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
|
|
292
292
|
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
|
|
293
293
|
*/
|
|
294
294
|
|
|
295
295
|
/**
|
|
296
296
|
* Creates a provider for a single, top-level imagery tile. The single image is assumed to use a
|
|
297
|
-
* @param {Resource|
|
|
297
|
+
* @param {Resource|string} url The url for the tile
|
|
298
298
|
* @param {SingleTileImageryProvider.fromUrlOptions} [options] Object describing initialization options.
|
|
299
299
|
* @returns {Promise.<SingleTileImageryProvider>} The resolved SingleTileImageryProvider.
|
|
300
300
|
*
|
package/Source/Scene/Terrain.js
CHANGED
|
@@ -112,9 +112,9 @@ Object.defineProperties(Terrain.prototype, {
|
|
|
112
112
|
*
|
|
113
113
|
* @function
|
|
114
114
|
*
|
|
115
|
-
* @param {
|
|
116
|
-
* @param {
|
|
117
|
-
* @param {
|
|
115
|
+
* @param {object} [options] Object with the following properties:
|
|
116
|
+
* @param {boolean} [options.requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server if available.
|
|
117
|
+
* @param {boolean} [options.requestWaterMask=false] Flag that indicates if the client should request per tile water masks from the server if available.
|
|
118
118
|
* @returns {Terrain} An asynchronous helper object for a CesiumTerrainProvider
|
|
119
119
|
*
|
|
120
120
|
* @see Ion
|
|
@@ -162,8 +162,8 @@ Terrain.fromWorldTerrain = function (options) {
|
|
|
162
162
|
*
|
|
163
163
|
* @function
|
|
164
164
|
*
|
|
165
|
-
* @param {
|
|
166
|
-
* @param {
|
|
165
|
+
* @param {object} [options] Object with the following properties:
|
|
166
|
+
* @param {boolean} [options.requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server if available.
|
|
167
167
|
* @returns {Terrain} An asynchronous helper object for a CesiumTerrainProvider
|
|
168
168
|
*
|
|
169
169
|
* @see Ion
|
|
@@ -1274,6 +1274,7 @@ function createFillMesh(tileProvider, frameState, tile, vertexArraysToDestroy) {
|
|
|
1274
1274
|
vertexCount,
|
|
1275
1275
|
minimumHeight,
|
|
1276
1276
|
maximumHeight,
|
|
1277
|
+
rectangle,
|
|
1277
1278
|
BoundingSphere.fromOrientedBoundingBox(obb),
|
|
1278
1279
|
computeOccludeePoint(
|
|
1279
1280
|
tileProvider,
|
|
@@ -107,7 +107,7 @@ TileMapServiceImageryProvider._requestMetadata = async function (
|
|
|
107
107
|
/**
|
|
108
108
|
* Creates a TileMapServiceImageryProvider from the specified url.
|
|
109
109
|
*
|
|
110
|
-
* @param {Resource|
|
|
110
|
+
* @param {Resource|string} url Path to image tiles on server.
|
|
111
111
|
* @param {TileMapServiceImageryProvider.ConstructorOptions} [options] Object describing initialization options.
|
|
112
112
|
* @returns {Promise<TileMapServiceImageryProvider>} A promise that resolves to the created TileMapServiceImageryProvider.
|
|
113
113
|
*
|
|
@@ -205,7 +205,7 @@ function calculateSafeMinimumDetailLevel(
|
|
|
205
205
|
* Parses the results of a successful xml request
|
|
206
206
|
* @private
|
|
207
207
|
*
|
|
208
|
-
* @param {
|
|
208
|
+
* @param {object} xml
|
|
209
209
|
* @param {TileMapServiceImageryProvider.ConstructorOptions} options
|
|
210
210
|
* @param {Resource} tmsResource
|
|
211
211
|
* @param {Resource} xmlResource
|
|
@@ -134,7 +134,7 @@ const pickFeaturesTags = combine(tags, {
|
|
|
134
134
|
* that this can be dynamically overridden by modifying the {@link UriTemplateImageryProvider#enablePickFeatures}
|
|
135
135
|
* property.
|
|
136
136
|
* @property {TileDiscardPolicy} [tileDiscardPolicy] A policy for discarding tile images according to some criteria
|
|
137
|
-
* @property {
|
|
137
|
+
* @property {object} [customTags] Allow to replace custom keywords in the URL template. The object must have strings as keys and functions as values.
|
|
138
138
|
*/
|
|
139
139
|
|
|
140
140
|
/**
|
package/Source/Scene/View.js
CHANGED
|
@@ -10,6 +10,7 @@ import ClearCommand from "../Renderer/ClearCommand.js";
|
|
|
10
10
|
import Pass from "../Renderer/Pass.js";
|
|
11
11
|
import PassState from "../Renderer/PassState.js";
|
|
12
12
|
import Camera from "./Camera.js";
|
|
13
|
+
import EdgeFramebuffer from "./EdgeFramebuffer.js";
|
|
13
14
|
import FrustumCommands from "./FrustumCommands.js";
|
|
14
15
|
import GlobeDepth from "./GlobeDepth.js";
|
|
15
16
|
import GlobeTranslucencyFramebuffer from "./GlobeTranslucencyFramebuffer.js";
|
|
@@ -63,6 +64,7 @@ function View(scene, camera, viewport) {
|
|
|
63
64
|
this.pickFramebuffer = new PickFramebuffer(context);
|
|
64
65
|
this.pickDepthFramebuffer = new PickDepthFramebuffer();
|
|
65
66
|
this.sceneFramebuffer = new SceneFramebuffer();
|
|
67
|
+
this.edgeFramebuffer = new EdgeFramebuffer();
|
|
66
68
|
this.globeDepth = globeDepth;
|
|
67
69
|
this.globeTranslucencyFramebuffer = new GlobeTranslucencyFramebuffer();
|
|
68
70
|
this.oit = oit;
|
|
@@ -445,6 +447,7 @@ View.prototype.destroy = function () {
|
|
|
445
447
|
this.pickDepthFramebuffer && this.pickDepthFramebuffer.destroy();
|
|
446
448
|
this.sceneFramebuffer =
|
|
447
449
|
this.sceneFramebuffer && this.sceneFramebuffer.destroy();
|
|
450
|
+
this.edgeFramebuffer = this.edgeFramebuffer && this.edgeFramebuffer.destroy();
|
|
448
451
|
this.globeDepth = this.globeDepth && this.globeDepth.destroy();
|
|
449
452
|
this.oit = this.oit && this.oit.destroy();
|
|
450
453
|
this.translucentTileClassification =
|