@cesium/engine 26.2.0 → 26.3.1-wasm.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/ThirdParty/Workers/zip-web-worker.js +707 -600
- package/Build/Workers/chunk-2P3WKV6V.js +290 -0
- package/Build/Workers/{chunk-M6QKXVAU.js → chunk-2U5272QU.js} +17 -17
- package/Build/Workers/{chunk-NEFDMMLY.js → chunk-4KCOC6OZ.js} +8 -10
- package/Build/Workers/{chunk-SJYSIOEM.js → chunk-5FULJNWY.js} +11 -13
- package/Build/Workers/{chunk-NCL22ZUX.js → chunk-65ZF23AQ.js} +1 -1
- package/Build/Workers/{chunk-KP5QD7WU.js → chunk-6D5534B7.js} +10 -12
- package/Build/Workers/{chunk-FX3VEAIU.js → chunk-6GFMBHBD.js} +19 -19
- package/Build/Workers/{chunk-A62YI6S6.js → chunk-6VRGQF3D.js} +4 -4
- package/Build/Workers/{chunk-DSGLDRTI.js → chunk-6XUIECFB.js} +4 -6
- package/Build/Workers/{chunk-HDL4HOXZ.js → chunk-7KWUH6RK.js} +14 -14
- package/Build/Workers/{chunk-UAZUP4I5.js → chunk-7ZBJRQQT.js} +7 -7
- package/Build/Workers/{chunk-CRCGE4J4.js → chunk-AEHANE5A.js} +991 -5612
- package/Build/Workers/chunk-AUU74SIZ.js +2420 -0
- package/Build/Workers/{chunk-ARZICEEP.js → chunk-B6V5NMIE.js} +13 -11
- package/Build/Workers/{chunk-76FDC45O.js → chunk-BRQ52ASU.js} +15 -17
- package/Build/Workers/{chunk-SA2A2AN5.js → chunk-FVLSQBPH.js} +7 -14
- package/Build/Workers/{chunk-CUTRKXUQ.js → chunk-IFKM2GZR.js} +12 -12
- package/Build/Workers/{chunk-NSKZ6SBK.js → chunk-KF6OEWVT.js} +17 -17
- package/Build/Workers/{chunk-O3DKEX7Q.js → chunk-KOAXSU77.js} +5 -7
- package/Build/Workers/{chunk-2Z4ZLVOD.js → chunk-KRVYCMGN.js} +6 -6
- package/Build/Workers/{chunk-SXSP3JHS.js → chunk-LTZRLNQP.js} +1 -1
- package/Build/Workers/{chunk-6FZDPMTO.js → chunk-M7WEAGWT.js} +8 -8
- package/Build/Workers/{chunk-NXGQBQWE.js → chunk-MJTLGN63.js} +14 -14
- package/Build/Workers/{chunk-XCBZVTIV.js → chunk-MUNZ77KV.js} +1 -1
- package/Build/Workers/{chunk-NLLCQBX3.js → chunk-NC5BUJEF.js} +2 -2
- package/Build/Workers/chunk-NYKURYFR.js +2131 -0
- package/Build/Workers/{chunk-5LSOO2KD.js → chunk-NZAQG57U.js} +7 -7
- package/Build/Workers/{chunk-DZUFEE4L.js → chunk-O5GUOP2G.js} +5 -7
- package/Build/Workers/{chunk-D6AY775A.js → chunk-OQUOLQTN.js} +8 -10
- package/Build/Workers/{chunk-CDJDJ5LK.js → chunk-OUG5JB2K.js} +16 -14
- package/Build/Workers/{chunk-ACTVJHSP.js → chunk-P4SDLSGF.js} +13 -6
- package/Build/Workers/{chunk-MAAHFYPC.js → chunk-P6PC2OIM.js} +7 -7
- package/Build/Workers/{chunk-6YR6JBMY.js → chunk-PPRK3XQU.js} +31 -35
- package/Build/Workers/{chunk-IMBVP57H.js → chunk-QGTYLWOT.js} +2 -2
- package/Build/Workers/{chunk-FCP2QY4G.js → chunk-QHTLIQUH.js} +5 -7
- package/Build/Workers/{chunk-EZGQPOIG.js → chunk-ROHWZQZ5.js} +5 -5
- package/Build/Workers/{chunk-B3QHNA4A.js → chunk-SNUWISJO.js} +6 -8
- package/Build/Workers/{chunk-XDWCTQCZ.js → chunk-T67YY3KP.js} +4 -2
- package/Build/Workers/{chunk-IJZJMIUY.js → chunk-TF5473GK.js} +13 -13
- package/Build/Workers/{chunk-OZGPS7FB.js → chunk-THHFTMAL.js} +4 -6
- package/Build/Workers/{chunk-PRWUMCXF.js → chunk-UFCZ62WM.js} +15 -13
- package/Build/Workers/{chunk-27FWRTJI.js → chunk-UV2YC2Q5.js} +11 -11
- package/Build/Workers/{chunk-N7CCOFLX.js → chunk-V4ICCWYA.js} +1 -1
- package/Build/Workers/{chunk-GHXVQVUM.js → chunk-VC6XXI2Z.js} +9 -9
- package/Build/Workers/{chunk-I74ZH5LK.js → chunk-VXJ6P4UI.js} +10 -10
- package/Build/Workers/{chunk-KGXSYGBG.js → chunk-W2BKP7G7.js} +15 -17
- package/Build/Workers/{chunk-LDRQSYBN.js → chunk-WMVGNBSH.js} +2 -2
- package/Build/Workers/{chunk-SMTGMFBL.js → chunk-XFZMQZSZ.js} +4 -4
- package/Build/Workers/{chunk-7MM3N2VE.js → chunk-XJ532R6R.js} +20 -20
- package/Build/Workers/{chunk-NJVBJG63.js → chunk-YJNU4SM4.js} +5 -5
- package/Build/Workers/{chunk-DIGUUD6G.js → chunk-YJRDTEHQ.js} +8 -8
- package/Build/Workers/chunk-YUICDZKO.js +2660 -0
- package/Build/Workers/{chunk-O3XFXGPZ.js → chunk-Z3DEVGJV.js} +7 -7
- package/Build/Workers/{chunk-3PSS3T43.js → chunk-ZECGI7UZ.js} +4 -4
- package/Build/Workers/{chunk-QFSSCLLZ.js → chunk-ZFLPVPUJ.js} +6 -8
- package/Build/Workers/{chunk-2RGJPWQX.js → chunk-ZIM5H2DB.js} +11 -11
- package/Build/Workers/{chunk-GVA7XQI2.js → chunk-ZSQMGGSB.js} +14 -16
- package/Build/Workers/{chunk-FU4BGABC.js → chunk-ZWYRGMBK.js} +16 -18
- package/Build/Workers/{chunk-JKXV6PG5.js → chunk-ZY733NZA.js} +1 -1
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +20 -19
- package/Build/Workers/createCircleGeometry.js +28 -27
- package/Build/Workers/createCircleOutlineGeometry.js +21 -20
- package/Build/Workers/createCoplanarPolygonGeometry.js +34 -34
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +33 -32
- package/Build/Workers/createCorridorGeometry.js +31 -31
- package/Build/Workers/createCorridorOutlineGeometry.js +30 -30
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +22 -21
- 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 +27 -26
- package/Build/Workers/createGroundPolylineGeometry.js +27 -26
- package/Build/Workers/createPlaneGeometry.js +18 -17
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +35 -35
- package/Build/Workers/createPolygonOutlineGeometry.js +34 -34
- package/Build/Workers/createPolylineGeometry.js +28 -29
- package/Build/Workers/createPolylineVolumeGeometry.js +34 -35
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +30 -31
- package/Build/Workers/createRectangleGeometry.js +30 -30
- package/Build/Workers/createRectangleOutlineGeometry.js +23 -24
- package/Build/Workers/createSimplePolylineGeometry.js +26 -27
- 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 +17 -16
- 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 +17 -16
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +36 -26
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +24 -24
- package/Build/Workers/createVerticesFromHeightmap.js +24 -25
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- package/Build/Workers/createWallGeometry.js +27 -28
- package/Build/Workers/createWallOutlineGeometry.js +26 -27
- package/Build/Workers/decodeDraco.js +16 -12
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +336 -337
- package/Build/Workers/decodeI3S.js +17 -12
- package/Build/Workers/{chunk-GXWQZBAI.js → decodeMeshopt.js} +23 -29
- package/Build/Workers/decodeSpz.js +1960 -0
- package/Build/Workers/gaussianSplatSorter.js +13 -6
- package/Build/Workers/gaussianSplatTextureGenerator.js +13 -6
- package/Build/Workers/incrementallyBuildTerrainPicker.js +9 -10
- package/Build/Workers/transcodeKTX2.js +26 -12
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +24 -24
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Source/Core/Cesium3DTilesTerrainData.js +11 -1
- package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +33 -23
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/IonResource.js +5 -0
- package/Source/Core/IonSnapGeometryType.js +59 -0
- package/Source/Core/IonSnapHeat.js +33 -0
- package/Source/Core/IonSnapMode.js +45 -0
- package/Source/Core/IonSnapParentGeometryType.js +52 -0
- package/Source/Core/IonSnapService.js +369 -0
- package/Source/Core/KTX2Transcoder.js +99 -5
- package/Source/Core/Resource.js +2 -0
- package/Source/Core/SnapService.js +63 -0
- package/Source/Core/TaskProcessor.js +249 -129
- package/Source/Core/TrustedServers.js +34 -1
- package/Source/Core/VectorPipeline.js +139 -45
- package/Source/Core/VectorProvider.js +311 -71
- package/Source/Core/WebAssemblyWorkerInitializer.js +125 -0
- package/Source/Core/fetchWebAssemblyBinary.js +52 -0
- package/Source/Renderer/AutomaticUniforms.js +44 -2
- package/Source/Renderer/ShaderBuilder.js +1 -1
- package/Source/Renderer/UniformState.js +47 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/BufferPointCollection.js +4 -7
- package/Source/Scene/BufferPolygonCollection.js +56 -27
- package/Source/Scene/BufferPolylineCollection.js +61 -8
- package/Source/Scene/BufferPolylineMaterial.js +6 -5
- package/Source/Scene/BufferPrimitiveCollection.js +199 -29
- package/Source/Scene/Cesium3DTile.js +12 -0
- package/Source/Scene/Cesium3DTileset.js +61 -8
- package/Source/Scene/Cesium3DTilesetBaseTraversal.js +15 -3
- package/Source/Scene/Cesium3DTilesetCache.js +15 -0
- package/Source/Scene/ClippingPolygon.js +154 -100
- package/Source/Scene/ClippingPolygonCollection.js +352 -694
- package/Source/Scene/CreditDisplay.js +62 -0
- package/Source/Scene/GaussianSplatPrimitive.js +153 -66
- package/Source/Scene/GeoJsonPrimitive.js +114 -24
- package/Source/Scene/GlobeSurfaceShaderSet.js +33 -54
- package/Source/Scene/GlobeSurfaceTile.js +14 -1
- package/Source/Scene/GlobeSurfaceTileProvider.js +232 -25
- package/Source/Scene/GltfBufferViewLoader.js +25 -13
- package/Source/Scene/GltfLoader.js +56 -6
- package/Source/Scene/GltfSpzLoader.js +5 -4
- package/Source/Scene/HeightReference.js +1 -1
- package/Source/Scene/MVTDataProvider.js +9 -0
- package/Source/Scene/Model/Model.js +242 -16
- package/Source/Scene/Model/Model3DTileContent.js +5 -0
- package/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js +54 -19
- package/Source/Scene/Model/ModelRenderResources.js +2 -3
- package/Source/Scene/Model/ModelSceneGraph.js +10 -1
- package/Source/Scene/Model/ModelVectorLookupPipelineStage.js +205 -0
- package/Source/Scene/Model/PickingPipelineStage.js +4 -0
- package/Source/Scene/PostProcessStage.js +22 -3
- package/Source/Scene/Scene.js +56 -1
- package/Source/Scene/Snapping.js +57 -0
- package/Source/Scene/SpzDecoder.js +106 -0
- package/Source/Scene/UrlTemplate3DTilesDataProvider.js +12 -1
- package/Source/Scene/VectorGltf3DTileContent.js +10 -2
- package/Source/Scene/WebMapServiceImageryProvider.js +5 -1
- package/Source/Scene/WebMapTileServiceImageryProvider.js +6 -1
- package/Source/Scene/renderBufferPolylineCollection.js +5 -1
- package/Source/Shaders/BufferPolylineMaterialVS.glsl +14 -2
- package/Source/Shaders/BufferPolylineMaterialVS.js +14 -2
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -4
- package/Source/Shaders/Builtin/Functions/eyeToCartographicDelta.glsl +74 -0
- package/Source/Shaders/Builtin/Functions/eyeToCartographicDelta.js +76 -0
- package/Source/Shaders/GlobeFS.glsl +10 -9
- package/Source/Shaders/GlobeFS.js +11 -9
- package/Source/Shaders/GlobeVS.glsl +0 -32
- package/Source/Shaders/GlobeVS.js +0 -32
- package/Source/Shaders/Model/ModelClippingPolygonsStageFS.glsl +15 -3
- package/Source/Shaders/Model/ModelClippingPolygonsStageFS.js +15 -3
- package/Source/Shaders/Model/ModelClippingPolygonsStageVS.glsl +20 -24
- package/Source/Shaders/Model/ModelClippingPolygonsStageVS.js +20 -24
- package/Source/Shaders/Model/ModelFS.glsl +4 -0
- package/Source/Shaders/Model/ModelFS.js +4 -0
- package/Source/Shaders/Model/ModelVS.glsl +7 -2
- package/Source/Shaders/Model/ModelVS.js +7 -2
- package/Source/Shaders/Model/ModelVectorLookupStageFS.glsl +6 -0
- package/Source/Shaders/Model/ModelVectorLookupStageFS.js +8 -0
- package/Source/Shaders/Model/ModelVectorLookupStageVS.glsl +15 -0
- package/Source/Shaders/Model/ModelVectorLookupStageVS.js +17 -0
- package/Source/Shaders/Model/VerticalExaggerationStageVS.glsl +9 -10
- package/Source/Shaders/Model/VerticalExaggerationStageVS.js +9 -11
- package/Source/Shaders/VectorCommon.glsl +177 -50
- package/Source/Shaders/VectorCommon.js +251 -19
- package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
- package/Source/ThirdParty/zip-module.wasm +0 -0
- package/Source/Workers/createTaskProcessorWorker.js +2 -0
- package/Source/Workers/createVerticesFromCesium3DTilesTerrain.js +13 -1
- package/Source/Workers/decodeDraco.js +7 -3
- package/Source/Workers/decodeI3S.js +7 -3
- package/Source/Workers/decodeMeshopt.js +21 -0
- package/Source/Workers/decodeSpz.js +20 -0
- package/Source/Workers/gaussianSplatSorter.js +7 -3
- package/Source/Workers/gaussianSplatTextureGenerator.js +7 -3
- package/Source/Workers/transcodeKTX2.js +22 -5
- package/index.d.ts +649 -55
- package/index.js +23 -13
- package/package.json +6 -6
- package/Build/Workers/chunk-2EFYUSUY.js +0 -1483
- package/Build/Workers/chunk-2H5264K7.js +0 -1284
- package/Build/Workers/chunk-2H73KDBM.js +0 -511
- package/Build/Workers/chunk-2ZKH2QZB.js +0 -387
- package/Build/Workers/chunk-36NI5E6W.js +0 -3820
- package/Build/Workers/chunk-37SW7SYS.js +0 -778
- package/Build/Workers/chunk-3GHVJ3SO.js +0 -455
- package/Build/Workers/chunk-3LB4UVPU.js +0 -387
- package/Build/Workers/chunk-3PONLKEL.js +0 -778
- package/Build/Workers/chunk-3QR662HH.js +0 -3820
- package/Build/Workers/chunk-3SX2WYSO.js +0 -973
- package/Build/Workers/chunk-3UDN6LYX.js +0 -476
- package/Build/Workers/chunk-47MCBSXI.js +0 -9237
- package/Build/Workers/chunk-4E626OCE.js +0 -1067
- package/Build/Workers/chunk-4NW2MJKH.js +0 -455
- package/Build/Workers/chunk-52YK5BSN.js +0 -198
- package/Build/Workers/chunk-5RNAQZK6.js +0 -9234
- package/Build/Workers/chunk-5YPQBFRD.js +0 -519
- package/Build/Workers/chunk-6FHT43QR.js +0 -140
- package/Build/Workers/chunk-6HK6IXK2.js +0 -138
- package/Build/Workers/chunk-6R5X2GUA.js +0 -1284
- package/Build/Workers/chunk-7A2OGDHT.js +0 -305
- package/Build/Workers/chunk-7CGEQUM2.js +0 -305
- package/Build/Workers/chunk-7D2HZKH7.js +0 -455
- package/Build/Workers/chunk-7I325HV6.js +0 -1344
- package/Build/Workers/chunk-7KVKHY7O.js +0 -147
- package/Build/Workers/chunk-7TKLTCZW.js +0 -219
- package/Build/Workers/chunk-7UUKBDH6.js +0 -1054
- package/Build/Workers/chunk-7W6DUHAB.js +0 -693
- package/Build/Workers/chunk-7XM5JK5F.js +0 -162
- package/Build/Workers/chunk-7YG3ND3P.js +0 -454
- package/Build/Workers/chunk-A3O6EDBK.js +0 -73
- package/Build/Workers/chunk-A6X24AZI.js +0 -1992
- package/Build/Workers/chunk-A7TTWVTF.js +0 -2719
- package/Build/Workers/chunk-ADX3CBKD.js +0 -9234
- package/Build/Workers/chunk-AF7DTMJ7.js +0 -398
- package/Build/Workers/chunk-AHWAZRBV.js +0 -82
- package/Build/Workers/chunk-AJSFRY4U.js +0 -1344
- package/Build/Workers/chunk-B4CQSLZJ.js +0 -305
- package/Build/Workers/chunk-BKPQFCXH.js +0 -511
- package/Build/Workers/chunk-BSPCI2LO.js +0 -959
- package/Build/Workers/chunk-BUJWSX5S.js +0 -301
- package/Build/Workers/chunk-C7JQVRLM.js +0 -497
- package/Build/Workers/chunk-C7QDUNI3.js +0 -138
- package/Build/Workers/chunk-CEEZE3YZ.js +0 -476
- package/Build/Workers/chunk-CIV5DJOQ.js +0 -778
- package/Build/Workers/chunk-CLCTQVVL.js +0 -241
- package/Build/Workers/chunk-CQNFIAZU.js +0 -56
- package/Build/Workers/chunk-DBD5WWG2.js +0 -959
- package/Build/Workers/chunk-DZBQUULR.js +0 -138
- package/Build/Workers/chunk-E2NKV5YT.js +0 -3820
- package/Build/Workers/chunk-E7NZJOK7.js +0 -3792
- package/Build/Workers/chunk-EB3Y5P3A.js +0 -368
- package/Build/Workers/chunk-EHTS2YPT.js +0 -2719
- package/Build/Workers/chunk-ELE6SC2C.js +0 -837
- package/Build/Workers/chunk-ENNFMWDW.js +0 -789
- package/Build/Workers/chunk-EOWDZN5S.js +0 -288
- package/Build/Workers/chunk-ERKUET22.js +0 -3201
- package/Build/Workers/chunk-F2IMBMZY.js +0 -241
- package/Build/Workers/chunk-F4CSNRZO.js +0 -219
- package/Build/Workers/chunk-FBP4DUQJ.js +0 -693
- package/Build/Workers/chunk-FDK4K5IA.js +0 -280
- package/Build/Workers/chunk-FGQFQHN5.js +0 -1054
- package/Build/Workers/chunk-FJWZMGOQ.js +0 -1992
- package/Build/Workers/chunk-FQ42MT7M.js +0 -58
- package/Build/Workers/chunk-GGNWQWSB.js +0 -301
- package/Build/Workers/chunk-GNKXEN4C.js +0 -682
- package/Build/Workers/chunk-GSWMAFTE.js +0 -9230
- package/Build/Workers/chunk-GXDHRC4J.js +0 -1344
- package/Build/Workers/chunk-GYSYP6PC.js +0 -1067
- package/Build/Workers/chunk-H2WCFXLP.js +0 -241
- package/Build/Workers/chunk-HHV3MCGV.js +0 -162
- package/Build/Workers/chunk-HLW2ZRVK.js +0 -368
- package/Build/Workers/chunk-HS6AD4P2.js +0 -398
- package/Build/Workers/chunk-HT6FASOT.js +0 -973
- package/Build/Workers/chunk-IDVHUDZT.js +0 -352
- package/Build/Workers/chunk-IGAZBTFZ.js +0 -3201
- package/Build/Workers/chunk-ILME5BXA.js +0 -301
- package/Build/Workers/chunk-IOO7Z2AV.js +0 -57
- package/Build/Workers/chunk-IUIFLOYO.js +0 -44
- package/Build/Workers/chunk-J73T2VOY.js +0 -171
- package/Build/Workers/chunk-JALGQYDY.js +0 -288
- package/Build/Workers/chunk-JW6OZT4R.js +0 -288
- package/Build/Workers/chunk-JXYLJCTC.js +0 -124
- package/Build/Workers/chunk-K27QOAW6.js +0 -97
- package/Build/Workers/chunk-KMV25A63.js +0 -789
- package/Build/Workers/chunk-KZWFWJML.js +0 -2719
- package/Build/Workers/chunk-LCXRRALY.js +0 -387
- package/Build/Workers/chunk-LD64RPYV.js +0 -368
- package/Build/Workers/chunk-LGNDTZVX.js +0 -97
- package/Build/Workers/chunk-LNSQVXFH.js +0 -1800
- package/Build/Workers/chunk-M4JZ6TSZ.js +0 -959
- package/Build/Workers/chunk-MCJDRDJQ.js +0 -102
- package/Build/Workers/chunk-MEENMEAH.js +0 -198
- package/Build/Workers/chunk-NAWU5RF4.js +0 -162
- package/Build/Workers/chunk-NIWITKQK.js +0 -693
- package/Build/Workers/chunk-OA6MYL2C.js +0 -837
- package/Build/Workers/chunk-OBEU25PI.js +0 -1067
- package/Build/Workers/chunk-OHP4ELS7.js +0 -198
- package/Build/Workers/chunk-PCL3Y7H5.js +0 -82
- package/Build/Workers/chunk-PD4GK4EM.js +0 -57
- package/Build/Workers/chunk-PEDU33QG.js +0 -2342
- package/Build/Workers/chunk-PVTSNNVI.js +0 -288
- package/Build/Workers/chunk-QHPZH22L.js +0 -241
- package/Build/Workers/chunk-QIZDWZK6.js +0 -301
- package/Build/Workers/chunk-QV6DG2YX.js +0 -1483
- package/Build/Workers/chunk-QVLAFFJY.js +0 -56
- package/Build/Workers/chunk-R4FPNAZ2.js +0 -352
- package/Build/Workers/chunk-R4K7EHOU.js +0 -171
- package/Build/Workers/chunk-R7JGHDD6.js +0 -789
- package/Build/Workers/chunk-RASQEYD4.js +0 -1483
- package/Build/Workers/chunk-RG4F5R57.js +0 -454
- package/Build/Workers/chunk-RW6ITX7Q.js +0 -3820
- package/Build/Workers/chunk-RYSQVJR6.js +0 -398
- package/Build/Workers/chunk-S6RJU5NM.js +0 -1054
- package/Build/Workers/chunk-SDFHDNS4.js +0 -147
- package/Build/Workers/chunk-SF6K72D7.js +0 -124
- package/Build/Workers/chunk-SGRGNDOD.js +0 -682
- package/Build/Workers/chunk-SM2CDCYF.js +0 -198
- package/Build/Workers/chunk-SS5ABQGY.js +0 -102
- package/Build/Workers/chunk-T5QBPLE3.js +0 -414
- package/Build/Workers/chunk-TN35HP5B.js +0 -1067
- package/Build/Workers/chunk-TNWKJNUZ.js +0 -454
- package/Build/Workers/chunk-TOAF47AQ.js +0 -102
- package/Build/Workers/chunk-TQ4QCOXT.js +0 -2719
- package/Build/Workers/chunk-TSDSILQB.js +0 -124
- package/Build/Workers/chunk-TVZD72WJ.js +0 -778
- package/Build/Workers/chunk-U5LV3F3Z.js +0 -1054
- package/Build/Workers/chunk-UEY73NRN.js +0 -38
- package/Build/Workers/chunk-UF46SZEZ.js +0 -789
- package/Build/Workers/chunk-UNRTMCET.js +0 -398
- package/Build/Workers/chunk-UTB7U3O6.js +0 -1992
- package/Build/Workers/chunk-UVO6COT2.js +0 -352
- package/Build/Workers/chunk-V46YGZE6.js +0 -352
- package/Build/Workers/chunk-VAL7DYNR.js +0 -278
- package/Build/Workers/chunk-VDGOCROW.js +0 -57
- package/Build/Workers/chunk-VFWSSBPT.js +0 -511
- package/Build/Workers/chunk-VVYMXI3I.js +0 -1284
- package/Build/Workers/chunk-VXWHPYQM.js +0 -837
- package/Build/Workers/chunk-VXYUBRSB.js +0 -219
- package/Build/Workers/chunk-VZLDLEWI.js +0 -387
- package/Build/Workers/chunk-W5OCKMPJ.js +0 -101
- package/Build/Workers/chunk-WBSY7HDY.js +0 -837
- package/Build/Workers/chunk-WN3F4CVG.js +0 -3201
- package/Build/Workers/chunk-WPRUWXGV.js +0 -693
- package/Build/Workers/chunk-WTO2ERBP.js +0 -414
- package/Build/Workers/chunk-WVHMDVG4.js +0 -959
- package/Build/Workers/chunk-XGA23TAX.js +0 -73
- package/Build/Workers/chunk-XLQZNQ4Z.js +0 -163
- package/Build/Workers/chunk-XLXSDIP5.js +0 -973
- package/Build/Workers/chunk-XQ3SKCMM.js +0 -140
- package/Build/Workers/chunk-XQH66YJC.js +0 -147
- package/Build/Workers/chunk-XTA7BXJG.js +0 -682
- package/Build/Workers/chunk-XTIDAFRS.js +0 -476
- package/Build/Workers/chunk-XUEDWBUD.js +0 -682
- package/Build/Workers/chunk-XYFLRH3H.js +0 -124
- package/Build/Workers/chunk-Y7JRTRTO.js +0 -305
- package/Build/Workers/chunk-Y7QSMDCJ.js +0 -352
- package/Build/Workers/chunk-YCB5TYTR.js +0 -1483
- package/Build/Workers/chunk-YEYOSTJX.js +0 -219
- package/Build/Workers/chunk-YGFVAGYF.js +0 -630
- package/Build/Workers/chunk-YIIACKQO.js +0 -368
- package/Build/Workers/chunk-YJGSP6PE.js +0 -511
- package/Build/Workers/chunk-YKU2Q3A2.js +0 -1287
- package/Build/Workers/chunk-Z4LR5EHE.js +0 -454
- package/Build/Workers/chunk-Z66EVE2A.js +0 -44
- package/Build/Workers/chunk-ZHIHHHTB.js +0 -414
- package/Build/Workers/chunk-ZMBHFYOX.js +0 -1344
- package/Build/Workers/chunk-ZNWHFSLE.js +0 -171
- package/Build/Workers/chunk-ZQLZG4IN.js +0 -2342
- package/Build/Workers/chunk-ZRTSMUZ2.js +0 -414
- package/Build/Workers/chunk-ZSGUV73H.js +0 -2342
- package/Build/Workers/chunk-ZZUVT5BM.js +0 -476
- package/Source/Shaders/Builtin/Functions/clipPolygons.glsl +0 -37
- package/Source/Shaders/Builtin/Functions/clipPolygons.js +0 -39
- package/Source/Shaders/Builtin/Functions/unpackClippingExtents.glsl +0 -14
- package/Source/Shaders/Builtin/Functions/unpackClippingExtents.js +0 -15
- package/Source/Shaders/PolygonSignedDistanceFS.glsl +0 -131
- package/Source/Shaders/PolygonSignedDistanceFS.js +0 -132
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import defined from "./defined.js";
|
|
2
|
+
import Resource from "./Resource.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Fetches a WebAssembly binary when a configuration provides its URL and does not already
|
|
6
|
+
* contain the binary.
|
|
7
|
+
*
|
|
8
|
+
* <code>TaskProcessor</code> posts the URL of the binary rather than its bytes, so that the
|
|
9
|
+
* document neither fetches nor compiles WebAssembly. Worker implementations call this function
|
|
10
|
+
* to obtain the bytes and pass them to an Emscripten module factory.
|
|
11
|
+
*
|
|
12
|
+
* The input configuration is not changed. If the configuration already carries
|
|
13
|
+
* <code>wasmBinary</code>, or has no <code>wasmBinaryFile</code>, this function returns undefined.
|
|
14
|
+
*
|
|
15
|
+
* @function fetchWebAssemblyBinary
|
|
16
|
+
*
|
|
17
|
+
* @param {WebAssemblyConfig} webAssemblyConfig The configuration posted by {@link TaskProcessor#initWebAssemblyModule}.
|
|
18
|
+
* @returns {Promise<ArrayBuffer|undefined>} A promise that resolves to the fetched binary, or undefined when no fetch is needed.
|
|
19
|
+
*
|
|
20
|
+
* @private
|
|
21
|
+
* @see TaskProcessor#initWebAssemblyModule
|
|
22
|
+
* @see createTaskProcessorWorker
|
|
23
|
+
*/
|
|
24
|
+
async function fetchWebAssemblyBinary(webAssemblyConfig) {
|
|
25
|
+
if (
|
|
26
|
+
!defined(webAssemblyConfig.wasmBinaryFile) ||
|
|
27
|
+
defined(webAssemblyConfig.wasmBinary)
|
|
28
|
+
) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return Resource.fetchArrayBuffer({
|
|
33
|
+
url: webAssemblyConfig.wasmBinaryFile,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The WebAssembly configuration posted to a worker by
|
|
39
|
+
* {@link TaskProcessor#initWebAssemblyModule}, as the first message that worker receives.
|
|
40
|
+
*
|
|
41
|
+
* @typedef {object} WebAssemblyConfig
|
|
42
|
+
*
|
|
43
|
+
* @property {string} [wasmBinaryFile] The absolute url of the WebAssembly binary. Undefined
|
|
44
|
+
* when the browser does not support WebAssembly and a fallback module is used instead.
|
|
45
|
+
* @property {string} [modulePath] The absolute URL of the JavaScript wrapper module, or the
|
|
46
|
+
* fallback module when the browser does not support WebAssembly.
|
|
47
|
+
* @property {ArrayBuffer} [wasmBinary] The binary contents, when they are already available.
|
|
48
|
+
*
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
export default fetchWebAssemblyBinary;
|
|
@@ -1008,6 +1008,27 @@ const AutomaticUniforms = {
|
|
|
1008
1008
|
},
|
|
1009
1009
|
}),
|
|
1010
1010
|
|
|
1011
|
+
/**
|
|
1012
|
+
* An automatic GLSL uniform containing the geodetic longitude (<code>x</code>),
|
|
1013
|
+
* latitude (<code>y</code>) in radians and height (<code>z</code>) in meters of the
|
|
1014
|
+
* eye (camera). The <code>z</code> component matches {@link czm_eyeHeight}.
|
|
1015
|
+
* This uniform is only valid when the {@link SceneMode} is <code>SCENE3D</code>.
|
|
1016
|
+
*
|
|
1017
|
+
* @example
|
|
1018
|
+
* // GLSL declaration
|
|
1019
|
+
* uniform vec3 czm_eyeCartographic;
|
|
1020
|
+
*
|
|
1021
|
+
* // Example
|
|
1022
|
+
* float cameraLatitude = czm_eyeCartographic.y;
|
|
1023
|
+
*/
|
|
1024
|
+
czm_eyeCartographic: new AutomaticUniform({
|
|
1025
|
+
size: 1,
|
|
1026
|
+
datatype: WebGLConstants.FLOAT_VEC3,
|
|
1027
|
+
getValue: function (uniformState) {
|
|
1028
|
+
return uniformState.eyeCartographic;
|
|
1029
|
+
},
|
|
1030
|
+
}),
|
|
1031
|
+
|
|
1011
1032
|
/**
|
|
1012
1033
|
* An automatic GLSL uniform containing height (<code>x</code>) and height squared (<code>y</code>)
|
|
1013
1034
|
* in meters of the eye (camera) above the 2D world plane. This uniform is only valid
|
|
@@ -1050,10 +1071,31 @@ const AutomaticUniforms = {
|
|
|
1050
1071
|
},
|
|
1051
1072
|
}),
|
|
1052
1073
|
|
|
1074
|
+
/**
|
|
1075
|
+
* An automatic GLSL uniform containing a 3x3 rotation from eye coordinates to an
|
|
1076
|
+
* east-north-up coordinate system centered at the position on the ellipsoid below
|
|
1077
|
+
* the camera.
|
|
1078
|
+
* This uniform is only valid when the {@link SceneMode} is <code>SCENE3D</code>.
|
|
1079
|
+
*
|
|
1080
|
+
* @example
|
|
1081
|
+
* // GLSL declaration
|
|
1082
|
+
* uniform mat3 czm_eyeToEnu;
|
|
1083
|
+
*
|
|
1084
|
+
* // Example
|
|
1085
|
+
* vec3 enu = czm_eyeToEnu * positionEC;
|
|
1086
|
+
*/
|
|
1087
|
+
czm_eyeToEnu: new AutomaticUniform({
|
|
1088
|
+
size: 1,
|
|
1089
|
+
datatype: WebGLConstants.FLOAT_MAT3,
|
|
1090
|
+
getValue: function (uniformState) {
|
|
1091
|
+
return uniformState.eyeToEnu;
|
|
1092
|
+
},
|
|
1093
|
+
}),
|
|
1094
|
+
|
|
1053
1095
|
/**
|
|
1054
1096
|
* An automatic GLSL uniform containing the transform from model coordinates
|
|
1055
1097
|
* to an east-north-up coordinate system centered at the position on the
|
|
1056
|
-
* ellipsoid
|
|
1098
|
+
* ellipsoid nearest to the camera.
|
|
1057
1099
|
* This uniform is only valid when the {@link SceneMode} is <code>SCENE3D</code>.
|
|
1058
1100
|
*/
|
|
1059
1101
|
czm_modelToEnu: new AutomaticUniform({
|
|
@@ -1065,7 +1107,7 @@ const AutomaticUniforms = {
|
|
|
1065
1107
|
}),
|
|
1066
1108
|
|
|
1067
1109
|
/**
|
|
1068
|
-
* An automatic GLSL uniform containing the
|
|
1110
|
+
* An automatic GLSL uniform containing the inverse of
|
|
1069
1111
|
* {@link AutomaticUniforms.czm_modelToEnu}.
|
|
1070
1112
|
* This uniform is only valid when the {@link SceneMode} is <code>SCENE3D</code>.
|
|
1071
1113
|
*/
|
|
@@ -424,7 +424,7 @@ ShaderBuilder.prototype.addVertexLines = function (lines) {
|
|
|
424
424
|
/**
|
|
425
425
|
* Appends lines of GLSL code to the fragment shader
|
|
426
426
|
*
|
|
427
|
-
* @param {string[]} lines
|
|
427
|
+
* @param {string|string[]} lines One or more lines to add to the end of the fragment shader source
|
|
428
428
|
*
|
|
429
429
|
* @example
|
|
430
430
|
* shaderBuilder.addFragmentLines([
|
|
@@ -162,8 +162,10 @@ function UniformState() {
|
|
|
162
162
|
this._frustum2DWidth = 0.0;
|
|
163
163
|
this._eyeHeight = 0.0;
|
|
164
164
|
this._eyeHeight2D = new Cartesian2();
|
|
165
|
+
this._eyeCartographic = new Cartesian3();
|
|
165
166
|
this._eyeEllipsoidNormalEC = new Cartesian3();
|
|
166
167
|
this._eyeEllipsoidCurvature = new Cartesian2();
|
|
168
|
+
this._eyeToEnu = new Matrix3();
|
|
167
169
|
this._modelToEnu = new Matrix4();
|
|
168
170
|
this._enuToModel = new Matrix4();
|
|
169
171
|
this._pixelRatio = 1.0;
|
|
@@ -715,6 +717,19 @@ Object.defineProperties(UniformState.prototype, {
|
|
|
715
717
|
},
|
|
716
718
|
},
|
|
717
719
|
|
|
720
|
+
/**
|
|
721
|
+
* The geodetic longitude (<code>x</code>), latitude (<code>y</code>) in radians and
|
|
722
|
+
* height (<code>z</code>) in meters of the eye (camera).
|
|
723
|
+
* This is only valid when the {@link SceneMode} is <code>SCENE3D</code>.
|
|
724
|
+
* @memberof UniformState.prototype
|
|
725
|
+
* @type {Cartesian3}
|
|
726
|
+
*/
|
|
727
|
+
eyeCartographic: {
|
|
728
|
+
get: function () {
|
|
729
|
+
return this._eyeCartographic;
|
|
730
|
+
},
|
|
731
|
+
},
|
|
732
|
+
|
|
718
733
|
/**
|
|
719
734
|
* The height (<code>x</code>) and the height squared (<code>y</code>)
|
|
720
735
|
* in meters of the eye (camera) above the 2D world plane. This uniform is only valid
|
|
@@ -751,9 +766,22 @@ Object.defineProperties(UniformState.prototype, {
|
|
|
751
766
|
},
|
|
752
767
|
},
|
|
753
768
|
|
|
769
|
+
/**
|
|
770
|
+
* A 3x3 rotation from eye coordinates to an east-north-up coordinate system
|
|
771
|
+
* centered at the position on the ellipsoid below the camera.
|
|
772
|
+
* This uniform is only valid when the {@link SceneMode} is <code>SCENE3D</code>.
|
|
773
|
+
* @memberof UniformState.prototype
|
|
774
|
+
* @type {Matrix3}
|
|
775
|
+
*/
|
|
776
|
+
eyeToEnu: {
|
|
777
|
+
get: function () {
|
|
778
|
+
return this._eyeToEnu;
|
|
779
|
+
},
|
|
780
|
+
},
|
|
781
|
+
|
|
754
782
|
/**
|
|
755
783
|
* A transform from model coordinates to an east-north-up coordinate system
|
|
756
|
-
* centered at the position on the ellipsoid
|
|
784
|
+
* centered at the position on the ellipsoid nearest to the camera.
|
|
757
785
|
* @memberof UniformState.prototype
|
|
758
786
|
* @type {Matrix4}
|
|
759
787
|
*/
|
|
@@ -1241,6 +1269,7 @@ function setInfiniteProjection(uniformState, matrix) {
|
|
|
1241
1269
|
|
|
1242
1270
|
const surfacePositionScratch = new Cartesian3();
|
|
1243
1271
|
const enuTransformScratch = new Matrix4();
|
|
1272
|
+
const enuRotationScratch = new Matrix3();
|
|
1244
1273
|
|
|
1245
1274
|
function setCamera(uniformState, camera) {
|
|
1246
1275
|
Cartesian3.clone(camera.positionWC, uniformState._cameraPosition);
|
|
@@ -1266,6 +1295,12 @@ function setCamera(uniformState, camera) {
|
|
|
1266
1295
|
);
|
|
1267
1296
|
} else {
|
|
1268
1297
|
uniformState._eyeHeight = positionCartographic.height;
|
|
1298
|
+
uniformState._eyeCartographic = Cartesian3.fromElements(
|
|
1299
|
+
positionCartographic.longitude,
|
|
1300
|
+
positionCartographic.latitude,
|
|
1301
|
+
positionCartographic.height,
|
|
1302
|
+
uniformState._eyeCartographic,
|
|
1303
|
+
);
|
|
1269
1304
|
uniformState._eyeEllipsoidNormalEC =
|
|
1270
1305
|
ellipsoid.geodeticSurfaceNormalCartographic(
|
|
1271
1306
|
positionCartographic,
|
|
@@ -1307,6 +1342,17 @@ function setCamera(uniformState, camera) {
|
|
|
1307
1342
|
uniformState._modelToEnu,
|
|
1308
1343
|
);
|
|
1309
1344
|
|
|
1345
|
+
const enuToWorldRotation = Matrix4.getRotation(
|
|
1346
|
+
enuToWorld,
|
|
1347
|
+
enuRotationScratch,
|
|
1348
|
+
);
|
|
1349
|
+
const enuToView = Matrix3.multiply(
|
|
1350
|
+
uniformState._viewRotation,
|
|
1351
|
+
enuToWorldRotation,
|
|
1352
|
+
enuRotationScratch,
|
|
1353
|
+
);
|
|
1354
|
+
uniformState._eyeToEnu = Matrix3.transpose(enuToView, uniformState._eyeToEnu);
|
|
1355
|
+
|
|
1310
1356
|
if (
|
|
1311
1357
|
!CesiumMath.equalsEpsilon(
|
|
1312
1358
|
ellipsoid._radii.x,
|
|
@@ -4,7 +4,7 @@ import Resource from "../Core/Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"
|
|
7
|
+
"AAPTaeRGM19PsTpo1ePVkJZk4Tg..zqn3rpU4kUaF-8QMW-oWZntlxvKhdUFXLBoo5dQwRNEKd1EoKJh-Ha2zxbrz2Nhz2tV_gLVZTQwFHLzJHKwsGDz4GTKV8jeUgb12Ci9CeU_9sOrauJYnGK2vHhtSSAQ-73rmKzNG_2lZ0zuCCEKslxCmXUw2mT1Cpk0RoCCtDheWByX1e7Lnb3LKCBDt9VhGFSGCOiaFfizFRLld8LWukKgxCgluTpKgUuUi4OytX84roEpm6mP7PE91AT1_5Uash6To";
|
|
8
8
|
/**
|
|
9
9
|
* Default options for accessing the ArcGIS image tile service.
|
|
10
10
|
*
|
|
@@ -12,6 +12,7 @@ import BufferPointMaterial from "./BufferPointMaterial.js";
|
|
|
12
12
|
/** @import ComponentDatatype from "../Core/ComponentDatatype.js"; */
|
|
13
13
|
/** @import Matrix4 from "../Core/Matrix4.js"; */
|
|
14
14
|
/** @import FrameState from "./FrameState.js"; */
|
|
15
|
+
/** @import { BufferPrimitiveCollectionOptions } from "./BufferPrimitiveCollection.js"; */
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* @typedef {object} BufferPointOptions
|
|
@@ -91,17 +92,13 @@ class BufferPointCollection extends BufferPrimitiveCollection {
|
|
|
91
92
|
// COLLECTION LIFECYCLE
|
|
92
93
|
|
|
93
94
|
/**
|
|
94
|
-
* @param {
|
|
95
|
+
* @param {BufferPrimitiveCollectionOptions} [options]
|
|
95
96
|
* @returns {BufferPointCollection}
|
|
96
97
|
* @override
|
|
97
98
|
* @ignore
|
|
98
99
|
*/
|
|
99
|
-
|
|
100
|
-
return new BufferPointCollection(
|
|
101
|
-
primitiveCountMax: collection.primitiveCountMax,
|
|
102
|
-
positionDatatype: collection.positionDatatype,
|
|
103
|
-
positionNormalized: collection.positionNormalized,
|
|
104
|
-
});
|
|
100
|
+
_cloneEmpty(options = Frozen.EMPTY_OBJECT) {
|
|
101
|
+
return new BufferPointCollection(this._cloneEmptyBaseArgs(options));
|
|
105
102
|
}
|
|
106
103
|
|
|
107
104
|
/////////////////////////////////////////////////////////////////////////////
|
|
@@ -14,6 +14,7 @@ import BufferPolygonMaterial from "./BufferPolygonMaterial.js";
|
|
|
14
14
|
/** @import { TypedArray } from "../Core/globalTypes.js"; */
|
|
15
15
|
/** @import Matrix4 from "../Core/Matrix4.js"; */
|
|
16
16
|
/** @import FrameState from "./FrameState.js" */
|
|
17
|
+
/** @import HeightReference from "./HeightReference.js"; */
|
|
17
18
|
/** @import ComponentDatatype from "../Core/ComponentDatatype.js"; */
|
|
18
19
|
|
|
19
20
|
const { ERR_CAPACITY } = BufferPrimitiveCollection.Error;
|
|
@@ -31,6 +32,29 @@ const { ERR_CAPACITY } = BufferPrimitiveCollection.Error;
|
|
|
31
32
|
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
32
33
|
*/
|
|
33
34
|
|
|
35
|
+
/**
|
|
36
|
+
* @typedef {object} BufferPolygonCollectionOptions
|
|
37
|
+
* @property {number} [primitiveCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY] Maximum number of polygons.
|
|
38
|
+
* @property {number} [vertexCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY] Maximum number of vertices.
|
|
39
|
+
* @property {number} [holeCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY] Maximum number of holes.
|
|
40
|
+
* @property {number} [triangleCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY] Maximum number of triangles.
|
|
41
|
+
* @property {ComponentDatatype} [positionDatatype=ComponentDatatype.DOUBLE] The component datatype used to store position values.
|
|
42
|
+
* @property {boolean} [positionNormalized=false] When <code>true</code>, integer position values are treated as normalized,
|
|
43
|
+
* where the full integer range maps to [-1, 1] (signed) or [0, 1] (unsigned). Only relevant for integer position datatypes
|
|
44
|
+
* (BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT).
|
|
45
|
+
* @property {boolean} [show=true]
|
|
46
|
+
* @property {boolean} [allowPicking=true] When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
|
|
47
|
+
* @property {BoundingSphere} [boundingVolume] Bounding volume, in world space, for the collection. When
|
|
48
|
+
* unspecified, a bounding volume is computed automatically and updated when primitive positions change. When
|
|
49
|
+
* specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume
|
|
50
|
+
* manually, and updating it only as needed, will improve performance for larger dynamic collections.
|
|
51
|
+
* @property {boolean} [debugShowBoundingVolume=false]
|
|
52
|
+
* @property {BlendOption} [blendOption=BlendOption.TRANSLUCENT]
|
|
53
|
+
* @property {HeightReference} [heightReference=HeightReference.NONE] When set to a clamping value, the
|
|
54
|
+
* collection is draped onto terrain and/or 3D Tiles, rather than drawn as geometry of its own.
|
|
55
|
+
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
56
|
+
*/
|
|
57
|
+
|
|
34
58
|
/**
|
|
35
59
|
* Collection of polygons held in ArrayBuffer storage for performance and memory optimization.
|
|
36
60
|
*
|
|
@@ -76,21 +100,7 @@ const { ERR_CAPACITY } = BufferPrimitiveCollection.Error;
|
|
|
76
100
|
*/
|
|
77
101
|
class BufferPolygonCollection extends BufferPrimitiveCollection {
|
|
78
102
|
/**
|
|
79
|
-
* @param {
|
|
80
|
-
* @param {number} [options.primitiveCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
81
|
-
* @param {number} [options.vertexCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
82
|
-
* @param {number} [options.holeCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
83
|
-
* @param {number} [options.triangleCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
84
|
-
* @param {ComponentDatatype} [options.positionDatatype=ComponentDatatype.DOUBLE]
|
|
85
|
-
* @param {boolean} [options.positionNormalized=false]
|
|
86
|
-
* @param {boolean} [options.show=true]
|
|
87
|
-
* @param {boolean} [options.allowPicking=true] When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
|
|
88
|
-
* @param {BoundingSphere} [options.boundingVolume] Bounding volume, in world space, for the collection. When
|
|
89
|
-
* unspecified, a bounding volume is computed automatically and updated when primitive positions change. When
|
|
90
|
-
* specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume
|
|
91
|
-
* manually, and updating it only as needed, will improve performance for larger dynamic collections.
|
|
92
|
-
* @param {boolean} [options.debugShowBoundingVolume=false]
|
|
93
|
-
* @param {BlendOption} [options.blendOption=BlendOption.TRANSLUCENT]
|
|
103
|
+
* @param {BufferPolygonCollectionOptions} [options]
|
|
94
104
|
*/
|
|
95
105
|
constructor(options = Frozen.EMPTY_OBJECT) {
|
|
96
106
|
super(options);
|
|
@@ -193,10 +203,16 @@ class BufferPolygonCollection extends BufferPrimitiveCollection {
|
|
|
193
203
|
*
|
|
194
204
|
* @param {BufferPolygonCollection} collection
|
|
195
205
|
* @param {BufferPolygonCollection} result
|
|
206
|
+
* @param {function(BufferPolygon, number): boolean} [predicate] When provided, only polygons for which this returns <code>true</code> are copied. Surviving polygons are compacted into contiguous indices.
|
|
196
207
|
* @returns {BufferPolygonCollection}
|
|
197
208
|
*/
|
|
198
|
-
static clone(collection, result) {
|
|
199
|
-
super.clone(collection, result);
|
|
209
|
+
static clone(collection, result, predicate) {
|
|
210
|
+
super.clone(collection, result, predicate);
|
|
211
|
+
|
|
212
|
+
// Base class's filtered clone uses PrimitiveClass.clone, which handles holes and triangles, so just return the result.
|
|
213
|
+
if (defined(predicate)) {
|
|
214
|
+
return result;
|
|
215
|
+
}
|
|
200
216
|
|
|
201
217
|
//>>includeStart('debug', pragmas.debug);
|
|
202
218
|
assert(collection.holeCount <= result.holeCountMax, ERR_CAPACITY);
|
|
@@ -222,19 +238,33 @@ class BufferPolygonCollection extends BufferPrimitiveCollection {
|
|
|
222
238
|
}
|
|
223
239
|
|
|
224
240
|
/**
|
|
225
|
-
*
|
|
241
|
+
* Returns a copy of the given collection, overriding any constructor options
|
|
242
|
+
* provided. Omitted options are inherited from the source collection. Any
|
|
243
|
+
* resized buffers must be large enough to hold every polygon.
|
|
244
|
+
*
|
|
245
|
+
* @param {BufferPolygonCollection} collection Source collection to copy.
|
|
246
|
+
* @param {BufferPolygonCollectionOptions} [options] Constructor options to override. Omitted options are inherited from the source collection.
|
|
247
|
+
* @param {function(BufferPolygon, number): boolean} [predicate] When provided, only polygons for which this returns <code>true</code> are copied. Surviving polygons are compacted into contiguous indices.
|
|
248
|
+
* @returns {BufferPolygonCollection}
|
|
249
|
+
* @override
|
|
250
|
+
*/
|
|
251
|
+
static fromCollection(collection, options, predicate) {
|
|
252
|
+
return /** @type {BufferPolygonCollection} */ (
|
|
253
|
+
super.fromCollection(collection, options, predicate)
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @param {BufferPolygonCollectionOptions} [options]
|
|
226
259
|
* @returns {BufferPolygonCollection}
|
|
227
260
|
* @override
|
|
228
261
|
* @ignore
|
|
229
262
|
*/
|
|
230
|
-
|
|
263
|
+
_cloneEmpty(options = Frozen.EMPTY_OBJECT) {
|
|
231
264
|
return new BufferPolygonCollection({
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
triangleCountMax: collection.triangleCountMax,
|
|
236
|
-
positionDatatype: collection.positionDatatype,
|
|
237
|
-
positionNormalized: collection.positionNormalized,
|
|
265
|
+
holeCountMax: this.holeCountMax,
|
|
266
|
+
triangleCountMax: this.triangleCountMax,
|
|
267
|
+
...this._cloneEmptyBaseArgs(options),
|
|
238
268
|
});
|
|
239
269
|
}
|
|
240
270
|
|
|
@@ -305,8 +335,7 @@ class BufferPolygonCollection extends BufferPrimitiveCollection {
|
|
|
305
335
|
update(frameState) {
|
|
306
336
|
super.update(frameState);
|
|
307
337
|
|
|
308
|
-
|
|
309
|
-
if (this.show && (passes.render || passes.pick)) {
|
|
338
|
+
if (this._isRendered(frameState)) {
|
|
310
339
|
this._renderContext = renderPolygons(
|
|
311
340
|
this,
|
|
312
341
|
frameState,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
3
|
import defined from "../Core/defined.js";
|
|
4
|
+
import DeveloperError from "../Core/DeveloperError.js";
|
|
5
|
+
import Frozen from "../Core/Frozen.js";
|
|
4
6
|
import BufferPrimitiveCollection from "./BufferPrimitiveCollection.js";
|
|
5
7
|
import BufferPolyline from "./BufferPolyline.js";
|
|
6
8
|
import renderPolylines from "./renderBufferPolylineCollection.js";
|
|
@@ -8,7 +10,12 @@ import BufferPolylineMaterial from "./BufferPolylineMaterial.js";
|
|
|
8
10
|
|
|
9
11
|
/** @import { TypedArray } from "../Core/globalTypes.js"; */
|
|
10
12
|
/** @import Matrix4 from "../Core/Matrix4.js"; */
|
|
13
|
+
/** @import BoundingSphere from "../Core/BoundingSphere.js"; */
|
|
14
|
+
/** @import ComponentDatatype from "../Core/ComponentDatatype.js"; */
|
|
15
|
+
/** @import BlendOption from "./BlendOption.js"; */
|
|
16
|
+
/** @import HeightReference from "./HeightReference.js"; */
|
|
11
17
|
/** @import FrameState from "./FrameState.js" */
|
|
18
|
+
/** @import { BufferPrimitiveCollectionOptions } from "./BufferPrimitiveCollection.js"; */
|
|
12
19
|
|
|
13
20
|
/**
|
|
14
21
|
* @typedef {object} BufferPolylineOptions
|
|
@@ -57,6 +64,55 @@ import BufferPolylineMaterial from "./BufferPolylineMaterial.js";
|
|
|
57
64
|
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
58
65
|
*/
|
|
59
66
|
class BufferPolylineCollection extends BufferPrimitiveCollection {
|
|
67
|
+
/**
|
|
68
|
+
* @param {object} [options]
|
|
69
|
+
* @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] Transforms geometry from model to world coordinates.
|
|
70
|
+
* @param {number} [options.primitiveCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
71
|
+
* @param {number} [options.vertexCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
72
|
+
* @param {boolean} [options.show=true]
|
|
73
|
+
* @param {ComponentDatatype} [options.positionDatatype=ComponentDatatype.DOUBLE]
|
|
74
|
+
* @param {boolean} [options.positionNormalized=false]
|
|
75
|
+
* @param {boolean} [options.allowPicking=false] When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
|
|
76
|
+
* @param {BoundingSphere} [options.boundingVolume] Bounding volume, in world space, for the collection.
|
|
77
|
+
* @param {boolean} [options.debugShowBoundingVolume=false]
|
|
78
|
+
* @param {BlendOption} [options.blendOption=BlendOption.TRANSLUCENT]
|
|
79
|
+
* @param {HeightReference} [options.heightReference=HeightReference.NONE]
|
|
80
|
+
* @param {"pixels"|"meters"} [options.widthUnits="pixels"] Unit of polyline widths in this collection:
|
|
81
|
+
* <code>"pixels"</code> on the screen, or <code>"meters"</code> in world space. A clamped
|
|
82
|
+
* {@link HeightReference} measures those meters on the ellipsoid surface, so elevation and terrain
|
|
83
|
+
* slope stretch the drawn width.
|
|
84
|
+
*/
|
|
85
|
+
constructor(options = Frozen.EMPTY_OBJECT) {
|
|
86
|
+
super(options);
|
|
87
|
+
|
|
88
|
+
const widthUnits = options.widthUnits ?? "pixels";
|
|
89
|
+
|
|
90
|
+
//>>includeStart('debug', pragmas.debug);
|
|
91
|
+
if (widthUnits !== "pixels" && widthUnits !== "meters") {
|
|
92
|
+
throw new DeveloperError(
|
|
93
|
+
'options.widthUnits must be "pixels" or "meters".',
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
//>>includeEnd('debug');
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @type {"pixels"|"meters"}
|
|
100
|
+
* @private
|
|
101
|
+
*/
|
|
102
|
+
this._widthUnits = widthUnits;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Unit of polyline widths in this collection: <code>"pixels"</code> on the screen, or
|
|
107
|
+
* <code>"meters"</code> in world space, measured on the ellipsoid surface when clamped.
|
|
108
|
+
*
|
|
109
|
+
* @type {"pixels"|"meters"}
|
|
110
|
+
* @readonly
|
|
111
|
+
*/
|
|
112
|
+
get widthUnits() {
|
|
113
|
+
return this._widthUnits;
|
|
114
|
+
}
|
|
115
|
+
|
|
60
116
|
_getCollectionClass() {
|
|
61
117
|
return BufferPolylineCollection;
|
|
62
118
|
}
|
|
@@ -73,17 +129,15 @@ class BufferPolylineCollection extends BufferPrimitiveCollection {
|
|
|
73
129
|
// COLLECTION LIFECYCLE
|
|
74
130
|
|
|
75
131
|
/**
|
|
76
|
-
* @param {
|
|
132
|
+
* @param {BufferPrimitiveCollectionOptions} [options]
|
|
77
133
|
* @returns {BufferPolylineCollection}
|
|
78
134
|
* @override
|
|
79
135
|
* @ignore
|
|
80
136
|
*/
|
|
81
|
-
|
|
137
|
+
_cloneEmpty(options = Frozen.EMPTY_OBJECT) {
|
|
82
138
|
return new BufferPolylineCollection({
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
positionDatatype: collection.positionDatatype,
|
|
86
|
-
positionNormalized: collection.positionNormalized,
|
|
139
|
+
widthUnits: this._widthUnits,
|
|
140
|
+
...this._cloneEmptyBaseArgs(options),
|
|
87
141
|
});
|
|
88
142
|
}
|
|
89
143
|
|
|
@@ -126,8 +180,7 @@ class BufferPolylineCollection extends BufferPrimitiveCollection {
|
|
|
126
180
|
update(frameState) {
|
|
127
181
|
super.update(frameState);
|
|
128
182
|
|
|
129
|
-
|
|
130
|
-
if (this.show && (passes.render || passes.pick)) {
|
|
183
|
+
if (this._isRendered(frameState)) {
|
|
131
184
|
this._renderContext = renderPolylines(
|
|
132
185
|
this,
|
|
133
186
|
frameState,
|
|
@@ -11,7 +11,8 @@ import BufferPrimitiveMaterial from "./BufferPrimitiveMaterial.js";
|
|
|
11
11
|
* @property {Color} [color=Color.WHITE] Color of fill.
|
|
12
12
|
* @property {Color} [outlineColor=Color.WHITE] Color of outline.
|
|
13
13
|
* @property {number} [outlineWidth=0.0] Width of outline, 0-255px.
|
|
14
|
-
* @property {number} [width=1.0] Width of line,
|
|
14
|
+
* @property {number} [width=1.0] Width of line, in the unit selected by
|
|
15
|
+
* {@link BufferPolylineCollection#widthUnits}.
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -28,7 +29,7 @@ class BufferPolylineMaterial extends BufferPrimitiveMaterial {
|
|
|
28
29
|
/** @ignore */
|
|
29
30
|
static Layout = {
|
|
30
31
|
...BufferPrimitiveMaterial.Layout,
|
|
31
|
-
|
|
32
|
+
WIDTH_F32: BufferPrimitiveMaterial.Layout.__BYTE_LENGTH,
|
|
32
33
|
__BYTE_LENGTH: BufferPrimitiveMaterial.Layout.__BYTE_LENGTH + 4,
|
|
33
34
|
};
|
|
34
35
|
|
|
@@ -45,7 +46,7 @@ class BufferPolylineMaterial extends BufferPrimitiveMaterial {
|
|
|
45
46
|
super(options);
|
|
46
47
|
|
|
47
48
|
/**
|
|
48
|
-
* Width of polyline,
|
|
49
|
+
* Width of polyline, in the unit selected by {@link BufferPolylineCollection#widthUnits}.
|
|
49
50
|
* @type {number}
|
|
50
51
|
*/
|
|
51
52
|
this.width = options.width ?? 1;
|
|
@@ -59,7 +60,7 @@ class BufferPolylineMaterial extends BufferPrimitiveMaterial {
|
|
|
59
60
|
*/
|
|
60
61
|
static pack(material, view, byteOffset) {
|
|
61
62
|
super.pack(material, view, byteOffset);
|
|
62
|
-
view.
|
|
63
|
+
view.setFloat32(this.Layout.WIDTH_F32 + byteOffset, material.width, true);
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
/**
|
|
@@ -71,7 +72,7 @@ class BufferPolylineMaterial extends BufferPrimitiveMaterial {
|
|
|
71
72
|
*/
|
|
72
73
|
static unpack(view, byteOffset, result) {
|
|
73
74
|
super.unpack(view, byteOffset, result);
|
|
74
|
-
result.width = view.
|
|
75
|
+
result.width = view.getFloat32(this.Layout.WIDTH_F32 + byteOffset, true);
|
|
75
76
|
return result;
|
|
76
77
|
}
|
|
77
78
|
|