@cesium/engine 26.1.0 → 26.2.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 +586 -480
- package/Build/Workers/chunk-27FWRTJI.js +454 -0
- package/Build/Workers/chunk-2H5264K7.js +1284 -0
- package/Build/Workers/chunk-2H73KDBM.js +511 -0
- package/Build/Workers/chunk-2RGJPWQX.js +1284 -0
- package/Build/Workers/chunk-2Z4ZLVOD.js +352 -0
- package/Build/Workers/chunk-2ZKH2QZB.js +387 -0
- package/Build/Workers/chunk-36NI5E6W.js +3820 -0
- package/Build/Workers/chunk-37SW7SYS.js +778 -0
- package/Build/Workers/chunk-3GHVJ3SO.js +455 -0
- package/Build/Workers/chunk-3LB4UVPU.js +387 -0
- package/Build/Workers/chunk-3PONLKEL.js +778 -0
- package/Build/Workers/chunk-3PSS3T43.js +102 -0
- package/Build/Workers/chunk-3QR662HH.js +3820 -0
- package/Build/Workers/chunk-3SX2WYSO.js +973 -0
- package/Build/Workers/chunk-3UDN6LYX.js +476 -0
- package/Build/Workers/chunk-47MCBSXI.js +9237 -0
- package/Build/Workers/chunk-4E626OCE.js +1067 -0
- package/Build/Workers/chunk-4NW2MJKH.js +455 -0
- package/Build/Workers/chunk-52YK5BSN.js +198 -0
- package/Build/Workers/chunk-5RNAQZK6.js +9234 -0
- package/Build/Workers/chunk-5YPQBFRD.js +519 -0
- package/Build/Workers/chunk-6FHT43QR.js +140 -0
- package/Build/Workers/chunk-6FZDPMTO.js +455 -0
- package/Build/Workers/chunk-6R5X2GUA.js +1284 -0
- package/Build/Workers/chunk-7A2OGDHT.js +305 -0
- package/Build/Workers/chunk-7CGEQUM2.js +305 -0
- package/Build/Workers/chunk-7I325HV6.js +1344 -0
- package/Build/Workers/chunk-7MM3N2VE.js +1067 -0
- package/Build/Workers/chunk-7TKLTCZW.js +219 -0
- package/Build/Workers/chunk-7UUKBDH6.js +1054 -0
- package/Build/Workers/chunk-7W6DUHAB.js +693 -0
- package/Build/Workers/chunk-7XM5JK5F.js +162 -0
- package/Build/Workers/chunk-7YG3ND3P.js +454 -0
- package/Build/Workers/chunk-A62YI6S6.js +305 -0
- package/Build/Workers/chunk-A7TTWVTF.js +2719 -0
- package/Build/Workers/chunk-ACTVJHSP.js +519 -0
- package/Build/Workers/chunk-ADX3CBKD.js +9234 -0
- package/Build/Workers/chunk-AF7DTMJ7.js +398 -0
- package/Build/Workers/chunk-AJSFRY4U.js +1344 -0
- package/Build/Workers/chunk-ARZICEEP.js +301 -0
- package/Build/Workers/chunk-B3QHNA4A.js +147 -0
- package/Build/Workers/chunk-BKPQFCXH.js +511 -0
- package/Build/Workers/chunk-BSPCI2LO.js +959 -0
- package/Build/Workers/chunk-BUJWSX5S.js +301 -0
- package/Build/Workers/chunk-C7QDUNI3.js +138 -0
- package/Build/Workers/chunk-CIV5DJOQ.js +778 -0
- package/Build/Workers/chunk-CQNFIAZU.js +56 -0
- package/Build/Workers/chunk-CRCGE4J4.js +9237 -0
- package/Build/Workers/chunk-CUTRKXUQ.js +288 -0
- package/Build/Workers/chunk-D6AY775A.js +3201 -0
- package/Build/Workers/chunk-DSGLDRTI.js +278 -0
- package/Build/Workers/chunk-DZBQUULR.js +138 -0
- package/Build/Workers/chunk-DZUFEE4L.js +140 -0
- package/Build/Workers/chunk-E2NKV5YT.js +3820 -0
- package/Build/Workers/chunk-EB3Y5P3A.js +368 -0
- package/Build/Workers/chunk-ELE6SC2C.js +837 -0
- package/Build/Workers/chunk-EOWDZN5S.js +288 -0
- package/Build/Workers/chunk-ERKUET22.js +3201 -0
- package/Build/Workers/chunk-EZGQPOIG.js +162 -0
- package/Build/Workers/chunk-F2IMBMZY.js +241 -0
- package/Build/Workers/chunk-F4CSNRZO.js +219 -0
- package/Build/Workers/chunk-FBP4DUQJ.js +693 -0
- package/Build/Workers/chunk-FJWZMGOQ.js +1992 -0
- package/Build/Workers/chunk-FQ42MT7M.js +58 -0
- package/Build/Workers/chunk-FU4BGABC.js +398 -0
- package/Build/Workers/chunk-FX3VEAIU.js +2719 -0
- package/Build/Workers/chunk-GGNWQWSB.js +301 -0
- package/Build/Workers/chunk-GHXVQVUM.js +1344 -0
- package/Build/Workers/chunk-GNKXEN4C.js +682 -0
- package/Build/Workers/chunk-GVA7XQI2.js +368 -0
- package/Build/Workers/chunk-GXDHRC4J.js +1344 -0
- package/Build/Workers/chunk-GYSYP6PC.js +1067 -0
- package/Build/Workers/chunk-H2WCFXLP.js +241 -0
- package/Build/Workers/chunk-HDL4HOXZ.js +778 -0
- package/Build/Workers/chunk-HLW2ZRVK.js +368 -0
- package/Build/Workers/chunk-HT6FASOT.js +973 -0
- package/Build/Workers/chunk-I74ZH5LK.js +959 -0
- package/Build/Workers/chunk-IDVHUDZT.js +352 -0
- package/Build/Workers/chunk-IJZJMIUY.js +789 -0
- package/Build/Workers/chunk-IMBVP57H.js +44 -0
- package/Build/Workers/chunk-IOO7Z2AV.js +57 -0
- package/Build/Workers/chunk-IUIFLOYO.js +44 -0
- package/Build/Workers/chunk-J73T2VOY.js +171 -0
- package/Build/Workers/chunk-JALGQYDY.js +288 -0
- package/Build/Workers/chunk-JXYLJCTC.js +124 -0
- package/Build/Workers/chunk-K27QOAW6.js +97 -0
- package/Build/Workers/chunk-KMV25A63.js +789 -0
- package/Build/Workers/chunk-KP5QD7WU.js +693 -0
- package/Build/Workers/chunk-KZWFWJML.js +2719 -0
- package/Build/Workers/chunk-LCXRRALY.js +387 -0
- package/Build/Workers/chunk-LDRQSYBN.js +1800 -0
- package/Build/Workers/chunk-M4JZ6TSZ.js +959 -0
- package/Build/Workers/chunk-M6QKXVAU.js +1054 -0
- package/Build/Workers/chunk-MAAHFYPC.js +198 -0
- package/Build/Workers/chunk-MCJDRDJQ.js +102 -0
- package/Build/Workers/chunk-MEENMEAH.js +198 -0
- package/Build/Workers/chunk-NAWU5RF4.js +162 -0
- package/Build/Workers/chunk-NCL22ZUX.js +56 -0
- package/Build/Workers/chunk-NEFDMMLY.js +241 -0
- package/Build/Workers/chunk-NJVBJG63.js +124 -0
- package/Build/Workers/chunk-NLLCQBX3.js +73 -0
- package/Build/Workers/chunk-NSKZ6SBK.js +1483 -0
- package/Build/Workers/chunk-NXGQBQWE.js +837 -0
- package/Build/Workers/chunk-O3DKEX7Q.js +352 -0
- package/Build/Workers/chunk-O3XFXGPZ.js +476 -0
- package/Build/Workers/chunk-OA6MYL2C.js +837 -0
- package/Build/Workers/chunk-OHP4ELS7.js +198 -0
- package/Build/Workers/chunk-OZGPS7FB.js +138 -0
- package/Build/Workers/chunk-PCL3Y7H5.js +82 -0
- package/Build/Workers/chunk-PD4GK4EM.js +57 -0
- package/Build/Workers/chunk-PEDU33QG.js +2342 -0
- package/Build/Workers/chunk-PRWUMCXF.js +682 -0
- package/Build/Workers/chunk-PVTSNNVI.js +288 -0
- package/Build/Workers/chunk-QFSSCLLZ.js +973 -0
- package/Build/Workers/chunk-QHPZH22L.js +241 -0
- package/Build/Workers/chunk-QIZDWZK6.js +301 -0
- package/Build/Workers/chunk-QV6DG2YX.js +1483 -0
- package/Build/Workers/chunk-R4K7EHOU.js +171 -0
- package/Build/Workers/chunk-R7JGHDD6.js +789 -0
- package/Build/Workers/chunk-RASQEYD4.js +1483 -0
- package/Build/Workers/chunk-RW6ITX7Q.js +3820 -0
- package/Build/Workers/chunk-RYSQVJR6.js +398 -0
- package/Build/Workers/chunk-S6RJU5NM.js +1054 -0
- package/Build/Workers/chunk-SA2A2AN5.js +2342 -0
- package/Build/Workers/chunk-SDFHDNS4.js +147 -0
- package/Build/Workers/chunk-SJYSIOEM.js +414 -0
- package/Build/Workers/chunk-SMTGMFBL.js +97 -0
- package/Build/Workers/chunk-SXSP3JHS.js +38 -0
- package/Build/Workers/chunk-TN35HP5B.js +1067 -0
- package/Build/Workers/chunk-TNWKJNUZ.js +454 -0
- package/Build/Workers/chunk-TOAF47AQ.js +102 -0
- package/Build/Workers/chunk-TQ4QCOXT.js +2719 -0
- package/Build/Workers/chunk-TSDSILQB.js +124 -0
- package/Build/Workers/chunk-U5LV3F3Z.js +1054 -0
- package/Build/Workers/chunk-UAZUP4I5.js +1992 -0
- package/Build/Workers/chunk-UF46SZEZ.js +789 -0
- package/Build/Workers/chunk-UNRTMCET.js +398 -0
- package/Build/Workers/chunk-UTB7U3O6.js +1992 -0
- package/Build/Workers/chunk-V46YGZE6.js +352 -0
- package/Build/Workers/chunk-VDGOCROW.js +57 -0
- package/Build/Workers/chunk-VFWSSBPT.js +511 -0
- package/Build/Workers/chunk-VVYMXI3I.js +1284 -0
- package/Build/Workers/chunk-VXWHPYQM.js +837 -0
- package/Build/Workers/chunk-VXYUBRSB.js +219 -0
- package/Build/Workers/chunk-VZLDLEWI.js +387 -0
- package/Build/Workers/chunk-W5OCKMPJ.js +101 -0
- package/Build/Workers/chunk-WN3F4CVG.js +3201 -0
- package/Build/Workers/chunk-WPRUWXGV.js +693 -0
- package/Build/Workers/chunk-WTO2ERBP.js +414 -0
- package/Build/Workers/chunk-WVHMDVG4.js +959 -0
- package/Build/Workers/chunk-XCBZVTIV.js +280 -0
- package/Build/Workers/chunk-XGA23TAX.js +73 -0
- package/Build/Workers/chunk-XLQZNQ4Z.js +163 -0
- package/Build/Workers/chunk-XQH66YJC.js +147 -0
- package/Build/Workers/chunk-XTA7BXJG.js +682 -0
- package/Build/Workers/chunk-XTIDAFRS.js +476 -0
- package/Build/Workers/chunk-XUEDWBUD.js +682 -0
- package/Build/Workers/chunk-XYFLRH3H.js +124 -0
- package/Build/Workers/chunk-Y7JRTRTO.js +305 -0
- package/Build/Workers/chunk-Y7QSMDCJ.js +352 -0
- package/Build/Workers/chunk-YCB5TYTR.js +1483 -0
- package/Build/Workers/chunk-YEYOSTJX.js +219 -0
- package/Build/Workers/chunk-YGFVAGYF.js +630 -0
- package/Build/Workers/chunk-YIIACKQO.js +368 -0
- package/Build/Workers/chunk-YJGSP6PE.js +511 -0
- package/Build/Workers/chunk-Z4LR5EHE.js +454 -0
- package/Build/Workers/chunk-Z66EVE2A.js +44 -0
- package/Build/Workers/chunk-ZHIHHHTB.js +414 -0
- package/Build/Workers/chunk-ZNWHFSLE.js +171 -0
- package/Build/Workers/chunk-ZQLZG4IN.js +2342 -0
- package/Build/Workers/chunk-ZRTSMUZ2.js +414 -0
- package/Build/Workers/chunk-ZZUVT5BM.js +476 -0
- package/Build/Workers/combineGeometry.js +16 -16
- package/Build/Workers/createBoxGeometry.js +10 -10
- package/Build/Workers/createBoxOutlineGeometry.js +8 -8
- package/Build/Workers/createCircleGeometry.js +18 -18
- package/Build/Workers/createCircleOutlineGeometry.js +11 -11
- package/Build/Workers/createCoplanarPolygonGeometry.js +27 -27
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +23 -23
- package/Build/Workers/createCorridorGeometry.js +23 -25
- package/Build/Workers/createCorridorOutlineGeometry.js +21 -23
- package/Build/Workers/createCylinderGeometry.js +12 -12
- package/Build/Workers/createCylinderOutlineGeometry.js +10 -10
- package/Build/Workers/createEllipseGeometry.js +18 -18
- package/Build/Workers/createEllipseOutlineGeometry.js +11 -11
- package/Build/Workers/createEllipsoidGeometry.js +11 -11
- package/Build/Workers/createEllipsoidOutlineGeometry.js +10 -10
- package/Build/Workers/createFrustumGeometry.js +11 -11
- package/Build/Workers/createFrustumOutlineGeometry.js +11 -11
- package/Build/Workers/createGeometry.js +16 -16
- package/Build/Workers/createGroundPolylineGeometry.js +16 -16
- package/Build/Workers/createPlaneGeometry.js +9 -9
- package/Build/Workers/createPlaneOutlineGeometry.js +8 -8
- package/Build/Workers/createPolygonGeometry.js +25 -25
- package/Build/Workers/createPolygonOutlineGeometry.js +22 -22
- package/Build/Workers/createPolylineGeometry.js +18 -18
- package/Build/Workers/createPolylineVolumeGeometry.js +24 -24
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +20 -20
- package/Build/Workers/createRectangleGeometry.js +19 -19
- package/Build/Workers/createRectangleOutlineGeometry.js +13 -13
- package/Build/Workers/createSimplePolylineGeometry.js +16 -16
- package/Build/Workers/createSphereGeometry.js +11 -11
- package/Build/Workers/createSphereOutlineGeometry.js +10 -10
- package/Build/Workers/createVectorTileClampedPolylines.js +7 -7
- package/Build/Workers/createVectorTileGeometries.js +15 -15
- package/Build/Workers/createVectorTilePoints.js +6 -6
- package/Build/Workers/createVectorTilePolygons.js +14 -14
- package/Build/Workers/createVectorTilePolylines.js +7 -7
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +17 -17
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +14 -14
- package/Build/Workers/createVerticesFromHeightmap.js +14 -14
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +12 -12
- package/Build/Workers/createWallGeometry.js +17 -17
- package/Build/Workers/createWallOutlineGeometry.js +17 -17
- package/Build/Workers/decodeDraco.js +2 -2
- package/Build/Workers/decodeI3S.js +5 -5
- package/Build/Workers/incrementallyBuildTerrainPicker.js +4 -4
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +14 -14
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +17 -17
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +1 -5
- package/Source/Core/BoundingSphere.js +0 -3
- package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +3 -4
- package/Source/Core/CoplanarPolygonGeometry.js +2 -2
- package/Source/Core/CorridorGeometry.js +2 -4
- package/Source/Core/CorridorOutlineGeometry.js +1 -3
- package/Source/Core/EarthOrientationParameters.js +2 -2
- package/Source/Core/EllipseGeometryLibrary.js +2 -2
- package/Source/Core/EllipsoidGeodesic.js +3 -3
- package/Source/Core/EllipsoidRhumbLine.js +1 -1
- package/Source/Core/GroundPolylineGeometry.js +2 -2
- package/Source/Core/Heap.js +1 -1
- package/Source/Core/HermitePolynomialApproximation.js +215 -179
- package/Source/Core/InterpolationAlgorithm.js +1 -0
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/JulianDate.js +1 -1
- package/Source/Core/LagrangePolynomialApproximation.js +55 -52
- package/Source/Core/LinearApproximation.js +69 -66
- package/Source/Core/Math.js +59 -0
- package/Source/Core/Matrix2.js +2 -2
- package/Source/Core/Matrix3.js +2 -2
- package/Source/Core/OrthographicFrustum.js +1 -1
- package/Source/Core/PerspectiveFrustum.js +1 -1
- package/Source/Core/PolygonGeometry.js +2 -2
- package/Source/Core/PolygonGeometryLibrary.js +1 -1
- package/Source/Core/PolygonOutlineGeometry.js +1 -1
- package/Source/Core/PolylineGeometry.js +1 -1
- package/Source/Core/PolylineVolumeGeometryLibrary.js +1 -1
- package/Source/Core/Rectangle.js +7 -1
- package/Source/Core/RectangleOutlineGeometry.js +1 -1
- package/Source/Core/SimplePolylineGeometry.js +1 -1
- package/Source/Core/TerrainEncoding.js +2 -2
- package/Source/Core/TerrainPicker.js +179 -168
- package/Source/Core/TimeIntervalCollection.js +1 -3
- package/Source/Core/Tipsify.js +1 -1
- package/Source/Core/Transforms.js +5 -1
- package/Source/Core/VectorPipeline.js +1117 -0
- package/Source/Core/VectorProvider.js +429 -0
- package/Source/Core/WallOutlineGeometry.js +1 -1
- package/Source/Core/getTimestamp.js +4 -2
- package/Source/DataSources/CompositeEntityCollection.js +0 -1
- package/Source/DataSources/CzmlDataSource.js +2 -0
- package/Source/DataSources/DataSourceDisplay.js +1 -1
- package/Source/DataSources/GeoJsonDataSource.js +0 -1
- package/Source/DataSources/GeometryVisualizer.js +1 -1
- package/Source/DataSources/KmlDataSource.js +1 -2
- package/Source/DataSources/PolylineVisualizer.js +1 -1
- package/Source/DataSources/StaticOutlineGeometryBatch.js +1 -1
- package/Source/Renderer/AutomaticUniforms.js +23 -0
- package/Source/Renderer/Context.js +9 -3
- package/Source/Renderer/DrawCommand.js +22 -0
- package/Source/Renderer/Framebuffer.js +4 -0
- package/Source/Renderer/Pass.js +11 -10
- package/Source/Renderer/Texture.js +11 -0
- package/Source/Renderer/UniformState.js +7 -0
- package/Source/Renderer/VertexArray.js +0 -1
- package/Source/Scene/ArcGisMapServerImageryProvider.js +0 -5
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +2 -1
- package/Source/Scene/BillboardCollection.js +7 -3
- package/Source/Scene/BufferPrimitiveCollection.js +27 -5
- package/Source/Scene/Camera.js +71 -5
- package/Source/Scene/Cesium3DTileset.js +1 -1
- package/Source/Scene/ClippingPlaneCollection.js +2 -2
- package/Source/Scene/Controllers/Controller.js +63 -0
- package/Source/Scene/Controllers/ControllerHost.js +78 -0
- package/Source/Scene/Controllers/HybridScreenSpacePanCameraController.js +106 -0
- package/Source/Scene/Controllers/MouseButton.js +32 -0
- package/Source/Scene/Controllers/ScreenSpaceElevatorCameraController.js +295 -0
- package/Source/Scene/Controllers/ScreenSpaceInputBindings.js +154 -0
- package/Source/Scene/Controllers/ScreenSpaceMapCameraController.js +310 -0
- package/Source/Scene/Controllers/ScreenSpaceTiltOrbitCameraController.js +642 -0
- package/Source/Scene/Controllers/ScreenSpaceZoomCameraController.js +431 -0
- package/Source/Scene/Controllers/defaultPickWorldPosition.js +84 -0
- package/Source/Scene/DerivedCommand.js +94 -0
- package/Source/Scene/EdgeFramebuffer.js +1 -5
- package/Source/Scene/FrameState.js +17 -0
- package/Source/Scene/Globe.js +20 -0
- package/Source/Scene/GlobeDepth.js +27 -1
- package/Source/Scene/GlobeSurfaceShaderSet.js +12 -2
- package/Source/Scene/GlobeSurfaceTile.js +48 -10
- package/Source/Scene/GlobeSurfaceTileProvider.js +121 -3
- package/Source/Scene/GltfLoader.js +32 -3
- package/Source/Scene/GltfSpzLoader.js +1 -1
- package/Source/Scene/GltfVertexBufferLoader.js +6 -3
- package/Source/Scene/I3SDataProvider.js +1 -1
- package/Source/Scene/I3SLayer.js +1 -1
- package/Source/Scene/I3SNode.js +2 -2
- package/Source/Scene/ImageryLayerCollection.js +188 -4
- package/Source/Scene/IonImageryProvider.js +1 -5
- package/Source/Scene/Label.js +4 -4
- package/Source/Scene/LabelCollection.js +1 -1
- package/Source/Scene/MVTDataProvider.js +2 -0
- package/Source/Scene/Model/B3dmLoader.js +1 -2
- package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +10 -8
- package/Source/Scene/Model/I3dmLoader.js +1 -1
- package/Source/Scene/Model/InstancingPipelineStage.js +4 -7
- package/Source/Scene/Model/MaterialPipelineStage.js +124 -1
- package/Source/Scene/Model/Model.js +8 -10
- package/Source/Scene/Model/ModelClippingPlanesPipelineStage.js +28 -1
- package/Source/Scene/Model/ModelDrawCommand.js +160 -16
- package/Source/Scene/Model/ModelDrawCommands.js +4 -0
- package/Source/Scene/Model/ModelSceneGraph.js +21 -0
- package/Source/Scene/Model/PickingPipelineStage.js +29 -0
- package/Source/Scene/Model/PrimitiveRenderResources.js +24 -0
- package/Source/Scene/ModelComponents.js +71 -0
- package/Source/Scene/Picking.js +16 -5
- package/Source/Scene/PlanarFillIdFramebuffer.js +172 -0
- package/Source/Scene/PntsParser.js +0 -1
- package/Source/Scene/PolylineCollection.js +1 -1
- package/Source/Scene/PostProcessStage.js +4 -2
- package/Source/Scene/ResourceCache.js +7 -4
- package/Source/Scene/ResourceCacheKey.js +16 -13
- package/Source/Scene/Scene.js +202 -5
- package/Source/Scene/ScreenSpaceCameraController.js +1 -2
- package/Source/Scene/ShadowMap.js +9 -3
- package/Source/Scene/ShadowMapShader.js +50 -2
- package/Source/Scene/SnapFramebuffer.js +121 -0
- package/Source/Scene/Snapping.js +184 -0
- package/Source/Scene/TerrainFillMesh.js +3 -2
- package/Source/Scene/UrlTemplate3DTilesDataProvider.js +1 -1
- package/Source/Scene/Vector3DTileContent.js +2 -3
- package/Source/Scene/VectorGltf3DTileContent.js +23 -3
- package/Source/Scene/View.js +10 -8
- package/Source/Scene/VoxelTraversal.js +1 -1
- package/Source/Scene/createElevationBandMaterial.js +1 -1
- package/Source/Scene/renderBufferPointCollection.js +1 -2
- package/Source/Scene/renderBufferPolygonCollection.js +1 -2
- package/Source/Scene/renderBufferPolylineCollection.js +1 -2
- 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/passCesium3DTilePlanarFillId.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.js +11 -0
- package/Source/Shaders/Builtin/Constants/passClassification.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passClassification.js +1 -1
- 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/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/GlobeFS.glsl +10 -5
- package/Source/Shaders/GlobeFS.js +9 -5
- package/Source/Shaders/Materials/PolylineGlowMaterial.glsl +1 -1
- package/Source/Shaders/Materials/PolylineGlowMaterial.js +1 -1
- package/Source/Shaders/Model/MaterialStageFS.glsl +8 -2
- package/Source/Shaders/Model/MaterialStageFS.js +8 -2
- package/Source/Shaders/Model/ModelFS.glsl +105 -0
- package/Source/Shaders/Model/ModelFS.js +105 -0
- package/Source/Shaders/VectorCommon.glsl +178 -0
- package/Source/Shaders/VectorCommon.js +75 -0
- package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
- package/Source/ThirdParty/zip-module.wasm +0 -0
- package/Source/Widget/CesiumWidget.js +30 -0
- package/index.d.ts +770 -10
- package/index.js +177 -160
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Cartesian2 from "../Core/Cartesian2.js";
|
|
2
2
|
import Check from "../Core/Check.js";
|
|
3
|
+
import Color from "../Core/Color.js";
|
|
3
4
|
import createGuid from "../Core/createGuid.js";
|
|
4
5
|
import Frozen from "../Core/Frozen.js";
|
|
5
6
|
import defined from "../Core/defined.js";
|
|
@@ -1123,4 +1124,14 @@ Texture.prototype.destroy = function () {
|
|
|
1123
1124
|
this._context._gl.deleteTexture(this._texture);
|
|
1124
1125
|
return destroyObject(this);
|
|
1125
1126
|
};
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* The default color used as a placeholder texture while other textures are downloaded.
|
|
1130
|
+
* This can be changed globally to customize the placeholder appearance.
|
|
1131
|
+
*
|
|
1132
|
+
* @type {Color}
|
|
1133
|
+
* @default Color.WHITE
|
|
1134
|
+
*/
|
|
1135
|
+
Texture.defaultColor = Color.WHITE;
|
|
1136
|
+
|
|
1126
1137
|
export default Texture;
|
|
@@ -37,6 +37,13 @@ function UniformState() {
|
|
|
37
37
|
* @type {Texture}
|
|
38
38
|
*/
|
|
39
39
|
this.edgeDepthTexture = undefined; // packed depth color attachment from edge pass
|
|
40
|
+
/**
|
|
41
|
+
* Texture written by the planar fill feature-ID pre-pass.
|
|
42
|
+
* Contains per-pixel feature IDs for non-behind planar fill geometry.
|
|
43
|
+
* Sampled by behind fills to test same-object coplanarity.
|
|
44
|
+
* @type {Texture}
|
|
45
|
+
*/
|
|
46
|
+
this.planarFillIdTexture = undefined;
|
|
40
47
|
/**
|
|
41
48
|
* @type {number}
|
|
42
49
|
*/
|
|
@@ -325,11 +325,6 @@ function ArcGisMapServerImageryProvider(options) {
|
|
|
325
325
|
this._credit = options.credit;
|
|
326
326
|
this._tileCredits = undefined;
|
|
327
327
|
|
|
328
|
-
let credit = options.credit;
|
|
329
|
-
if (typeof credit === "string") {
|
|
330
|
-
credit = new Credit(credit);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
328
|
/**
|
|
334
329
|
* Gets or sets a value indicating whether feature picking is enabled. If true, {@link ArcGisMapServerImageryProvider#pickFeatures} will
|
|
335
330
|
* invoke the "identify" operation on the ArcGIS server and return the features included in the response. If false,
|
|
@@ -4,7 +4,7 @@ import Resource from "../Core/Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"
|
|
7
|
+
"AAPTa7BPWL4PoZRFPJ2CM2YRclg..ub1vMOBXctC7ozMMKNnmx3ZwVTsDJAXo2GLomQ2CZjuOc2HLr1-CryeuRo9ZsV65cuZ9xN1yFKeLTu7Cxld7B97aI28os_NnuC9nvWde_l4G1DTApSHmhrVoZfKgO0bqOrsDfvvSgO-cdkUEvBASNX_4Lb9tB5fEY7lbYaWdOOWBXyZylR9il0-biB248V6HdDT1kgkSwz9esfKialRTLgxJx8AFM9is--UXK0CLvZn6JUU44PZSFuMyAT1_rgxsirsZ";
|
|
8
8
|
/**
|
|
9
9
|
* Default options for accessing the ArcGIS image tile service.
|
|
10
10
|
*
|
|
@@ -706,8 +706,9 @@ Object.defineProperties(Billboard.prototype, {
|
|
|
706
706
|
},
|
|
707
707
|
|
|
708
708
|
/**
|
|
709
|
-
*
|
|
709
|
+
* The aligned axis is the direction vector that the billboard up vector points towards.
|
|
710
710
|
* The default is the zero vector, which means the billboard is aligned to the screen up vector.
|
|
711
|
+
* Note that only the zero vector (0,0,0) resets the alignment to screen up.
|
|
711
712
|
* @memberof Billboard.prototype
|
|
712
713
|
* @type {Cartesian3}
|
|
713
714
|
* @example
|
|
@@ -1033,8 +1033,9 @@ function writeCompressedAttrib1(
|
|
|
1033
1033
|
billboard,
|
|
1034
1034
|
) {
|
|
1035
1035
|
const writer = vafWriters[attributeLocations.compressedAttribute1];
|
|
1036
|
-
|
|
1036
|
+
let alignedAxis = billboard.alignedAxis;
|
|
1037
1037
|
if (!Cartesian3.equals(alignedAxis, Cartesian3.ZERO)) {
|
|
1038
|
+
alignedAxis = Cartesian3.normalize(alignedAxis, new Cartesian3());
|
|
1038
1039
|
billboardCollection._shaderAlignedAxis = true;
|
|
1039
1040
|
}
|
|
1040
1041
|
|
|
@@ -1096,12 +1097,15 @@ function writeCompressedAttrib2(
|
|
|
1096
1097
|
? billboard.getPickId(frameState.context).color
|
|
1097
1098
|
: Color.WHITE;
|
|
1098
1099
|
const sizeInMeters = billboard.sizeInMeters ? 1.0 : 0.0;
|
|
1100
|
+
const rawAxis = billboard.alignedAxis;
|
|
1101
|
+
const normalizedAxis = !Cartesian3.equals(rawAxis, Cartesian3.ZERO)
|
|
1102
|
+
? Cartesian3.normalize(rawAxis, new Cartesian3())
|
|
1103
|
+
: rawAxis;
|
|
1099
1104
|
const validAlignedAxis =
|
|
1100
|
-
Math.abs(Cartesian3.magnitudeSquared(
|
|
1105
|
+
Math.abs(Cartesian3.magnitudeSquared(normalizedAxis) - 1.0) <
|
|
1101
1106
|
CesiumMath.EPSILON6
|
|
1102
1107
|
? 1.0
|
|
1103
1108
|
: 0.0;
|
|
1104
|
-
|
|
1105
1109
|
billboardCollection._allSizedInMeters =
|
|
1106
1110
|
billboardCollection._allSizedInMeters && sizeInMeters === 1.0;
|
|
1107
1111
|
|
|
@@ -194,7 +194,6 @@ class BufferPrimitiveCollection {
|
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
196
|
* @type {number}
|
|
197
|
-
* @protected
|
|
198
197
|
* @ignore
|
|
199
198
|
*/
|
|
200
199
|
this._positionCountMax =
|
|
@@ -249,6 +248,13 @@ class BufferPrimitiveCollection {
|
|
|
249
248
|
*/
|
|
250
249
|
this._dirtyBoundingVolume = false;
|
|
251
250
|
|
|
251
|
+
/**
|
|
252
|
+
* Monotonically increasing counter, bumped each time collection is marked "clean".
|
|
253
|
+
* @type {number}
|
|
254
|
+
* @ignore
|
|
255
|
+
*/
|
|
256
|
+
this._version = 0;
|
|
257
|
+
|
|
252
258
|
this._allocatePrimitiveBuffer();
|
|
253
259
|
this._allocatePositionBuffer();
|
|
254
260
|
this._allocateMaterialBuffer();
|
|
@@ -524,13 +530,14 @@ class BufferPrimitiveCollection {
|
|
|
524
530
|
vertices,
|
|
525
531
|
Cartesian3.ZERO,
|
|
526
532
|
3,
|
|
527
|
-
this.
|
|
533
|
+
this._boundingVolume,
|
|
528
534
|
);
|
|
529
535
|
BoundingSphere.transform(
|
|
530
|
-
this.
|
|
531
|
-
this.
|
|
532
|
-
this.
|
|
536
|
+
this._boundingVolume,
|
|
537
|
+
this._modelMatrix,
|
|
538
|
+
this._boundingVolume,
|
|
533
539
|
);
|
|
540
|
+
|
|
534
541
|
this._dirtyBoundingVolume = false;
|
|
535
542
|
}
|
|
536
543
|
|
|
@@ -660,6 +667,18 @@ class BufferPrimitiveCollection {
|
|
|
660
667
|
}
|
|
661
668
|
}
|
|
662
669
|
|
|
670
|
+
/**
|
|
671
|
+
* Marks all primitives 'clean', and updates version counter.
|
|
672
|
+
* @ignore
|
|
673
|
+
*/
|
|
674
|
+
_makeClean() {
|
|
675
|
+
if (this._dirtyCount > 0) {
|
|
676
|
+
this._dirtyCount = 0;
|
|
677
|
+
this._dirtyOffset = 0;
|
|
678
|
+
this._version++;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
663
682
|
/**
|
|
664
683
|
* Marks collection bounding volume as 'dirty', to be updated on next render,
|
|
665
684
|
* if automatic bounding volume updates are enabled.
|
|
@@ -771,6 +790,9 @@ class BufferPrimitiveCollection {
|
|
|
771
790
|
* @readonly
|
|
772
791
|
*/
|
|
773
792
|
get boundingVolume() {
|
|
793
|
+
if (this._dirtyBoundingVolume) {
|
|
794
|
+
this._updateBoundingVolume();
|
|
795
|
+
}
|
|
774
796
|
return this._boundingVolume;
|
|
775
797
|
}
|
|
776
798
|
|
package/Source/Scene/Camera.js
CHANGED
|
@@ -3,6 +3,7 @@ import Cartesian2 from "../Core/Cartesian2.js";
|
|
|
3
3
|
import Cartesian3 from "../Core/Cartesian3.js";
|
|
4
4
|
import Cartesian4 from "../Core/Cartesian4.js";
|
|
5
5
|
import Cartographic from "../Core/Cartographic.js";
|
|
6
|
+
import Check from "../Core/Check.js";
|
|
6
7
|
import Frozen from "../Core/Frozen.js";
|
|
7
8
|
import defined from "../Core/defined.js";
|
|
8
9
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
@@ -2356,7 +2357,7 @@ const scratchLookAtHeadingPitchRangeQuaternion1 = new Quaternion();
|
|
|
2356
2357
|
const scratchLookAtHeadingPitchRangeQuaternion2 = new Quaternion();
|
|
2357
2358
|
const scratchHeadingPitchRangeMatrix3 = new Matrix3();
|
|
2358
2359
|
|
|
2359
|
-
function offsetFromHeadingPitchRange(heading, pitch, range) {
|
|
2360
|
+
function offsetFromHeadingPitchRange(heading, pitch, range, result) {
|
|
2360
2361
|
pitch = CesiumMath.clamp(
|
|
2361
2362
|
pitch,
|
|
2362
2363
|
-CesiumMath.PI_OVER_TWO,
|
|
@@ -2380,10 +2381,7 @@ function offsetFromHeadingPitchRange(heading, pitch, range) {
|
|
|
2380
2381
|
scratchHeadingPitchRangeMatrix3,
|
|
2381
2382
|
);
|
|
2382
2383
|
|
|
2383
|
-
const offset = Cartesian3.clone(
|
|
2384
|
-
Cartesian3.UNIT_X,
|
|
2385
|
-
scratchLookAtHeadingPitchRangeOffset,
|
|
2386
|
-
);
|
|
2384
|
+
const offset = Cartesian3.clone(Cartesian3.UNIT_X, result);
|
|
2387
2385
|
Matrix3.multiplyByVector(rotMatrix, offset, offset);
|
|
2388
2386
|
Cartesian3.negate(offset, offset);
|
|
2389
2387
|
Cartesian3.multiplyByScalar(offset, range, offset);
|
|
@@ -2441,6 +2439,7 @@ Camera.prototype.lookAtTransform = function (transform, offset) {
|
|
|
2441
2439
|
offset.heading,
|
|
2442
2440
|
offset.pitch,
|
|
2443
2441
|
offset.range,
|
|
2442
|
+
scratchLookAtHeadingPitchRangeOffset,
|
|
2444
2443
|
);
|
|
2445
2444
|
} else {
|
|
2446
2445
|
cartesianOffset = offset;
|
|
@@ -2492,6 +2491,72 @@ Camera.prototype.lookAtTransform = function (transform, offset) {
|
|
|
2492
2491
|
this._adjustOrthographicFrustum(true);
|
|
2493
2492
|
};
|
|
2494
2493
|
|
|
2494
|
+
const scratchLookAtWorldPositionTransform = new Matrix4();
|
|
2495
|
+
const scratchLookAtWorldPositionDirection = new Cartesian3();
|
|
2496
|
+
const scratchLookAtWorldPositionWorldUp = new Cartesian3();
|
|
2497
|
+
const scratchLookAtWorldPositionRight = new Cartesian3();
|
|
2498
|
+
|
|
2499
|
+
/**
|
|
2500
|
+
* Sets the camera orientation to look at a target position in world coordinates. The camera's up vector will be oriented to the world up vector at the target position.
|
|
2501
|
+
* If the camera is at the target position, the camera will be oriented to the world up vector at the target position.
|
|
2502
|
+
* @param {Cartesian3} target The target position in world coordinates.
|
|
2503
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to use for determining the world up.
|
|
2504
|
+
*/
|
|
2505
|
+
Camera.prototype.lookAtWorldPosition = function (
|
|
2506
|
+
target,
|
|
2507
|
+
ellipsoid = Ellipsoid.default,
|
|
2508
|
+
) {
|
|
2509
|
+
//>>includeStart('debug', pragmas.debug);
|
|
2510
|
+
Check.typeOf.object("target", target);
|
|
2511
|
+
Check.typeOf.object("ellipsoid", ellipsoid);
|
|
2512
|
+
//>>includeEnd('debug');
|
|
2513
|
+
|
|
2514
|
+
const transform = Matrix4.clone(
|
|
2515
|
+
this._transform,
|
|
2516
|
+
scratchLookAtWorldPositionTransform,
|
|
2517
|
+
);
|
|
2518
|
+
|
|
2519
|
+
this._setTransform(Matrix4.IDENTITY);
|
|
2520
|
+
|
|
2521
|
+
// Get direction to look at target
|
|
2522
|
+
let direction = Cartesian3.subtract(
|
|
2523
|
+
target,
|
|
2524
|
+
this.positionWC,
|
|
2525
|
+
scratchLookAtWorldPositionDirection,
|
|
2526
|
+
);
|
|
2527
|
+
|
|
2528
|
+
// If the camera is at the target position, we can't look at it, but we should still continue to re-orient the camera to the world up vector at the target position.
|
|
2529
|
+
if (Cartesian3.magnitudeSquared(direction) < CesiumMath.EPSILON8) {
|
|
2530
|
+
direction = Cartesian3.clone(
|
|
2531
|
+
this.directionWC,
|
|
2532
|
+
scratchLookAtWorldPositionDirection,
|
|
2533
|
+
);
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
direction = Cartesian3.normalize(direction, this.direction);
|
|
2537
|
+
|
|
2538
|
+
// Orient the camera to the world up vector at the target position
|
|
2539
|
+
const worldUp = ellipsoid.geodeticSurfaceNormal(
|
|
2540
|
+
target,
|
|
2541
|
+
scratchLookAtWorldPositionWorldUp,
|
|
2542
|
+
);
|
|
2543
|
+
|
|
2544
|
+
let right = Cartesian3.cross(
|
|
2545
|
+
direction,
|
|
2546
|
+
worldUp,
|
|
2547
|
+
scratchLookAtWorldPositionRight,
|
|
2548
|
+
);
|
|
2549
|
+
if (Cartesian3.magnitudeSquared(right) < CesiumMath.EPSILON8) {
|
|
2550
|
+
right = Cartesian3.clone(this.rightWC, scratchLookAtWorldPositionRight);
|
|
2551
|
+
}
|
|
2552
|
+
Cartesian3.normalize(right, this.right);
|
|
2553
|
+
|
|
2554
|
+
const up = Cartesian3.cross(right, direction, this.up);
|
|
2555
|
+
Cartesian3.normalize(up, this.up);
|
|
2556
|
+
|
|
2557
|
+
this._setTransform(transform);
|
|
2558
|
+
};
|
|
2559
|
+
|
|
2495
2560
|
const viewRectangle3DCartographic1 = new Cartographic();
|
|
2496
2561
|
const viewRectangle3DCartographic2 = new Cartographic();
|
|
2497
2562
|
const viewRectangle3DNorthEast = new Cartesian3();
|
|
@@ -3621,6 +3686,7 @@ Camera.prototype.flyToBoundingSphere = function (boundingSphere, options) {
|
|
|
3621
3686
|
offset.heading,
|
|
3622
3687
|
offset.pitch,
|
|
3623
3688
|
offset.range,
|
|
3689
|
+
scratchflyToBoundingSphereDestination,
|
|
3624
3690
|
);
|
|
3625
3691
|
}
|
|
3626
3692
|
|
|
@@ -103,7 +103,7 @@ import ImageryLayerCollection from "./ImageryLayerCollection.js";
|
|
|
103
103
|
* @property {ClippingPlaneCollection} [clippingPlanes] The {@link ClippingPlaneCollection} used to selectively disable rendering the tileset.
|
|
104
104
|
* @property {ClippingPolygonCollection} [clippingPolygons] The {@link ClippingPolygonCollection} used to selectively disable rendering the tileset.
|
|
105
105
|
* @property {ClassificationType} [classificationType] Determines whether terrain, 3D Tiles or both will be classified by this tileset. See {@link Cesium3DTileset#classificationType} for details about restrictions and limitations.
|
|
106
|
-
* @property {HeightReference} [heightReference] Sets the {@link HeightReference} for
|
|
106
|
+
* @property {HeightReference} [heightReference] Sets the {@link HeightReference} for features in vector tilesets.
|
|
107
107
|
* @property {Scene} [scene] The {@link CesiumWidget#scene} that the tileset will be rendered in, required for tilesets that specify a {@link heightReference} value for clamping 3D Tiles vector data content- like points, lines, and labels- to terrain or 3D tiles.
|
|
108
108
|
* @property {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid determining the size and shape of the globe.
|
|
109
109
|
* @property {object} [pointCloudShading] Options for constructing a {@link PointCloudShading} object to control point attenuation based on geometric error and lighting.
|
|
@@ -545,8 +545,8 @@ ClippingPlaneCollection.prototype.update = function (frameState) {
|
|
|
545
545
|
}
|
|
546
546
|
if (!this._multipleDirtyPlanes) {
|
|
547
547
|
// partial updates possible
|
|
548
|
-
let offsetX
|
|
549
|
-
let offsetY
|
|
548
|
+
let offsetX;
|
|
549
|
+
let offsetY;
|
|
550
550
|
if (useFloatTexture) {
|
|
551
551
|
offsetY = Math.floor(dirtyIndex / clippingPlanesTexture.width);
|
|
552
552
|
offsetX = Math.floor(dirtyIndex - offsetY * clippingPlanesTexture.width);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import DeveloperError from "../../Core/DeveloperError.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An interface for a camera controller that can be registered with the scene to handle input events, camera animations, and other interactions. Implementations of this interface are expected to be registered with the scene via a {@link ControllerHost}.
|
|
5
|
+
* This type describes an
|
|
6
|
+
* interface and is not intended to be instantiated directly.
|
|
7
|
+
* @class
|
|
8
|
+
* @abstract
|
|
9
|
+
* @see {@link HybridScreenSpacePanCameraController}
|
|
10
|
+
* @see {@link ScreenSpaceElevatorCameraController}
|
|
11
|
+
* @see {@link ScreenSpaceMapCameraController}
|
|
12
|
+
* @see {@link ScreenSpaceTiltOrbitCameraController}
|
|
13
|
+
*/
|
|
14
|
+
class Controller {
|
|
15
|
+
/**
|
|
16
|
+
* Determines if the controller is enabled and should be updated by the host scene.
|
|
17
|
+
* @type {boolean}
|
|
18
|
+
*/
|
|
19
|
+
get enabled() {
|
|
20
|
+
return DeveloperError.throwInstantiationError();
|
|
21
|
+
}
|
|
22
|
+
set enabled(value) {
|
|
23
|
+
DeveloperError.throwInstantiationError();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Invoked when the controller is added to the DOM. Implement <code>connectedCallback</code> to set up any DOM event listeners.
|
|
28
|
+
* @param {HTMLElement} element The DOM element containing the Cesium scene.
|
|
29
|
+
*/
|
|
30
|
+
connectedCallback(element) {
|
|
31
|
+
DeveloperError.throwInstantiationError();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Invoked when the controller is removed from the DOM. Implement <code>disconnectedCallback</code> to tear down any DOM event listeners.
|
|
36
|
+
* @param {HTMLElement} element The DOM element containing the Cesium scene.
|
|
37
|
+
*/
|
|
38
|
+
disconnectedCallback(element) {
|
|
39
|
+
DeveloperError.throwInstantiationError();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Invoked once per frame. Implement <code>update</code> to modify the camera or other parts of the scene.
|
|
44
|
+
* @see {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/#updaterender-cycle-events|Update/Render Cycle Events}
|
|
45
|
+
* @param {Scene} scene
|
|
46
|
+
* @param {JulianDate} time The current simulation time.
|
|
47
|
+
*/
|
|
48
|
+
update(scene, time) {
|
|
49
|
+
DeveloperError.throwInstantiationError();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Invoked when the controller is being updated the first time, immediately before <code>update</code> is called. Implement <code>firstUpdate</code> to perform one-time work after the relevant scene has begun its render loop. Some examples might include initializing simulation time values or adding a primitive to the scene.
|
|
54
|
+
* @see Controller#update
|
|
55
|
+
* @param {Scene} scene
|
|
56
|
+
* @param {JulianDate} time The current simulation time.
|
|
57
|
+
*/
|
|
58
|
+
firstUpdate(scene, time) {
|
|
59
|
+
DeveloperError.throwInstantiationError();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export default Controller;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collects an array of Controller objects that can be registered with the scene to handle input events, camera animations, and other interactions.
|
|
3
|
+
* @class
|
|
4
|
+
* @see {@link Controller}
|
|
5
|
+
* @see {@link Scene#controllerHost}
|
|
6
|
+
*/
|
|
7
|
+
class ControllerHost {
|
|
8
|
+
/**
|
|
9
|
+
* Creates an instance of a <code>ControllerHost</code>. Typically, a <code>ControllerHost</code> is created by the Scene constructor and accessed via {@link Scene#controllerHost}.
|
|
10
|
+
* @see {@link Scene#controllerHost}
|
|
11
|
+
*/
|
|
12
|
+
constructor() {
|
|
13
|
+
/**
|
|
14
|
+
* @type {Controller[]}
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
this._controllers = [];
|
|
18
|
+
this._needsUpdate = new Set();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The number of controllers registered to this host.
|
|
23
|
+
* @type {number}
|
|
24
|
+
* @readonly
|
|
25
|
+
*/
|
|
26
|
+
get controllerCount() {
|
|
27
|
+
return this._controllers.length;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Registers a controller implementation with this host.
|
|
32
|
+
* @param {Controller} controller An implementation of the Controller interface to register with this host.
|
|
33
|
+
* @param {HTMLElement} element The DOM element containing the Cesium scene.
|
|
34
|
+
* @param {number} [priority=0] An index, less than or equal to the current count of registed controllers, that defines the precedence of the new controller relative to those previously registered. A priority of <code>0</code> would mean the new controller would apply its updates before any other controller. As subsequent controllers are updated, their effects are applied on top of any previous update effects. If omitted, the new controller becomes the highest priority, i.e., its updates are applied after all other controllers.
|
|
35
|
+
*/
|
|
36
|
+
registerController(controller, element, priority) {
|
|
37
|
+
const index = priority ?? this.controllerCount;
|
|
38
|
+
this._controllers.splice(index, 0, controller);
|
|
39
|
+
this._needsUpdate.add(controller);
|
|
40
|
+
controller.connectedCallback(element);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Unregisters a controller implementation from this host.
|
|
45
|
+
* @param {Controller} controller An implementation of the Controller interface to unregister from this host.
|
|
46
|
+
* @param {HTMLElement} element The DOM element containing the Cesium scene.
|
|
47
|
+
*/
|
|
48
|
+
unregisterController(controller, element) {
|
|
49
|
+
const controllers = this._controllers;
|
|
50
|
+
const index = controllers.indexOf(controller);
|
|
51
|
+
if (index !== -1) {
|
|
52
|
+
controllers.splice(index, 1);
|
|
53
|
+
controller.disconnectedCallback(element);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Invoked once per frame by the host scene. Updates all registered controllers in order of their priority.
|
|
59
|
+
* @param {Scene} scene The host scene.
|
|
60
|
+
* @param {JulianDate} time The current simulation time.
|
|
61
|
+
*/
|
|
62
|
+
update(scene, time) {
|
|
63
|
+
for (const controller of this._controllers) {
|
|
64
|
+
if (!controller.enabled) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (this._needsUpdate.has(controller)) {
|
|
69
|
+
controller.firstUpdate(scene, time);
|
|
70
|
+
this._needsUpdate.delete(controller);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
controller.update(scene, time);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export default ControllerHost;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import ScreenSpaceElevatorCameraController from "./ScreenSpaceElevatorCameraController.js";
|
|
2
|
+
import ScreenSpaceMapCameraController from "./ScreenSpaceMapCameraController.js";
|
|
3
|
+
import Cartesian3 from "../../Core/Cartesian3.js";
|
|
4
|
+
import CesiumMath from "../../Core/Math.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A contextual camera controller that combines screenspace map panning and screenspace elevator panning. The controller automatically switches between the two based on the camera's angle relative to nadir. If the camera is looking mostly down (within angleThreshold of nadir), <code>ScreenSpaceMapCameraController</code> is used.
|
|
8
|
+
* If the camera is looking towards the horizon (beyond angleThreshold from nadir), the <code>ScreenSpaceElevatorCameraController</code> is used.
|
|
9
|
+
* @implements Controller
|
|
10
|
+
* @example
|
|
11
|
+
* viewer.scene.screenSpaceCameraController.enableInputs = false;
|
|
12
|
+
* viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
|
|
13
|
+
*
|
|
14
|
+
* const hybridController = new HybridScreenSpacePanCameraController();
|
|
15
|
+
* viewer.addController(hybridController);
|
|
16
|
+
*/
|
|
17
|
+
class HybridScreenSpacePanCameraController {
|
|
18
|
+
constructor() {
|
|
19
|
+
this._elevatorController = new ScreenSpaceElevatorCameraController();
|
|
20
|
+
this._mapController = new ScreenSpaceMapCameraController();
|
|
21
|
+
|
|
22
|
+
this._enabled = true;
|
|
23
|
+
this._ellipsoidNormal = new Cartesian3();
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The angle threshold in radians that determines which controller is used. If the camera is looking within this angle of nadir, the map controller is used. Otherwise, the elevator controller is used.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @default CesiumMath.toRadians(125)
|
|
29
|
+
*/
|
|
30
|
+
this.angleThreshold = CesiumMath.toRadians(125);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
get enabled() {
|
|
34
|
+
return this._enabled;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
set enabled(value) {
|
|
38
|
+
this._enabled = value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The controller that is used when the camera is looking more horizontally (beyond angleThreshold from nadir).
|
|
43
|
+
* @type {ScreenSpaceElevatorCameraController}
|
|
44
|
+
* @readonly
|
|
45
|
+
*/
|
|
46
|
+
get elevatorController() {
|
|
47
|
+
return this._elevatorController;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The controller that is used when the camera is looking mostly down (within angleThreshold of nadir).
|
|
52
|
+
* @type {ScreenSpaceMapCameraController}
|
|
53
|
+
* @readonly
|
|
54
|
+
*/
|
|
55
|
+
get mapController() {
|
|
56
|
+
return this._mapController;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @inheritdoc
|
|
61
|
+
* @param {HTMLElement} element The DOM element containing the Cesium scene.
|
|
62
|
+
*/
|
|
63
|
+
connectedCallback(element) {
|
|
64
|
+
this._elevatorController.connectedCallback(element);
|
|
65
|
+
this._mapController.connectedCallback(element);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @inheritdoc
|
|
70
|
+
* @param {HTMLElement} element The DOM element containing the Cesium scene.
|
|
71
|
+
*/
|
|
72
|
+
disconnectedCallback(element) {
|
|
73
|
+
this._elevatorController.disconnectedCallback(element);
|
|
74
|
+
this._mapController.disconnectedCallback(element);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @inheritdoc
|
|
79
|
+
*/
|
|
80
|
+
firstUpdate() {
|
|
81
|
+
this._elevatorController.firstUpdate();
|
|
82
|
+
this._mapController.firstUpdate();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @inheritdoc
|
|
87
|
+
* @param {Scene} scene
|
|
88
|
+
*/
|
|
89
|
+
update(scene) {
|
|
90
|
+
const camera = scene.camera;
|
|
91
|
+
const normal = scene.ellipsoid.geodeticSurfaceNormal(
|
|
92
|
+
camera.positionWC,
|
|
93
|
+
this._ellipsoidNormal,
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
const angle = Math.abs(Cartesian3.angleBetween(normal, camera.directionWC));
|
|
97
|
+
const activeController =
|
|
98
|
+
angle < this.angleThreshold && angle > Math.PI - this.angleThreshold
|
|
99
|
+
? this._elevatorController
|
|
100
|
+
: this._mapController;
|
|
101
|
+
|
|
102
|
+
activeController.update(scene);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export default HybridScreenSpacePanCameraController;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This enumerated type is for classifying mouse buttons: left, middle, and right.
|
|
5
|
+
* @enum {number}
|
|
6
|
+
*/
|
|
7
|
+
const MouseButton = {
|
|
8
|
+
/**
|
|
9
|
+
* Represents a mouse left button.
|
|
10
|
+
* @type {number}
|
|
11
|
+
* @constant
|
|
12
|
+
*/
|
|
13
|
+
LEFT: 0,
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents a mouse middle button.
|
|
17
|
+
* @type {number}
|
|
18
|
+
* @constant
|
|
19
|
+
*/
|
|
20
|
+
MIDDLE: 1,
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents a mouse right button.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @constant
|
|
26
|
+
*/
|
|
27
|
+
RIGHT: 2,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
Object.freeze(MouseButton);
|
|
31
|
+
|
|
32
|
+
export default MouseButton;
|