@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
|
@@ -125,7 +125,6 @@ GaussianSplat3DTileContent.tilesetRequiresGaussianSplattingExt = function (
|
|
|
125
125
|
tileset,
|
|
126
126
|
) {
|
|
127
127
|
let hasGaussianSplatExtension = false;
|
|
128
|
-
let hasLegacyGaussianSplatExtension = false;
|
|
129
128
|
if (tileset.isGltfExtensionRequired instanceof Function) {
|
|
130
129
|
hasGaussianSplatExtension =
|
|
131
130
|
tileset.isGltfExtensionRequired("KHR_gaussian_splatting") &&
|
|
@@ -133,22 +132,20 @@ GaussianSplat3DTileContent.tilesetRequiresGaussianSplattingExt = function (
|
|
|
133
132
|
"KHR_gaussian_splatting_compression_spz_2",
|
|
134
133
|
);
|
|
135
134
|
|
|
136
|
-
|
|
137
|
-
"KHR_spz_gaussian_splats_compression"
|
|
138
|
-
)
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
"KHR_gaussian_splatting_compression_spz_2 extensions.",
|
|
148
|
-
);
|
|
135
|
+
if (
|
|
136
|
+
tileset.isGltfExtensionRequired("KHR_spz_gaussian_splats_compression")
|
|
137
|
+
) {
|
|
138
|
+
deprecationWarning(
|
|
139
|
+
"KHR_spz_gaussian_splats_compression",
|
|
140
|
+
"Support for the original KHR_spz_gaussian_splats_compression extension has been removed in favor " +
|
|
141
|
+
"of the up to date KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions" +
|
|
142
|
+
"\n\nPlease retile your tileset with the KHR_gaussian_splatting and " +
|
|
143
|
+
"KHR_gaussian_splatting_compression_spz_2 extensions.",
|
|
144
|
+
);
|
|
145
|
+
}
|
|
149
146
|
}
|
|
150
147
|
|
|
151
|
-
return hasGaussianSplatExtension
|
|
148
|
+
return hasGaussianSplatExtension;
|
|
152
149
|
};
|
|
153
150
|
|
|
154
151
|
Object.defineProperties(GaussianSplat3DTileContent.prototype, {
|
|
@@ -236,7 +233,6 @@ Object.defineProperties(GaussianSplat3DTileContent.prototype, {
|
|
|
236
233
|
* @readonly
|
|
237
234
|
*/
|
|
238
235
|
batchTableByteLength: {
|
|
239
|
-
// eslint-disable-next-line getter-return
|
|
240
236
|
get: function () {
|
|
241
237
|
return 0;
|
|
242
238
|
},
|
|
@@ -32,6 +32,7 @@ import Quaternion from "../Core/Quaternion.js";
|
|
|
32
32
|
import SplitDirection from "./SplitDirection.js";
|
|
33
33
|
import destroyObject from "../Core/destroyObject.js";
|
|
34
34
|
import ContextLimits from "../Renderer/ContextLimits.js";
|
|
35
|
+
import Transforms from "../Core/Transforms.js";
|
|
35
36
|
|
|
36
37
|
const scratchMatrix4A = new Matrix4();
|
|
37
38
|
const scratchMatrix4B = new Matrix4();
|
|
@@ -89,7 +90,7 @@ function createGaussianSplatTexture(context, splatTextureData) {
|
|
|
89
90
|
* </p>
|
|
90
91
|
* @alias GaussianSplatPrimitive
|
|
91
92
|
* @constructor
|
|
92
|
-
* @param {
|
|
93
|
+
* @param {object} options An object with the following properties:
|
|
93
94
|
* @param {Cesium3DTileset} options.tileset The tileset that this primitive belongs to.
|
|
94
95
|
* @param {boolean} [options.debugShowBoundingVolume=false] Whether to show the bounding volume of the primitive for debugging purposes.
|
|
95
96
|
* @private
|
|
@@ -427,6 +428,13 @@ GaussianSplatPrimitive.transformTile = function (tile) {
|
|
|
427
428
|
const gltfPrimitive = tile.content.gltfPrimitive;
|
|
428
429
|
const gaussianSplatPrimitive = tile.tileset.gaussianSplatPrimitive;
|
|
429
430
|
|
|
431
|
+
if (gaussianSplatPrimitive._rootTransform === undefined) {
|
|
432
|
+
gaussianSplatPrimitive._rootTransform = Transforms.eastNorthUpToFixedFrame(
|
|
433
|
+
tile.tileset.boundingSphere.center,
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
const rootTransform = gaussianSplatPrimitive._rootTransform;
|
|
437
|
+
|
|
430
438
|
const computedModelMatrix = Matrix4.multiplyTransformation(
|
|
431
439
|
computedTransform,
|
|
432
440
|
gaussianSplatPrimitive._axisCorrectionMatrix,
|
|
@@ -441,7 +449,7 @@ GaussianSplatPrimitive.transformTile = function (tile) {
|
|
|
441
449
|
|
|
442
450
|
const toGlobal = Matrix4.multiply(
|
|
443
451
|
tile.tileset.modelMatrix,
|
|
444
|
-
|
|
452
|
+
rootTransform,
|
|
445
453
|
scratchMatrix4B,
|
|
446
454
|
);
|
|
447
455
|
const toLocal = Matrix4.inverse(toGlobal, scratchMatrix4C);
|
|
@@ -684,7 +692,7 @@ GaussianSplatPrimitive.buildGSplatDrawCommand = function (
|
|
|
684
692
|
const tileset = primitive._tileset;
|
|
685
693
|
const modelMatrix = Matrix4.multiply(
|
|
686
694
|
tileset.modelMatrix,
|
|
687
|
-
|
|
695
|
+
primitive._rootTransform,
|
|
688
696
|
scratchMatrix4A,
|
|
689
697
|
);
|
|
690
698
|
const inverseModelRotation = Matrix4.getRotation(
|
|
@@ -765,7 +773,7 @@ GaussianSplatPrimitive.buildGSplatDrawCommand = function (
|
|
|
765
773
|
|
|
766
774
|
const modelMatrix = Matrix4.multiply(
|
|
767
775
|
tileset.modelMatrix,
|
|
768
|
-
|
|
776
|
+
primitive._rootTransform,
|
|
769
777
|
scratchMatrix4B,
|
|
770
778
|
);
|
|
771
779
|
|
|
@@ -804,10 +812,6 @@ GaussianSplatPrimitive.buildGSplatDrawCommand = function (
|
|
|
804
812
|
GaussianSplatPrimitive.prototype.update = function (frameState) {
|
|
805
813
|
const tileset = this._tileset;
|
|
806
814
|
|
|
807
|
-
if (!defined(this._rootTransform)) {
|
|
808
|
-
this._rootTransform = tileset.root.computedTransform;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
815
|
if (!tileset.show || tileset._selectedTiles.length === 0) {
|
|
812
816
|
return;
|
|
813
817
|
}
|
|
@@ -49,8 +49,8 @@ GaussianSplatSorter._getSorterTaskProcessor = function () {
|
|
|
49
49
|
* Sorts Gaussian splats using a radix sort algorithm. Sorted by distance from the camera.
|
|
50
50
|
* A new list of indexes is returned, which can be used to render the splats in the correct order.
|
|
51
51
|
*
|
|
52
|
-
* @param {
|
|
53
|
-
* @param {
|
|
52
|
+
* @param {object} parameters - The parameters for sorting Gaussian splat indexes.
|
|
53
|
+
* @param {object} parameters.primitive - The primitive containing positions and modelView matrices.
|
|
54
54
|
* @returns {Promise|undefined} A promise that resolves to the sorted indexes or undefined if the task cannot be scheduled.
|
|
55
55
|
* @exception {RuntimeError} Sorter could not be initialized.
|
|
56
56
|
* @private
|
package/Source/Scene/Globe.js
CHANGED
|
@@ -646,7 +646,7 @@ function makeShadersDirty(globe) {
|
|
|
646
646
|
const fragmentSources = [AtmosphereCommon, GroundAtmosphere];
|
|
647
647
|
if (
|
|
648
648
|
defined(globe._material) &&
|
|
649
|
-
(!requireNormals || globe._terrainProvider.
|
|
649
|
+
(!requireNormals || globe._terrainProvider.hasVertexNormals)
|
|
650
650
|
) {
|
|
651
651
|
fragmentSources.push(globe._material.shaderSource);
|
|
652
652
|
defines.push("APPLY_MATERIAL");
|
|
@@ -493,10 +493,8 @@ GlobeSurfaceTile.prototype.updateExaggeration = function (
|
|
|
493
493
|
if (quadtree !== undefined) {
|
|
494
494
|
quadtree._tileToUpdateHeights.push(tile);
|
|
495
495
|
const customData = tile.customData;
|
|
496
|
-
const
|
|
497
|
-
for (let i = 0; i < customDataLength; i++) {
|
|
496
|
+
for (const data of customData) {
|
|
498
497
|
// Restart the level so that a height update is triggered
|
|
499
|
-
const data = customData[i];
|
|
500
498
|
data.level = -1;
|
|
501
499
|
}
|
|
502
500
|
}
|
|
@@ -931,7 +929,15 @@ function createWaterMaskTextureIfNeeded(context, surfaceTile) {
|
|
|
931
929
|
let texture;
|
|
932
930
|
|
|
933
931
|
const waterMaskLength = waterMask.length;
|
|
934
|
-
if (
|
|
932
|
+
if (waterMask instanceof ImageBitmap) {
|
|
933
|
+
texture = Texture.create({
|
|
934
|
+
context: context,
|
|
935
|
+
source: waterMask,
|
|
936
|
+
sampler: waterMaskData.sampler,
|
|
937
|
+
flipY: false,
|
|
938
|
+
skipColorSpaceConversion: true,
|
|
939
|
+
});
|
|
940
|
+
} else if (waterMaskLength === 1) {
|
|
935
941
|
// Length 1 means the tile is entirely land or entirely water.
|
|
936
942
|
// A value of 0 indicates entirely land, a value of 1 indicates entirely water.
|
|
937
943
|
if (waterMask[0] !== 0) {
|
|
@@ -125,6 +125,12 @@ Object.defineProperties(GltfBufferViewLoader.prototype, {
|
|
|
125
125
|
},
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
+
/**
|
|
129
|
+
* Load the resources associated with the loader.
|
|
130
|
+
* @private
|
|
131
|
+
* @param {GltfBufferViewLoader} loader
|
|
132
|
+
* @returns {Promise<GltfBufferViewLoader>}
|
|
133
|
+
*/
|
|
128
134
|
async function loadResources(loader) {
|
|
129
135
|
try {
|
|
130
136
|
const bufferLoader = getBufferLoader(loader);
|
|
@@ -190,9 +196,18 @@ GltfBufferViewLoader.prototype.load = async function () {
|
|
|
190
196
|
return this._promise;
|
|
191
197
|
};
|
|
192
198
|
|
|
199
|
+
/**
|
|
200
|
+
* Get the buffer loader for the specified buffer view loader.
|
|
201
|
+
* Attempts to retrieve from the resource cache first. If a buffer loader is
|
|
202
|
+
* not found, creates a new buffer loader and adds it to the resource cache.
|
|
203
|
+
* @private
|
|
204
|
+
* @param {GltfBufferViewLoader} bufferViewLoader The loader.
|
|
205
|
+
* @returns {BufferLoader} The buffer loader.
|
|
206
|
+
*/
|
|
193
207
|
function getBufferLoader(bufferViewLoader) {
|
|
194
208
|
const resourceCache = bufferViewLoader._resourceCache;
|
|
195
209
|
const buffer = bufferViewLoader._buffer;
|
|
210
|
+
|
|
196
211
|
if (defined(buffer.uri)) {
|
|
197
212
|
const baseResource = bufferViewLoader._baseResource;
|
|
198
213
|
const resource = baseResource.getDerivedResource({
|
|
@@ -202,9 +217,12 @@ function getBufferLoader(bufferViewLoader) {
|
|
|
202
217
|
resource: resource,
|
|
203
218
|
});
|
|
204
219
|
}
|
|
220
|
+
|
|
221
|
+
const source = buffer.extras?._pipeline?.source;
|
|
205
222
|
return resourceCache.getEmbeddedBufferLoader({
|
|
206
223
|
parentResource: bufferViewLoader._gltfResource,
|
|
207
224
|
bufferId: bufferViewLoader._bufferId,
|
|
225
|
+
typedArray: source,
|
|
208
226
|
});
|
|
209
227
|
}
|
|
210
228
|
|
|
@@ -1441,13 +1441,18 @@ function loadIndices(
|
|
|
1441
1441
|
loader,
|
|
1442
1442
|
accessorId,
|
|
1443
1443
|
primitive,
|
|
1444
|
-
draco,
|
|
1445
1444
|
hasFeatureIds,
|
|
1446
1445
|
needsPostProcessing,
|
|
1447
1446
|
frameState,
|
|
1448
1447
|
) {
|
|
1449
1448
|
const accessor = loader.gltfJson.accessors[accessorId];
|
|
1450
1449
|
const bufferViewId = accessor.bufferView;
|
|
1450
|
+
// Infer compression / extensions directly from the glTF primitive instead of passing in flags
|
|
1451
|
+
const extensions = primitive.extensions ?? Frozen.EMPTY_OBJECT;
|
|
1452
|
+
const draco = extensions.KHR_draco_mesh_compression;
|
|
1453
|
+
const hasEdgeVisibility = defined(
|
|
1454
|
+
extensions.EXT_mesh_primitive_edge_visibility,
|
|
1455
|
+
);
|
|
1451
1456
|
|
|
1452
1457
|
if (!defined(draco) && !defined(bufferViewId)) {
|
|
1453
1458
|
return undefined;
|
|
@@ -1470,7 +1475,10 @@ function loadIndices(
|
|
|
1470
1475
|
const outputTypedArrayOnly = loadAttributesAsTypedArray;
|
|
1471
1476
|
const outputBuffer = !outputTypedArrayOnly;
|
|
1472
1477
|
const outputTypedArray =
|
|
1473
|
-
loadAttributesAsTypedArray ||
|
|
1478
|
+
loadAttributesAsTypedArray ||
|
|
1479
|
+
loadForCpuOperations ||
|
|
1480
|
+
loadForClassification ||
|
|
1481
|
+
hasEdgeVisibility;
|
|
1474
1482
|
|
|
1475
1483
|
// Determine what to load right now:
|
|
1476
1484
|
//
|
|
@@ -1991,11 +1999,6 @@ function fetchSpzExtensionFrom(extensions) {
|
|
|
1991
1999
|
return spz;
|
|
1992
2000
|
}
|
|
1993
2001
|
|
|
1994
|
-
const legacySpz = extensions?.KHR_spz_gaussian_splats_compression;
|
|
1995
|
-
if (defined(legacySpz)) {
|
|
1996
|
-
return legacySpz;
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
2002
|
return undefined;
|
|
2000
2003
|
}
|
|
2001
2004
|
|
|
@@ -2036,8 +2039,44 @@ function loadPrimitive(loader, gltfPrimitive, hasInstances, frameState) {
|
|
|
2036
2039
|
);
|
|
2037
2040
|
}
|
|
2038
2041
|
|
|
2042
|
+
// Edge Visibility
|
|
2043
|
+
const edgeVisibilityExtension = extensions.EXT_mesh_primitive_edge_visibility;
|
|
2044
|
+
const hasEdgeVisibility = defined(edgeVisibilityExtension);
|
|
2045
|
+
if (hasEdgeVisibility) {
|
|
2046
|
+
const visibilityAccessor =
|
|
2047
|
+
loader.gltfJson.accessors[edgeVisibilityExtension.visibility];
|
|
2048
|
+
if (!defined(visibilityAccessor)) {
|
|
2049
|
+
throw new RuntimeError("Edge visibility accessor not found!");
|
|
2050
|
+
}
|
|
2051
|
+
const visibilityValues = loadAccessor(loader, visibilityAccessor);
|
|
2052
|
+
primitive.edgeVisibility = {
|
|
2053
|
+
visibility: visibilityValues,
|
|
2054
|
+
material: edgeVisibilityExtension.material,
|
|
2055
|
+
};
|
|
2056
|
+
|
|
2057
|
+
// Load silhouette normals
|
|
2058
|
+
if (defined(edgeVisibilityExtension.silhouetteNormals)) {
|
|
2059
|
+
const silhouetteNormalsAccessor =
|
|
2060
|
+
loader.gltfJson.accessors[edgeVisibilityExtension.silhouetteNormals];
|
|
2061
|
+
if (defined(silhouetteNormalsAccessor)) {
|
|
2062
|
+
const silhouetteNormalsValues = loadAccessor(
|
|
2063
|
+
loader,
|
|
2064
|
+
silhouetteNormalsAccessor,
|
|
2065
|
+
);
|
|
2066
|
+
primitive.edgeVisibility.silhouetteNormals = silhouetteNormalsValues;
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
// Load line strings
|
|
2071
|
+
if (defined(edgeVisibilityExtension.lineStrings)) {
|
|
2072
|
+
primitivePlan.edgeVisibility.lineStrings =
|
|
2073
|
+
edgeVisibilityExtension.lineStrings;
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2039
2077
|
//support the latest glTF spec and the legacy extension
|
|
2040
2078
|
const spzExtension = fetchSpzExtensionFrom(extensions);
|
|
2079
|
+
|
|
2041
2080
|
if (defined(spzExtension)) {
|
|
2042
2081
|
needsPostProcessing = true;
|
|
2043
2082
|
primitivePlan.needsGaussianSplats = true;
|
|
@@ -2108,7 +2147,6 @@ function loadPrimitive(loader, gltfPrimitive, hasInstances, frameState) {
|
|
|
2108
2147
|
loader,
|
|
2109
2148
|
indices,
|
|
2110
2149
|
gltfPrimitive,
|
|
2111
|
-
draco,
|
|
2112
2150
|
hasFeatureIds,
|
|
2113
2151
|
needsPostProcessing,
|
|
2114
2152
|
frameState,
|
|
@@ -5,28 +5,28 @@ import DeveloperError from "../Core/DeveloperError.js";
|
|
|
5
5
|
import Resource from "../Core/Resource.js";
|
|
6
6
|
import IonResource from "../Core/IonResource.js";
|
|
7
7
|
import Check from "../Core/Check.js";
|
|
8
|
-
import UrlTemplateImageryProvider from "./UrlTemplateImageryProvider.js";
|
|
9
8
|
import GoogleMaps from "../Core/GoogleMaps.js";
|
|
9
|
+
import { GOOGLE_2D_MAPS as createFromIonEndpoint } from "./IonImageryProviderFactory.js";
|
|
10
|
+
import UrlTemplateImageryProvider from "./UrlTemplateImageryProvider.js";
|
|
10
11
|
|
|
11
12
|
const trailingSlashRegex = /\/$/;
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
|
-
* @typedef {
|
|
15
|
+
* @typedef {object} Google2DImageryProvider.ConstructorOptions
|
|
15
16
|
*
|
|
16
17
|
* Initialization options for the Google2DImageryProvider constructor
|
|
17
18
|
*
|
|
18
|
-
* @property {
|
|
19
|
-
* @property {string}
|
|
20
|
-
* @property {string}
|
|
21
|
-
* @property {string
|
|
22
|
-
* @property {string}
|
|
23
|
-
* @property {
|
|
24
|
-
* @property {
|
|
25
|
-
* @property {number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
|
|
19
|
+
* @property {string} key The Google api key to send with tile requests.
|
|
20
|
+
* @property {string} session The Google session token that tracks the current state of your map and viewport.
|
|
21
|
+
* @property {string|Resource|IonResource} url The Google 2D maps endpoint.
|
|
22
|
+
* @property {string} tileWidth The width of each tile in pixels.
|
|
23
|
+
* @property {string} tileHeight The height of each tile in pixels.
|
|
24
|
+
* @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
|
|
25
|
+
* @property {number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
|
|
26
26
|
* this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
|
|
27
27
|
* to result in rendering problems.
|
|
28
|
-
* @property {number} [
|
|
29
|
-
* @property {Rectangle} [
|
|
28
|
+
* @property {number} [maximumLevel=22] The maximum level-of-detail supported by the imagery provider.
|
|
29
|
+
* @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -36,7 +36,7 @@ const trailingSlashRegex = /\/$/;
|
|
|
36
36
|
*
|
|
37
37
|
*
|
|
38
38
|
* Provides 2D image tiles from {@link https://developers.google.com/maps/documentation/tile/2d-tiles-overview|Google 2D Tiles}.
|
|
39
|
-
*
|
|
39
|
+
*
|
|
40
40
|
* Google 2D Tiles can only be used with the Google geocoder.
|
|
41
41
|
*
|
|
42
42
|
* @alias Google2DImageryProvider
|
|
@@ -52,7 +52,7 @@ const trailingSlashRegex = /\/$/;
|
|
|
52
52
|
* @example
|
|
53
53
|
* // Use your own Google api key
|
|
54
54
|
* Cesium.GoogleMaps.defaultApiKey = "your-api-key";
|
|
55
|
-
*
|
|
55
|
+
*
|
|
56
56
|
* const googleTilesProvider = Cesium.Google2DImageryProvider.fromUrl({
|
|
57
57
|
* mapType: "SATELLITE"
|
|
58
58
|
* });
|
|
@@ -125,8 +125,6 @@ function Google2DImageryProvider(options) {
|
|
|
125
125
|
// This will be defined for ion resources
|
|
126
126
|
this._tileCredits = resource.credits;
|
|
127
127
|
this._attributionsByLevel = undefined;
|
|
128
|
-
// Asynchronously request and populate _attributionsByLevel
|
|
129
|
-
this.getViewportCredits();
|
|
130
128
|
}
|
|
131
129
|
|
|
132
130
|
Object.defineProperties(Google2DImageryProvider.prototype, {
|
|
@@ -296,7 +294,7 @@ Object.defineProperties(Google2DImageryProvider.prototype, {
|
|
|
296
294
|
* @param {string} [options.language="en_US"] an IETF language tag that specifies the language used to display information on the tiles
|
|
297
295
|
* @param {string} [options.region="US"] A Common Locale Data Repository region identifier (two uppercase letters) that represents the physical location of the user.
|
|
298
296
|
* @param {"layerRoadmap" | "layerStreetview" | "layerTraffic"} [options.overlayLayerType] Returns a transparent overlay map with the specified layerType. If no value is provided, a basemap of mapType is returned. Use multiple instances of Google2DImageryProvider to add multiple Google Maps overlays to a scene. layerRoadmap is included in terrain and roadmap mapTypes, so adding as overlay to terrain or roadmap has no effect.
|
|
299
|
-
* @param {
|
|
297
|
+
* @param {object} [options.styles] An array of JSON style objects that specify the appearance and detail level of map features such as roads, parks, and built-up areas. Styling is used to customize the standard Google base map. The styles parameter is valid only if the mapType is roadmap. For the complete style syntax, see the ({@link https://developers.google.com/maps/documentation/tile/style-reference|Google Style Reference}).
|
|
300
298
|
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
|
|
301
299
|
* @param {number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
|
|
302
300
|
* this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
|
|
@@ -354,10 +352,6 @@ Google2DImageryProvider.fromIonAssetId = async function (options) {
|
|
|
354
352
|
},
|
|
355
353
|
);
|
|
356
354
|
|
|
357
|
-
const endpoint = await endpointResource.fetchJson();
|
|
358
|
-
const endpointOptions = { ...endpoint.options };
|
|
359
|
-
delete endpointOptions.url;
|
|
360
|
-
|
|
361
355
|
const providerOptions = {
|
|
362
356
|
language: options.language,
|
|
363
357
|
region: options.region,
|
|
@@ -368,11 +362,15 @@ Google2DImageryProvider.fromIonAssetId = async function (options) {
|
|
|
368
362
|
credit: options.credit,
|
|
369
363
|
};
|
|
370
364
|
|
|
371
|
-
|
|
372
|
-
|
|
365
|
+
const endpoint = await endpointResource.fetchJson();
|
|
366
|
+
const url = endpoint.options.url;
|
|
367
|
+
delete endpoint.options.url;
|
|
368
|
+
endpoint.options = {
|
|
369
|
+
...endpoint.options,
|
|
373
370
|
...providerOptions,
|
|
374
|
-
|
|
375
|
-
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
return createFromIonEndpoint(url, endpoint, endpointResource);
|
|
376
374
|
};
|
|
377
375
|
|
|
378
376
|
/**
|
|
@@ -383,7 +381,7 @@ Google2DImageryProvider.fromIonAssetId = async function (options) {
|
|
|
383
381
|
* @param {string} [options.language="en_US"] an IETF language tag that specifies the language used to display information on the tiles
|
|
384
382
|
* @param {string} [options.region="US"] A Common Locale Data Repository region identifier (two uppercase letters) that represents the physical location of the user.
|
|
385
383
|
* @param {"layerRoadmap" | "layerStreetview" | "layerTraffic"} [options.overlayLayerType] Returns a transparent overlay map with the specified layerType. If no value is provided, a basemap of mapType is returned. Use multiple instances of Google2DImageryProvider to add multiple Google Maps overlays to a scene. layerRoadmap is included in terrain and roadmap mapTypes, so adding as overlay to terrain or roadmap has no effect.
|
|
386
|
-
* @param {
|
|
384
|
+
* @param {object} [options.styles] An array of JSON style objects that specify the appearance and detail level of map features such as roads, parks, and built-up areas. Styling is used to customize the standard Google base map. The styles parameter is valid only if the mapType is roadmap. For the complete style syntax, see the ({@link https://developers.google.com/maps/documentation/tile/style-reference|Google Style Reference}).
|
|
387
385
|
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
|
|
388
386
|
* @param {number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
|
|
389
387
|
* this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
|
|
@@ -486,7 +484,21 @@ Google2DImageryProvider.prototype.requestImage = function (
|
|
|
486
484
|
level,
|
|
487
485
|
request,
|
|
488
486
|
) {
|
|
489
|
-
|
|
487
|
+
const promise = this._imageryProvider.requestImage(x, y, level, request);
|
|
488
|
+
|
|
489
|
+
// If the requestImage call returns undefined, it couldn't be scheduled this frame. Make sure to return undefined so this can be handled upstream.
|
|
490
|
+
if (!defined(promise)) {
|
|
491
|
+
return undefined;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// Asynchronously request and populate _attributionsByLevel if it hasn't been already. We do this here so that the promise can be properly awaited.
|
|
495
|
+
if (promise && !defined(this._attributionsByLevel)) {
|
|
496
|
+
return Promise.all([promise, this.getViewportCredits()]).then(
|
|
497
|
+
(results) => results[0],
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
return promise;
|
|
490
502
|
};
|
|
491
503
|
|
|
492
504
|
/**
|
|
@@ -436,7 +436,7 @@ Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype, {
|
|
|
436
436
|
/**
|
|
437
437
|
* Creates a tiled imagery provider using the Google Earth Imagery API.
|
|
438
438
|
*
|
|
439
|
-
* @param {Resource|
|
|
439
|
+
* @param {Resource|string} url The url of the Google Earth server hosting the imagery.
|
|
440
440
|
* @param {GoogleEarthEnterpriseMapsProvider.ConstructorOptions} [options] Object describing initialization options
|
|
441
441
|
* @returns {Promise<GoogleEarthEnterpriseMapsProvider>} The created GoogleEarthEnterpriseMapsProvider.
|
|
442
442
|
*
|
|
@@ -63,7 +63,7 @@ import Lerc from "lerc";
|
|
|
63
63
|
import Rectangle from "../Core/Rectangle.js";
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
* @typedef {
|
|
66
|
+
* @typedef {object} I3SDataProvider.ConstructorOptions
|
|
67
67
|
*
|
|
68
68
|
* Initialization options for the I3SDataProvider constructor
|
|
69
69
|
*
|
|
@@ -41,11 +41,11 @@ async function initializeDecoder() {
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Transcodes I3S to glTF in a web worker
|
|
44
|
-
* @param {
|
|
45
|
-
* @param {
|
|
44
|
+
* @param {string} url custom attributes source URL
|
|
45
|
+
* @param {object} defaultGeometrySchema Schema to use during decoding
|
|
46
46
|
* @param {I3SGeometry} geometryData The draco encoded geometry data
|
|
47
47
|
* @param {Array} [featureData] The draco encoded feature data
|
|
48
|
-
* @param {
|
|
48
|
+
* @param {object} [symbologyData] The rendering symbology to apply
|
|
49
49
|
* @returns Promise<undefined|object> Returns a promise which resolves to the glTF result, or undefined if the task cannot be scheduled this frame.
|
|
50
50
|
*
|
|
51
51
|
* @exception {RuntimeError} I3S decoder could not be initialized.
|
|
@@ -35,7 +35,7 @@ const ITwinData = {};
|
|
|
35
35
|
*
|
|
36
36
|
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
37
37
|
*
|
|
38
|
-
* @param {
|
|
38
|
+
* @param {object} options
|
|
39
39
|
* @param {string} options.iModelId The id of the iModel to load
|
|
40
40
|
* @param {Cesium3DTileset.ConstructorOptions} [options.tilesetOptions] Object containing options to pass to the internally created {@link Cesium3DTileset}.
|
|
41
41
|
* @param {string} [options.changesetId] The id of the changeset to load, if not provided the latest changesets will be used
|
|
@@ -95,7 +95,7 @@ ITwinData.createTilesetFromIModelId = async function ({
|
|
|
95
95
|
*
|
|
96
96
|
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
97
97
|
*
|
|
98
|
-
* @param {
|
|
98
|
+
* @param {object} options
|
|
99
99
|
* @param {string} options.iTwinId The id of the iTwin to load data from
|
|
100
100
|
* @param {string} options.realityDataId The id of the reality data to load
|
|
101
101
|
* @param {ITwinPlatform.RealityDataType} [options.type] The type of this reality data
|
|
@@ -169,7 +169,7 @@ ITwinData.createTilesetForRealityDataId = async function ({
|
|
|
169
169
|
* If the <code>type</code> or <code>rootDocument</code> are not provided this function
|
|
170
170
|
* will first request the full metadata for the specified reality data to fill these values.
|
|
171
171
|
*
|
|
172
|
-
* @param {
|
|
172
|
+
* @param {object} options
|
|
173
173
|
* @param {string} options.iTwinId The id of the iTwin to load data from
|
|
174
174
|
* @param {string} options.realityDataId The id of the reality data to load
|
|
175
175
|
* @param {ITwinPlatform.RealityDataType} [options.type] The type of this reality data
|
|
@@ -232,7 +232,7 @@ ITwinData.createDataSourceForRealityDataId = async function ({
|
|
|
232
232
|
/**
|
|
233
233
|
* Load data from the Geospatial Features API as GeoJSON.
|
|
234
234
|
*
|
|
235
|
-
* @param {
|
|
235
|
+
* @param {object} options
|
|
236
236
|
* @param {string} options.iTwinId The id of the iTwin to load data from
|
|
237
237
|
* @param {string} options.collectionId The id of the data collection to load
|
|
238
238
|
* @param {number} [options.limit=10000] number of items per page, must be between 1 and 10,000 inclusive
|
|
@@ -40,7 +40,7 @@ import SplitDirection from "./SplitDirection.js";
|
|
|
40
40
|
import TileImagery from "./TileImagery.js";
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* @typedef {
|
|
43
|
+
* @typedef {object} ImageryLayer.ConstructorOptions
|
|
44
44
|
*
|
|
45
45
|
* Initialization options for the ImageryLayer constructor.
|
|
46
46
|
*
|
|
@@ -459,14 +459,13 @@ function deriveChildTile(
|
|
|
459
459
|
// as the bounding volumes are needed below.
|
|
460
460
|
let tileMetadata;
|
|
461
461
|
let tileBounds;
|
|
462
|
-
let contentBounds;
|
|
463
462
|
if (defined(subtree.tilePropertyTableJson)) {
|
|
464
463
|
tileMetadata = subtree.getTileMetadataView(implicitCoordinates);
|
|
465
464
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
465
|
+
tileBounds = BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(
|
|
466
|
+
"TILE",
|
|
467
|
+
tileMetadata,
|
|
468
|
+
);
|
|
470
469
|
}
|
|
471
470
|
|
|
472
471
|
// Content is not loaded at this point, so this flag is set for future reference.
|
|
@@ -502,6 +501,20 @@ function deriveChildTile(
|
|
|
502
501
|
uri: childContentUri,
|
|
503
502
|
};
|
|
504
503
|
|
|
504
|
+
let contentBounds;
|
|
505
|
+
|
|
506
|
+
if (subtree.contentPropertyTableJsons.length > 0) {
|
|
507
|
+
const contentMetadata = subtree.getContentMetadataView(
|
|
508
|
+
implicitCoordinates,
|
|
509
|
+
i,
|
|
510
|
+
);
|
|
511
|
+
|
|
512
|
+
contentBounds = BoundingVolumeSemantics.parseAllBoundingVolumeSemantics(
|
|
513
|
+
"CONTENT",
|
|
514
|
+
contentMetadata,
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
|
|
505
518
|
const contentBoundingVolume = getContentBoundingVolume(
|
|
506
519
|
boundingVolume,
|
|
507
520
|
contentBounds,
|
|
@@ -892,7 +905,6 @@ function deriveBoundingVolumeS2(
|
|
|
892
905
|
}
|
|
893
906
|
|
|
894
907
|
// Extract the first 3 face bits from the 64-bit S2 cell ID.
|
|
895
|
-
// eslint-disable-next-line no-undef
|
|
896
908
|
const face = Number(parentTile._boundingVolume.s2Cell._cellId >> BigInt(61));
|
|
897
909
|
// The Hilbert curve is rotated for the "odd" faces on the S2 Earthcube.
|
|
898
910
|
// See http://s2geometry.io/devguide/img/s2cell_global.jpg
|
|
@@ -900,7 +912,6 @@ function deriveBoundingVolumeS2(
|
|
|
900
912
|
face % 2 === 0
|
|
901
913
|
? HilbertOrder.encode2D(level, x, y)
|
|
902
914
|
: HilbertOrder.encode2D(level, y, x);
|
|
903
|
-
// eslint-disable-next-line no-undef
|
|
904
915
|
const cell = S2Cell.fromFacePositionLevel(face, BigInt(position), level);
|
|
905
916
|
|
|
906
917
|
let minHeight, maxHeight;
|
|
@@ -515,7 +515,7 @@ function parseSubtreeChunks(subtreeView) {
|
|
|
515
515
|
* isExternal and isActive fields for easier parsing later. This modifies
|
|
516
516
|
* the objects in place.
|
|
517
517
|
*
|
|
518
|
-
* @param {
|
|
518
|
+
* @param {object[]} [bufferHeaders=[]] The JSON from subtreeJson.buffers.
|
|
519
519
|
* @returns {BufferHeader[]} The same array of headers with additional fields.
|
|
520
520
|
* @private
|
|
521
521
|
*/
|
|
@@ -547,7 +547,7 @@ function preprocessBuffers(bufferHeaders) {
|
|
|
547
547
|
* Iterate the list of buffer views from the subtree JSON and add the
|
|
548
548
|
* isActive flag. Also save a reference to the bufferHeader
|
|
549
549
|
*
|
|
550
|
-
* @param {
|
|
550
|
+
* @param {object[]} [bufferViewHeaders=[]] The JSON from subtree.bufferViews
|
|
551
551
|
* @param {BufferHeader[]} bufferHeaders The preprocessed buffer headers
|
|
552
552
|
* @returns {BufferViewHeader[]} The same array of bufferView headers with additional fields
|
|
553
553
|
* @private
|
|
@@ -576,7 +576,7 @@ function preprocessBufferViews(bufferViewHeaders, bufferHeaders) {
|
|
|
576
576
|
* This function modifies the buffer view headers' isActive flags in place.
|
|
577
577
|
* </p>
|
|
578
578
|
*
|
|
579
|
-
* @param {
|
|
579
|
+
* @param {object[]} subtreeJson The JSON chunk from the subtree
|
|
580
580
|
* @param {BufferViewHeader[]} bufferViewHeaders The preprocessed buffer view headers
|
|
581
581
|
* @private
|
|
582
582
|
*/
|
|
@@ -128,7 +128,7 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
|
|
|
128
128
|
* This is an array to support multiple contents.
|
|
129
129
|
* </p>
|
|
130
130
|
*
|
|
131
|
-
* @type {
|
|
131
|
+
* @type {object[]}
|
|
132
132
|
* @readonly
|
|
133
133
|
* @private
|
|
134
134
|
*/
|
|
@@ -223,7 +223,7 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
|
|
|
223
223
|
* in the contents array (3D Tiles 1.1) or the `3DTILES_multiple_contents` extension
|
|
224
224
|
*
|
|
225
225
|
* @param {object} tileJson The JSON header of the tile with either implicit tiling (3D Tiles 1.1) or the 3DTILES_implicit_tiling extension.
|
|
226
|
-
* @return {
|
|
226
|
+
* @return {object[]} An array of JSON headers for the contents of each tile
|
|
227
227
|
* @private
|
|
228
228
|
*/
|
|
229
229
|
function gatherContentHeaders(tileJson) {
|