@cesium/engine 25.0.0 → 26.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/Workers/{chunk-3VDDRF2E.js → chunk-2EFYUSUY.js} +14 -14
- package/Build/Workers/{chunk-4GF4MVPY.js → chunk-5LSOO2KD.js} +7 -7
- package/Build/Workers/{chunk-I3A6DXYZ.js → chunk-6HK6IXK2.js} +4 -4
- package/Build/Workers/{chunk-CZ23Y3RM.js → chunk-6YR6JBMY.js} +2 -2
- package/Build/Workers/{chunk-J7KQEKPK.js → chunk-76FDC45O.js} +13 -13
- package/Build/Workers/{chunk-ZCCIIBZT.js → chunk-7D2HZKH7.js} +6 -6
- package/Build/Workers/{chunk-HSVQATK2.js → chunk-7KVKHY7O.js} +6 -6
- package/Build/Workers/{chunk-ITD2IN7N.js → chunk-A3O6EDBK.js} +2 -2
- package/Build/Workers/{chunk-ND3NTTOF.js → chunk-A6X24AZI.js} +6 -6
- package/Build/Workers/{chunk-DH26SNAB.js → chunk-AHWAZRBV.js} +6 -2
- package/Build/Workers/{chunk-3XY3MVPG.js → chunk-B4CQSLZJ.js} +4 -4
- package/Build/Workers/{chunk-DYT5NR6P.js → chunk-C7JQVRLM.js} +3 -3
- package/Build/Workers/{chunk-WC57YYBN.js → chunk-CDJDJ5LK.js} +2 -2
- package/Build/Workers/{chunk-VQKLRBIK.js → chunk-CEEZE3YZ.js} +7 -7
- package/Build/Workers/{chunk-4QQXGTCE.js → chunk-CLCTQVVL.js} +8 -8
- package/Build/Workers/{chunk-WNN5D4W3.js → chunk-DBD5WWG2.js} +10 -10
- package/Build/Workers/{chunk-URUCCIPS.js → chunk-DIGUUD6G.js} +6 -6
- package/Build/Workers/{chunk-BTX2NL3P.js → chunk-E7NZJOK7.js} +196 -22
- package/Build/Workers/{chunk-3LSD7OOA.js → chunk-EHTS2YPT.js} +16 -16
- package/Build/Workers/{chunk-35H3UBIO.js → chunk-ENNFMWDW.js} +11 -11
- package/Build/Workers/{chunk-GL7DNVUS.js → chunk-FCP2QY4G.js} +5 -5
- package/Build/Workers/{chunk-3RFFPH4M.js → chunk-FDK4K5IA.js} +1 -1
- package/Build/Workers/{chunk-WTQGE7Q6.js → chunk-FGQFQHN5.js} +17 -17
- package/Build/Workers/{chunk-WUBKZFF6.js → chunk-GSWMAFTE.js} +9 -9
- package/Build/Workers/{chunk-3TKLDHV3.js → chunk-GXWQZBAI.js} +2 -2
- package/Build/Workers/{chunk-A7A433MD.js → chunk-HHV3MCGV.js} +5 -5
- package/Build/Workers/{chunk-A7ZBMVFS.js → chunk-HS6AD4P2.js} +14 -14
- package/Build/Workers/{chunk-QXNQQYPV.js → chunk-IGAZBTFZ.js} +8 -8
- package/Build/Workers/{chunk-ZAPOS52G.js → chunk-ILME5BXA.js} +8 -8
- package/Build/Workers/{chunk-4MTRQFJP.js → chunk-JKXV6PG5.js} +1 -1
- package/Build/Workers/{chunk-FVLVVOBQ.js → chunk-JW6OZT4R.js} +10 -10
- package/Build/Workers/{chunk-EZARA5FJ.js → chunk-KGXSYGBG.js} +13 -13
- package/Build/Workers/{chunk-J3OFS2RD.js → chunk-LD64RPYV.js} +12 -12
- package/Build/Workers/{chunk-AWFZHD2B.js → chunk-LGNDTZVX.js} +4 -4
- package/Build/Workers/{chunk-AEAVLYPS.js → chunk-LNSQVXFH.js} +2 -2
- package/Build/Workers/{chunk-TA777BGS.js → chunk-N7CCOFLX.js} +1 -1
- package/Build/Workers/{chunk-7LSFAEWF.js → chunk-NIWITKQK.js} +10 -10
- package/Build/Workers/{chunk-4XXHJI6Y.js → chunk-OBEU25PI.js} +17 -17
- package/Build/Workers/{chunk-5T6QQAJW.js → chunk-QVLAFFJY.js} +1 -1
- package/Build/Workers/{chunk-J647NNZW.js → chunk-R4FPNAZ2.js} +6 -6
- package/Build/Workers/{chunk-HVMG6AG4.js → chunk-RG4F5R57.js} +9 -9
- package/Build/Workers/{chunk-ST2UWDUU.js → chunk-SF6K72D7.js} +5 -5
- package/Build/Workers/{chunk-H2A4USJR.js → chunk-SGRGNDOD.js} +10 -10
- package/Build/Workers/{chunk-DFEI5MAV.js → chunk-SM2CDCYF.js} +7 -7
- package/Build/Workers/{chunk-TAI4HLII.js → chunk-SS5ABQGY.js} +4 -4
- package/Build/Workers/{chunk-ACFFCHHZ.js → chunk-T5QBPLE3.js} +11 -11
- package/Build/Workers/{chunk-BVAIWR7O.js → chunk-TVZD72WJ.js} +12 -12
- package/Build/Workers/{chunk-6SDGQI27.js → chunk-UEY73NRN.js} +1 -1
- package/Build/Workers/{chunk-K6NFIRFB.js → chunk-UVO6COT2.js} +5 -5
- package/Build/Workers/{chunk-77RL3MBD.js → chunk-VAL7DYNR.js} +25 -4
- package/Build/Workers/{chunk-WN6P5UDH.js → chunk-WBSY7HDY.js} +12 -12
- package/Build/Workers/{chunk-FIBS5S7R.js → chunk-XDWCTQCZ.js} +2 -2
- package/Build/Workers/{chunk-CKQP3DSS.js → chunk-XLXSDIP5.js} +6 -6
- package/Build/Workers/{chunk-LH5SF3XV.js → chunk-XQ3SKCMM.js} +5 -5
- package/Build/Workers/{chunk-QSDY4NS7.js → chunk-YKU2Q3A2.js} +9 -9
- package/Build/Workers/{chunk-GPIGURCG.js → chunk-ZMBHFYOX.js} +7 -7
- package/Build/Workers/{chunk-QO2CGXMP.js → chunk-ZSGUV73H.js} +6 -6
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +16 -16
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipseGeometry.js +26 -26
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
- package/Build/Workers/createEllipsoidGeometry.js +19 -19
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
- package/Build/Workers/createFrustumGeometry.js +18 -18
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
- package/Build/Workers/createGeometry.js +24 -24
- package/Build/Workers/createGroundPolylineGeometry.js +22 -22
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createPolylineGeometry.js +25 -25
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
- package/Build/Workers/createSimplePolylineGeometry.js +23 -23
- package/Build/Workers/createSphereGeometry.js +19 -19
- package/Build/Workers/createSphereOutlineGeometry.js +18 -18
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -24
- package/Build/Workers/createVectorTilePoints.js +13 -13
- package/Build/Workers/createVectorTilePolygons.js +22 -22
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- package/Build/Workers/createWallGeometry.js +24 -24
- package/Build/Workers/createWallOutlineGeometry.js +23 -23
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +987 -2320
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
- package/Build/Workers/transcodeKTX2.js +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Source/Core/BoundingRectangle.js +6 -8
- package/Source/Core/Cartesian2.js +1 -1
- package/Source/Core/Cartesian3.js +1 -1
- package/Source/Core/Cartesian4.js +1 -1
- package/Source/Core/Color.js +1 -0
- package/Source/Core/ComponentDatatype.js +35 -0
- package/Source/Core/InterpolationAlgorithm.js +57 -50
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/MapProjection.js +1 -0
- package/Source/Core/Matrix2.js +1 -1
- package/Source/Core/Matrix3.js +1 -1
- package/Source/Core/Matrix4.js +1 -1
- package/Source/Core/Resource.js +1 -1
- package/Source/Core/ScreenSpaceEventHandler.js +51 -41
- package/Source/Core/TerrainMesh.js +3 -3
- package/Source/Core/TerrainPicker.js +1 -0
- package/Source/Core/createColorRamp.js +37 -0
- package/Source/Core/globalTypes.js +25 -0
- package/Source/Core/writeTextToCanvas.js +1 -0
- package/Source/DataSources/CzmlDataSource.js +12 -0
- package/Source/DataSources/KmlDataSource.js +528 -555
- package/Source/DataSources/PathGraphics.js +8 -1
- package/Source/DataSources/PathMode.js +27 -0
- package/Source/DataSources/PathVisualizer.js +298 -1
- package/Source/Renderer/Pass.js +3 -2
- package/Source/Renderer/Texture.js +1 -1
- package/Source/Renderer/VertexArray.js +1 -0
- package/Source/Renderer/createUniform.js +346 -239
- package/Source/Renderer/createUniformArray.js +494 -381
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/BillboardTexture.js +5 -3
- package/Source/Scene/BufferPoint.js +1 -0
- package/Source/Scene/BufferPointCollection.js +14 -1
- package/Source/Scene/BufferPolygon.js +3 -2
- package/Source/Scene/BufferPolygonCollection.js +10 -0
- package/Source/Scene/BufferPolyline.js +1 -0
- package/Source/Scene/BufferPolylineCollection.js +2 -0
- package/Source/Scene/BufferPrimitiveCollection.js +79 -28
- package/Source/Scene/CameraEventAggregator.js +30 -18
- package/Source/Scene/Cesium3DTile.js +54 -1
- package/Source/Scene/Cesium3DTileContent.js +195 -254
- package/Source/Scene/Cesium3DTileContentFactory.js +10 -2
- package/Source/Scene/Cesium3DTileOptimizations.js +4 -6
- package/Source/Scene/Cesium3DTileset.js +45 -5
- package/Source/Scene/ClippingPlaneCollection.js +2 -2
- package/Source/Scene/ClippingPolygon.js +2 -0
- package/Source/Scene/ClippingPolygonCollection.js +2 -2
- package/Source/Scene/Composite3DTileContent.js +254 -292
- package/Source/Scene/DerivedCommand.js +4 -0
- package/Source/Scene/EdgeDisplayMode.js +50 -0
- package/Source/Scene/Empty3DTileContent.js +100 -132
- package/Source/Scene/Expression.js +6 -8
- package/Source/Scene/GaussianSplat3DTileContent.js +436 -478
- package/Source/Scene/GeoJsonPrimitive.js +874 -0
- package/Source/Scene/Geometry3DTileContent.js +151 -185
- package/Source/Scene/GlobeSurfaceShaderSet.js +501 -409
- package/Source/Scene/GlobeSurfaceTile.js +540 -401
- package/Source/Scene/GlobeSurfaceTileProvider.js +1259 -1146
- package/Source/Scene/GltfBufferViewLoader.js +3 -3
- package/Source/Scene/GltfLoader.js +110 -0
- package/Source/Scene/GltfLoaderUtil.js +20 -4
- package/Source/Scene/GltfPipeline/forEachTextureInMaterial.js +10 -0
- package/Source/Scene/GltfPipeline/removeUnusedElements.js +21 -11
- package/Source/Scene/ImageryLayer.js +2 -2
- package/Source/Scene/ImageryLayerCollection.js +2 -2
- package/Source/Scene/Implicit3DTileContent.js +179 -214
- package/Source/Scene/MVTDataProvider.js +147 -0
- package/Source/Scene/Material.js +1 -0
- package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +79 -311
- package/Source/Scene/Model/Extensions/Gpm/GltfGpmLoader.js +4 -0
- package/Source/Scene/Model/Model.js +37 -0
- package/Source/Scene/Model/Model3DTileContent.js +424 -458
- package/Source/Scene/Model/ModelDrawCommand.js +31 -3
- package/Source/Scene/Model/ModelUtility.js +5 -0
- package/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js +466 -150
- package/Source/Scene/ModelComponents.js +39 -1
- package/Source/Scene/Multiple3DTileContent.js +291 -334
- package/Source/Scene/Picking.js +5 -0
- package/Source/Scene/PntsParser.js +1 -0
- package/Source/Scene/QuadtreePrimitive.js +3 -2
- package/Source/Scene/ResourceCacheKey.js +5 -5
- package/Source/Scene/Scene.js +27 -0
- package/Source/Scene/Tileset3DTileContent.js +113 -146
- package/Source/Scene/UrlTemplate3DTilesDataProvider.js +499 -0
- package/Source/Scene/Vector3DTileContent.js +205 -234
- package/Source/Scene/VectorGltf3DTileContent.js +85 -36
- package/Source/Scene/VoxelPrimitive.js +159 -175
- package/Source/Scene/VoxelProvider.js +64 -91
- package/Source/Scene/buildVectorGltfFromMVT.js +1059 -0
- package/Source/Scene/buildVoxelCustomShader.js +199 -0
- package/Source/Scene/decodeMVT.js +634 -0
- package/Source/Scene/findMeshoptExtension.js +23 -0
- package/Source/Scene/renderBufferPointCollection.js +113 -62
- package/Source/Scene/renderBufferPolygonCollection.js +98 -55
- package/Source/Scene/renderBufferPolylineCollection.js +270 -143
- package/Source/Shaders/BufferPointMaterialFS.glsl +1 -0
- package/Source/Shaders/BufferPointMaterialFS.js +1 -0
- package/Source/Shaders/BufferPointMaterialVS.glsl +19 -9
- package/Source/Shaders/BufferPointMaterialVS.js +20 -10
- package/Source/Shaders/BufferPolygonMaterialVS.glsl +13 -4
- package/Source/Shaders/BufferPolygonMaterialVS.js +14 -5
- package/Source/Shaders/BufferPolylineMaterialVS.glsl +16 -2
- package/Source/Shaders/BufferPolylineMaterialVS.js +17 -3
- package/Source/Shaders/Builtin/Constants/passCesium3DTileEdgesDirect.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passCesium3DTileEdgesDirect.js +11 -0
- package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
- package/Source/Shaders/Model/EdgeVisibilityStageVS.glsl +0 -1
- package/Source/Shaders/Model/EdgeVisibilityStageVS.js +0 -1
- package/Source/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/Source/Workers/incrementallyBuildTerrainPicker.js +2 -0
- package/index.d.ts +311 -288
- package/index.js +103 -92
- package/package.json +4 -4
package/Source/Scene/Picking.js
CHANGED
|
@@ -247,6 +247,7 @@ const scratchColorZero = new Color(0.0, 0.0, 0.0, 0.0);
|
|
|
247
247
|
* height will default to the value of <code>width</code>
|
|
248
248
|
* @param {BoundingRectangle} result The result rectangle
|
|
249
249
|
* @returns {BoundingRectangle} The result rectangle
|
|
250
|
+
* @ignore
|
|
250
251
|
*/
|
|
251
252
|
function computePickingDrawingBufferRectangle(
|
|
252
253
|
drawingBufferHeight,
|
|
@@ -270,6 +271,7 @@ function computePickingDrawingBufferRectangle(
|
|
|
270
271
|
* @param {BoundingRectangle} drawingBufferRectangle The output drawing buffer recangle.
|
|
271
272
|
* @param {number} [width=3] Width of the pick rectangle.
|
|
272
273
|
* @param {number} [height=3] Height of the pick rectangle.
|
|
274
|
+
* @ignore
|
|
273
275
|
*/
|
|
274
276
|
function pickBegin(
|
|
275
277
|
scene,
|
|
@@ -332,6 +334,7 @@ function pickBegin(
|
|
|
332
334
|
* Teardown needed after picking.
|
|
333
335
|
*
|
|
334
336
|
* @param {Scene} scene
|
|
337
|
+
* @ignore
|
|
335
338
|
*/
|
|
336
339
|
function pickEnd(scene) {
|
|
337
340
|
const { context } = scene;
|
|
@@ -808,6 +811,7 @@ Picking.prototype.pickPosition = function (scene, windowPosition, result) {
|
|
|
808
811
|
* @param {object[]} pickedAttributes
|
|
809
812
|
* @param {object[]} pickedFeatures
|
|
810
813
|
* @returns {boolean} whether picking should end
|
|
814
|
+
* @ignore
|
|
811
815
|
*/
|
|
812
816
|
function addDrillPickedResults(
|
|
813
817
|
pickedResults,
|
|
@@ -875,6 +879,7 @@ function addDrillPickedResults(
|
|
|
875
879
|
* @param {function(number): object[]} pickCallback Pick callback to execute each iteration
|
|
876
880
|
* @param {number} [limit=Number.MAX_VALUE] If supplied, stop drilling after collecting this many picks
|
|
877
881
|
* @returns {object[]} List of picked results
|
|
882
|
+
* @ignore
|
|
878
883
|
*/
|
|
879
884
|
function drillPick(pickCallback, limit) {
|
|
880
885
|
// PERFORMANCE_IDEA: This function calls each primitive's update for each pass. Instead
|
|
@@ -214,6 +214,7 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
|
|
|
214
214
|
* a one-time warning will be printed.
|
|
215
215
|
*
|
|
216
216
|
* @param {object} parsedContent The parsed content
|
|
217
|
+
* @ignore
|
|
217
218
|
*/
|
|
218
219
|
function removeInvalidBinaryBodyReferences(parsedContent) {
|
|
219
220
|
const batchTableJson = parsedContent.batchTableJson;
|
|
@@ -1527,11 +1527,12 @@ function updateHeights(primitive, frameState) {
|
|
|
1527
1527
|
);
|
|
1528
1528
|
|
|
1529
1529
|
if (defined(position)) {
|
|
1530
|
-
//
|
|
1530
|
+
// `pick` wrote into the module-level `scratchPosition`, so `position`
|
|
1531
|
+
// aliases it — clone before caching or the next pick mutates every entry.
|
|
1531
1532
|
tile.setPositionCacheEntry(
|
|
1532
1533
|
data.positionCartographic,
|
|
1533
1534
|
primitive.maximumScreenSpaceError,
|
|
1534
|
-
position,
|
|
1535
|
+
Cartesian3.clone(position),
|
|
1535
1536
|
);
|
|
1536
1537
|
}
|
|
1537
1538
|
}
|
|
@@ -3,8 +3,8 @@ import Frozen from "../Core/Frozen.js";
|
|
|
3
3
|
import defined from "../Core/defined.js";
|
|
4
4
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
5
5
|
import getAbsoluteUri from "../Core/getAbsoluteUri.js";
|
|
6
|
+
import findMeshoptExtension from "./findMeshoptExtension.js";
|
|
6
7
|
import GltfLoaderUtil from "./GltfLoaderUtil.js";
|
|
7
|
-
import hasExtension from "./hasExtension.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Compute cache keys for resources in {@link ResourceCache}.
|
|
@@ -22,8 +22,8 @@ function getExternalResourceCacheKey(resource) {
|
|
|
22
22
|
function getBufferViewCacheKey(bufferView) {
|
|
23
23
|
let { byteOffset, byteLength } = bufferView;
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const meshopt = findMeshoptExtension(bufferView);
|
|
26
|
+
if (defined(meshopt)) {
|
|
27
27
|
byteOffset = meshopt.byteOffset ?? 0;
|
|
28
28
|
byteLength = meshopt.byteLength;
|
|
29
29
|
}
|
|
@@ -247,8 +247,8 @@ ResourceCacheKey.getBufferViewCacheKey = function (options) {
|
|
|
247
247
|
const bufferView = gltf.bufferViews[bufferViewId];
|
|
248
248
|
let bufferId = bufferView.buffer;
|
|
249
249
|
const buffer = gltf.buffers[bufferId];
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
const meshopt = findMeshoptExtension(bufferView);
|
|
251
|
+
if (defined(meshopt)) {
|
|
252
252
|
bufferId = meshopt.buffer;
|
|
253
253
|
}
|
|
254
254
|
|
package/Source/Scene/Scene.js
CHANGED
|
@@ -2466,6 +2466,7 @@ function createWorkingFrustum(camera) {
|
|
|
2466
2466
|
*
|
|
2467
2467
|
* @param {Scene} scene The scene.
|
|
2468
2468
|
* @returns {Function} A function to execute translucent commands.
|
|
2469
|
+
* @ignore
|
|
2469
2470
|
*/
|
|
2470
2471
|
function obtainTranslucentCommandExecutionFunction(scene) {
|
|
2471
2472
|
if (scene._environmentState.useOIT) {
|
|
@@ -2618,6 +2619,29 @@ function performCesium3DTileEdgesPass(scene, passState, frustumCommands) {
|
|
|
2618
2619
|
passState.framebuffer = originalFramebuffer;
|
|
2619
2620
|
}
|
|
2620
2621
|
|
|
2622
|
+
/**
|
|
2623
|
+
* Execute edge commands that should render directly to the main framebuffer
|
|
2624
|
+
* (EDGES_ONLY mode). These edges bypass the MRT edge framebuffer and render
|
|
2625
|
+
* on top of surface geometry.
|
|
2626
|
+
*
|
|
2627
|
+
* @param {Scene} scene
|
|
2628
|
+
* @param {PassState} passState
|
|
2629
|
+
* @param {FrustumCommands} frustumCommands
|
|
2630
|
+
*
|
|
2631
|
+
* @private
|
|
2632
|
+
*/
|
|
2633
|
+
function performCesium3DTileEdgesDirectPass(scene, passState, frustumCommands) {
|
|
2634
|
+
scene.context.uniformState.updatePass(Pass.CESIUM_3D_TILE_EDGES_DIRECT);
|
|
2635
|
+
|
|
2636
|
+
const commands = frustumCommands.commands[Pass.CESIUM_3D_TILE_EDGES_DIRECT];
|
|
2637
|
+
const commandCount =
|
|
2638
|
+
frustumCommands.indices[Pass.CESIUM_3D_TILE_EDGES_DIRECT];
|
|
2639
|
+
|
|
2640
|
+
for (let j = 0; j < commandCount; ++j) {
|
|
2641
|
+
executeCommand(commands[j], scene, passState);
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2621
2645
|
/**
|
|
2622
2646
|
* Execute the draw commands for all the render passes.
|
|
2623
2647
|
*
|
|
@@ -2911,6 +2935,9 @@ function executeCommands(scene, passState) {
|
|
|
2911
2935
|
|
|
2912
2936
|
performPass(frustumCommands, Pass.OPAQUE);
|
|
2913
2937
|
|
|
2938
|
+
// Draw direct edges (EDGES_ONLY mode) after opaque surfaces
|
|
2939
|
+
performCesium3DTileEdgesDirectPass(scene, passState, frustumCommands);
|
|
2940
|
+
|
|
2914
2941
|
performGaussianSplatPass(scene, passState, frustumCommands);
|
|
2915
2942
|
|
|
2916
2943
|
if (index !== 0 && scene.mode !== SceneMode.SCENE2D) {
|
|
@@ -8,175 +8,142 @@ import destroyObject from "../Core/destroyObject.js";
|
|
|
8
8
|
* Implements the {@link Cesium3DTileContent} interface.
|
|
9
9
|
* </p>
|
|
10
10
|
*
|
|
11
|
-
* @
|
|
12
|
-
* @constructor
|
|
13
|
-
*
|
|
11
|
+
* @implements Cesium3DTileContent
|
|
14
12
|
* @private
|
|
15
13
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
class Tileset3DTileContent {
|
|
15
|
+
constructor(tileset, tile, resource) {
|
|
16
|
+
this._tileset = tileset;
|
|
17
|
+
this._tile = tile;
|
|
18
|
+
this._resource = resource;
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
this.featurePropertiesDirty = false;
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
this._metadata = undefined;
|
|
23
|
+
this._group = undefined;
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
}
|
|
25
|
+
this._ready = false;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
get featuresLength() {
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
get pointsLength() {
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
get trianglesLength() {
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
get geometryByteLength() {
|
|
41
|
+
return 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
get texturesByteLength() {
|
|
45
|
+
return 0;
|
|
46
|
+
}
|
|
28
47
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
pointsLength: {
|
|
37
|
-
get: function () {
|
|
38
|
-
return 0;
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
trianglesLength: {
|
|
43
|
-
get: function () {
|
|
44
|
-
return 0;
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
geometryByteLength: {
|
|
49
|
-
get: function () {
|
|
50
|
-
return 0;
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
texturesByteLength: {
|
|
55
|
-
get: function () {
|
|
56
|
-
return 0;
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
batchTableByteLength: {
|
|
61
|
-
get: function () {
|
|
62
|
-
return 0;
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
innerContents: {
|
|
67
|
-
get: function () {
|
|
68
|
-
return undefined;
|
|
69
|
-
},
|
|
70
|
-
},
|
|
48
|
+
get batchTableByteLength() {
|
|
49
|
+
return 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
get innerContents() {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
71
55
|
|
|
72
56
|
/**
|
|
73
57
|
* Returns true when the tile's content is ready to render; otherwise false
|
|
74
58
|
*
|
|
75
|
-
* @memberof Tileset3DTileContent.prototype
|
|
76
59
|
*
|
|
77
60
|
* @type {boolean}
|
|
78
61
|
* @readonly
|
|
79
62
|
* @private
|
|
80
63
|
*/
|
|
81
|
-
ready
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
tileset: {
|
|
88
|
-
get: function () {
|
|
89
|
-
return this._tileset;
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
tile: {
|
|
94
|
-
get: function () {
|
|
95
|
-
return this._tile;
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
url: {
|
|
100
|
-
get: function () {
|
|
101
|
-
return this._resource.getUrlComponent(true);
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
batchTable: {
|
|
106
|
-
get: function () {
|
|
107
|
-
return undefined;
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
metadata: {
|
|
112
|
-
get: function () {
|
|
113
|
-
return this._metadata;
|
|
114
|
-
},
|
|
115
|
-
set: function (value) {
|
|
116
|
-
this._metadata = value;
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
group: {
|
|
121
|
-
get: function () {
|
|
122
|
-
return this._group;
|
|
123
|
-
},
|
|
124
|
-
set: function (value) {
|
|
125
|
-
this._group = value;
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
});
|
|
64
|
+
get ready() {
|
|
65
|
+
return this._ready;
|
|
66
|
+
}
|
|
129
67
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
* @param {Cesium3DTile} tile
|
|
134
|
-
* @param {Resource} resource
|
|
135
|
-
* @param {object} json
|
|
136
|
-
* @returns {Tileset3DTileContent}
|
|
137
|
-
*/
|
|
138
|
-
Tileset3DTileContent.fromJson = function (tileset, tile, resource, json) {
|
|
139
|
-
const content = new Tileset3DTileContent(tileset, tile, resource);
|
|
140
|
-
content._tileset.loadTileset(content._resource, json, content._tile);
|
|
141
|
-
content._ready = true;
|
|
68
|
+
get tileset() {
|
|
69
|
+
return this._tileset;
|
|
70
|
+
}
|
|
142
71
|
|
|
143
|
-
|
|
144
|
-
|
|
72
|
+
get tile() {
|
|
73
|
+
return this._tile;
|
|
74
|
+
}
|
|
145
75
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
*/
|
|
150
|
-
Tileset3DTileContent.prototype.hasProperty = function (batchId, name) {
|
|
151
|
-
return false;
|
|
152
|
-
};
|
|
76
|
+
get url() {
|
|
77
|
+
return this._resource.getUrlComponent(true);
|
|
78
|
+
}
|
|
153
79
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
*/
|
|
158
|
-
Tileset3DTileContent.prototype.getFeature = function (batchId) {
|
|
159
|
-
return undefined;
|
|
160
|
-
};
|
|
80
|
+
get batchTable() {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
161
83
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
) {};
|
|
84
|
+
get metadata() {
|
|
85
|
+
return this._metadata;
|
|
86
|
+
}
|
|
166
87
|
|
|
167
|
-
|
|
88
|
+
set metadata(value) {
|
|
89
|
+
this._metadata = value;
|
|
90
|
+
}
|
|
168
91
|
|
|
169
|
-
|
|
92
|
+
get group() {
|
|
93
|
+
return this._group;
|
|
94
|
+
}
|
|
170
95
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
96
|
+
set group(value) {
|
|
97
|
+
this._group = value;
|
|
98
|
+
}
|
|
174
99
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
100
|
+
/**
|
|
101
|
+
* Creates an instance of Tileset3DTileContent from a parsed JSON object
|
|
102
|
+
* @param {Cesium3DTileset} tileset
|
|
103
|
+
* @param {Cesium3DTile} tile
|
|
104
|
+
* @param {Resource} resource
|
|
105
|
+
* @param {object} json
|
|
106
|
+
* @returns {Tileset3DTileContent}
|
|
107
|
+
*/
|
|
108
|
+
static fromJson(tileset, tile, resource, json) {
|
|
109
|
+
const content = new Tileset3DTileContent(tileset, tile, resource);
|
|
110
|
+
content._tileset.loadTileset(content._resource, json, content._tile);
|
|
111
|
+
content._ready = true;
|
|
112
|
+
|
|
113
|
+
return content;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Part of the {@link Cesium3DTileContent} interface. <code>Tileset3DTileContent</code>
|
|
118
|
+
* always returns <code>false</code> since a tile of this type does not have any features.
|
|
119
|
+
*/
|
|
120
|
+
hasProperty(batchId, name) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Part of the {@link Cesium3DTileContent} interface. <code>Tileset3DTileContent</code>
|
|
126
|
+
* always returns <code>undefined</code> since a tile of this type does not have any features.
|
|
127
|
+
*/
|
|
128
|
+
getFeature(batchId) {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
applyDebugSettings(enabled, color) {}
|
|
133
|
+
applyStyle(style) {}
|
|
134
|
+
update(tileset, frameState) {}
|
|
135
|
+
|
|
136
|
+
pick(ray, frameState, result) {
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
isDestroyed() {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
destroy() {
|
|
145
|
+
return destroyObject(this);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
178
148
|
|
|
179
|
-
Tileset3DTileContent.prototype.destroy = function () {
|
|
180
|
-
return destroyObject(this);
|
|
181
|
-
};
|
|
182
149
|
export default Tileset3DTileContent;
|