@hztxi/cesium-engine 25.0.7 → 26.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Workers/chunk-2FNKHQL3.js +754 -0
- package/Build/Workers/chunk-2NCNUVAT.js +56 -0
- package/Build/Workers/chunk-2ZYRUVVU.js +301 -0
- package/Build/Workers/chunk-36IU7N4V.js +1284 -0
- package/Build/Workers/chunk-3BDLET5S.js +198 -0
- package/Build/Workers/chunk-3JZXI44G.js +3822 -0
- package/Build/Workers/chunk-3N2UNLWJ.js +101 -0
- package/Build/Workers/chunk-3NCG2YYR.js +58 -0
- package/Build/Workers/chunk-3PRHI4KX.js +241 -0
- package/Build/Workers/chunk-3R6E2SH4.js +672 -0
- package/Build/Workers/chunk-3ZKKXEXL.js +415 -0
- package/Build/Workers/chunk-47KVKPTO.js +415 -0
- package/Build/Workers/chunk-4FFIJ7ZV.js +56 -0
- package/Build/Workers/chunk-4N227IPR.js +973 -0
- package/Build/Workers/chunk-4P6OAPBM.js +97 -0
- package/Build/Workers/chunk-4XR3K4GD.js +280 -0
- package/Build/Workers/chunk-4Z2JINRS.js +519 -0
- package/Build/Workers/chunk-4ZOLEPZK.js +519 -0
- package/Build/Workers/chunk-5EF3WWQG.js +352 -0
- package/Build/Workers/chunk-5I76476T.js +288 -0
- package/Build/Workers/chunk-5PBZKBAP.js +511 -0
- package/Build/Workers/chunk-5RVAAW26.js +82 -0
- package/Build/Workers/chunk-5VWK76PO.js +511 -0
- package/Build/Workers/chunk-6SEICASZ.js +241 -0
- package/Build/Workers/chunk-77DBX23X.js +455 -0
- package/Build/Workers/chunk-7C2D3DTI.js +959 -0
- package/Build/Workers/chunk-7GQOWCSN.js +959 -0
- package/Build/Workers/chunk-7J2ONMKC.js +198 -0
- package/Build/Workers/chunk-7MHUHXZZ.js +219 -0
- package/Build/Workers/chunk-7MQPHOAS.js +455 -0
- package/Build/Workers/chunk-7NJ5O7TP.js +387 -0
- package/Build/Workers/chunk-7T4MW2W4.js +368 -0
- package/Build/Workers/chunk-7UXZUGUZ.js +82 -0
- package/Build/Workers/chunk-7Y642MCO.js +352 -0
- package/Build/Workers/chunk-7ZFKBLUE.js +1054 -0
- package/Build/Workers/chunk-A2UHPWPL.js +38 -0
- package/Build/Workers/chunk-A7LGY5XS.js +140 -0
- package/Build/Workers/chunk-AN2NVYL6.js +1483 -0
- package/Build/Workers/chunk-AS2QC7H2.js +219 -0
- package/Build/Workers/chunk-AVOLMIGJ.js +57 -0
- package/Build/Workers/chunk-B7PT2VL5.js +630 -0
- package/Build/Workers/chunk-BHRHMUDM.js +147 -0
- package/Build/Workers/chunk-BUWAHRK5.js +672 -0
- package/Build/Workers/chunk-C5ET5HON.js +198 -0
- package/Build/Workers/chunk-C6XQGBPV.js +476 -0
- package/Build/Workers/chunk-C7B672RR.js +73 -0
- package/Build/Workers/chunk-CAEC5DA2.js +57 -0
- package/Build/Workers/chunk-CBCOHH5O.js +837 -0
- package/Build/Workers/chunk-CEMXKBQO.js +1800 -0
- package/Build/Workers/chunk-CKW3STKA.js +1067 -0
- package/Build/Workers/chunk-CV5RICKT.js +1992 -0
- package/Build/Workers/chunk-DBWSISJT.js +56 -0
- package/Build/Workers/chunk-DCMOBPLG.js +352 -0
- package/Build/Workers/chunk-DSBSPPPJ.js +1344 -0
- package/Build/Workers/chunk-DSGLDRTI.js +278 -0
- package/Build/Workers/chunk-DXD7OPSP.js +1992 -0
- package/Build/Workers/chunk-DXECZBSA.js +368 -0
- package/Build/Workers/chunk-DZIRO6ZK.js +682 -0
- package/Build/Workers/chunk-E4CRPGX5.js +140 -0
- package/Build/Workers/chunk-E4IVMEBH.js +52 -0
- package/Build/Workers/chunk-E6IPM6HP.js +56 -0
- package/Build/Workers/chunk-EB2HAHRY.js +1054 -0
- package/Build/Workers/chunk-ECDCQXCO.js +1992 -0
- package/Build/Workers/chunk-ECN3VUMA.js +73 -0
- package/Build/Workers/chunk-ECSKVHUB.js +476 -0
- package/Build/Workers/chunk-EIENGLA5.js +278 -0
- package/Build/Workers/chunk-EK5CWDW2.js +476 -0
- package/Build/Workers/chunk-EL4B5CSQ.js +162 -0
- package/Build/Workers/chunk-EUCUBIEZ.js +97 -0
- package/Build/Workers/chunk-FAYBQGKO.js +219 -0
- package/Build/Workers/chunk-FGCXPEZM.js +3201 -0
- package/Build/Workers/chunk-FHCRXPA6.js +44 -0
- package/Build/Workers/chunk-FM6EQUFX.js +1800 -0
- package/Build/Workers/chunk-FPFGGQ4X.js +301 -0
- package/Build/Workers/chunk-FQ42MT7M.js +58 -0
- package/Build/Workers/chunk-FQDYQG4P.js +1284 -0
- package/Build/Workers/chunk-FQTV6W3I.js +973 -0
- package/Build/Workers/chunk-FTCBY5HH.js +138 -0
- package/Build/Workers/chunk-GI5RWJAY.js +101 -0
- package/Build/Workers/chunk-GNLMSDRO.js +945 -0
- package/Build/Workers/chunk-GTA727KQ.js +140 -0
- package/Build/Workers/chunk-GVUJ6O3R.js +73 -0
- package/Build/Workers/chunk-GXTM7AG3.js +1483 -0
- package/Build/Workers/chunk-HAXQB2FS.js +2719 -0
- package/Build/Workers/chunk-HCGU7OCG.js +97 -0
- package/Build/Workers/chunk-HRIPVWSC.js +58 -0
- package/Build/Workers/chunk-IC3BR6SC.js +102 -0
- package/Build/Workers/chunk-IEPPOHF3.js +44 -0
- package/Build/Workers/chunk-IU3YAYPT.js +1344 -0
- package/Build/Workers/chunk-J3AXZ4WC.js +124 -0
- package/Build/Workers/chunk-J7MZR7B2.js +1483 -0
- package/Build/Workers/chunk-KBNW776Q.js +305 -0
- package/Build/Workers/chunk-KBSWXVSY.js +837 -0
- package/Build/Workers/chunk-KEYTLNVK.js +1067 -0
- package/Build/Workers/chunk-KN3RQWUA.js +3201 -0
- package/Build/Workers/chunk-KSIEJYNL.js +3822 -0
- package/Build/Workers/chunk-KT3GG7AW.js +754 -0
- package/Build/Workers/chunk-KYCEM22I.js +1800 -0
- package/Build/Workers/chunk-L2TFZKN6.js +455 -0
- package/Build/Workers/chunk-LHKE2VUR.js +945 -0
- package/Build/Workers/chunk-LJTQW46H.js +57 -0
- package/Build/Workers/chunk-LMQGYJME.js +672 -0
- package/Build/Workers/chunk-LOBYJQA4.js +76 -0
- package/Build/Workers/chunk-LOF32O7F.js +163 -0
- package/Build/Workers/chunk-LOTIJA7D.js +124 -0
- package/Build/Workers/chunk-M7Z3MPAX.js +973 -0
- package/Build/Workers/chunk-MHNLTQHO.js +3201 -0
- package/Build/Workers/chunk-MICPAD7R.js +398 -0
- package/Build/Workers/chunk-ML7OMD72.js +2342 -0
- package/Build/Workers/chunk-MPJ73WMH.js +138 -0
- package/Build/Workers/chunk-MUTHG7T7.js +171 -0
- package/Build/Workers/chunk-NBTGXEMT.js +945 -0
- package/Build/Workers/chunk-NQZC37F7.js +38 -0
- package/Build/Workers/chunk-O3X3D2Z3.js +352 -0
- package/Build/Workers/chunk-OBUIHPKF.js +352 -0
- package/Build/Workers/chunk-PAEWNYIV.js +138 -0
- package/Build/Workers/chunk-PANJ7YH6.js +102 -0
- package/Build/Workers/chunk-PCL3Y7H5.js +82 -0
- package/Build/Workers/chunk-PHUELDXQ.js +76 -0
- package/Build/Workers/chunk-PIIUGRQD.js +387 -0
- package/Build/Workers/chunk-POKD22OT.js +2719 -0
- package/Build/Workers/chunk-PQMA7MFS.js +9237 -0
- package/Build/Workers/chunk-PQZW2QZG.js +163 -0
- package/Build/Workers/chunk-PURIPUSY.js +682 -0
- package/Build/Workers/chunk-QQZPPXY4.js +3822 -0
- package/Build/Workers/chunk-QXLQLGL2.js +1067 -0
- package/Build/Workers/chunk-R2JQAAU7.js +630 -0
- package/Build/Workers/chunk-RC4YC3VU.js +278 -0
- package/Build/Workers/chunk-RGNNWVR6.js +171 -0
- package/Build/Workers/chunk-RUOETBWP.js +288 -0
- package/Build/Workers/chunk-RV4EPLBO.js +2342 -0
- package/Build/Workers/chunk-SBBIEHYT.js +44 -0
- package/Build/Workers/chunk-SBEQLEO5.js +352 -0
- package/Build/Workers/chunk-SGC2GT3Y.js +1284 -0
- package/Build/Workers/chunk-SKLK4CBL.js +162 -0
- package/Build/Workers/chunk-SWVZTU6X.js +305 -0
- package/Build/Workers/chunk-T3EUPM5A.js +454 -0
- package/Build/Workers/chunk-TA6IU2XL.js +171 -0
- package/Build/Workers/chunk-TLSGD5TR.js +280 -0
- package/Build/Workers/chunk-TNDQT5AB.js +682 -0
- package/Build/Workers/chunk-TOXDLWKZ.js +368 -0
- package/Build/Workers/chunk-TZBM6TAB.js +124 -0
- package/Build/Workers/chunk-U2OY6MX6.js +398 -0
- package/Build/Workers/chunk-UCY4B5EV.js +288 -0
- package/Build/Workers/chunk-V52FEPCV.js +754 -0
- package/Build/Workers/chunk-VBEXZBG5.js +147 -0
- package/Build/Workers/chunk-VC76B6GM.js +959 -0
- package/Build/Workers/chunk-VCUOYHWC.js +519 -0
- package/Build/Workers/chunk-VDBQVKTF.js +387 -0
- package/Build/Workers/chunk-VJIL5H6K.js +2719 -0
- package/Build/Workers/chunk-VJLDRHKN.js +511 -0
- package/Build/Workers/chunk-VMF7KOGY.js +162 -0
- package/Build/Workers/chunk-W3X2ZAEJ.js +52 -0
- package/Build/Workers/chunk-W5OCKMPJ.js +101 -0
- package/Build/Workers/chunk-X4VZ33YL.js +454 -0
- package/Build/Workers/chunk-XDM5A6C4.js +102 -0
- package/Build/Workers/chunk-XHT5SVP4.js +52 -0
- package/Build/Workers/chunk-XITBARMZ.js +2342 -0
- package/Build/Workers/chunk-XLQZNQ4Z.js +163 -0
- package/Build/Workers/chunk-XZ6HDXKM.js +76 -0
- package/Build/Workers/chunk-Y6AQK4FY.js +1344 -0
- package/Build/Workers/chunk-Y7NDFEQ3.js +398 -0
- package/Build/Workers/chunk-YBBQDYX2.js +301 -0
- package/Build/Workers/chunk-YHPYPVAB.js +837 -0
- package/Build/Workers/chunk-YJBPRW4A.js +415 -0
- package/Build/Workers/chunk-YNKK6BXY.js +454 -0
- package/Build/Workers/chunk-YRAJ74HR.js +305 -0
- package/Build/Workers/chunk-YULTZK5O.js +147 -0
- package/Build/Workers/chunk-YUNQYP3Z.js +9237 -0
- package/Build/Workers/chunk-YX2FOQMF.js +9237 -0
- package/Build/Workers/chunk-Z7BONRW2.js +241 -0
- package/Build/Workers/chunk-ZK2R3DEJ.js +1054 -0
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +18 -18
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +39 -39
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +33 -33
- package/Build/Workers/createCorridorGeometry.js +36 -37
- package/Build/Workers/createCorridorOutlineGeometry.js +34 -35
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +20 -20
- 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 +20 -20
- package/Build/Workers/createGeometry.js +25 -24
- package/Build/Workers/createGroundPolylineGeometry.js +26 -26
- package/Build/Workers/createMvtTile.js +111 -19
- package/Build/Workers/createPlaneGeometry.js +18 -18
- package/Build/Workers/createPlaneOutlineGeometry.js +17 -17
- package/Build/Workers/createPolygonGeometry.js +36 -36
- package/Build/Workers/createPolygonOutlineGeometry.js +33 -33
- package/Build/Workers/createPolylineGeometry.js +28 -28
- package/Build/Workers/createPolylineVolumeGeometry.js +38 -36
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +32 -31
- package/Build/Workers/createRectangleGeometry.js +29 -29
- package/Build/Workers/createRectangleOutlineGeometry.js +23 -23
- package/Build/Workers/createSimplePolylineGeometry.js +26 -26
- package/Build/Workers/createSphereGeometry.js +19 -19
- package/Build/Workers/createSphereOutlineGeometry.js +18 -18
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -24
- package/Build/Workers/createVectorTilePoints.js +13 -13
- package/Build/Workers/createVectorTilePolygons.js +22 -22
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -26
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +23 -23
- package/Build/Workers/createVerticesFromHeightmap.js +23 -23
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +21 -21
- package/Build/Workers/createWallGeometry.js +26 -26
- package/Build/Workers/createWallOutlineGeometry.js +26 -26
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +993 -2334
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
- package/Build/Workers/transcodeKTX2.js +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +23 -23
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -26
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +1 -5
- package/Source/Core/BoundingRectangle.js +6 -8
- package/Source/Core/BoundingSphere.js +0 -3
- package/Source/Core/Cartesian2.js +1 -1
- package/Source/Core/Cartesian3.js +1 -1
- package/Source/Core/Cartesian4.js +1 -1
- package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +3 -4
- package/Source/Core/Color.js +1 -0
- package/Source/Core/ComponentDatatype.js +35 -0
- 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/Heap.js +1 -1
- package/Source/Core/HermitePolynomialApproximation.js +215 -179
- package/Source/Core/InterpolationAlgorithm.js +58 -50
- 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/MapProjection.js +1 -0
- package/Source/Core/Math.js +59 -0
- package/Source/Core/Matrix2.js +3 -3
- package/Source/Core/Matrix3.js +3 -3
- package/Source/Core/Matrix4.js +1 -1
- 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/Resource.js +1 -1
- package/Source/Core/ScreenSpaceEventHandler.js +51 -41
- package/Source/Core/SimplePolylineGeometry.js +1 -1
- package/Source/Core/TerrainEncoding.js +2 -2
- package/Source/Core/TerrainMesh.js +3 -3
- package/Source/Core/TerrainPicker.js +180 -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/createColorRamp.js +37 -0
- package/Source/Core/getTimestamp.js +4 -2
- package/Source/Core/globalTypes.js +25 -0
- package/Source/Core/writeTextToCanvas.js +1 -0
- package/Source/DataSources/CompositeEntityCollection.js +0 -1
- package/Source/DataSources/CzmlDataSource.js +14 -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 +529 -557
- package/Source/DataSources/PathGraphics.js +8 -1
- package/Source/DataSources/PathMode.js +27 -0
- package/Source/DataSources/PathVisualizer.js +298 -1
- 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 -9
- package/Source/Renderer/Texture.js +12 -1
- package/Source/Renderer/UniformState.js +7 -0
- package/Source/Renderer/VertexArray.js +1 -1
- package/Source/Renderer/createUniform.js +346 -239
- package/Source/Renderer/createUniformArray.js +494 -381
- 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 +15 -5
- package/Source/Scene/BillboardTexture.js +5 -3
- package/Source/Scene/BufferPointCollection.js +11 -1
- package/Source/Scene/BufferPolygonCollection.js +26 -0
- package/Source/Scene/BufferPolylineCollection.js +2 -0
- package/Source/Scene/BufferPrimitiveCollection.js +105 -32
- package/Source/Scene/Camera.js +85 -9
- package/Source/Scene/CameraEventAggregator.js +30 -18
- package/Source/Scene/CameraFlightPath.js +7 -4
- package/Source/Scene/Cesium3DTile.js +102 -4
- package/Source/Scene/Cesium3DTileContent.js +195 -254
- package/Source/Scene/Cesium3DTileContentFactory.js +10 -2
- package/Source/Scene/Cesium3DTileOptimizations.js +4 -6
- package/Source/Scene/Cesium3DTileStyle.js +40 -0
- package/Source/Scene/Cesium3DTileset.js +213 -8
- package/Source/Scene/Cesium3DTilesetTraversal.js +14 -0
- package/Source/Scene/ClippingPlaneCollection.js +4 -4
- package/Source/Scene/ClippingPolygon.js +2 -0
- package/Source/Scene/ClippingPolygonCollection.js +2 -2
- package/Source/Scene/Composite3DTileContent.js +254 -292
- 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 +98 -0
- package/Source/Scene/EdgeDisplayMode.js +50 -0
- package/Source/Scene/EdgeFramebuffer.js +1 -5
- package/Source/Scene/Empty3DTileContent.js +100 -132
- package/Source/Scene/Expression.js +6 -8
- package/Source/Scene/FrameState.js +17 -0
- package/Source/Scene/GaussianSplat3DTileContent.js +436 -478
- package/Source/Scene/GeoJsonPrimitive.js +874 -0
- package/Source/Scene/Geometry3DTileContent.js +151 -185
- package/Source/Scene/Globe.js +22 -1
- package/Source/Scene/GlobeDepth.js +27 -1
- package/Source/Scene/GlobeSurfaceShaderSet.js +637 -540
- package/Source/Scene/GlobeSurfaceTile.js +575 -398
- package/Source/Scene/GlobeSurfaceTileProvider.js +1412 -1184
- package/Source/Scene/GltfBufferViewLoader.js +3 -3
- package/Source/Scene/GltfLoader.js +146 -3
- package/Source/Scene/GltfLoaderUtil.js +20 -4
- package/Source/Scene/GltfPipeline/forEachTextureInMaterial.js +10 -0
- package/Source/Scene/GltfPipeline/removeUnusedElements.js +21 -11
- package/Source/Scene/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/ImageryLayer.js +2 -2
- package/Source/Scene/ImageryLayerCollection.js +190 -6
- package/Source/Scene/Implicit3DTileContent.js +192 -216
- package/Source/Scene/ImplicitTileCoordinates.js +17 -0
- package/Source/Scene/IonImageryProvider.js +1 -5
- package/Source/Scene/Label.js +4 -4
- package/Source/Scene/LabelCollection.js +4 -1
- package/Source/Scene/MVTDataProvider.js +555 -0
- package/Source/Scene/Material.js +1 -0
- package/Source/Scene/Model/B3dmLoader.js +1 -2
- package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +82 -312
- package/Source/Scene/Model/Extensions/Gpm/GltfGpmLoader.js +4 -0
- 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 +45 -10
- package/Source/Scene/Model/Model3DTileContent.js +424 -458
- package/Source/Scene/Model/ModelClippingPlanesPipelineStage.js +28 -1
- package/Source/Scene/Model/ModelDrawCommand.js +180 -8
- package/Source/Scene/Model/ModelDrawCommands.js +4 -0
- package/Source/Scene/Model/ModelSceneGraph.js +21 -0
- package/Source/Scene/Model/ModelUtility.js +5 -0
- package/Source/Scene/Model/PickingPipelineStage.js +29 -0
- package/Source/Scene/Model/PrimitiveRenderResources.js +24 -0
- package/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js +645 -153
- package/Source/Scene/ModelComponents.js +112 -0
- package/Source/Scene/Multiple3DTileContent.js +291 -334
- package/Source/Scene/MvtLabelCandidates.js +295 -0
- package/Source/Scene/MvtLabelManager.js +1069 -0
- package/Source/Scene/Picking.js +19 -3
- package/Source/Scene/PlanarFillIdFramebuffer.js +172 -0
- package/Source/Scene/PntsParser.js +1 -1
- package/Source/Scene/PolylineCollection.js +5 -3
- package/Source/Scene/PostProcessStage.js +4 -2
- package/Source/Scene/QuadtreePrimitive.js +3 -2
- package/Source/Scene/ResourceCache.js +7 -4
- package/Source/Scene/ResourceCacheKey.js +21 -18
- package/Source/Scene/Scene.js +237 -11
- package/Source/Scene/SceneTransforms.js +6 -5
- 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/Tileset3DTileContent.js +113 -146
- package/Source/Scene/UrlTemplate3DTilesDataProvider.js +543 -0
- package/Source/Scene/Vector3DTileContent.js +207 -237
- package/Source/Scene/VectorGltf3DTileContent.js +185 -45
- package/Source/Scene/View.js +10 -8
- package/Source/Scene/VoxelPrimitive.js +159 -175
- package/Source/Scene/VoxelProvider.js +64 -91
- package/Source/Scene/VoxelTraversal.js +1 -1
- package/Source/Scene/buildVectorGltfFromMVT.js +1208 -0
- package/Source/Scene/buildVoxelCustomShader.js +199 -0
- package/Source/Scene/createElevationBandMaterial.js +1 -1
- package/Source/Scene/decodeMVT.js +877 -0
- package/Source/Scene/findMeshoptExtension.js +23 -0
- package/Source/Scene/renderBufferPointCollection.js +114 -64
- package/Source/Scene/renderBufferPolygonCollection.js +245 -53
- package/Source/Scene/renderBufferPolylineCollection.js +271 -145
- package/Source/Shaders/BillboardCollectionVS.glsl +23 -25
- package/Source/Shaders/BillboardCollectionVS.js +23 -25
- package/Source/Shaders/BufferPointMaterialFS.glsl +1 -0
- package/Source/Shaders/BufferPointMaterialFS.js +1 -0
- package/Source/Shaders/BufferPointMaterialVS.glsl +19 -9
- package/Source/Shaders/BufferPointMaterialVS.js +20 -10
- package/Source/Shaders/BufferPolygonMaterialFS.glsl +13 -0
- package/Source/Shaders/BufferPolygonMaterialFS.js +13 -0
- package/Source/Shaders/BufferPolygonMaterialVS.glsl +22 -4
- package/Source/Shaders/BufferPolygonMaterialVS.js +23 -5
- package/Source/Shaders/BufferPolylineMaterialVS.glsl +16 -2
- package/Source/Shaders/BufferPolylineMaterialVS.js +17 -3
- 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/passCesium3DTileEdgesDirect.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passCesium3DTileEdgesDirect.js +11 -0
- 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/passOverlay.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
- package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
- package/Source/Shaders/Builtin/CzmBuiltins.js +4 -0
- package/Source/Shaders/GlobeFS.glsl +10 -6
- package/Source/Shaders/GlobeFS.js +10 -6
- package/Source/Shaders/Materials/PolylineGlowMaterial.glsl +1 -1
- package/Source/Shaders/Materials/PolylineGlowMaterial.js +1 -1
- package/Source/Shaders/Model/EdgeVisibilityStageVS.glsl +0 -1
- package/Source/Shaders/Model/EdgeVisibilityStageVS.js +0 -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 +180 -0
- package/Source/ThirdParty/zip-module.wasm +0 -0
- package/Source/Widget/CesiumWidget.js +30 -0
- package/Source/Workers/createMvtTile.js +39 -0
- package/Source/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/Source/Workers/incrementallyBuildTerrainPicker.js +2 -0
- package/index.js +214 -184
- package/package.json +13 -13
|
@@ -15,10 +15,22 @@ import ModelReader from "./ModelReader.js";
|
|
|
15
15
|
import VertexAttributeSemantic from "../VertexAttributeSemantic.js";
|
|
16
16
|
import AttributeType from "../AttributeType.js";
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* 2-bit edge visibility values as defined by EXT_mesh_primitive_edge_visibility.
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
const EdgeVisibilityType = Object.freeze({
|
|
23
|
+
HIDDEN: 0,
|
|
24
|
+
SILHOUETTE: 1,
|
|
25
|
+
HARD: 2,
|
|
26
|
+
// REPEATED_HARD (3) is a secondary spec encoding for a hard edge; normalized to HARD at decode time.
|
|
27
|
+
REPEATED_HARD: 3,
|
|
28
|
+
});
|
|
29
|
+
|
|
18
30
|
/**
|
|
19
31
|
* Builds derived line geometry for model edges using EXT_mesh_primitive_edge_visibility data.
|
|
20
32
|
* It parses the encoded edge visibility bits, creates a separate edge-domain vertex array with
|
|
21
|
-
* per-edge attributes (edge type, optional feature ID,
|
|
33
|
+
* per-edge attributes (edge type, optional feature ID, adjacent face normals),
|
|
22
34
|
* sets up the required shader defines / varyings, and stores the resulting line list geometry on
|
|
23
35
|
* the render resources for a later edge rendering pass.
|
|
24
36
|
*
|
|
@@ -93,13 +105,6 @@ EdgeVisibilityPipelineStage.process = function (
|
|
|
93
105
|
"a_edgeFeatureId",
|
|
94
106
|
);
|
|
95
107
|
|
|
96
|
-
// Add silhouette normal attribute and varying for silhouette edges
|
|
97
|
-
const silhouetteNormalLocation = shaderBuilder.addAttribute(
|
|
98
|
-
"vec3",
|
|
99
|
-
"a_silhouetteNormal",
|
|
100
|
-
);
|
|
101
|
-
shaderBuilder.addVarying("vec3", "v_silhouetteNormalView", "flat");
|
|
102
|
-
|
|
103
108
|
// Add face normal attributes for silhouette detection
|
|
104
109
|
const faceNormalALocation = shaderBuilder.addAttribute(
|
|
105
110
|
"vec3",
|
|
@@ -126,11 +131,6 @@ EdgeVisibilityPipelineStage.process = function (
|
|
|
126
131
|
);
|
|
127
132
|
shaderBuilder.addVarying("float", "v_edgeOffset");
|
|
128
133
|
|
|
129
|
-
// Add varying for view space position for perspective-correct silhouette detection
|
|
130
|
-
|
|
131
|
-
// Build triangle adjacency (mapping edges to adjacent triangles) and compute per-triangle face normals.
|
|
132
|
-
const adjacencyData = buildTriangleAdjacency(primitive);
|
|
133
|
-
|
|
134
134
|
const edgeResult = extractVisibleEdges(primitive);
|
|
135
135
|
|
|
136
136
|
if (
|
|
@@ -183,7 +183,6 @@ EdgeVisibilityPipelineStage.process = function (
|
|
|
183
183
|
|
|
184
184
|
// Generate paired face normals for each unique edge (used to classify silhouette edges in the shader).
|
|
185
185
|
const edgeFaceNormals = generateEdgeFaceNormals(
|
|
186
|
-
adjacencyData,
|
|
187
186
|
edgeResult.edgeIndices,
|
|
188
187
|
edgeResult.edgeData,
|
|
189
188
|
primitive.edgeVisibility,
|
|
@@ -196,7 +195,6 @@ EdgeVisibilityPipelineStage.process = function (
|
|
|
196
195
|
renderResources,
|
|
197
196
|
frameState.context,
|
|
198
197
|
edgeTypeLocation,
|
|
199
|
-
silhouetteNormalLocation,
|
|
200
198
|
faceNormalALocation,
|
|
201
199
|
faceNormalBLocation,
|
|
202
200
|
edgeFeatureIdLocation,
|
|
@@ -259,258 +257,72 @@ EdgeVisibilityPipelineStage.process = function (
|
|
|
259
257
|
};
|
|
260
258
|
|
|
261
259
|
/**
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
260
|
+
* Generate face normal pairs for each silhouette edge from the GLB silhouetteNormals
|
|
261
|
+
* accessor. Per the spec, the accessor MUST be present for any primitive that encodes
|
|
262
|
+
* at least one silhouette edge.
|
|
265
263
|
*
|
|
266
|
-
* @param {ModelComponents.Primitive} primitive The primitive containing triangle index + position data
|
|
267
|
-
* @returns {{edgeMap:Map<string, number[]>, faceNormals:Float32Array, triangleCount:number}}
|
|
268
|
-
* @private
|
|
269
|
-
*/
|
|
270
|
-
function buildTriangleAdjacency(primitive) {
|
|
271
|
-
const indices = primitive.indices;
|
|
272
|
-
if (!defined(indices)) {
|
|
273
|
-
return {
|
|
274
|
-
edgeMap: new Map(),
|
|
275
|
-
faceNormals: new Float32Array(0),
|
|
276
|
-
triangleCount: 0,
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
const triangleIndexArray = indices.typedArray;
|
|
281
|
-
const triangleCount = Math.floor(triangleIndexArray.length / 3);
|
|
282
|
-
|
|
283
|
-
// Get vertex positions for face normal calculation
|
|
284
|
-
const positionAttribute = ModelUtility.getAttributeBySemantic(
|
|
285
|
-
primitive,
|
|
286
|
-
VertexAttributeSemantic.POSITION,
|
|
287
|
-
);
|
|
288
|
-
|
|
289
|
-
// Retrieve raw (possibly quantized) position data. If the attribute is quantized
|
|
290
|
-
// we must dequantize on the CPU here because we compute face normals and silhouette
|
|
291
|
-
// classification data before the vertex shader's dequantization stage runs.
|
|
292
|
-
let positions = defined(positionAttribute.typedArray)
|
|
293
|
-
? positionAttribute.typedArray
|
|
294
|
-
: ModelReader.readAttributeAsTypedArray(positionAttribute);
|
|
295
|
-
|
|
296
|
-
const quantization = positionAttribute.quantization;
|
|
297
|
-
if (defined(quantization) && !quantization.octEncoded) {
|
|
298
|
-
const count = positions.length; // length is 3 * vertexCount
|
|
299
|
-
const dequantized = new Float32Array(count);
|
|
300
|
-
const offset = quantization.quantizedVolumeOffset;
|
|
301
|
-
const step = quantization.quantizedVolumeStepSize;
|
|
302
|
-
for (let i = 0; i < count; i += 3) {
|
|
303
|
-
dequantized[i] = offset.x + positions[i] * step.x;
|
|
304
|
-
dequantized[i + 1] = offset.y + positions[i + 1] * step.y;
|
|
305
|
-
dequantized[i + 2] = offset.z + positions[i + 2] * step.z;
|
|
306
|
-
}
|
|
307
|
-
positions = dequantized;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// Build edge map: key = "min,max", value = [triangleA, triangleB?]
|
|
311
|
-
const edgeMap = new Map();
|
|
312
|
-
|
|
313
|
-
// Calculate face normals for each triangle (model space)
|
|
314
|
-
const faceNormals = new Float32Array(triangleCount * 3);
|
|
315
|
-
|
|
316
|
-
// Scratch vectors to avoid heap allocations per triangle
|
|
317
|
-
const scratchP0 = new Cartesian3();
|
|
318
|
-
const scratchP1 = new Cartesian3();
|
|
319
|
-
const scratchP2 = new Cartesian3();
|
|
320
|
-
const scratchE1 = new Cartesian3();
|
|
321
|
-
const scratchE2 = new Cartesian3();
|
|
322
|
-
const scratchCross = new Cartesian3();
|
|
323
|
-
|
|
324
|
-
function processEdge(a, b, triIndex) {
|
|
325
|
-
const edgeKey = `${a < b ? a : b},${a < b ? b : a}`;
|
|
326
|
-
let list = edgeMap.get(edgeKey);
|
|
327
|
-
if (!defined(list)) {
|
|
328
|
-
list = [];
|
|
329
|
-
edgeMap.set(edgeKey, list);
|
|
330
|
-
}
|
|
331
|
-
if (list.length < 2) {
|
|
332
|
-
list.push(triIndex);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
for (let t = 0; t < triangleCount; t++) {
|
|
337
|
-
const base = t * 3;
|
|
338
|
-
const i0 = triangleIndexArray[base];
|
|
339
|
-
const i1 = triangleIndexArray[base + 1];
|
|
340
|
-
const i2 = triangleIndexArray[base + 2];
|
|
341
|
-
|
|
342
|
-
const i0o = i0 * 3;
|
|
343
|
-
const i1o = i1 * 3;
|
|
344
|
-
const i2o = i2 * 3;
|
|
345
|
-
|
|
346
|
-
scratchP0.x = positions[i0o];
|
|
347
|
-
scratchP0.y = positions[i0o + 1];
|
|
348
|
-
scratchP0.z = positions[i0o + 2];
|
|
349
|
-
scratchP1.x = positions[i1o];
|
|
350
|
-
scratchP1.y = positions[i1o + 1];
|
|
351
|
-
scratchP1.z = positions[i1o + 2];
|
|
352
|
-
scratchP2.x = positions[i2o];
|
|
353
|
-
scratchP2.y = positions[i2o + 1];
|
|
354
|
-
scratchP2.z = positions[i2o + 2];
|
|
355
|
-
|
|
356
|
-
Cartesian3.subtract(scratchP1, scratchP0, scratchE1);
|
|
357
|
-
Cartesian3.subtract(scratchP2, scratchP0, scratchE2);
|
|
358
|
-
Cartesian3.cross(scratchE1, scratchE2, scratchCross);
|
|
359
|
-
|
|
360
|
-
// Skip degenerate triangles: a zero or non-finite cross product cannot be
|
|
361
|
-
// safely normalized and would produce invalid face normals.
|
|
362
|
-
const crossMagnitudeSquared = Cartesian3.magnitudeSquared(scratchCross);
|
|
363
|
-
if (
|
|
364
|
-
crossMagnitudeSquared === 0.0 ||
|
|
365
|
-
!Number.isFinite(crossMagnitudeSquared)
|
|
366
|
-
) {
|
|
367
|
-
continue;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
Cartesian3.multiplyByScalar(
|
|
371
|
-
scratchCross,
|
|
372
|
-
1.0 / Math.sqrt(crossMagnitudeSquared),
|
|
373
|
-
scratchCross,
|
|
374
|
-
);
|
|
375
|
-
|
|
376
|
-
faceNormals[base] = scratchCross.x;
|
|
377
|
-
faceNormals[base + 1] = scratchCross.y;
|
|
378
|
-
faceNormals[base + 2] = scratchCross.z;
|
|
379
|
-
|
|
380
|
-
// Register edges
|
|
381
|
-
processEdge(i0, i1, t);
|
|
382
|
-
processEdge(i1, i2, t);
|
|
383
|
-
processEdge(i2, i0, t);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
return { edgeMap, faceNormals, triangleCount };
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Generate face normal pairs for each edge. Silhouette edges use normals from the GLB
|
|
391
|
-
* silhouetteNormals accessor if available. Boundary edges synthesize the opposite normal
|
|
392
|
-
* as the negation of the first triangle's normal.
|
|
393
|
-
*
|
|
394
|
-
* @param {{edgeMap:Map<string,number[]>, faceNormals:Float32Array}} adjacencyData Triangle adjacency data
|
|
395
264
|
* @param {number[]} edgeIndices Packed array of 2 vertex indices per edge
|
|
396
|
-
* @param {Object[]} edgeData Array of edge metadata (edgeType,
|
|
265
|
+
* @param {Object[]} edgeData Array of edge metadata (edgeType, silhouetteEdgeIndex)
|
|
397
266
|
* @param {Object} edgeVisibility Edge visibility extension data
|
|
398
267
|
* @returns {Float32Array} Packed array: 6 floats per edge (normalA.xyz, normalB.xyz)
|
|
399
268
|
* @private
|
|
400
269
|
*/
|
|
401
|
-
function generateEdgeFaceNormals(
|
|
402
|
-
adjacencyData,
|
|
403
|
-
edgeIndices,
|
|
404
|
-
edgeData,
|
|
405
|
-
edgeVisibility,
|
|
406
|
-
) {
|
|
407
|
-
const { edgeMap, faceNormals } = adjacencyData;
|
|
270
|
+
function generateEdgeFaceNormals(edgeIndices, edgeData, edgeVisibility) {
|
|
408
271
|
const numEdges = edgeIndices.length / 2;
|
|
409
272
|
const edgeFaceNormals = new Float32Array(numEdges * 6);
|
|
410
273
|
|
|
411
|
-
const
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
scratchNormal.y = 0;
|
|
435
|
-
scratchNormal.z = 1;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
silhouetteNormalsFloat[i * 3] = scratchNormal.x;
|
|
439
|
-
silhouetteNormalsFloat[i * 3 + 1] = scratchNormal.y;
|
|
440
|
-
silhouetteNormalsFloat[i * 3 + 2] = scratchNormal.z;
|
|
274
|
+
const raw = edgeVisibility.silhouetteNormals;
|
|
275
|
+
if (!defined(raw)) {
|
|
276
|
+
// No silhouette edges in this primitive, the shader only checks normals for SILHOUETTE edges.
|
|
277
|
+
return edgeFaceNormals;
|
|
278
|
+
}
|
|
279
|
+
// raw is a packed typed array (x0,y0,z0, x1,y1,z1, ...) of float, byte, or
|
|
280
|
+
// short components. The vectors are normalized below, which cancels the
|
|
281
|
+
// quantization scale, so raw components can be used directly for all three.
|
|
282
|
+
const normalCount = raw.length / 3;
|
|
283
|
+
const silhouetteNormalsFloat = new Float32Array(raw.length);
|
|
284
|
+
const scratchNormal = new Cartesian3();
|
|
285
|
+
|
|
286
|
+
for (let i = 0; i < normalCount; i++) {
|
|
287
|
+
scratchNormal.x = raw[i * 3];
|
|
288
|
+
scratchNormal.y = raw[i * 3 + 1];
|
|
289
|
+
scratchNormal.z = raw[i * 3 + 2];
|
|
290
|
+
|
|
291
|
+
if (Cartesian3.magnitudeSquared(scratchNormal) > 0) {
|
|
292
|
+
Cartesian3.normalize(scratchNormal, scratchNormal);
|
|
293
|
+
} else {
|
|
294
|
+
scratchNormal.x = 0;
|
|
295
|
+
scratchNormal.y = 0;
|
|
296
|
+
scratchNormal.z = 1;
|
|
441
297
|
}
|
|
298
|
+
|
|
299
|
+
silhouetteNormalsFloat[i * 3] = scratchNormal.x;
|
|
300
|
+
silhouetteNormalsFloat[i * 3 + 1] = scratchNormal.y;
|
|
301
|
+
silhouetteNormalsFloat[i * 3 + 2] = scratchNormal.z;
|
|
442
302
|
}
|
|
443
303
|
|
|
444
304
|
for (let i = 0; i < numEdges; i++) {
|
|
445
|
-
const
|
|
446
|
-
const b = edgeIndices[i * 2 + 1];
|
|
447
|
-
const edgeKey = `${a < b ? a : b},${a < b ? b : a}`;
|
|
448
|
-
const triangleList = edgeMap.get(edgeKey);
|
|
449
|
-
|
|
450
|
-
const { edgeType, mateVertexIndex } = edgeData[i];
|
|
451
|
-
|
|
452
|
-
let nAx, nAy, nAz, nBx, nBy, nBz;
|
|
453
|
-
let usedGLBNormals = false;
|
|
454
|
-
|
|
455
|
-
// Use GLB silhouetteNormals for type=1 (SILHOUETTE) edges if available
|
|
456
|
-
if (
|
|
457
|
-
hasGLBSilhouetteNormals &&
|
|
458
|
-
silhouetteNormalsFloat &&
|
|
459
|
-
edgeType === 1 &&
|
|
460
|
-
mateVertexIndex >= 0
|
|
461
|
-
) {
|
|
462
|
-
const pairBase = mateVertexIndex * 2;
|
|
463
|
-
if ((pairBase + 1) * 3 + 2 < silhouetteNormalsFloat.length) {
|
|
464
|
-
const baseA = pairBase * 3;
|
|
465
|
-
const baseB = (pairBase + 1) * 3;
|
|
466
|
-
|
|
467
|
-
nAx = silhouetteNormalsFloat[baseA];
|
|
468
|
-
nAy = silhouetteNormalsFloat[baseA + 1];
|
|
469
|
-
nAz = silhouetteNormalsFloat[baseA + 2];
|
|
470
|
-
nBx = silhouetteNormalsFloat[baseB];
|
|
471
|
-
nBy = silhouetteNormalsFloat[baseB + 1];
|
|
472
|
-
nBz = silhouetteNormalsFloat[baseB + 2];
|
|
473
|
-
|
|
474
|
-
usedGLBNormals = true;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
305
|
+
const { edgeType, silhouetteEdgeIndex } = edgeData[i];
|
|
477
306
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
if (!defined(triangleList) || triangleList.length === 0) {
|
|
482
|
-
continue;
|
|
483
|
-
}
|
|
307
|
+
if (edgeType !== EdgeVisibilityType.SILHOUETTE || silhouetteEdgeIndex < 0) {
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
484
310
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
nAy = faceNormals[aBase + 1];
|
|
489
|
-
nAz = faceNormals[aBase + 2];
|
|
490
|
-
|
|
491
|
-
const isManifold = triangleList.length > 1;
|
|
492
|
-
|
|
493
|
-
if (isManifold) {
|
|
494
|
-
const tB = triangleList[1];
|
|
495
|
-
const bBase = tB * 3;
|
|
496
|
-
nBx = faceNormals[bBase];
|
|
497
|
-
nBy = faceNormals[bBase + 1];
|
|
498
|
-
nBz = faceNormals[bBase + 2];
|
|
499
|
-
} else {
|
|
500
|
-
// Boundary edge – synthesize opposite normal
|
|
501
|
-
nBx = -nAx;
|
|
502
|
-
nBy = -nAy;
|
|
503
|
-
nBz = -nAz;
|
|
504
|
-
}
|
|
311
|
+
const pairBase = silhouetteEdgeIndex * 2;
|
|
312
|
+
if ((pairBase + 1) * 3 + 2 >= silhouetteNormalsFloat.length) {
|
|
313
|
+
continue;
|
|
505
314
|
}
|
|
506
315
|
|
|
316
|
+
const baseA = pairBase * 3;
|
|
317
|
+
const baseB = (pairBase + 1) * 3;
|
|
507
318
|
const baseIdx = i * 6;
|
|
508
|
-
|
|
509
|
-
edgeFaceNormals[baseIdx
|
|
510
|
-
edgeFaceNormals[baseIdx +
|
|
511
|
-
edgeFaceNormals[baseIdx +
|
|
512
|
-
edgeFaceNormals[baseIdx +
|
|
513
|
-
edgeFaceNormals[baseIdx +
|
|
319
|
+
|
|
320
|
+
edgeFaceNormals[baseIdx] = silhouetteNormalsFloat[baseA];
|
|
321
|
+
edgeFaceNormals[baseIdx + 1] = silhouetteNormalsFloat[baseA + 1];
|
|
322
|
+
edgeFaceNormals[baseIdx + 2] = silhouetteNormalsFloat[baseA + 2];
|
|
323
|
+
edgeFaceNormals[baseIdx + 3] = silhouetteNormalsFloat[baseB];
|
|
324
|
+
edgeFaceNormals[baseIdx + 4] = silhouetteNormalsFloat[baseB + 1];
|
|
325
|
+
edgeFaceNormals[baseIdx + 5] = silhouetteNormalsFloat[baseB + 2];
|
|
514
326
|
}
|
|
515
327
|
|
|
516
328
|
return edgeFaceNormals;
|
|
@@ -520,10 +332,10 @@ function generateEdgeFaceNormals(
|
|
|
520
332
|
* Parse the EXT_mesh_primitive_edge_visibility 2-bit edge encoding and extract
|
|
521
333
|
* a unique set of edges that should be considered for rendering. Edge types:
|
|
522
334
|
* <ul>
|
|
523
|
-
* <li>
|
|
524
|
-
* <li>
|
|
525
|
-
* <li>
|
|
526
|
-
* <li>
|
|
335
|
+
* <li><code>EdgeVisibilityType.HIDDEN</code> - skipped</li>
|
|
336
|
+
* <li><code>EdgeVisibilityType.SILHOUETTE</code> - candidates for conditional display based on facing</li>
|
|
337
|
+
* <li><code>EdgeVisibilityType.HARD</code> - always displayed</li>
|
|
338
|
+
* <li><code>EdgeVisibilityType.REPEATED_HARD</code> - secondary encoding for a hard edge (treated same as HARD)</li>
|
|
527
339
|
* </ul>
|
|
528
340
|
* Deduplicates edges shared by adjacent triangles and records per-edge metadata.
|
|
529
341
|
*
|
|
@@ -597,7 +409,7 @@ function extractVisibleEdges(primitive) {
|
|
|
597
409
|
const byte = visibilityArray[byteIndex];
|
|
598
410
|
const visibility2Bit = (byte >> bitPairOffset) & 0x3;
|
|
599
411
|
|
|
600
|
-
if (visibility2Bit ===
|
|
412
|
+
if (visibility2Bit === EdgeVisibilityType.HIDDEN) {
|
|
601
413
|
continue;
|
|
602
414
|
}
|
|
603
415
|
|
|
@@ -606,25 +418,28 @@ function extractVisibleEdges(primitive) {
|
|
|
606
418
|
const edgeKey = `${small},${big}`;
|
|
607
419
|
|
|
608
420
|
if (seenEdgeHashes.has(edgeKey)) {
|
|
421
|
+
// Deduplicate edges shared by adjacent triangles. This also handles
|
|
422
|
+
// REPEATED_HARD edges (type=3): their first occurrence is recorded as
|
|
423
|
+
// HARD, and any subsequent REPEATED_HARD occurrence is skipped here.
|
|
609
424
|
continue;
|
|
610
425
|
}
|
|
611
426
|
seenEdgeHashes.add(edgeKey);
|
|
612
427
|
edgeIndices.push(a, b);
|
|
613
428
|
|
|
614
|
-
//
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
mateVertexIndex = silhouetteEdgeCount;
|
|
429
|
+
// Assign a sequential index into the silhouetteNormals accessor for SILHOUETTE edges.
|
|
430
|
+
let silhouetteEdgeIndex = -1;
|
|
431
|
+
if (visibility2Bit === EdgeVisibilityType.SILHOUETTE) {
|
|
432
|
+
silhouetteEdgeIndex = silhouetteEdgeCount;
|
|
619
433
|
silhouetteEdgeCount++;
|
|
620
434
|
}
|
|
621
435
|
|
|
622
436
|
edgeData.push({
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
437
|
+
// Normalize REPEATED_HARD to HARD — both render identically in the shader.
|
|
438
|
+
edgeType:
|
|
439
|
+
visibility2Bit === EdgeVisibilityType.REPEATED_HARD
|
|
440
|
+
? EdgeVisibilityType.HARD
|
|
441
|
+
: visibility2Bit,
|
|
442
|
+
silhouetteEdgeIndex: silhouetteEdgeIndex,
|
|
628
443
|
color: globalColor,
|
|
629
444
|
});
|
|
630
445
|
}
|
|
@@ -687,11 +502,8 @@ function extractVisibleEdges(primitive) {
|
|
|
687
502
|
seenEdgeHashes.add(edgeKey);
|
|
688
503
|
edgeIndices.push(a, b);
|
|
689
504
|
edgeData.push({
|
|
690
|
-
edgeType:
|
|
691
|
-
|
|
692
|
-
edgeIndex: -1,
|
|
693
|
-
mateVertexIndex: -1,
|
|
694
|
-
currentTriangleVertices: undefined,
|
|
505
|
+
edgeType: EdgeVisibilityType.HARD,
|
|
506
|
+
silhouetteEdgeIndex: -1,
|
|
695
507
|
color: defined(lineColor) ? lineColor : undefined,
|
|
696
508
|
});
|
|
697
509
|
}
|
|
@@ -792,7 +604,6 @@ function collectVertexColors(runtimePrimitive) {
|
|
|
792
604
|
* @param {PrimitiveRenderResources} renderResources The render resources for the primitive
|
|
793
605
|
* @param {Context} context The WebGL rendering context
|
|
794
606
|
* @param {number} edgeTypeLocation Shader attribute location for the edge type
|
|
795
|
-
* @param {number} silhouetteNormalLocation Shader attribute location for input silhouette normal
|
|
796
607
|
* @param {number} faceNormalALocation Shader attribute location for face normal A
|
|
797
608
|
* @param {number} faceNormalBLocation Shader attribute location for face normal B
|
|
798
609
|
* @param {number} edgeFeatureIdLocation Shader attribute location for optional edge feature ID
|
|
@@ -800,7 +611,7 @@ function collectVertexColors(runtimePrimitive) {
|
|
|
800
611
|
* @param {number} edgeOtherPosLocation Shader attribute location for the other endpoint position
|
|
801
612
|
* @param {number} edgeOffsetLocation Shader attribute location for edge offset (-1 or +1)
|
|
802
613
|
* @param {VertexColorInfo} [vertexColorInfo] Packed per-vertex colors (optional)
|
|
803
|
-
* @param {Object} edgeVisibility Edge visibility extension object (may contain silhouetteNormals
|
|
614
|
+
* @param {Object} edgeVisibility Edge visibility extension object (may contain silhouetteNormals, a packed typed array of VEC3 components)
|
|
804
615
|
* @param {Float32Array} edgeFaceNormals Packed face normals (6 floats per edge)
|
|
805
616
|
* @param {Object} [cumDistAttribute] Cumulative distance attribute
|
|
806
617
|
* @param {number} [edgeCumDistLocation] Cumulative distance location
|
|
@@ -813,7 +624,6 @@ function createQuadEdgeGeometry(
|
|
|
813
624
|
renderResources,
|
|
814
625
|
context,
|
|
815
626
|
edgeTypeLocation,
|
|
816
|
-
silhouetteNormalLocation,
|
|
817
627
|
faceNormalALocation,
|
|
818
628
|
faceNormalBLocation,
|
|
819
629
|
edgeFeatureIdLocation,
|
|
@@ -849,7 +659,6 @@ function createQuadEdgeGeometry(
|
|
|
849
659
|
// Create arrays for quad vertices
|
|
850
660
|
const edgePosArray = new Float32Array(totalVerts * 3);
|
|
851
661
|
const edgeTypeArray = new Float32Array(totalVerts);
|
|
852
|
-
const silhouetteNormalArray = new Float32Array(totalVerts * 3);
|
|
853
662
|
const faceNormalAArray = new Float32Array(totalVerts * 3);
|
|
854
663
|
const faceNormalBArray = new Float32Array(totalVerts * 3);
|
|
855
664
|
const edgeOtherPosArray = new Float32Array(totalVerts * 3);
|
|
@@ -1002,32 +811,6 @@ function createQuadEdgeGeometry(
|
|
|
1002
811
|
edgeCumDistArray[baseVertexIndex + 3] = cumDistB;
|
|
1003
812
|
}
|
|
1004
813
|
|
|
1005
|
-
// Set silhouette normal (same for all 4 vertices)
|
|
1006
|
-
let normalX = 0,
|
|
1007
|
-
normalY = 0,
|
|
1008
|
-
normalZ = 1;
|
|
1009
|
-
|
|
1010
|
-
if (rawType === 1 && defined(edgeVisibility.silhouetteNormals)) {
|
|
1011
|
-
const mateVertexIndex = edgeData[i].mateVertexIndex;
|
|
1012
|
-
if (
|
|
1013
|
-
mateVertexIndex >= 0 &&
|
|
1014
|
-
mateVertexIndex < edgeVisibility.silhouetteNormals.length
|
|
1015
|
-
) {
|
|
1016
|
-
const normal = edgeVisibility.silhouetteNormals[mateVertexIndex];
|
|
1017
|
-
if (defined(normal)) {
|
|
1018
|
-
normalX = normal.x;
|
|
1019
|
-
normalY = normal.y;
|
|
1020
|
-
normalZ = normal.z;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
for (let v = 0; v < 4; v++) {
|
|
1026
|
-
silhouetteNormalArray[(baseVertexIndex + v) * 3] = normalX;
|
|
1027
|
-
silhouetteNormalArray[(baseVertexIndex + v) * 3 + 1] = normalY;
|
|
1028
|
-
silhouetteNormalArray[(baseVertexIndex + v) * 3 + 2] = normalZ;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
814
|
// Set face normals (same for all 4 vertices)
|
|
1032
815
|
const faceNormalIdx = i * 6;
|
|
1033
816
|
const normalAX = edgeFaceNormals[faceNormalIdx];
|
|
@@ -1060,12 +843,6 @@ function createQuadEdgeGeometry(
|
|
|
1060
843
|
usage: BufferUsage.STATIC_DRAW,
|
|
1061
844
|
});
|
|
1062
845
|
|
|
1063
|
-
const silhouetteNormalBuffer = Buffer.createVertexBuffer({
|
|
1064
|
-
context,
|
|
1065
|
-
typedArray: silhouetteNormalArray,
|
|
1066
|
-
usage: BufferUsage.STATIC_DRAW,
|
|
1067
|
-
});
|
|
1068
|
-
|
|
1069
846
|
const faceNormalABuffer = Buffer.createVertexBuffer({
|
|
1070
847
|
context,
|
|
1071
848
|
typedArray: faceNormalAArray,
|
|
@@ -1154,13 +931,6 @@ function createQuadEdgeGeometry(
|
|
|
1154
931
|
componentDatatype: ComponentDatatype.FLOAT,
|
|
1155
932
|
normalize: false,
|
|
1156
933
|
},
|
|
1157
|
-
{
|
|
1158
|
-
index: silhouetteNormalLocation,
|
|
1159
|
-
vertexBuffer: silhouetteNormalBuffer,
|
|
1160
|
-
componentsPerAttribute: 3,
|
|
1161
|
-
componentDatatype: ComponentDatatype.FLOAT,
|
|
1162
|
-
normalize: false,
|
|
1163
|
-
},
|
|
1164
934
|
{
|
|
1165
935
|
index: faceNormalALocation,
|
|
1166
936
|
vertexBuffer: faceNormalABuffer,
|
|
@@ -30,6 +30,7 @@ function GltfGpmLoader() {}
|
|
|
30
30
|
*
|
|
31
31
|
* @param {number[]} array The input array
|
|
32
32
|
* @returns {Matrix3} The Matrix3
|
|
33
|
+
* @ignore
|
|
33
34
|
*/
|
|
34
35
|
function createCovarianceMatrixFromUpperTriangle(array) {
|
|
35
36
|
const covarianceMatrix = new Matrix3(
|
|
@@ -51,6 +52,7 @@ function createCovarianceMatrixFromUpperTriangle(array) {
|
|
|
51
52
|
*
|
|
52
53
|
* @param {object} anchorPointDirectJson The input JSON
|
|
53
54
|
* @returns {AnchorPointDirect} The direct anchor point
|
|
55
|
+
* @ignore
|
|
54
56
|
*/
|
|
55
57
|
function createAnchorPointDirect(anchorPointDirectJson) {
|
|
56
58
|
const position = Cartesian3.fromArray(
|
|
@@ -75,6 +77,7 @@ function createAnchorPointDirect(anchorPointDirectJson) {
|
|
|
75
77
|
*
|
|
76
78
|
* @param {object} anchorPointIndirectJson The input JSON
|
|
77
79
|
* @returns {AnchorPointIndirect} The indirect anchor point
|
|
80
|
+
* @ignore
|
|
78
81
|
*/
|
|
79
82
|
function createAnchorPointIndirect(anchorPointIndirectJson) {
|
|
80
83
|
const position = Cartesian3.fromArray(
|
|
@@ -103,6 +106,7 @@ function createAnchorPointIndirect(anchorPointIndirectJson) {
|
|
|
103
106
|
*
|
|
104
107
|
* @param {object} correlationGroupJson The input JSON
|
|
105
108
|
* @returns {CorrelationGroup} The correlation group
|
|
109
|
+
* @ignore
|
|
106
110
|
*/
|
|
107
111
|
function createCorrelationGroup(correlationGroupJson) {
|
|
108
112
|
const groupFlags = correlationGroupJson.groupFlags;
|
|
@@ -407,7 +407,7 @@ function createInstances(loader, components, frameState) {
|
|
|
407
407
|
const featureIdArray = new Float32Array(instancesLength);
|
|
408
408
|
|
|
409
409
|
const instancePositions = Cartesian3.unpackArray(translationTypedArray);
|
|
410
|
-
let instancePosition
|
|
410
|
+
let instancePosition;
|
|
411
411
|
|
|
412
412
|
const instanceNormalRight = new Cartesian3();
|
|
413
413
|
const instanceNormalUp = new Cartesian3();
|
|
@@ -294,13 +294,13 @@ function getModelMatrixAndNodeTransform(
|
|
|
294
294
|
const instances = renderResources.runtimeNode.node.instances;
|
|
295
295
|
if (instances.transformInWorldSpace) {
|
|
296
296
|
// Replicate the multiplication order in LegacyInstancingStageVS.
|
|
297
|
-
|
|
297
|
+
Matrix4.multiplyTransformation(
|
|
298
298
|
model.modelMatrix,
|
|
299
299
|
sceneGraph.components.transform,
|
|
300
300
|
modelMatrix,
|
|
301
301
|
);
|
|
302
302
|
|
|
303
|
-
|
|
303
|
+
Matrix4.multiplyTransformation(
|
|
304
304
|
sceneGraph.axisCorrectionMatrix,
|
|
305
305
|
renderResources.runtimeNode.computedTransform,
|
|
306
306
|
nodeComputedTransform,
|
|
@@ -308,16 +308,13 @@ function getModelMatrixAndNodeTransform(
|
|
|
308
308
|
} else {
|
|
309
309
|
// The node transform should be pre-multiplied with the instancing transform.
|
|
310
310
|
modelMatrix = Matrix4.clone(sceneGraph.computedModelMatrix, modelMatrix);
|
|
311
|
-
|
|
311
|
+
Matrix4.multiplyTransformation(
|
|
312
312
|
modelMatrix,
|
|
313
313
|
renderResources.runtimeNode.computedTransform,
|
|
314
314
|
modelMatrix,
|
|
315
315
|
);
|
|
316
316
|
|
|
317
|
-
|
|
318
|
-
Matrix4.IDENTITY,
|
|
319
|
-
nodeComputedTransform,
|
|
320
|
-
);
|
|
317
|
+
Matrix4.clone(Matrix4.IDENTITY, nodeComputedTransform);
|
|
321
318
|
}
|
|
322
319
|
}
|
|
323
320
|
|