@cesium/engine 22.2.0 → 23.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-YFEZPDAY.js → chunk-2GL2EUEE.js} +11 -11
- package/Build/Workers/{chunk-A3NUMZBG.js → chunk-2WI4HGJU.js} +6 -6
- package/Build/Workers/{chunk-3JB2X2PR.js → chunk-36LBFITA.js} +665 -366
- package/Build/Workers/{chunk-VSZ5DB2W.js → chunk-3B65YFXC.js} +1 -1
- package/Build/Workers/{chunk-PSHZAHFE.js → chunk-4LGFX2P5.js} +11 -11
- package/Build/Workers/{chunk-AMWXJ5A7.js → chunk-4UNQX2MP.js} +2 -2
- package/Build/Workers/{chunk-LDSQMLRC.js → chunk-52K3GJKG.js} +3 -3
- package/Build/Workers/{chunk-MSTAVM2N.js → chunk-56OHFSLH.js} +10 -10
- package/Build/Workers/{chunk-IWOSJVFQ.js → chunk-5A7YSAXT.js} +14 -14
- package/Build/Workers/{chunk-PMDPP22G.js → chunk-5JP5FG7U.js} +7 -7
- package/Build/Workers/{chunk-DIJ7IG5D.js → chunk-5R7SBUTW.js} +10 -10
- package/Build/Workers/chunk-5VKZVPO5.js +1829 -0
- package/Build/Workers/{chunk-L2FSBEW2.js → chunk-6FVFM2KB.js} +5 -5
- package/Build/Workers/{chunk-G6WQA27G.js → chunk-6SLGTBB2.js} +5 -5
- package/Build/Workers/{chunk-3HUEBDFC.js → chunk-7KRN6JPQ.js} +14 -14
- package/Build/Workers/{chunk-GMHDOQPH.js → chunk-AA33B6PU.js} +4 -4
- package/Build/Workers/{chunk-7CDQUIP5.js → chunk-AP6XWET5.js} +8 -8
- package/Build/Workers/{chunk-IVN5HSOI.js → chunk-APDKMX7W.js} +6 -6
- package/Build/Workers/{chunk-72LZ3FN6.js → chunk-ARCFIOKA.js} +12 -12
- package/Build/Workers/{chunk-UBJYWGMV.js → chunk-BNBD2YZK.js} +16 -16
- package/Build/Workers/{chunk-VGH2CSC7.js → chunk-DT5SJBKA.js} +29 -15
- package/Build/Workers/{chunk-ED4UXMYY.js → chunk-ESD4IEOU.js} +5 -5
- package/Build/Workers/{chunk-JFN2DQHY.js → chunk-FSDVXW7M.js} +5 -5
- package/Build/Workers/{chunk-JERDRSEI.js → chunk-G3YT7M7A.js} +1 -1
- package/Build/Workers/{chunk-NY3CWLIZ.js → chunk-GN5NEUDT.js} +8 -8
- package/Build/Workers/{chunk-O3GWUTWM.js → chunk-HYLEKKO5.js} +1 -1
- package/Build/Workers/{chunk-64PJ4MTB.js → chunk-HYTFXWMY.js} +7 -7
- package/Build/Workers/{chunk-FPRM6PCE.js → chunk-IFA7VHHP.js} +560 -306
- package/Build/Workers/{chunk-FM5XPC2E.js → chunk-IYVDOB5V.js} +4 -4
- package/Build/Workers/{chunk-P7ISUYLW.js → chunk-JUGY5AZN.js} +4 -4
- package/Build/Workers/{chunk-JONWM4IO.js → chunk-KPYU6YZG.js} +1 -1
- package/Build/Workers/{chunk-JUOSYFXT.js → chunk-L7RDJ4V7.js} +1 -1
- package/Build/Workers/{chunk-MWGB6DLR.js → chunk-LDQWNMEC.js} +1 -1
- package/Build/Workers/{chunk-C6FTHSJA.js → chunk-MQJG522T.js} +6 -6
- package/Build/Workers/{chunk-WH4HDRGN.js → chunk-MT5M7RLZ.js} +2 -2
- package/Build/Workers/{chunk-4ZQN7M7E.js → chunk-N4AWE7TZ.js} +10 -10
- package/Build/Workers/{chunk-SDUH3N6G.js → chunk-NAYRNPEP.js} +4 -4
- package/Build/Workers/{chunk-7OPRTZBT.js → chunk-NNHU33JK.js} +7 -7
- package/Build/Workers/{chunk-CQCEPC6N.js → chunk-NQCAZU7S.js} +13 -13
- package/Build/Workers/{chunk-35J4D6PX.js → chunk-NUYLNQKV.js} +2 -2
- package/Build/Workers/{chunk-I45CATZK.js → chunk-OC6X22PG.js} +9 -9
- package/Build/Workers/{chunk-7MGTX4WP.js → chunk-OHBM4YG4.js} +12 -12
- package/Build/Workers/{chunk-DCR62BCO.js → chunk-OMXN7YF4.js} +12 -12
- package/Build/Workers/{chunk-XPNY2VY3.js → chunk-OQ3EAJNW.js} +2 -2
- package/Build/Workers/{chunk-4I7BCCNU.js → chunk-OQBPOKPZ.js} +6 -6
- package/Build/Workers/{chunk-2JNPWPLE.js → chunk-PQVNT5CJ.js} +6 -6
- package/Build/Workers/{chunk-K64RQCRK.js → chunk-QA24Q62E.js} +17 -17
- package/Build/Workers/{chunk-K6BXEBAF.js → chunk-QQX7S5QT.js} +17 -17
- package/Build/Workers/{chunk-2YVTOY5Z.js → chunk-QTOHIXGF.js} +10 -10
- package/Build/Workers/{chunk-4MCPC4TE.js → chunk-R7M4XNPP.js} +8 -8
- package/Build/Workers/{chunk-C35SJ4QP.js → chunk-SGKTBHFQ.js} +13 -13
- package/Build/Workers/{chunk-BKYJBTHW.js → chunk-SQTRWKO2.js} +5 -5
- package/Build/Workers/{chunk-I4D5IP46.js → chunk-T43FXHNC.js} +7 -7
- package/Build/Workers/{chunk-QO6Z5UJE.js → chunk-UEEGWJJP.js} +2 -2
- package/Build/Workers/{chunk-ZUWF63QU.js → chunk-WKXDCVBO.js} +4 -4
- package/Build/Workers/{chunk-N5MNKWED.js → chunk-Y5AJSEEN.js} +2 -2
- package/Build/Workers/{chunk-V26Y7ZQL.js → chunk-ZIW5FCIW.js} +37 -27
- 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 +5 -5
- 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 +20 -12
- 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/AttributeCompression.js +53 -6
- package/Source/Core/BoxGeometry.js +1 -1
- package/Source/Core/Cartesian2.js +689 -684
- package/Source/Core/Cartesian3.js +1044 -1043
- package/Source/Core/Cartesian4.js +816 -813
- package/Source/Core/CornerType.js +1 -1
- package/Source/Core/CorridorGeometry.js +1 -1
- package/Source/Core/FeatureDetection.js +1 -32
- package/Source/Core/Geometry.js +1 -1
- package/Source/Core/GoogleMaps.js +23 -2
- package/Source/Core/IntersectionTests.js +2 -2
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/OpenCageGeocoderService.js +2 -3
- package/Source/Core/PinBuilder.js +1 -1
- package/Source/Core/PolygonGeometry.js +1 -1
- package/Source/Core/PolylineGeometry.js +1 -1
- package/Source/Core/PolylineVolumeGeometry.js +1 -1
- package/Source/Core/RectangleGeometry.js +1 -1
- package/Source/Core/ScreenSpaceEventHandler.js +4 -8
- package/Source/Core/TerrainMesh.js +11 -8
- package/Source/Core/TerrainPicker.js +24 -7
- package/Source/Core/VideoSynchronizer.js +1 -1
- package/Source/Core/WallGeometry.js +1 -1
- package/Source/Core/globalTypes.js +16 -0
- package/Source/Core/writeTextToCanvas.js +40 -86
- package/Source/DataSources/BillboardGraphics.js +1 -1
- package/Source/DataSources/BoxGraphics.js +1 -1
- package/Source/DataSources/CallbackPositionProperty.js +1 -1
- package/Source/DataSources/CorridorGraphics.js +1 -1
- package/Source/DataSources/CzmlDataSource.js +1 -1
- package/Source/DataSources/EllipseGraphics.js +1 -1
- package/Source/DataSources/EllipsoidGraphics.js +1 -1
- package/Source/DataSources/Entity.js +1 -1
- package/Source/DataSources/EntityCluster.js +2 -2
- package/Source/DataSources/GeoJsonDataSource.js +2 -2
- package/Source/DataSources/GpxDataSource.js +1 -1
- package/Source/DataSources/KmlDataSource.js +1 -1
- package/Source/DataSources/KmlTour.js +1 -1
- package/Source/DataSources/LabelGraphics.js +1 -1
- package/Source/DataSources/ModelGraphics.js +1 -1
- package/Source/DataSources/PlaneGraphics.js +1 -1
- package/Source/DataSources/PolygonGraphics.js +1 -1
- package/Source/DataSources/PolylineGraphics.js +1 -1
- package/Source/DataSources/PolylineVolumeGraphics.js +1 -1
- package/Source/DataSources/RectangleGraphics.js +1 -1
- package/Source/DataSources/WallGraphics.js +1 -1
- package/Source/DataSources/exportKml.js +1 -1
- package/Source/Renderer/Context.js +11 -10
- package/Source/Renderer/ContextLimits.js +66 -33
- package/Source/Renderer/ShaderDestination.js +54 -13
- package/Source/Renderer/ShaderSource.js +19 -18
- package/Source/Renderer/Texture.js +1 -1
- package/Source/Renderer/Texture3D.js +166 -7
- package/Source/Renderer/TextureAtlas.js +2 -2
- package/Source/Scene/Appearance.js +1 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +8 -5
- package/Source/Scene/BillboardCollection.js +65 -26
- package/Source/Scene/BillboardTexture.js +4 -1
- package/Source/Scene/BufferLoader.js +65 -74
- package/Source/Scene/Camera.js +13 -2
- package/Source/Scene/ClippingPlaneCollection.js +2 -2
- package/Source/Scene/CloudCollection.js +2 -2
- package/Source/Scene/CubeMapPanorama.js +351 -0
- package/Source/Scene/CumulusCloud.js +1 -1
- package/Source/Scene/DerivedCommand.js +8 -31
- package/Source/Scene/DracoLoader.js +79 -78
- package/Source/Scene/DynamicEnvironmentMapManager.js +41 -26
- package/Source/Scene/EquirectangularPanorama.js +264 -0
- package/Source/Scene/Fog.js +1 -1
- package/Source/Scene/FrameState.js +7 -0
- package/Source/Scene/GaussianSplatPrimitive.js +907 -168
- package/Source/Scene/Globe.js +3 -10
- package/Source/Scene/GlobeSurfaceShaderSet.js +36 -32
- package/Source/Scene/GltfBufferViewLoader.js +109 -118
- package/Source/Scene/GltfDracoLoader.js +167 -176
- package/Source/Scene/GltfImageLoader.js +91 -101
- package/Source/Scene/GltfIndexBufferLoader.js +228 -241
- package/Source/Scene/GltfJsonLoader.js +90 -99
- package/Source/Scene/GltfLoader.js +323 -324
- package/Source/Scene/GltfSpzLoader.js +127 -134
- package/Source/Scene/GltfStructuralMetadataLoader.js +181 -186
- package/Source/Scene/GltfTextureLoader.js +217 -231
- package/Source/Scene/GltfVertexBufferLoader.js +267 -276
- package/Source/Scene/GoogleStreetViewCubeMapPanoramaProvider.js +341 -0
- package/Source/Scene/ImageBasedLighting.js +2 -2
- package/Source/Scene/ImageryLayerCollection.js +2 -2
- package/Source/Scene/ImageryProvider.js +2 -2
- package/Source/Scene/Label.js +7 -5
- package/Source/Scene/LabelCollection.js +60 -2
- package/Source/Scene/Material.js +1 -1
- package/Source/Scene/MaterialAppearance.js +1 -1
- package/Source/Scene/Megatexture.js +174 -242
- package/Source/Scene/MetadataClassProperty.js +212 -7
- package/Source/Scene/MetadataComponentType.js +162 -127
- package/Source/Scene/MetadataSchemaLoader.js +60 -67
- package/Source/Scene/MetadataTable.js +14 -0
- package/Source/Scene/MetadataTableProperty.js +14 -0
- package/Source/Scene/Model/B3dmLoader.js +216 -224
- package/Source/Scene/Model/CustomShader.js +6 -1
- package/Source/Scene/Model/CustomShaderPipelineStage.js +122 -7
- package/Source/Scene/Model/GeoJsonLoader.js +53 -61
- package/Source/Scene/Model/GeometryPipelineStage.js +17 -3
- package/Source/Scene/Model/I3dmLoader.js +232 -240
- package/Source/Scene/Model/MaterialPipelineStage.js +17 -0
- package/Source/Scene/Model/MetadataPipelineStage.js +438 -22
- package/Source/Scene/Model/Model.js +1 -1
- package/Source/Scene/Model/PntsLoader.js +78 -89
- package/Source/Scene/ModelComponents.js +10 -0
- package/Source/Scene/Panorama.js +53 -0
- package/Source/Scene/PanoramaProvider.js +43 -0
- package/Source/Scene/ParticleSystem.js +2 -2
- package/Source/Scene/PointPrimitive.js +1 -1
- package/Source/Scene/PointPrimitiveCollection.js +14 -22
- package/Source/Scene/Polyline.js +0 -1
- package/Source/Scene/PolylineCollection.js +1 -4
- package/Source/Scene/PolylineColorAppearance.js +1 -6
- package/Source/Scene/PolylineMaterialAppearance.js +1 -6
- package/Source/Scene/PostProcessStageCollection.js +1 -1
- package/Source/Scene/PropertyTable.js +43 -0
- package/Source/Scene/PropertyTexture.js +1 -1
- package/Source/Scene/PropertyTextureProperty.js +0 -97
- package/Source/Scene/QuadtreePrimitive.js +6 -3
- package/Source/Scene/ResourceLoader.js +84 -92
- package/Source/Scene/Scene.js +12 -0
- package/Source/Scene/ShadowMap.js +1 -2
- package/Source/Scene/SkyBox.js +29 -164
- package/Source/Scene/StructuralMetadata.js +18 -3
- package/Source/Scene/Vector3DTileClampedPolylines.js +1 -5
- package/Source/Scene/Vector3DTilePolylines.js +1 -5
- package/Source/Scene/VoxelPrimitive.js +16 -33
- package/Source/Scene/VoxelRenderResources.js +1 -8
- package/Source/Scene/VoxelTraversal.js +16 -61
- package/Source/Scene/WebMapTileServiceImageryProvider.js +1 -1
- package/Source/Scene/createElevationBandMaterial.js +1 -1
- package/Source/Scene/parseStructuralMetadata.js +244 -0
- package/Source/Scene/processVoxelProperties.js +1 -1
- package/Source/Shaders/BillboardCollectionFS.glsl +66 -40
- package/Source/Shaders/BillboardCollectionFS.js +67 -40
- package/Source/Shaders/BillboardCollectionVS.glsl +22 -31
- package/Source/Shaders/BillboardCollectionVS.js +22 -31
- package/Source/Shaders/Builtin/CzmBuiltins.js +4 -0
- package/Source/Shaders/Builtin/Functions/columbusViewMorph.glsl +8 -1
- package/Source/Shaders/Builtin/Functions/columbusViewMorph.js +8 -1
- package/Source/Shaders/Builtin/Functions/decodeRGB8.glsl +22 -0
- package/Source/Shaders/Builtin/Functions/decodeRGB8.js +24 -0
- package/Source/Shaders/Builtin/Functions/unpackTexture.glsl +35 -0
- package/Source/Shaders/Builtin/Functions/unpackTexture.js +37 -0
- package/Source/Shaders/CubeMapPanoramaVS.glsl +11 -0
- package/Source/Shaders/CubeMapPanoramaVS.js +13 -0
- package/Source/Shaders/Model/MetadataStageFS.glsl +2 -1
- package/Source/Shaders/Model/MetadataStageFS.js +2 -1
- package/Source/Shaders/Model/MetadataStageVS.glsl +2 -1
- package/Source/Shaders/Model/MetadataStageVS.js +2 -1
- package/Source/Shaders/Model/ModelFS.glsl +9 -1
- package/Source/Shaders/Model/ModelFS.js +9 -1
- package/Source/Shaders/Model/ModelVS.glsl +4 -2
- package/Source/Shaders/Model/ModelVS.js +4 -2
- package/Source/Shaders/PointPrimitiveCollectionVS.glsl +8 -39
- package/Source/Shaders/PointPrimitiveCollectionVS.js +8 -39
- package/Source/Shaders/Voxels/IntersectionUtils.glsl +1 -1
- package/Source/Shaders/Voxels/IntersectionUtils.js +1 -1
- package/Source/Shaders/Voxels/Megatexture.glsl +15 -83
- package/Source/Shaders/Voxels/Megatexture.js +15 -83
- package/Source/Shaders/Voxels/Octree.glsl +6 -9
- package/Source/Shaders/Voxels/Octree.js +6 -9
- package/Source/Widget/CesiumWidget.js +1 -1
- package/Source/Workers/incrementallyBuildTerrainPicker.js +16 -2
- package/index.d.ts +582 -193
- package/index.js +91 -83
- package/package.json +2 -1
- package/Build/Workers/chunk-ZGWX2R5I.js +0 -1443
|
@@ -37,50 +37,45 @@ const MetallicRoughness = ModelComponents.MetallicRoughness;
|
|
|
37
37
|
/**
|
|
38
38
|
* Loads a .pnts point cloud and transcodes it into a {@link ModelComponents}
|
|
39
39
|
*
|
|
40
|
-
* @alias PntsLoader
|
|
41
|
-
* @constructor
|
|
42
|
-
* @augments ResourceLoader
|
|
43
40
|
* @private
|
|
44
|
-
*
|
|
45
|
-
* @param {object} options An object containing the following properties
|
|
46
|
-
* @param {ArrayBuffer} options.arrayBuffer The array buffer of the pnts contents
|
|
47
|
-
* @param {number} [options.byteOffset] The byte offset to the beginning of the pnts contents in the array buffer
|
|
48
|
-
* @param {boolean} [options.loadAttributesFor2D=false] If true, load the positions buffer as a typed array for accurately projecting models to 2D.
|
|
49
41
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
class PntsLoader extends ResourceLoader {
|
|
43
|
+
/**
|
|
44
|
+
* @param {object} options An object containing the following properties
|
|
45
|
+
* @param {ArrayBuffer} options.arrayBuffer The array buffer of the pnts contents
|
|
46
|
+
* @param {number} [options.byteOffset] The byte offset to the beginning of the pnts contents in the array buffer
|
|
47
|
+
* @param {boolean} [options.loadAttributesFor2D=false] If true, load the positions buffer as a typed array for accurately projecting models to 2D.
|
|
48
|
+
*/
|
|
49
|
+
constructor(options) {
|
|
50
|
+
super();
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
const byteOffset = options.byteOffset ?? 0;
|
|
52
|
+
options = options ?? Frozen.EMPTY_OBJECT;
|
|
55
53
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
//>>includeEnd('debug');
|
|
54
|
+
const arrayBuffer = options.arrayBuffer;
|
|
55
|
+
const byteOffset = options.byteOffset ?? 0;
|
|
59
56
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
//>>includeStart('debug', pragmas.debug);
|
|
58
|
+
Check.typeOf.object("options.arrayBuffer", arrayBuffer);
|
|
59
|
+
//>>includeEnd('debug');
|
|
63
60
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
this._arrayBuffer = arrayBuffer;
|
|
62
|
+
this._byteOffset = byteOffset;
|
|
63
|
+
this._loadAttributesFor2D = options.loadAttributesFor2D ?? false;
|
|
67
64
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
this._buffers = [];
|
|
65
|
+
this._parsedContent = undefined;
|
|
66
|
+
this._decodePromise = undefined;
|
|
67
|
+
this._decodedAttributes = undefined;
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
this._promise = undefined;
|
|
70
|
+
this._error = undefined;
|
|
71
|
+
this._state = ResourceLoaderState.UNLOADED;
|
|
72
|
+
this._buffers = [];
|
|
77
73
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
74
|
+
// The batch table object contains a json and a binary component access using keys of the same name.
|
|
75
|
+
this._components = undefined;
|
|
76
|
+
this._transform = Matrix4.IDENTITY;
|
|
77
|
+
}
|
|
82
78
|
|
|
83
|
-
Object.defineProperties(PntsLoader.prototype, {
|
|
84
79
|
/**
|
|
85
80
|
* The cache key of the resource
|
|
86
81
|
*
|
|
@@ -90,11 +85,9 @@ Object.defineProperties(PntsLoader.prototype, {
|
|
|
90
85
|
* @readonly
|
|
91
86
|
* @private
|
|
92
87
|
*/
|
|
93
|
-
cacheKey
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
},
|
|
88
|
+
get cacheKey() {
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
98
91
|
|
|
99
92
|
/**
|
|
100
93
|
* The loaded components.
|
|
@@ -105,11 +98,9 @@ Object.defineProperties(PntsLoader.prototype, {
|
|
|
105
98
|
* @readonly
|
|
106
99
|
* @private
|
|
107
100
|
*/
|
|
108
|
-
components
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
},
|
|
101
|
+
get components() {
|
|
102
|
+
return this._components;
|
|
103
|
+
}
|
|
113
104
|
|
|
114
105
|
/**
|
|
115
106
|
* A world-space transform to apply to the primitives.
|
|
@@ -121,50 +112,60 @@ Object.defineProperties(PntsLoader.prototype, {
|
|
|
121
112
|
* @readonly
|
|
122
113
|
* @private
|
|
123
114
|
*/
|
|
124
|
-
transform
|
|
125
|
-
|
|
126
|
-
return this._transform;
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Loads the resource.
|
|
133
|
-
* @returns {Promise<PntsLoader>} A promise which resolves to the loader when the resource loading is completed.
|
|
134
|
-
* @private
|
|
135
|
-
*/
|
|
136
|
-
PntsLoader.prototype.load = function () {
|
|
137
|
-
if (defined(this._promise)) {
|
|
138
|
-
return this._promise;
|
|
115
|
+
get transform() {
|
|
116
|
+
return this._transform;
|
|
139
117
|
}
|
|
140
118
|
|
|
141
|
-
|
|
142
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Loads the resource.
|
|
121
|
+
* @returns {Promise<PntsLoader>} A promise which resolves to the loader when the resource loading is completed.
|
|
122
|
+
* @private
|
|
123
|
+
*/
|
|
124
|
+
load() {
|
|
125
|
+
if (defined(this._promise)) {
|
|
126
|
+
return this._promise;
|
|
127
|
+
}
|
|
143
128
|
|
|
144
|
-
|
|
145
|
-
|
|
129
|
+
this._parsedContent = PntsParser.parse(this._arrayBuffer, this._byteOffset);
|
|
130
|
+
this._state = ResourceLoaderState.PROCESSING;
|
|
146
131
|
|
|
147
|
-
|
|
148
|
-
if (defined(this._error)) {
|
|
149
|
-
const error = this._error;
|
|
150
|
-
this._error = undefined;
|
|
151
|
-
throw error;
|
|
132
|
+
this._promise = Promise.resolve(this);
|
|
152
133
|
}
|
|
153
134
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
135
|
+
process(frameState) {
|
|
136
|
+
if (defined(this._error)) {
|
|
137
|
+
const error = this._error;
|
|
138
|
+
this._error = undefined;
|
|
139
|
+
throw error;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (this._state === ResourceLoaderState.READY) {
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (this._state === ResourceLoaderState.PROCESSING) {
|
|
147
|
+
if (defined(this._decodePromise)) {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
157
150
|
|
|
158
|
-
|
|
159
|
-
if (defined(this._decodePromise)) {
|
|
160
|
-
return false;
|
|
151
|
+
this._decodePromise = decodeDraco(this, frameState.context);
|
|
161
152
|
}
|
|
162
153
|
|
|
163
|
-
|
|
154
|
+
return false;
|
|
164
155
|
}
|
|
165
156
|
|
|
166
|
-
|
|
167
|
-
|
|
157
|
+
unload() {
|
|
158
|
+
const buffers = this._buffers;
|
|
159
|
+
for (let i = 0; i < buffers.length; i++) {
|
|
160
|
+
buffers[i].destroy();
|
|
161
|
+
}
|
|
162
|
+
buffers.length = 0;
|
|
163
|
+
|
|
164
|
+
this._components = undefined;
|
|
165
|
+
this._parsedContent = undefined;
|
|
166
|
+
this._arrayBuffer = undefined;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
168
169
|
|
|
169
170
|
function decodeDraco(loader, context) {
|
|
170
171
|
const parsedContent = loader._parsedContent;
|
|
@@ -701,16 +702,4 @@ function addPropertyAttributesToPrimitive(
|
|
|
701
702
|
primitive.propertyAttributeIds = [0];
|
|
702
703
|
}
|
|
703
704
|
|
|
704
|
-
PntsLoader.prototype.unload = function () {
|
|
705
|
-
const buffers = this._buffers;
|
|
706
|
-
for (let i = 0; i < buffers.length; i++) {
|
|
707
|
-
buffers[i].destroy();
|
|
708
|
-
}
|
|
709
|
-
buffers.length = 0;
|
|
710
|
-
|
|
711
|
-
this._components = undefined;
|
|
712
|
-
this._parsedContent = undefined;
|
|
713
|
-
this._arrayBuffer = undefined;
|
|
714
|
-
};
|
|
715
|
-
|
|
716
705
|
export default PntsLoader;
|
|
@@ -1623,6 +1623,16 @@ function Material() {
|
|
|
1623
1623
|
* @private
|
|
1624
1624
|
*/
|
|
1625
1625
|
this.unlit = false;
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* The point diameter in pixels for POINTS primitives. This is set by the
|
|
1629
|
+
* BENTLEY_materials_point_style extension.
|
|
1630
|
+
*
|
|
1631
|
+
* @type {number|undefined}
|
|
1632
|
+
* @default undefined
|
|
1633
|
+
* @private
|
|
1634
|
+
*/
|
|
1635
|
+
this.pointDiameter = undefined;
|
|
1626
1636
|
}
|
|
1627
1637
|
|
|
1628
1638
|
/**
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import DeveloperError from "../Core/DeveloperError.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Displays panorama imagery in a scene. This type describes an interface and is not intended to be instantiated directly.
|
|
5
|
+
*
|
|
6
|
+
* @alias Panorama
|
|
7
|
+
* @constructor
|
|
8
|
+
* @abstract
|
|
9
|
+
*
|
|
10
|
+
* @see EquirectangularPanorama
|
|
11
|
+
* @see CubeMapPanorama
|
|
12
|
+
* @see GoogleStreetViewCubeMapPanoramaProvider
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=panorama|Cesium Sandcastle Panorama}
|
|
16
|
+
*/
|
|
17
|
+
function Panorama() {
|
|
18
|
+
DeveloperError.throwInstantiationError();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
Object.defineProperties(Panorama.prototype, {
|
|
22
|
+
/**
|
|
23
|
+
* Determines if the panorama will be shown.
|
|
24
|
+
* @memberof Panorama.prototype
|
|
25
|
+
* @type {boolean}
|
|
26
|
+
*/
|
|
27
|
+
show: {
|
|
28
|
+
get: DeveloperError.throwInstantiationError,
|
|
29
|
+
set: DeveloperError.throwInstantiationError,
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Gets the transform of the panorama.
|
|
34
|
+
* @memberof Panorama.prototype
|
|
35
|
+
* @type {Matrix4}
|
|
36
|
+
* @readonly
|
|
37
|
+
*/
|
|
38
|
+
transform: {
|
|
39
|
+
get: DeveloperError.throwInstantiationError,
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Gets the credits of the panorama.
|
|
44
|
+
* @memberof Panorama.prototype
|
|
45
|
+
* @type {Credit}
|
|
46
|
+
* @readonly
|
|
47
|
+
*/
|
|
48
|
+
credit: {
|
|
49
|
+
get: DeveloperError.throwInstantiationError,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export default Panorama;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import DeveloperError from "../Core/DeveloperError.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Provides imagery to be displayed on the surface of an ellipsoid. This type describes an
|
|
5
|
+
* interface and is not intended to be instantiated directly.
|
|
6
|
+
*
|
|
7
|
+
* @alias PanoramaProvider
|
|
8
|
+
* @constructor
|
|
9
|
+
* @abstract
|
|
10
|
+
*
|
|
11
|
+
* @see GoogleStreetViewCubeMapPanoramaProvider
|
|
12
|
+
* @see EquirectangularPanorama
|
|
13
|
+
* @see CubeMapPanorama
|
|
14
|
+
*
|
|
15
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=panorama|Cesium Sandcastle Panorama}
|
|
16
|
+
*/
|
|
17
|
+
function PanoramaProvider() {
|
|
18
|
+
DeveloperError.throwInstantiationError();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
Object.defineProperties(PanoramaProvider.prototype, {});
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Returns a panorama provider.
|
|
25
|
+
*
|
|
26
|
+
* @param {object} options Input options to create the panorama provider.
|
|
27
|
+
* @returns {PanoramaProvider} The panorama provider for loading panoramas into a scene.
|
|
28
|
+
*/
|
|
29
|
+
PanoramaProvider.fromUrl = function (options) {
|
|
30
|
+
DeveloperError.throwInstantiationError();
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Returns a panorama primitive.
|
|
35
|
+
*
|
|
36
|
+
* @param {object} options Input options to create the panorama primitive.
|
|
37
|
+
* @returns {Panorama} The panorama primitive for displaying panoramas in a scene.
|
|
38
|
+
*/
|
|
39
|
+
PanoramaProvider.prototype.loadPanorama = function (options) {
|
|
40
|
+
DeveloperError.throwInstantiationError();
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default PanoramaProvider;
|
|
@@ -52,8 +52,8 @@ const defaultImageSize = new Cartesian2(1.0, 1.0);
|
|
|
52
52
|
* @param {number} [options.minimumMass] Sets the minimum bound for the mass of a particle in kilograms. A particle's actual mass will be chosen as a random amount above this value.
|
|
53
53
|
* @param {number} [options.maximumMass] Sets the maximum mass of particles in kilograms. A particle's actual mass will be chosen as a random amount below this value.
|
|
54
54
|
* @demo {@link https://cesium.com/learn/cesiumjs-learn/cesiumjs-particle-systems/|Particle Systems Tutorial}
|
|
55
|
-
* @demo {@link https://sandcastle.cesium.com/?
|
|
56
|
-
* @demo {@link https://sandcastle.cesium.com/?
|
|
55
|
+
* @demo {@link https://sandcastle.cesium.com/?id=particle-system|Particle Systems Tutorial Demo}
|
|
56
|
+
* @demo {@link https://sandcastle.cesium.com/?id=particle-system-fireworks|Particle Systems Fireworks Demo}
|
|
57
57
|
*/
|
|
58
58
|
function ParticleSystem(options) {
|
|
59
59
|
options = options ?? Frozen.EMPTY_OBJECT;
|
|
@@ -39,7 +39,7 @@ import SplitDirection from "./SplitDirection.js";
|
|
|
39
39
|
* @internalConstructor
|
|
40
40
|
* @class
|
|
41
41
|
*
|
|
42
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
42
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=points|Cesium Sandcastle Points Demo}
|
|
43
43
|
*/
|
|
44
44
|
function PointPrimitive(options, pointPrimitiveCollection) {
|
|
45
45
|
options = options ?? Frozen.EMPTY_OBJECT;
|
|
@@ -24,6 +24,7 @@ import BlendingState from "./BlendingState.js";
|
|
|
24
24
|
import BlendOption from "./BlendOption.js";
|
|
25
25
|
import PointPrimitive from "./PointPrimitive.js";
|
|
26
26
|
import SceneMode from "./SceneMode.js";
|
|
27
|
+
import AttributeCompression from "../Core/AttributeCompression.js";
|
|
27
28
|
|
|
28
29
|
const SHOW_INDEX = PointPrimitive.SHOW_INDEX;
|
|
29
30
|
const POSITION_INDEX = PointPrimitive.POSITION_INDEX;
|
|
@@ -501,6 +502,7 @@ function createVAF(context, numberOfPointPrimitives, buffersUsage) {
|
|
|
501
502
|
// instead of storing it in a vertex buffer.
|
|
502
503
|
|
|
503
504
|
const writePositionScratch = new EncodedCartesian3();
|
|
505
|
+
const writeColorScratch = new Color();
|
|
504
506
|
|
|
505
507
|
function writePositionSizeAndOutline(
|
|
506
508
|
pointPrimitiveCollection,
|
|
@@ -539,7 +541,6 @@ function writePositionSizeAndOutline(
|
|
|
539
541
|
positionLowWriter(i, low.x, low.y, low.z, outlineWidth);
|
|
540
542
|
}
|
|
541
543
|
|
|
542
|
-
const LEFT_SHIFT16 = 65536.0; // 2^16
|
|
543
544
|
const LEFT_SHIFT8 = 256.0; // 2^8
|
|
544
545
|
|
|
545
546
|
function writeCompressedAttrib0(
|
|
@@ -551,31 +552,22 @@ function writeCompressedAttrib0(
|
|
|
551
552
|
const i = pointPrimitive._index;
|
|
552
553
|
|
|
553
554
|
const color = pointPrimitive.color;
|
|
554
|
-
const pickColor = pointPrimitive.getPickId(context).color;
|
|
555
555
|
const outlineColor = pointPrimitive.outlineColor;
|
|
556
|
+
const pickColor = pointPrimitive.getPickId(context).color;
|
|
556
557
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
red = Color.floatToByte(outlineColor.red);
|
|
563
|
-
green = Color.floatToByte(outlineColor.green);
|
|
564
|
-
blue = Color.floatToByte(outlineColor.blue);
|
|
565
|
-
const compressed1 = red * LEFT_SHIFT16 + green * LEFT_SHIFT8 + blue;
|
|
566
|
-
|
|
567
|
-
red = Color.floatToByte(pickColor.red);
|
|
568
|
-
green = Color.floatToByte(pickColor.green);
|
|
569
|
-
blue = Color.floatToByte(pickColor.blue);
|
|
570
|
-
const compressed2 = red * LEFT_SHIFT16 + green * LEFT_SHIFT8 + blue;
|
|
571
|
-
|
|
572
|
-
const compressed3 =
|
|
573
|
-
Color.floatToByte(color.alpha) * LEFT_SHIFT16 +
|
|
574
|
-
Color.floatToByte(outlineColor.alpha) * LEFT_SHIFT8 +
|
|
575
|
-
Color.floatToByte(pickColor.alpha);
|
|
558
|
+
// Pack all three alpha channels into an RGB-encoded component.
|
|
559
|
+
writeColorScratch.red = color.alpha;
|
|
560
|
+
writeColorScratch.green = outlineColor.alpha;
|
|
561
|
+
writeColorScratch.blue = pickColor.alpha;
|
|
576
562
|
|
|
577
563
|
const writer = vafWriters[attributeLocations.compressedAttribute0];
|
|
578
|
-
writer(
|
|
564
|
+
writer(
|
|
565
|
+
i,
|
|
566
|
+
AttributeCompression.encodeRGB8(color),
|
|
567
|
+
AttributeCompression.encodeRGB8(outlineColor),
|
|
568
|
+
AttributeCompression.encodeRGB8(pickColor),
|
|
569
|
+
AttributeCompression.encodeRGB8(writeColorScratch),
|
|
570
|
+
);
|
|
579
571
|
}
|
|
580
572
|
|
|
581
573
|
function writeCompressedAttrib1(
|
package/Source/Scene/Polyline.js
CHANGED
|
@@ -83,7 +83,6 @@ function Polyline(options, polylineCollection) {
|
|
|
83
83
|
|
|
84
84
|
this._actualLength = undefined;
|
|
85
85
|
|
|
86
|
-
// eslint-disable-next-line no-use-before-define
|
|
87
86
|
this._propertiesChanged = new Uint32Array(NUMBER_OF_PROPERTIES);
|
|
88
87
|
this._polylineCollection = polylineCollection;
|
|
89
88
|
this._dirty = false;
|
|
@@ -11,7 +11,6 @@ import defined from "../Core/defined.js";
|
|
|
11
11
|
import destroyObject from "../Core/destroyObject.js";
|
|
12
12
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
13
13
|
import EncodedCartesian3 from "../Core/EncodedCartesian3.js";
|
|
14
|
-
import FeatureDetection from "../Core/FeatureDetection.js";
|
|
15
14
|
import IndexDatatype from "../Core/IndexDatatype.js";
|
|
16
15
|
import Intersect from "../Core/Intersect.js";
|
|
17
16
|
import CesiumMath from "../Core/Math.js";
|
|
@@ -1294,9 +1293,7 @@ PolylineBucket.prototype.updateShader = function (
|
|
|
1294
1293
|
defines.push("POLYLINE_DASH");
|
|
1295
1294
|
}
|
|
1296
1295
|
|
|
1297
|
-
|
|
1298
|
-
defines.push("CLIP_POLYLINE");
|
|
1299
|
-
}
|
|
1296
|
+
defines.push("CLIP_POLYLINE");
|
|
1300
1297
|
|
|
1301
1298
|
const fs = new ShaderSource({
|
|
1302
1299
|
defines: defines,
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import Frozen from "../Core/Frozen.js";
|
|
2
|
-
import FeatureDetection from "../Core/FeatureDetection.js";
|
|
3
2
|
import VertexFormat from "../Core/VertexFormat.js";
|
|
4
3
|
import PerInstanceFlatColorAppearanceFS from "../Shaders/Appearances/PerInstanceFlatColorAppearanceFS.js";
|
|
5
4
|
import PolylineColorAppearanceVS from "../Shaders/Appearances/PolylineColorAppearanceVS.js";
|
|
6
5
|
import PolylineCommon from "../Shaders/PolylineCommon.js";
|
|
7
6
|
import Appearance from "./Appearance.js";
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
const defaultVertexShaderSource = `#define CLIP_POLYLINE \n${PolylineCommon}\n${PolylineColorAppearanceVS}`;
|
|
10
9
|
const defaultFragmentShaderSource = PerInstanceFlatColorAppearanceFS;
|
|
11
10
|
|
|
12
|
-
if (!FeatureDetection.isInternetExplorer()) {
|
|
13
|
-
defaultVertexShaderSource = `#define CLIP_POLYLINE \n${defaultVertexShaderSource}`;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
11
|
/**
|
|
17
12
|
* An appearance for {@link GeometryInstance} instances with color attributes and
|
|
18
13
|
* {@link PolylineGeometry} or {@link GroundPolylineGeometry}.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Frozen from "../Core/Frozen.js";
|
|
2
2
|
import defined from "../Core/defined.js";
|
|
3
|
-
import FeatureDetection from "../Core/FeatureDetection.js";
|
|
4
3
|
import VertexFormat from "../Core/VertexFormat.js";
|
|
5
4
|
import PolylineMaterialAppearanceVS from "../Shaders/Appearances/PolylineMaterialAppearanceVS.js";
|
|
6
5
|
import PolylineCommon from "../Shaders/PolylineCommon.js";
|
|
@@ -8,13 +7,9 @@ import PolylineFS from "../Shaders/PolylineFS.js";
|
|
|
8
7
|
import Appearance from "./Appearance.js";
|
|
9
8
|
import Material from "./Material.js";
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
const defaultVertexShaderSource = `#define CLIP_POLYLINE \n${PolylineCommon}\n${PolylineMaterialAppearanceVS}`;
|
|
12
11
|
const defaultFragmentShaderSource = PolylineFS;
|
|
13
12
|
|
|
14
|
-
if (!FeatureDetection.isInternetExplorer()) {
|
|
15
|
-
defaultVertexShaderSource = `#define CLIP_POLYLINE \n${defaultVertexShaderSource}`;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
13
|
/**
|
|
19
14
|
* An appearance for {@link PolylineGeometry} that supports shading with materials.
|
|
20
15
|
*
|
|
@@ -303,7 +303,7 @@ Object.defineProperties(PostProcessStageCollection.prototype, {
|
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
305
|
* Specifies the tonemapping algorithm used when rendering with high dynamic range.
|
|
306
|
-
* {@link https://sandcastle.cesium.com/?
|
|
306
|
+
* {@link https://sandcastle.cesium.com/?id=high-dynamic-range|Sandcastle Demo}
|
|
307
307
|
*
|
|
308
308
|
* @example viewer.scene.postProcessStages.tonemapper = Cesium.Tonemapper.ACES;
|
|
309
309
|
*
|
|
@@ -4,6 +4,7 @@ import DeveloperError from "../Core/DeveloperError.js";
|
|
|
4
4
|
import defined from "../Core/defined.js";
|
|
5
5
|
import JsonMetadataTable from "./JsonMetadataTable.js";
|
|
6
6
|
import addAllToArray from "../Core/addAllToArray.js";
|
|
7
|
+
import { destroyObject } from "@cesium/engine";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* A property table for use with the <code>EXT_structural_metadata</code> extension or
|
|
@@ -53,6 +54,7 @@ function PropertyTable(options) {
|
|
|
53
54
|
this._metadataTable = options.metadataTable;
|
|
54
55
|
this._jsonMetadataTable = options.jsonMetadataTable;
|
|
55
56
|
this._batchTableHierarchy = options.batchTableHierarchy;
|
|
57
|
+
this._texture = options.texture; // Property table buffer data packed into a GPU texture
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
Object.defineProperties(PropertyTable.prototype, {
|
|
@@ -113,6 +115,23 @@ Object.defineProperties(PropertyTable.prototype, {
|
|
|
113
115
|
},
|
|
114
116
|
},
|
|
115
117
|
|
|
118
|
+
/**
|
|
119
|
+
* The properties stored in this table.
|
|
120
|
+
*
|
|
121
|
+
* @memberof PropertyTable.prototype
|
|
122
|
+
* @type {Object<string, MetadataTableProperty>}
|
|
123
|
+
* @readonly
|
|
124
|
+
*/
|
|
125
|
+
properties: {
|
|
126
|
+
get: function () {
|
|
127
|
+
if (defined(this._metadataTable)) {
|
|
128
|
+
return this._metadataTable.properties;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return undefined;
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
|
|
116
135
|
/**
|
|
117
136
|
* Extra user-defined properties.
|
|
118
137
|
*
|
|
@@ -164,6 +183,20 @@ Object.defineProperties(PropertyTable.prototype, {
|
|
|
164
183
|
return totalByteLength;
|
|
165
184
|
},
|
|
166
185
|
},
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The texture containing the property table data, if any.
|
|
189
|
+
*
|
|
190
|
+
* @memberof PropertyTable.prototype
|
|
191
|
+
* @type {Texture | undefined}
|
|
192
|
+
* @readonly
|
|
193
|
+
* @private
|
|
194
|
+
*/
|
|
195
|
+
texture: {
|
|
196
|
+
get: function () {
|
|
197
|
+
return this._texture;
|
|
198
|
+
},
|
|
199
|
+
},
|
|
167
200
|
});
|
|
168
201
|
|
|
169
202
|
/**
|
|
@@ -533,4 +566,14 @@ PropertyTable.prototype.getExactClassName = function (featureId) {
|
|
|
533
566
|
return hierarchy.getClassName(featureId);
|
|
534
567
|
};
|
|
535
568
|
|
|
569
|
+
/**
|
|
570
|
+
* Destroys any resources that need cleaning up in the property table.
|
|
571
|
+
*
|
|
572
|
+
* @private
|
|
573
|
+
*/
|
|
574
|
+
PropertyTable.prototype.destroy = function () {
|
|
575
|
+
this._texture = this._texture && this._texture.destroy();
|
|
576
|
+
return destroyObject(this);
|
|
577
|
+
};
|
|
578
|
+
|
|
536
579
|
export default PropertyTable;
|