@hztxi/cesium-engine 25.0.6 → 26.2.1
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-2GJAWJJT.js +1344 -0
- package/Build/Workers/chunk-2J2VS5RI.js +288 -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-375SHKGW.js +44 -0
- package/Build/Workers/chunk-3BDLET5S.js +198 -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-4N227IPR.js +973 -0
- package/Build/Workers/chunk-4P6OAPBM.js +97 -0
- package/Build/Workers/chunk-4ZOLEPZK.js +519 -0
- package/Build/Workers/chunk-5EF3WWQG.js +352 -0
- package/Build/Workers/chunk-5FYUSABU.js +945 -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-5WU37CUJ.js +630 -0
- package/Build/Workers/chunk-6EBDN5WS.js +97 -0
- package/Build/Workers/chunk-75HIWCEV.js +301 -0
- package/Build/Workers/chunk-77DBX23X.js +455 -0
- package/Build/Workers/chunk-7AMVPXZY.js +1992 -0
- package/Build/Workers/chunk-7BMDD6SM.js +124 -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-7OME2OKM.js +171 -0
- package/Build/Workers/chunk-7Y642MCO.js +352 -0
- package/Build/Workers/chunk-7ZFKBLUE.js +1054 -0
- package/Build/Workers/chunk-A2BROW3D.js +352 -0
- package/Build/Workers/chunk-A7LGY5XS.js +140 -0
- package/Build/Workers/chunk-AN2NVYL6.js +1483 -0
- package/Build/Workers/chunk-B4XOVZGA.js +476 -0
- package/Build/Workers/chunk-B7PT2VL5.js +630 -0
- package/Build/Workers/chunk-C6XQGBPV.js +476 -0
- package/Build/Workers/chunk-CAEC5DA2.js +57 -0
- package/Build/Workers/chunk-CBCOHH5O.js +837 -0
- package/Build/Workers/chunk-CDLPLYLV.js +1287 -0
- package/Build/Workers/chunk-CEKCKPFN.js +368 -0
- package/Build/Workers/chunk-CEMXKBQO.js +1800 -0
- package/Build/Workers/chunk-CHMDKP5L.js +2342 -0
- package/Build/Workers/chunk-CKW3STKA.js +1067 -0
- package/Build/Workers/chunk-CV5RICKT.js +1992 -0
- package/Build/Workers/chunk-CWGB3D4Z.js +257 -0
- package/Build/Workers/chunk-DBWSISJT.js +56 -0
- package/Build/Workers/chunk-DQEUGBGA.js +2719 -0
- package/Build/Workers/chunk-DSBSPPPJ.js +1344 -0
- package/Build/Workers/chunk-DSGLDRTI.js +278 -0
- package/Build/Workers/chunk-DUBE5G2H.js +497 -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-E4PBNWWK.js +58 -0
- package/Build/Workers/chunk-E5MWOMVC.js +57 -0
- package/Build/Workers/chunk-ECN3VUMA.js +73 -0
- package/Build/Workers/chunk-ECSKVHUB.js +476 -0
- package/Build/Workers/chunk-EE3XBOQI.js +1483 -0
- package/Build/Workers/chunk-EHA2ZDPZ.js +415 -0
- package/Build/Workers/chunk-EKEKPAJF.js +454 -0
- package/Build/Workers/chunk-EL4B5CSQ.js +162 -0
- package/Build/Workers/chunk-EOHKUXPX.js +198 -0
- package/Build/Workers/chunk-ERENMHG2.js +754 -0
- package/Build/Workers/chunk-ESQGFRLZ.js +163 -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-FQ42MT7M.js +58 -0
- package/Build/Workers/chunk-FQDYQG4P.js +1284 -0
- package/Build/Workers/chunk-FTCBY5HH.js +138 -0
- package/Build/Workers/chunk-FV4OWDV4.js +9230 -0
- package/Build/Workers/chunk-FYRNNQSL.js +280 -0
- package/Build/Workers/chunk-GI5RWJAY.js +101 -0
- package/Build/Workers/chunk-GNLMSDRO.js +945 -0
- package/Build/Workers/chunk-GVUJ6O3R.js +73 -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-IU3YAYPT.js +1344 -0
- package/Build/Workers/chunk-J7MZR7B2.js +1483 -0
- package/Build/Workers/chunk-JMF4ATAS.js +3794 -0
- package/Build/Workers/chunk-KEJKMITY.js +82 -0
- package/Build/Workers/chunk-KSIEJYNL.js +3822 -0
- package/Build/Workers/chunk-KT3GG7AW.js +754 -0
- package/Build/Workers/chunk-KW2QZDUS.js +147 -0
- package/Build/Workers/chunk-KYCEM22I.js +1800 -0
- package/Build/Workers/chunk-L6B5XPBL.js +73 -0
- package/Build/Workers/chunk-LGJXN2VP.js +352 -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-LY2UG3HV.js +38 -0
- package/Build/Workers/chunk-M7Z3MPAX.js +973 -0
- package/Build/Workers/chunk-MHNLTQHO.js +3201 -0
- package/Build/Workers/chunk-ML7OMD72.js +2342 -0
- package/Build/Workers/chunk-NBTGXEMT.js +945 -0
- package/Build/Workers/chunk-NCPJBP24.js +140 -0
- package/Build/Workers/chunk-NFY5V6MR.js +102 -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-OYPSUED3.js +1067 -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-PIIUGRQD.js +387 -0
- package/Build/Workers/chunk-POKD22OT.js +2719 -0
- package/Build/Workers/chunk-PQMA7MFS.js +9237 -0
- package/Build/Workers/chunk-PURIPUSY.js +682 -0
- package/Build/Workers/chunk-QIOOTLWN.js +56 -0
- package/Build/Workers/chunk-QQZPPXY4.js +3822 -0
- package/Build/Workers/chunk-QUPRALOD.js +101 -0
- package/Build/Workers/chunk-QXLQLGL2.js +1067 -0
- package/Build/Workers/chunk-RBEVHHXK.js +3201 -0
- package/Build/Workers/chunk-RC4YC3VU.js +278 -0
- package/Build/Workers/chunk-RGNNWVR6.js +171 -0
- package/Build/Workers/chunk-RHO5HV52.js +305 -0
- package/Build/Workers/chunk-SBBIEHYT.js +44 -0
- package/Build/Workers/chunk-SVCZUP5R.js +837 -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-TBHW5UME.js +973 -0
- package/Build/Workers/chunk-TLSGD5TR.js +280 -0
- package/Build/Workers/chunk-TOXDLWKZ.js +368 -0
- package/Build/Workers/chunk-TPOX6IOR.js +1054 -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-ULNBTI6R.js +138 -0
- package/Build/Workers/chunk-UMUS2AQQ.js +398 -0
- package/Build/Workers/chunk-UZ7GTP2L.js +162 -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-VJIL5H6K.js +2719 -0
- package/Build/Workers/chunk-VMF7KOGY.js +162 -0
- package/Build/Workers/chunk-W3C7OHXF.js +387 -0
- package/Build/Workers/chunk-W5OCKMPJ.js +101 -0
- package/Build/Workers/chunk-WB5GWYDP.js +455 -0
- package/Build/Workers/chunk-WN6MAL25.js +682 -0
- package/Build/Workers/chunk-WTR7KMQA.js +693 -0
- package/Build/Workers/chunk-WTTFMU3P.js +241 -0
- package/Build/Workers/chunk-WULONJZC.js +1800 -0
- package/Build/Workers/chunk-WZPMAVTV.js +511 -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-Y7KVUJEB.js +219 -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-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-Z6JV4DZG.js +1046 -0
- package/Build/Workers/chunk-Z7BONRW2.js +241 -0
- package/Build/Workers/chunk-ZK2R3DEJ.js +1054 -0
- package/Build/Workers/chunk-ZTK5EBUI.js +76 -0
- package/Build/Workers/chunk-ZZPDORJK.js +56 -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 +98 -34
- 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/GroundPolylineGeometry.js +99 -4
- 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/PolylinePipeline.js +9 -2
- 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/PolylineGeometryUpdater.js +125 -7
- 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 +137 -8
- package/Source/Scene/CameraEventAggregator.js +30 -18
- package/Source/Scene/CameraFlightPath.js +17 -0
- 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/ColumbusWorlds.js +190 -0
- 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 +27 -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 +110 -22
- package/Source/Scene/GlobeDepth.js +243 -6
- package/Source/Scene/GlobeSurfaceShaderSet.js +637 -540
- package/Source/Scene/GlobeSurfaceTile.js +575 -398
- package/Source/Scene/GlobeSurfaceTileProvider.js +2289 -1842
- 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/GroundPolylinePrimitive.js +2 -1
- 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/Polyline.js +32 -5
- package/Source/Scene/PolylineCollection.js +39 -0
- package/Source/Scene/PostProcessStage.js +4 -2
- package/Source/Scene/Primitive.js +12 -13
- package/Source/Scene/PrimitivePipeline.js +158 -28
- 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 +655 -6
- package/Source/Scene/SceneTransforms.js +18 -0
- package/Source/Scene/ScreenSpaceCameraController.js +12 -3
- 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/PolylineShadowVolumeFS.glsl +14 -0
- package/Source/Shaders/PolylineShadowVolumeFS.js +14 -0
- package/Source/Shaders/RestoreDepth.glsl +8 -0
- package/Source/Shaders/RestoreDepth.js +10 -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.d.ts +535 -1393
- package/index.js +125 -93
- package/package.json +13 -13
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.144.1
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
CylinderGeometryLibrary_default
|
|
28
|
+
} from "./chunk-GVUJ6O3R.js";
|
|
29
|
+
import {
|
|
30
|
+
GeometryOffsetAttribute_default
|
|
31
|
+
} from "./chunk-NQZC37F7.js";
|
|
32
|
+
import {
|
|
33
|
+
VertexFormat_default
|
|
34
|
+
} from "./chunk-PAEWNYIV.js";
|
|
35
|
+
import {
|
|
36
|
+
IndexDatatype_default
|
|
37
|
+
} from "./chunk-A7LGY5XS.js";
|
|
38
|
+
import {
|
|
39
|
+
GeometryAttributes_default
|
|
40
|
+
} from "./chunk-FHCRXPA6.js";
|
|
41
|
+
import {
|
|
42
|
+
BoundingSphere_default
|
|
43
|
+
} from "./chunk-36IU7N4V.js";
|
|
44
|
+
import {
|
|
45
|
+
GeometryAttribute_default,
|
|
46
|
+
Geometry_default,
|
|
47
|
+
PrimitiveType_default
|
|
48
|
+
} from "./chunk-2ZYRUVVU.js";
|
|
49
|
+
import {
|
|
50
|
+
ComponentDatatype_default
|
|
51
|
+
} from "./chunk-RC4YC3VU.js";
|
|
52
|
+
import {
|
|
53
|
+
Cartesian2_default
|
|
54
|
+
} from "./chunk-CV5RICKT.js";
|
|
55
|
+
import {
|
|
56
|
+
Cartesian3_default,
|
|
57
|
+
Frozen_default
|
|
58
|
+
} from "./chunk-XITBARMZ.js";
|
|
59
|
+
import {
|
|
60
|
+
Math_default
|
|
61
|
+
} from "./chunk-4ZOLEPZK.js";
|
|
62
|
+
import {
|
|
63
|
+
DeveloperError_default
|
|
64
|
+
} from "./chunk-LOF32O7F.js";
|
|
65
|
+
import {
|
|
66
|
+
defined_default
|
|
67
|
+
} from "./chunk-5RVAAW26.js";
|
|
68
|
+
|
|
69
|
+
// packages/engine/Source/Core/CylinderGeometry.js
|
|
70
|
+
var radiusScratch = new Cartesian2_default();
|
|
71
|
+
var normalScratch = new Cartesian3_default();
|
|
72
|
+
var bitangentScratch = new Cartesian3_default();
|
|
73
|
+
var tangentScratch = new Cartesian3_default();
|
|
74
|
+
var positionScratch = new Cartesian3_default();
|
|
75
|
+
function CylinderGeometry(options) {
|
|
76
|
+
options = options ?? Frozen_default.EMPTY_OBJECT;
|
|
77
|
+
const length = options.length;
|
|
78
|
+
const topRadius = options.topRadius;
|
|
79
|
+
const bottomRadius = options.bottomRadius;
|
|
80
|
+
const vertexFormat = options.vertexFormat ?? VertexFormat_default.DEFAULT;
|
|
81
|
+
const slices = options.slices ?? 128;
|
|
82
|
+
if (!defined_default(length)) {
|
|
83
|
+
throw new DeveloperError_default("options.length must be defined.");
|
|
84
|
+
}
|
|
85
|
+
if (!defined_default(topRadius)) {
|
|
86
|
+
throw new DeveloperError_default("options.topRadius must be defined.");
|
|
87
|
+
}
|
|
88
|
+
if (!defined_default(bottomRadius)) {
|
|
89
|
+
throw new DeveloperError_default("options.bottomRadius must be defined.");
|
|
90
|
+
}
|
|
91
|
+
if (slices < 3) {
|
|
92
|
+
throw new DeveloperError_default(
|
|
93
|
+
"options.slices must be greater than or equal to 3."
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
if (defined_default(options.offsetAttribute) && options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
|
|
97
|
+
throw new DeveloperError_default(
|
|
98
|
+
"GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry."
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
this._length = length;
|
|
102
|
+
this._topRadius = topRadius;
|
|
103
|
+
this._bottomRadius = bottomRadius;
|
|
104
|
+
this._vertexFormat = VertexFormat_default.clone(vertexFormat);
|
|
105
|
+
this._slices = slices;
|
|
106
|
+
this._offsetAttribute = options.offsetAttribute;
|
|
107
|
+
this._workerName = "createCylinderGeometry";
|
|
108
|
+
}
|
|
109
|
+
CylinderGeometry.packedLength = VertexFormat_default.packedLength + 5;
|
|
110
|
+
CylinderGeometry.pack = function(value, array, startingIndex) {
|
|
111
|
+
if (!defined_default(value)) {
|
|
112
|
+
throw new DeveloperError_default("value is required");
|
|
113
|
+
}
|
|
114
|
+
if (!defined_default(array)) {
|
|
115
|
+
throw new DeveloperError_default("array is required");
|
|
116
|
+
}
|
|
117
|
+
startingIndex = startingIndex ?? 0;
|
|
118
|
+
VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
|
|
119
|
+
startingIndex += VertexFormat_default.packedLength;
|
|
120
|
+
array[startingIndex++] = value._length;
|
|
121
|
+
array[startingIndex++] = value._topRadius;
|
|
122
|
+
array[startingIndex++] = value._bottomRadius;
|
|
123
|
+
array[startingIndex++] = value._slices;
|
|
124
|
+
array[startingIndex] = value._offsetAttribute ?? -1;
|
|
125
|
+
return array;
|
|
126
|
+
};
|
|
127
|
+
var scratchVertexFormat = new VertexFormat_default();
|
|
128
|
+
var scratchOptions = {
|
|
129
|
+
vertexFormat: scratchVertexFormat,
|
|
130
|
+
length: void 0,
|
|
131
|
+
topRadius: void 0,
|
|
132
|
+
bottomRadius: void 0,
|
|
133
|
+
slices: void 0,
|
|
134
|
+
offsetAttribute: void 0
|
|
135
|
+
};
|
|
136
|
+
CylinderGeometry.unpack = function(array, startingIndex, result) {
|
|
137
|
+
if (!defined_default(array)) {
|
|
138
|
+
throw new DeveloperError_default("array is required");
|
|
139
|
+
}
|
|
140
|
+
startingIndex = startingIndex ?? 0;
|
|
141
|
+
const vertexFormat = VertexFormat_default.unpack(
|
|
142
|
+
array,
|
|
143
|
+
startingIndex,
|
|
144
|
+
scratchVertexFormat
|
|
145
|
+
);
|
|
146
|
+
startingIndex += VertexFormat_default.packedLength;
|
|
147
|
+
const length = array[startingIndex++];
|
|
148
|
+
const topRadius = array[startingIndex++];
|
|
149
|
+
const bottomRadius = array[startingIndex++];
|
|
150
|
+
const slices = array[startingIndex++];
|
|
151
|
+
const offsetAttribute = array[startingIndex];
|
|
152
|
+
if (!defined_default(result)) {
|
|
153
|
+
scratchOptions.length = length;
|
|
154
|
+
scratchOptions.topRadius = topRadius;
|
|
155
|
+
scratchOptions.bottomRadius = bottomRadius;
|
|
156
|
+
scratchOptions.slices = slices;
|
|
157
|
+
scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
|
158
|
+
return new CylinderGeometry(scratchOptions);
|
|
159
|
+
}
|
|
160
|
+
result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
|
|
161
|
+
result._length = length;
|
|
162
|
+
result._topRadius = topRadius;
|
|
163
|
+
result._bottomRadius = bottomRadius;
|
|
164
|
+
result._slices = slices;
|
|
165
|
+
result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
|
166
|
+
return result;
|
|
167
|
+
};
|
|
168
|
+
CylinderGeometry.createGeometry = function(cylinderGeometry) {
|
|
169
|
+
let length = cylinderGeometry._length;
|
|
170
|
+
const topRadius = cylinderGeometry._topRadius;
|
|
171
|
+
const bottomRadius = cylinderGeometry._bottomRadius;
|
|
172
|
+
const vertexFormat = cylinderGeometry._vertexFormat;
|
|
173
|
+
const slices = cylinderGeometry._slices;
|
|
174
|
+
if (length <= 0 || topRadius < 0 || bottomRadius < 0 || topRadius === 0 && bottomRadius === 0) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const twoSlices = slices + slices;
|
|
178
|
+
const threeSlices = slices + twoSlices;
|
|
179
|
+
const numVertices = twoSlices + twoSlices;
|
|
180
|
+
const positions = CylinderGeometryLibrary_default.computePositions(
|
|
181
|
+
length,
|
|
182
|
+
topRadius,
|
|
183
|
+
bottomRadius,
|
|
184
|
+
slices,
|
|
185
|
+
true
|
|
186
|
+
);
|
|
187
|
+
const st = vertexFormat.st ? new Float32Array(numVertices * 2) : void 0;
|
|
188
|
+
const normals = vertexFormat.normal ? new Float32Array(numVertices * 3) : void 0;
|
|
189
|
+
const tangents = vertexFormat.tangent ? new Float32Array(numVertices * 3) : void 0;
|
|
190
|
+
const bitangents = vertexFormat.bitangent ? new Float32Array(numVertices * 3) : void 0;
|
|
191
|
+
let i;
|
|
192
|
+
const computeNormal = vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent;
|
|
193
|
+
if (computeNormal) {
|
|
194
|
+
const computeTangent = vertexFormat.tangent || vertexFormat.bitangent;
|
|
195
|
+
let normalIndex = 0;
|
|
196
|
+
let tangentIndex = 0;
|
|
197
|
+
let bitangentIndex = 0;
|
|
198
|
+
const theta = Math.atan2(bottomRadius - topRadius, length);
|
|
199
|
+
const normal = normalScratch;
|
|
200
|
+
normal.z = Math.sin(theta);
|
|
201
|
+
const normalScale = Math.cos(theta);
|
|
202
|
+
let tangent = tangentScratch;
|
|
203
|
+
let bitangent = bitangentScratch;
|
|
204
|
+
for (i = 0; i < slices; i++) {
|
|
205
|
+
const angle = i / slices * Math_default.TWO_PI;
|
|
206
|
+
const x = normalScale * Math.cos(angle);
|
|
207
|
+
const y = normalScale * Math.sin(angle);
|
|
208
|
+
if (computeNormal) {
|
|
209
|
+
normal.x = x;
|
|
210
|
+
normal.y = y;
|
|
211
|
+
if (computeTangent) {
|
|
212
|
+
tangent = Cartesian3_default.normalize(
|
|
213
|
+
Cartesian3_default.cross(Cartesian3_default.UNIT_Z, normal, tangent),
|
|
214
|
+
tangent
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
if (vertexFormat.normal) {
|
|
218
|
+
normals[normalIndex++] = normal.x;
|
|
219
|
+
normals[normalIndex++] = normal.y;
|
|
220
|
+
normals[normalIndex++] = normal.z;
|
|
221
|
+
normals[normalIndex++] = normal.x;
|
|
222
|
+
normals[normalIndex++] = normal.y;
|
|
223
|
+
normals[normalIndex++] = normal.z;
|
|
224
|
+
}
|
|
225
|
+
if (vertexFormat.tangent) {
|
|
226
|
+
tangents[tangentIndex++] = tangent.x;
|
|
227
|
+
tangents[tangentIndex++] = tangent.y;
|
|
228
|
+
tangents[tangentIndex++] = tangent.z;
|
|
229
|
+
tangents[tangentIndex++] = tangent.x;
|
|
230
|
+
tangents[tangentIndex++] = tangent.y;
|
|
231
|
+
tangents[tangentIndex++] = tangent.z;
|
|
232
|
+
}
|
|
233
|
+
if (vertexFormat.bitangent) {
|
|
234
|
+
bitangent = Cartesian3_default.normalize(
|
|
235
|
+
Cartesian3_default.cross(normal, tangent, bitangent),
|
|
236
|
+
bitangent
|
|
237
|
+
);
|
|
238
|
+
bitangents[bitangentIndex++] = bitangent.x;
|
|
239
|
+
bitangents[bitangentIndex++] = bitangent.y;
|
|
240
|
+
bitangents[bitangentIndex++] = bitangent.z;
|
|
241
|
+
bitangents[bitangentIndex++] = bitangent.x;
|
|
242
|
+
bitangents[bitangentIndex++] = bitangent.y;
|
|
243
|
+
bitangents[bitangentIndex++] = bitangent.z;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
for (i = 0; i < slices; i++) {
|
|
248
|
+
if (vertexFormat.normal) {
|
|
249
|
+
normals[normalIndex++] = 0;
|
|
250
|
+
normals[normalIndex++] = 0;
|
|
251
|
+
normals[normalIndex++] = -1;
|
|
252
|
+
}
|
|
253
|
+
if (vertexFormat.tangent) {
|
|
254
|
+
tangents[tangentIndex++] = 1;
|
|
255
|
+
tangents[tangentIndex++] = 0;
|
|
256
|
+
tangents[tangentIndex++] = 0;
|
|
257
|
+
}
|
|
258
|
+
if (vertexFormat.bitangent) {
|
|
259
|
+
bitangents[bitangentIndex++] = 0;
|
|
260
|
+
bitangents[bitangentIndex++] = -1;
|
|
261
|
+
bitangents[bitangentIndex++] = 0;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
for (i = 0; i < slices; i++) {
|
|
265
|
+
if (vertexFormat.normal) {
|
|
266
|
+
normals[normalIndex++] = 0;
|
|
267
|
+
normals[normalIndex++] = 0;
|
|
268
|
+
normals[normalIndex++] = 1;
|
|
269
|
+
}
|
|
270
|
+
if (vertexFormat.tangent) {
|
|
271
|
+
tangents[tangentIndex++] = 1;
|
|
272
|
+
tangents[tangentIndex++] = 0;
|
|
273
|
+
tangents[tangentIndex++] = 0;
|
|
274
|
+
}
|
|
275
|
+
if (vertexFormat.bitangent) {
|
|
276
|
+
bitangents[bitangentIndex++] = 0;
|
|
277
|
+
bitangents[bitangentIndex++] = 1;
|
|
278
|
+
bitangents[bitangentIndex++] = 0;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
const numIndices = 12 * slices - 12;
|
|
283
|
+
const indices = IndexDatatype_default.createTypedArray(numVertices, numIndices);
|
|
284
|
+
let index = 0;
|
|
285
|
+
let j = 0;
|
|
286
|
+
for (i = 0; i < slices - 1; i++) {
|
|
287
|
+
indices[index++] = j;
|
|
288
|
+
indices[index++] = j + 2;
|
|
289
|
+
indices[index++] = j + 3;
|
|
290
|
+
indices[index++] = j;
|
|
291
|
+
indices[index++] = j + 3;
|
|
292
|
+
indices[index++] = j + 1;
|
|
293
|
+
j += 2;
|
|
294
|
+
}
|
|
295
|
+
indices[index++] = twoSlices - 2;
|
|
296
|
+
indices[index++] = 0;
|
|
297
|
+
indices[index++] = 1;
|
|
298
|
+
indices[index++] = twoSlices - 2;
|
|
299
|
+
indices[index++] = 1;
|
|
300
|
+
indices[index++] = twoSlices - 1;
|
|
301
|
+
for (i = 1; i < slices - 1; i++) {
|
|
302
|
+
indices[index++] = twoSlices + i + 1;
|
|
303
|
+
indices[index++] = twoSlices + i;
|
|
304
|
+
indices[index++] = twoSlices;
|
|
305
|
+
}
|
|
306
|
+
for (i = 1; i < slices - 1; i++) {
|
|
307
|
+
indices[index++] = threeSlices;
|
|
308
|
+
indices[index++] = threeSlices + i;
|
|
309
|
+
indices[index++] = threeSlices + i + 1;
|
|
310
|
+
}
|
|
311
|
+
let textureCoordIndex = 0;
|
|
312
|
+
if (vertexFormat.st) {
|
|
313
|
+
const rad = Math.max(topRadius, bottomRadius);
|
|
314
|
+
for (i = 0; i < numVertices; i++) {
|
|
315
|
+
const position = Cartesian3_default.fromArray(positions, i * 3, positionScratch);
|
|
316
|
+
st[textureCoordIndex++] = (position.x + rad) / (2 * rad);
|
|
317
|
+
st[textureCoordIndex++] = (position.y + rad) / (2 * rad);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
const attributes = new GeometryAttributes_default();
|
|
321
|
+
if (vertexFormat.position) {
|
|
322
|
+
attributes.position = new GeometryAttribute_default({
|
|
323
|
+
componentDatatype: ComponentDatatype_default.DOUBLE,
|
|
324
|
+
componentsPerAttribute: 3,
|
|
325
|
+
values: positions
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
if (vertexFormat.normal) {
|
|
329
|
+
attributes.normal = new GeometryAttribute_default({
|
|
330
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
331
|
+
componentsPerAttribute: 3,
|
|
332
|
+
values: normals
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
if (vertexFormat.tangent) {
|
|
336
|
+
attributes.tangent = new GeometryAttribute_default({
|
|
337
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
338
|
+
componentsPerAttribute: 3,
|
|
339
|
+
values: tangents
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
if (vertexFormat.bitangent) {
|
|
343
|
+
attributes.bitangent = new GeometryAttribute_default({
|
|
344
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
345
|
+
componentsPerAttribute: 3,
|
|
346
|
+
values: bitangents
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
if (vertexFormat.st) {
|
|
350
|
+
attributes.st = new GeometryAttribute_default({
|
|
351
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
352
|
+
componentsPerAttribute: 2,
|
|
353
|
+
values: st
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
radiusScratch.x = length * 0.5;
|
|
357
|
+
radiusScratch.y = Math.max(bottomRadius, topRadius);
|
|
358
|
+
const boundingSphere = new BoundingSphere_default(
|
|
359
|
+
Cartesian3_default.ZERO,
|
|
360
|
+
Cartesian2_default.magnitude(radiusScratch)
|
|
361
|
+
);
|
|
362
|
+
if (defined_default(cylinderGeometry._offsetAttribute)) {
|
|
363
|
+
length = positions.length;
|
|
364
|
+
const offsetValue = cylinderGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
|
365
|
+
const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
|
|
366
|
+
attributes.applyOffset = new GeometryAttribute_default({
|
|
367
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
|
368
|
+
componentsPerAttribute: 1,
|
|
369
|
+
values: applyOffset
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
return new Geometry_default({
|
|
373
|
+
attributes,
|
|
374
|
+
indices,
|
|
375
|
+
primitiveType: PrimitiveType_default.TRIANGLES,
|
|
376
|
+
boundingSphere,
|
|
377
|
+
offsetAttribute: cylinderGeometry._offsetAttribute
|
|
378
|
+
});
|
|
379
|
+
};
|
|
380
|
+
var unitCylinderGeometry;
|
|
381
|
+
CylinderGeometry.getUnitCylinder = function() {
|
|
382
|
+
if (!defined_default(unitCylinderGeometry)) {
|
|
383
|
+
unitCylinderGeometry = CylinderGeometry.createGeometry(
|
|
384
|
+
new CylinderGeometry({
|
|
385
|
+
topRadius: 1,
|
|
386
|
+
bottomRadius: 1,
|
|
387
|
+
length: 1,
|
|
388
|
+
vertexFormat: VertexFormat_default.POSITION_ONLY
|
|
389
|
+
})
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
return unitCylinderGeometry;
|
|
393
|
+
};
|
|
394
|
+
var CylinderGeometry_default = CylinderGeometry;
|
|
395
|
+
|
|
396
|
+
export {
|
|
397
|
+
CylinderGeometry_default
|
|
398
|
+
};
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.144.0
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
Matrix2_default,
|
|
28
|
+
Quaternion_default,
|
|
29
|
+
Rectangle_default,
|
|
30
|
+
Transforms_default
|
|
31
|
+
} from "./chunk-PQMA7MFS.js";
|
|
32
|
+
import {
|
|
33
|
+
Matrix4_default
|
|
34
|
+
} from "./chunk-FGCXPEZM.js";
|
|
35
|
+
import {
|
|
36
|
+
WebGLConstants_default
|
|
37
|
+
} from "./chunk-YGFVAGYF.js";
|
|
38
|
+
import {
|
|
39
|
+
Cartesian2_default,
|
|
40
|
+
Cartographic_default
|
|
41
|
+
} from "./chunk-DXD7OPSP.js";
|
|
42
|
+
import {
|
|
43
|
+
Cartesian3_default,
|
|
44
|
+
Frozen_default,
|
|
45
|
+
Matrix3_default
|
|
46
|
+
} from "./chunk-ML7OMD72.js";
|
|
47
|
+
import {
|
|
48
|
+
Check_default,
|
|
49
|
+
DeveloperError_default
|
|
50
|
+
} from "./chunk-XLQZNQ4Z.js";
|
|
51
|
+
import {
|
|
52
|
+
defined_default
|
|
53
|
+
} from "./chunk-PCL3Y7H5.js";
|
|
54
|
+
|
|
55
|
+
// packages/engine/Source/Core/GeometryType.js
|
|
56
|
+
var GeometryType = {
|
|
57
|
+
NONE: 0,
|
|
58
|
+
TRIANGLES: 1,
|
|
59
|
+
LINES: 2,
|
|
60
|
+
POLYLINES: 3
|
|
61
|
+
};
|
|
62
|
+
Object.freeze(GeometryType);
|
|
63
|
+
var GeometryType_default = GeometryType;
|
|
64
|
+
|
|
65
|
+
// packages/engine/Source/Core/PrimitiveType.js
|
|
66
|
+
var PrimitiveType = {
|
|
67
|
+
/**
|
|
68
|
+
* Points primitive where each vertex (or index) is a separate point.
|
|
69
|
+
*
|
|
70
|
+
* @type {number}
|
|
71
|
+
* @constant
|
|
72
|
+
*/
|
|
73
|
+
POINTS: WebGLConstants_default.POINTS,
|
|
74
|
+
/**
|
|
75
|
+
* Lines primitive where each two vertices (or indices) is a line segment. Line segments are not necessarily connected.
|
|
76
|
+
*
|
|
77
|
+
* @type {number}
|
|
78
|
+
* @constant
|
|
79
|
+
*/
|
|
80
|
+
LINES: WebGLConstants_default.LINES,
|
|
81
|
+
/**
|
|
82
|
+
* Line loop primitive where each vertex (or index) after the first connects a line to
|
|
83
|
+
* the previous vertex, and the last vertex implicitly connects to the first.
|
|
84
|
+
*
|
|
85
|
+
* @type {number}
|
|
86
|
+
* @constant
|
|
87
|
+
*/
|
|
88
|
+
LINE_LOOP: WebGLConstants_default.LINE_LOOP,
|
|
89
|
+
/**
|
|
90
|
+
* Line strip primitive where each vertex (or index) after the first connects a line to the previous vertex.
|
|
91
|
+
*
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @constant
|
|
94
|
+
*/
|
|
95
|
+
LINE_STRIP: WebGLConstants_default.LINE_STRIP,
|
|
96
|
+
/**
|
|
97
|
+
* Triangles primitive where each three vertices (or indices) is a triangle. Triangles do not necessarily share edges.
|
|
98
|
+
*
|
|
99
|
+
* @type {number}
|
|
100
|
+
* @constant
|
|
101
|
+
*/
|
|
102
|
+
TRIANGLES: WebGLConstants_default.TRIANGLES,
|
|
103
|
+
/**
|
|
104
|
+
* Triangle strip primitive where each vertex (or index) after the first two connect to
|
|
105
|
+
* the previous two vertices forming a triangle. For example, this can be used to model a wall.
|
|
106
|
+
*
|
|
107
|
+
* @type {number}
|
|
108
|
+
* @constant
|
|
109
|
+
*/
|
|
110
|
+
TRIANGLE_STRIP: WebGLConstants_default.TRIANGLE_STRIP,
|
|
111
|
+
/**
|
|
112
|
+
* Triangle fan primitive where each vertex (or index) after the first two connect to
|
|
113
|
+
* the previous vertex and the first vertex forming a triangle. For example, this can be used
|
|
114
|
+
* to model a cone or circle.
|
|
115
|
+
*
|
|
116
|
+
* @type {number}
|
|
117
|
+
* @constant
|
|
118
|
+
*/
|
|
119
|
+
TRIANGLE_FAN: WebGLConstants_default.TRIANGLE_FAN
|
|
120
|
+
};
|
|
121
|
+
PrimitiveType.isLines = function(primitiveType) {
|
|
122
|
+
return primitiveType === PrimitiveType.LINES || primitiveType === PrimitiveType.LINE_LOOP || primitiveType === PrimitiveType.LINE_STRIP;
|
|
123
|
+
};
|
|
124
|
+
PrimitiveType.isTriangles = function(primitiveType) {
|
|
125
|
+
return primitiveType === PrimitiveType.TRIANGLES || primitiveType === PrimitiveType.TRIANGLE_STRIP || primitiveType === PrimitiveType.TRIANGLE_FAN;
|
|
126
|
+
};
|
|
127
|
+
PrimitiveType.validate = function(primitiveType) {
|
|
128
|
+
return primitiveType === PrimitiveType.POINTS || primitiveType === PrimitiveType.LINES || primitiveType === PrimitiveType.LINE_LOOP || primitiveType === PrimitiveType.LINE_STRIP || primitiveType === PrimitiveType.TRIANGLES || primitiveType === PrimitiveType.TRIANGLE_STRIP || primitiveType === PrimitiveType.TRIANGLE_FAN;
|
|
129
|
+
};
|
|
130
|
+
Object.freeze(PrimitiveType);
|
|
131
|
+
var PrimitiveType_default = PrimitiveType;
|
|
132
|
+
|
|
133
|
+
// packages/engine/Source/Core/Geometry.js
|
|
134
|
+
function Geometry(options) {
|
|
135
|
+
options = options ?? Frozen_default.EMPTY_OBJECT;
|
|
136
|
+
Check_default.typeOf.object("options.attributes", options.attributes);
|
|
137
|
+
this.attributes = options.attributes;
|
|
138
|
+
this.indices = options.indices;
|
|
139
|
+
this.primitiveType = options.primitiveType ?? PrimitiveType_default.TRIANGLES;
|
|
140
|
+
this.boundingSphere = options.boundingSphere;
|
|
141
|
+
this.geometryType = options.geometryType ?? GeometryType_default.NONE;
|
|
142
|
+
this.boundingSphereCV = options.boundingSphereCV;
|
|
143
|
+
this.offsetAttribute = options.offsetAttribute;
|
|
144
|
+
}
|
|
145
|
+
Geometry.computeNumberOfVertices = function(geometry) {
|
|
146
|
+
Check_default.typeOf.object("geometry", geometry);
|
|
147
|
+
let numberOfVertices = -1;
|
|
148
|
+
for (const property in geometry.attributes) {
|
|
149
|
+
if (geometry.attributes.hasOwnProperty(property) && defined_default(geometry.attributes[property]) && defined_default(geometry.attributes[property].values)) {
|
|
150
|
+
const attribute = geometry.attributes[property];
|
|
151
|
+
const num = attribute.values.length / attribute.componentsPerAttribute;
|
|
152
|
+
if (numberOfVertices !== num && numberOfVertices !== -1) {
|
|
153
|
+
throw new DeveloperError_default(
|
|
154
|
+
"All attribute lists must have the same number of attributes."
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
numberOfVertices = num;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return numberOfVertices;
|
|
161
|
+
};
|
|
162
|
+
var rectangleCenterScratch = new Cartographic_default();
|
|
163
|
+
var enuCenterScratch = new Cartesian3_default();
|
|
164
|
+
var fixedFrameToEnuScratch = new Matrix4_default();
|
|
165
|
+
var boundingRectanglePointsCartographicScratch = [
|
|
166
|
+
new Cartographic_default(),
|
|
167
|
+
new Cartographic_default(),
|
|
168
|
+
new Cartographic_default()
|
|
169
|
+
];
|
|
170
|
+
var boundingRectanglePointsEnuScratch = [
|
|
171
|
+
new Cartesian2_default(),
|
|
172
|
+
new Cartesian2_default(),
|
|
173
|
+
new Cartesian2_default()
|
|
174
|
+
];
|
|
175
|
+
var points2DScratch = [new Cartesian2_default(), new Cartesian2_default(), new Cartesian2_default()];
|
|
176
|
+
var pointEnuScratch = new Cartesian3_default();
|
|
177
|
+
var enuRotationScratch = new Quaternion_default();
|
|
178
|
+
var enuRotationMatrixScratch = new Matrix4_default();
|
|
179
|
+
var rotation2DScratch = new Matrix2_default();
|
|
180
|
+
Geometry._textureCoordinateRotationPoints = function(positions, stRotation, ellipsoid, boundingRectangle) {
|
|
181
|
+
let i;
|
|
182
|
+
const rectangleCenter = Rectangle_default.center(
|
|
183
|
+
boundingRectangle,
|
|
184
|
+
rectangleCenterScratch
|
|
185
|
+
);
|
|
186
|
+
const enuCenter = Cartographic_default.toCartesian(
|
|
187
|
+
rectangleCenter,
|
|
188
|
+
ellipsoid,
|
|
189
|
+
enuCenterScratch
|
|
190
|
+
);
|
|
191
|
+
const enuToFixedFrame = Transforms_default.eastNorthUpToFixedFrame(
|
|
192
|
+
enuCenter,
|
|
193
|
+
ellipsoid,
|
|
194
|
+
fixedFrameToEnuScratch
|
|
195
|
+
);
|
|
196
|
+
const fixedFrameToEnu = Matrix4_default.inverse(
|
|
197
|
+
enuToFixedFrame,
|
|
198
|
+
fixedFrameToEnuScratch
|
|
199
|
+
);
|
|
200
|
+
const boundingPointsEnu = boundingRectanglePointsEnuScratch;
|
|
201
|
+
const boundingPointsCarto = boundingRectanglePointsCartographicScratch;
|
|
202
|
+
boundingPointsCarto[0].longitude = boundingRectangle.west;
|
|
203
|
+
boundingPointsCarto[0].latitude = boundingRectangle.south;
|
|
204
|
+
boundingPointsCarto[1].longitude = boundingRectangle.west;
|
|
205
|
+
boundingPointsCarto[1].latitude = boundingRectangle.north;
|
|
206
|
+
boundingPointsCarto[2].longitude = boundingRectangle.east;
|
|
207
|
+
boundingPointsCarto[2].latitude = boundingRectangle.south;
|
|
208
|
+
let posEnu = pointEnuScratch;
|
|
209
|
+
for (i = 0; i < 3; i++) {
|
|
210
|
+
Cartographic_default.toCartesian(boundingPointsCarto[i], ellipsoid, posEnu);
|
|
211
|
+
posEnu = Matrix4_default.multiplyByPointAsVector(fixedFrameToEnu, posEnu, posEnu);
|
|
212
|
+
boundingPointsEnu[i].x = posEnu.x;
|
|
213
|
+
boundingPointsEnu[i].y = posEnu.y;
|
|
214
|
+
}
|
|
215
|
+
const rotation = Quaternion_default.fromAxisAngle(
|
|
216
|
+
Cartesian3_default.UNIT_Z,
|
|
217
|
+
-stRotation,
|
|
218
|
+
enuRotationScratch
|
|
219
|
+
);
|
|
220
|
+
const textureMatrix = Matrix3_default.fromQuaternion(
|
|
221
|
+
rotation,
|
|
222
|
+
enuRotationMatrixScratch
|
|
223
|
+
);
|
|
224
|
+
const positionsLength = positions.length;
|
|
225
|
+
let enuMinX = Number.POSITIVE_INFINITY;
|
|
226
|
+
let enuMinY = Number.POSITIVE_INFINITY;
|
|
227
|
+
let enuMaxX = Number.NEGATIVE_INFINITY;
|
|
228
|
+
let enuMaxY = Number.NEGATIVE_INFINITY;
|
|
229
|
+
for (i = 0; i < positionsLength; i++) {
|
|
230
|
+
posEnu = Matrix4_default.multiplyByPointAsVector(
|
|
231
|
+
fixedFrameToEnu,
|
|
232
|
+
positions[i],
|
|
233
|
+
posEnu
|
|
234
|
+
);
|
|
235
|
+
posEnu = Matrix3_default.multiplyByVector(textureMatrix, posEnu, posEnu);
|
|
236
|
+
enuMinX = Math.min(enuMinX, posEnu.x);
|
|
237
|
+
enuMinY = Math.min(enuMinY, posEnu.y);
|
|
238
|
+
enuMaxX = Math.max(enuMaxX, posEnu.x);
|
|
239
|
+
enuMaxY = Math.max(enuMaxY, posEnu.y);
|
|
240
|
+
}
|
|
241
|
+
const toDesiredInComputed = Matrix2_default.fromRotation(
|
|
242
|
+
stRotation,
|
|
243
|
+
rotation2DScratch
|
|
244
|
+
);
|
|
245
|
+
const points2D = points2DScratch;
|
|
246
|
+
points2D[0].x = enuMinX;
|
|
247
|
+
points2D[0].y = enuMinY;
|
|
248
|
+
points2D[1].x = enuMinX;
|
|
249
|
+
points2D[1].y = enuMaxY;
|
|
250
|
+
points2D[2].x = enuMaxX;
|
|
251
|
+
points2D[2].y = enuMinY;
|
|
252
|
+
const boundingEnuMin = boundingPointsEnu[0];
|
|
253
|
+
const boundingPointsWidth = boundingPointsEnu[2].x - boundingEnuMin.x;
|
|
254
|
+
const boundingPointsHeight = boundingPointsEnu[1].y - boundingEnuMin.y;
|
|
255
|
+
for (i = 0; i < 3; i++) {
|
|
256
|
+
const point2D = points2D[i];
|
|
257
|
+
Matrix2_default.multiplyByVector(toDesiredInComputed, point2D, point2D);
|
|
258
|
+
point2D.x = (point2D.x - boundingEnuMin.x) / boundingPointsWidth;
|
|
259
|
+
point2D.y = (point2D.y - boundingEnuMin.y) / boundingPointsHeight;
|
|
260
|
+
}
|
|
261
|
+
const minXYCorner = points2D[0];
|
|
262
|
+
const maxYCorner = points2D[1];
|
|
263
|
+
const maxXCorner = points2D[2];
|
|
264
|
+
const result = new Array(6);
|
|
265
|
+
Cartesian2_default.pack(minXYCorner, result);
|
|
266
|
+
Cartesian2_default.pack(maxYCorner, result, 2);
|
|
267
|
+
Cartesian2_default.pack(maxXCorner, result, 4);
|
|
268
|
+
return result;
|
|
269
|
+
};
|
|
270
|
+
var Geometry_default = Geometry;
|
|
271
|
+
|
|
272
|
+
// packages/engine/Source/Core/GeometryAttribute.js
|
|
273
|
+
function GeometryAttribute(options) {
|
|
274
|
+
options = options ?? Frozen_default.EMPTY_OBJECT;
|
|
275
|
+
if (!defined_default(options.componentDatatype)) {
|
|
276
|
+
throw new DeveloperError_default("options.componentDatatype is required.");
|
|
277
|
+
}
|
|
278
|
+
if (!defined_default(options.componentsPerAttribute)) {
|
|
279
|
+
throw new DeveloperError_default("options.componentsPerAttribute is required.");
|
|
280
|
+
}
|
|
281
|
+
if (options.componentsPerAttribute < 1 || options.componentsPerAttribute > 4) {
|
|
282
|
+
throw new DeveloperError_default(
|
|
283
|
+
"options.componentsPerAttribute must be between 1 and 4."
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
if (!defined_default(options.values)) {
|
|
287
|
+
throw new DeveloperError_default("options.values is required.");
|
|
288
|
+
}
|
|
289
|
+
this.componentDatatype = options.componentDatatype;
|
|
290
|
+
this.componentsPerAttribute = options.componentsPerAttribute;
|
|
291
|
+
this.normalize = options.normalize ?? false;
|
|
292
|
+
this.values = options.values;
|
|
293
|
+
}
|
|
294
|
+
var GeometryAttribute_default = GeometryAttribute;
|
|
295
|
+
|
|
296
|
+
export {
|
|
297
|
+
GeometryType_default,
|
|
298
|
+
PrimitiveType_default,
|
|
299
|
+
Geometry_default,
|
|
300
|
+
GeometryAttribute_default
|
|
301
|
+
};
|