@mapgis/cesium 17.0.4 → 17.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/Documentation/AlgorithmLib.html +29 -29
- package/Documentation/AngulationTool.html +5 -5
- package/Documentation/Animation.html +7 -7
- package/Documentation/AnimationTool.html +41 -41
- package/Documentation/AnimationViewModel.html +23 -23
- package/Documentation/Appearance.html +10 -10
- package/Documentation/ArcGISTiledElevationTerrainProvider.html +13 -13
- package/Documentation/ArcGisMapServerImageryProvider.html +68 -33
- package/Documentation/AssociativeArray.html +8 -8
- package/Documentation/AttributeSurfacePrimitive.html +7 -7
- package/Documentation/AxisAlignedBoundingBox.html +11 -11
- package/Documentation/BaiduImageryProvider.html +29 -29
- package/Documentation/BaiduMapImagerProvider.html +1 -1
- package/Documentation/BaiduProjection.html +7 -7
- package/Documentation/BaseLayerPicker.html +5 -5
- package/Documentation/BaseLayerPickerViewModel.html +10 -10
- package/Documentation/Billboard.html +31 -31
- package/Documentation/BillboardCollection.html +17 -17
- package/Documentation/BillboardGraphics.html +25 -25
- package/Documentation/BillboardVisualizer.html +4 -4
- package/Documentation/BingMapsGeocoderService.html +4 -4
- package/Documentation/BingMapsImageryProvider.html +35 -35
- package/Documentation/BlendingState.html +5 -5
- package/Documentation/BloomEffect.html +12 -12
- package/Documentation/BoundingRectangle.html +18 -18
- package/Documentation/BoundingSphere.html +34 -34
- package/Documentation/BoxEmitter.html +2 -2
- package/Documentation/BoxGeometry.html +7 -7
- package/Documentation/BoxGeometryUpdater.html +3 -3
- package/Documentation/BoxGraphics.html +15 -15
- package/Documentation/BoxOutlineGeometry.html +7 -7
- package/Documentation/CallbackProperty.html +7 -7
- package/Documentation/Camera.html +80 -80
- package/Documentation/CameraEventAggregator.html +13 -13
- package/Documentation/Cartesian2.html +44 -44
- package/Documentation/Cartesian3.html +54 -54
- package/Documentation/Cartesian4.html +46 -46
- package/Documentation/Cartographic.html +16 -16
- package/Documentation/CartographicGeocoderService.html +2 -2
- package/Documentation/CatmullRomSpline.html +9 -9
- package/Documentation/Cesium3DTile.html +12 -12
- package/Documentation/Cesium3DTileContent.html +14 -14
- package/Documentation/Cesium3DTileCustomContent.html +1 -1
- package/Documentation/Cesium3DTileFeature.html +10 -10
- package/Documentation/Cesium3DTilePointFeature.html +33 -33
- package/Documentation/Cesium3DTileStyle.html +31 -31
- package/Documentation/Cesium3DTilesInspector.html +5 -5
- package/Documentation/Cesium3DTilesInspectorViewModel.html +70 -70
- package/Documentation/Cesium3DTileset.html +91 -91
- package/Documentation/Cesium3DTilesetGraphics.html +8 -8
- package/Documentation/Cesium3DTilesetVisualizer.html +4 -4
- package/Documentation/CesiumHeatmap.html +3 -3
- package/Documentation/CesiumInspector.html +5 -5
- package/Documentation/CesiumInspectorViewModel.html +52 -52
- package/Documentation/CesiumNavigation.html +1 -1
- package/Documentation/CesiumTerrainProvider.html +17 -17
- package/Documentation/CesiumWidget.html +20 -20
- package/Documentation/CheckerboardMaterialProperty.html +9 -9
- package/Documentation/CircleEmitter.html +3 -3
- package/Documentation/CircleGeometry.html +5 -5
- package/Documentation/CircleOutlineGeometry.html +5 -5
- package/Documentation/CircleScanEffect.html +1 -1
- package/Documentation/CircleWaveMaterialProperty.html +1 -1
- package/Documentation/ClassificationPrimitive.html +21 -21
- package/Documentation/ClippingGeometry.html +4 -4
- package/Documentation/ClippingPlane.html +5 -5
- package/Documentation/ClippingPlaneCollection.html +17 -17
- package/Documentation/Clock.html +12 -12
- package/Documentation/ClockViewModel.html +14 -14
- package/Documentation/CollisionDetectionByRender.html +10 -10
- package/Documentation/Color.html +185 -185
- package/Documentation/ColorGeometryInstanceAttribute.html +8 -8
- package/Documentation/ColorMaterialProperty.html +7 -7
- package/Documentation/Command.html +4 -4
- package/Documentation/CompositeEntityCollection.html +21 -21
- package/Documentation/CompositeMaterialProperty.html +7 -7
- package/Documentation/CompositePositionProperty.html +8 -8
- package/Documentation/CompositeProperty.html +6 -6
- package/Documentation/CompressedTextureBuffer.html +8 -8
- package/Documentation/ConditionsExpression.html +4 -4
- package/Documentation/ConeEmitter.html +1 -1
- package/Documentation/ConstantPositionProperty.html +8 -8
- package/Documentation/ConstantProperty.html +8 -8
- package/Documentation/CoplanarPolygonGeometry.html +6 -6
- package/Documentation/CoplanarPolygonOutlineGeometry.html +6 -6
- package/Documentation/CorridorGeometry.html +6 -6
- package/Documentation/CorridorGeometryUpdater.html +3 -3
- package/Documentation/CorridorGraphics.html +23 -23
- package/Documentation/CorridorOutlineGeometry.html +5 -5
- package/Documentation/Credit.html +7 -7
- package/Documentation/CreditDisplay.html +11 -11
- package/Documentation/CubicRealPolynomial.html +3 -3
- package/Documentation/CullingVolume.html +4 -4
- package/Documentation/CustomDataSource.html +11 -11
- package/Documentation/CustomHeightmapTerrainProvider.html +15 -15
- package/Documentation/CustomProjection.html +5 -5
- package/Documentation/CustomShader.html +1 -1
- package/Documentation/CustomTilingScheme.html +16 -54
- package/Documentation/CutFillAnalysis.html +17 -17
- package/Documentation/CuttingTool.html +11 -11
- package/Documentation/CylinderGeometry.html +5 -5
- package/Documentation/CylinderGeometryUpdater.html +3 -3
- package/Documentation/CylinderGraphics.html +19 -19
- package/Documentation/CylinderOutlineGeometry.html +5 -5
- package/Documentation/CzmlDataSource.html +22 -22
- package/Documentation/DataSource.html +11 -11
- package/Documentation/DataSourceClock.html +12 -12
- package/Documentation/DataSourceCollection.html +18 -18
- package/Documentation/DataSourceDisplay.html +10 -10
- package/Documentation/DebugAppearance.html +12 -12
- package/Documentation/DebugCameraPrimitive.html +5 -5
- package/Documentation/DebugModelMatrixPrimitive.html +8 -8
- package/Documentation/DefaultProxy.html +2 -2
- package/Documentation/DeveloperError.html +4 -4
- package/Documentation/DirectionalLight.html +4 -4
- package/Documentation/DiscardEmptyTileImagePolicy.html +4 -4
- package/Documentation/DiscardMissingTileImagePolicy.html +3 -3
- package/Documentation/DistanceDisplayCondition.html +10 -10
- package/Documentation/DistanceDisplayConditionGeometryInstanceAttribute.html +7 -7
- package/Documentation/DrawElement.html +9 -9
- package/Documentation/DrawTool.html +4 -4
- package/Documentation/DynamicEntityVisualizer.html +1 -1
- package/Documentation/DynamicLightLineEffect.html +13 -13
- package/Documentation/EasingFunction.html +33 -33
- package/Documentation/EditTool.html +15 -15
- package/Documentation/EllipseGeometry.html +6 -6
- package/Documentation/EllipseGeometryUpdater.html +4 -4
- package/Documentation/EllipseGraphics.html +25 -25
- package/Documentation/EllipseOutlineGeometry.html +5 -5
- package/Documentation/Ellipsoid.html +34 -34
- package/Documentation/EllipsoidGeodesic.html +10 -10
- package/Documentation/EllipsoidGeometry.html +5 -5
- package/Documentation/EllipsoidGeometryUpdater.html +3 -3
- package/Documentation/EllipsoidGraphics.html +23 -23
- package/Documentation/EllipsoidOutlineGeometry.html +5 -5
- package/Documentation/EllipsoidRhumbLine.html +12 -12
- package/Documentation/EllipsoidSurfaceAppearance.html +15 -15
- package/Documentation/EllipsoidTangentPlane.html +14 -14
- package/Documentation/EllipsoidTerrainProvider.html +13 -13
- package/Documentation/Entity.html +40 -40
- package/Documentation/EntityCluster.html +11 -11
- package/Documentation/EntityCollection.html +17 -17
- package/Documentation/EntityView.html +7 -7
- package/Documentation/Event.html +6 -6
- package/Documentation/EventHelper.html +4 -4
- package/Documentation/Expression.html +4 -4
- package/Documentation/FeatureDetection.html +9 -9
- package/Documentation/FlattenTool.html +34 -6
- package/Documentation/FloodAnalysis.html +16 -16
- package/Documentation/FloodAnalysisReflection.html +9 -9
- package/Documentation/Fog.html +5 -5
- package/Documentation/FrameRateMonitor.html +16 -16
- package/Documentation/FrustumGeometry.html +5 -5
- package/Documentation/FrustumOutlineGeometry.html +5 -5
- package/Documentation/Fullscreen.html +9 -9
- package/Documentation/FullscreenButton.html +5 -5
- package/Documentation/FullscreenButtonViewModel.html +8 -8
- package/Documentation/GaodeImageryProvider.html +29 -29
- package/Documentation/GaodeProjection.html +7 -7
- package/Documentation/GeoJsonDataSource.html +27 -27
- package/Documentation/Geocoder.html +7 -7
- package/Documentation/GeocoderService.html +3 -3
- package/Documentation/GeocoderViewModel.html +14 -14
- package/Documentation/GeographicProjection.html +94 -4
- package/Documentation/GeographicTilingScheme.html +10 -10
- package/Documentation/Geometry.html +6 -6
- package/Documentation/GeometryAttribute.html +5 -5
- package/Documentation/GeometryAttributes.html +7 -7
- package/Documentation/GeometryFactory.html +2 -2
- package/Documentation/GeometryInstance.html +5 -5
- package/Documentation/GeometryInstanceAttribute.html +5 -5
- package/Documentation/GeometryPipeline.html +13 -13
- package/Documentation/GeometryUpdater.html +22 -22
- package/Documentation/GeometryVisualizer.html +4 -4
- package/Documentation/GetFeatureInfoFormat.html +1 -1
- package/Documentation/Globe.html +47 -47
- package/Documentation/GlobeEffect.html +8 -8
- package/Documentation/GlobeIndependentTranslucency.html +10 -10
- package/Documentation/GlobeTranslucency.html +7 -7
- package/Documentation/GoogleEarthEnterpriseImageryProvider.html +29 -29
- package/Documentation/GoogleEarthEnterpriseMapsProvider.html +34 -34
- package/Documentation/GoogleEarthEnterpriseMetadata.html +14 -14
- package/Documentation/GoogleEarthEnterpriseTerrainData.html +7 -7
- package/Documentation/GoogleEarthEnterpriseTerrainProvider.html +15 -15
- package/Documentation/GoogleMapImageryProvider.html +1 -1
- package/Documentation/Graphic.html +31 -31
- package/Documentation/GraphicTransformTool.html +7 -7
- package/Documentation/GraphicsLayer.html +27 -27
- package/Documentation/GregorianDate.html +9 -9
- package/Documentation/GridImageryProvider.html +30 -30
- package/Documentation/GridMaterialProperty.html +11 -11
- package/Documentation/GroundGeometryUpdater.html +3 -3
- package/Documentation/GroundPolylineGeometry.html +7 -7
- package/Documentation/GroundPolylinePrimitive.html +19 -19
- package/Documentation/GroundPrimitive.html +24 -24
- package/Documentation/GroundPrimitiveRectangleGenerater.html +3 -3
- package/Documentation/HashMap.html +12 -12
- package/Documentation/HeadingPitchRange.html +5 -5
- package/Documentation/HeadingPitchRoll.html +13 -13
- package/Documentation/HeightLimited.html +4 -4
- package/Documentation/HeightModelEffect.html +8 -8
- package/Documentation/HeightmapTerrainData.html +7 -7
- package/Documentation/HermitePolynomialApproximation.html +4 -4
- package/Documentation/HermiteSpline.html +12 -12
- package/Documentation/HilbertOrder.html +1 -1
- package/Documentation/HomeButton.html +5 -5
- package/Documentation/HomeButtonViewModel.html +5 -5
- package/Documentation/ImageMaterialProperty.html +10 -10
- package/Documentation/ImageryLayer.html +34 -34
- package/Documentation/ImageryLayerCollection.html +25 -25
- package/Documentation/ImageryLayerFeatureInfo.html +8 -8
- package/Documentation/ImageryProvider.html +88 -28
- package/Documentation/ImprovedNoise.html +1 -1
- package/Documentation/InfoBox.html +6 -6
- package/Documentation/InfoBoxViewModel.html +11 -11
- package/Documentation/IntersectionTests.html +11 -11
- package/Documentation/Intersections2D.html +4 -4
- package/Documentation/Interval.html +3 -3
- package/Documentation/Ion.html +3 -3
- package/Documentation/IonGeocoderService.html +2 -2
- package/Documentation/IonImageryProvider.html +28 -28
- package/Documentation/IonResource.html +39 -39
- package/Documentation/Iso8601.html +4 -4
- package/Documentation/JulianDate.html +31 -31
- package/Documentation/KeyboardCameraController.html +10 -10
- package/Documentation/KmlCamera.html +1 -1
- package/Documentation/KmlDataSource.html +20 -20
- package/Documentation/KmlFeatureData.html +9 -9
- package/Documentation/KmlLookAt.html +1 -1
- package/Documentation/KmlTour.html +12 -12
- package/Documentation/KmlTourFlyTo.html +5 -5
- package/Documentation/KmlTourWait.html +4 -4
- package/Documentation/Label.html +30 -30
- package/Documentation/LabelCollection.html +15 -15
- package/Documentation/LabelGraphics.html +26 -26
- package/Documentation/LabelVisualizer.html +4 -4
- package/Documentation/LagrangePolynomialApproximation.html +3 -3
- package/Documentation/Layers.html +56 -56
- package/Documentation/LeapSecond.html +3 -3
- package/Documentation/Light.html +3 -3
- package/Documentation/LineScanEffect.html +6 -6
- package/Documentation/LinearApproximation.html +3 -3
- package/Documentation/LinearSpline.html +7 -7
- package/Documentation/LonlatProjection.html +4 -4
- package/Documentation/M3DTree.html +11 -11
- package/Documentation/MapGIS3DTile.html +12 -12
- package/Documentation/MapGIS3DTileFeature.html +10 -10
- package/Documentation/MapGIS3DTileset.html +86 -86
- package/Documentation/MapGISCustomImageryProvider.html +29 -29
- package/Documentation/MapGISFeatureGeojsonProvider.html +9 -9
- package/Documentation/MapGISFeatureLayer.html +52 -52
- package/Documentation/MapGISFeatureProvider.html +9 -9
- package/Documentation/MapGISFeatureTilePrimitiveCollection.html +16 -16
- package/Documentation/MapGISGeojsonLayer.html +38 -38
- package/Documentation/MapGISGeojsonProvider.html +8 -8
- package/Documentation/MapGISGeojsonTilePrimitiveCollection.html +16 -16
- package/Documentation/MapGISLabelLayer.html +18 -18
- package/Documentation/MapGISM3D.html +13 -13
- package/Documentation/MapGISM3DSet.html +319 -311
- package/Documentation/MapGISM3DTileContent.html +3 -3
- package/Documentation/MapGISMapServerImageryProvider.html +4 -4
- package/Documentation/MapGISTerrainProvider.html +297 -297
- package/Documentation/MapGISTileAvailability.html +1098 -0
- package/Documentation/MapGISTileServerImageProvider.html +5 -5
- package/Documentation/MapGISVectorGeojsonProvider.html +9 -9
- package/Documentation/MapGISVectorLayer.html +50 -50
- package/Documentation/MapGISVectorProvider.html +9 -9
- package/Documentation/MapGISVectorTilePrimitiveCollection.html +16 -16
- package/Documentation/MapProjection.html +4 -4
- package/Documentation/MapboxImageryProvider.html +29 -29
- package/Documentation/MapboxStyleImageryProvider.html +29 -29
- package/Documentation/Material.html +44 -44
- package/Documentation/MaterialAppearance.MaterialSupport.html +4 -4
- package/Documentation/MaterialAppearance.html +15 -15
- package/Documentation/MaterialProperty.html +6 -6
- package/Documentation/Math.html +76 -76
- package/Documentation/Matrix2.html +41 -41
- package/Documentation/Matrix3.html +56 -56
- package/Documentation/Matrix4.html +76 -76
- package/Documentation/MeasureAreaTool.html +1 -1
- package/Documentation/MeasureLengthTool.html +7 -7
- package/Documentation/MeasureSlopeTool.html +5 -5
- package/Documentation/Model.html +51 -51
- package/Documentation/ModelAnimation.html +12 -12
- package/Documentation/ModelAnimationCollection.html +10 -10
- package/Documentation/ModelEditor.html +1 -1
- package/Documentation/ModelExplosion.html +15 -15
- package/Documentation/ModelFilterTool.html +5 -5
- package/Documentation/ModelGraphics.html +26 -26
- package/Documentation/ModelMaterial.html +5 -5
- package/Documentation/ModelMesh.html +4 -4
- package/Documentation/ModelNode.html +6 -6
- package/Documentation/ModelTransformTool.html +244 -17
- package/Documentation/ModelVisualizer.html +4 -4
- package/Documentation/Moon.html +7 -7
- package/Documentation/NavigationControl.html +1 -1
- package/Documentation/NavigationHelpButton.html +5 -5
- package/Documentation/NavigationHelpButtonViewModel.html +6 -6
- package/Documentation/NavigationTool.html +2 -2
- package/Documentation/NearFarScalar.html +12 -12
- package/Documentation/NeverTileDiscardPolicy.html +3 -3
- package/Documentation/NodeTransformationProperty.html +8 -8
- package/Documentation/Occluder.html +10 -10
- package/Documentation/OpenCageGeocoderService.html +4 -4
- package/Documentation/OpenStreetMapImageryProvider.html +98 -33
- package/Documentation/OpenWeatherImageryProvider.html +2 -2
- package/Documentation/OrientedBoundingBox.html +20 -20
- package/Documentation/OrthographicFrustum.html +14 -14
- package/Documentation/OrthographicOffCenterFrustum.html +13 -13
- package/Documentation/PackableForInterpolation.html +4 -4
- package/Documentation/Particle.html +13 -13
- package/Documentation/ParticleBurst.html +5 -5
- package/Documentation/ParticleEmitter.html +1 -1
- package/Documentation/ParticleSystem.html +29 -29
- package/Documentation/PathGraphics.html +12 -12
- package/Documentation/PathVisualizer.html +4 -4
- package/Documentation/PeliasGeocoderService.html +3 -3
- package/Documentation/PerInstanceColorAppearance.html +15 -15
- package/Documentation/PerformanceWatchdog.html +5 -5
- package/Documentation/PerformanceWatchdogViewModel.html +6 -6
- package/Documentation/PerspectiveFrustum.html +18 -18
- package/Documentation/PerspectiveOffCenterFrustum.html +14 -14
- package/Documentation/PinBuilder.html +5 -5
- package/Documentation/Plane.html +13 -13
- package/Documentation/PlaneGeometry.html +5 -5
- package/Documentation/PlaneGeometryUpdater.html +3 -3
- package/Documentation/PlaneGraphics.html +15 -15
- package/Documentation/PlaneOutlineGeometry.html +5 -5
- package/Documentation/PointCloudShading.html +11 -11
- package/Documentation/PointGraphics.html +15 -15
- package/Documentation/PointPrimitive.html +14 -14
- package/Documentation/PointPrimitiveCollection.html +15 -15
- package/Documentation/PointVisualizer.html +4 -4
- package/Documentation/PolygonGeometry.html +8 -8
- package/Documentation/PolygonGeometryUpdater.html +3 -3
- package/Documentation/PolygonGraphics.html +26 -26
- package/Documentation/PolygonHierarchy.html +3 -3
- package/Documentation/PolygonOutlineGeometry.html +6 -6
- package/Documentation/Polyline.html +8 -8
- package/Documentation/PolylineArrowMaterialProperty.html +7 -7
- package/Documentation/PolylineCollection.html +15 -15
- package/Documentation/PolylineColorAppearance.html +12 -12
- package/Documentation/PolylineDashMaterialProperty.html +10 -10
- package/Documentation/PolylineGeometry.html +5 -5
- package/Documentation/PolylineGeometryUpdater.html +25 -25
- package/Documentation/PolylineGlowMaterialProperty.html +9 -9
- package/Documentation/PolylineGraphics.html +17 -17
- package/Documentation/PolylineMaterialAppearance.html +12 -12
- package/Documentation/PolylineOutlineMaterialProperty.html +9 -9
- package/Documentation/PolylineTrailLinkMaterialProperty.html +1 -1
- package/Documentation/PolylineVisualizer.html +4 -4
- package/Documentation/PolylineVolumeAnimationGeometry.html +14 -14
- package/Documentation/PolylineVolumeGeometry.html +5 -5
- package/Documentation/PolylineVolumeGeometryUpdater.html +3 -3
- package/Documentation/PolylineVolumeGraphics.html +17 -17
- package/Documentation/PolylineVolumeOutlineGeometry.html +5 -5
- package/Documentation/PositionProperty.html +7 -7
- package/Documentation/PositionPropertyArray.html +8 -8
- package/Documentation/PostProcessStage.html +16 -16
- package/Documentation/PostProcessStageCollection.html +13 -13
- package/Documentation/PostProcessStageComposite.html +11 -11
- package/Documentation/PostProcessStageLibrary.html +15 -15
- package/Documentation/Primitive.html +120 -21
- package/Documentation/PrimitiveCollection.html +15 -15
- package/Documentation/ProjectionPicker.html +5 -5
- package/Documentation/ProjectionPickerViewModel.html +13 -13
- package/Documentation/Property.html +5 -5
- package/Documentation/PropertyArray.html +6 -6
- package/Documentation/PropertyBag.html +10 -10
- package/Documentation/ProviderViewModel.html +7 -7
- package/Documentation/Proxy.html +2 -2
- package/Documentation/QuadraticRealPolynomial.html +3 -3
- package/Documentation/QuantizedMeshTerrainData.html +7 -7
- package/Documentation/QuarticRealPolynomial.html +3 -3
- package/Documentation/Quaternion.html +45 -45
- package/Documentation/QuaternionSpline.html +7 -7
- package/Documentation/Queue.html +9 -9
- package/Documentation/RadarMaterialProperty.html +1 -1
- package/Documentation/RadarScanEffect.html +3 -3
- package/Documentation/Ray.html +5 -5
- package/Documentation/ReImg.html +2 -2
- package/Documentation/Rectangle.html +35 -35
- package/Documentation/RectangleGeometry.html +6 -6
- package/Documentation/RectangleGeometryUpdater.html +3 -3
- package/Documentation/RectangleGraphics.html +23 -23
- package/Documentation/RectangleOutlineGeometry.html +5 -5
- package/Documentation/ReferenceProperty.html +13 -13
- package/Documentation/Request.html +14 -14
- package/Documentation/RequestErrorEvent.html +5 -5
- package/Documentation/RequestScheduler.html +5 -5
- package/Documentation/ResetViewNavigationControl.html +7 -7
- package/Documentation/Resource.html +54 -54
- package/Documentation/RoamParticle.html +25 -25
- package/Documentation/RuntimeError.html +4 -4
- package/Documentation/SampleElevationTool.html +2 -2
- package/Documentation/SampledPositionProperty.html +20 -20
- package/Documentation/SampledProperty.html +19 -19
- package/Documentation/Scene.html +119 -119
- package/Documentation/SceneLayer.html +31 -31
- package/Documentation/SceneModePicker.html +5 -5
- package/Documentation/SceneModePickerViewModel.html +15 -15
- package/Documentation/SceneProjector.html +30 -30
- package/Documentation/SceneProjectorEx.html +19 -19
- package/Documentation/SceneTransforms.html +3 -3
- package/Documentation/ScreenSpaceCameraController.html +25 -25
- package/Documentation/ScreenSpaceEventHandler.html +8 -8
- package/Documentation/SearchlightEffect.html +4 -4
- package/Documentation/SelectTool.html +4 -4
- package/Documentation/SelectionIndicator.html +5 -5
- package/Documentation/SelectionIndicatorViewModel.html +12 -12
- package/Documentation/ShadowAnalysis.html +12 -12
- package/Documentation/ShadowMap.html +8 -8
- package/Documentation/ShadowRateAnalysis.html +14 -14
- package/Documentation/ShowGeometryInstanceAttribute.html +6 -6
- package/Documentation/Simon1994PlanetaryPositions.html +3 -3
- package/Documentation/SimplePolylineGeometry.html +5 -5
- package/Documentation/SingleTileImageryProvider.html +29 -29
- package/Documentation/SkyAtmosphere.html +9 -9
- package/Documentation/SkyBox.html +6 -6
- package/Documentation/SkyLineAnalysis.html +3 -3
- package/Documentation/SphereEmitter.html +2 -2
- package/Documentation/SphereGeometry.html +5 -5
- package/Documentation/SphereOutlineGeometry.html +5 -5
- package/Documentation/Spherical.html +13 -13
- package/Documentation/Spline.html +7 -7
- package/Documentation/StableParticle.html +28 -28
- package/Documentation/StripeMaterialProperty.html +11 -11
- package/Documentation/Style.html +26 -26
- package/Documentation/StyleExpression.html +3 -3
- package/Documentation/Sun.html +5 -5
- package/Documentation/SunLight.html +3 -3
- package/Documentation/SvgPathBindingHandler.html +2 -2
- package/Documentation/TaskProcessor.html +5 -5
- package/Documentation/TerrainAnalyse.html +14 -14
- package/Documentation/TerrainData.html +7 -7
- package/Documentation/TerrainProfile.html +4 -4
- package/Documentation/TerrainProvider.html +16 -16
- package/Documentation/Texture3D.html +1 -1
- package/Documentation/ThemeManager.html +14 -14
- package/Documentation/TiandituImageryProvider.html +4 -4
- package/Documentation/TileAvailability.html +6 -6
- package/Documentation/TileCoordinatesImageryProvider.html +28 -28
- package/Documentation/TileDiscardPolicy.html +3 -3
- package/Documentation/TileMapServiceImageryProvider.html +98 -33
- package/Documentation/TileProviderError.html +12 -12
- package/Documentation/TilingScheme.html +10 -10
- package/Documentation/TimeDynamicImagery.html +6 -6
- package/Documentation/TimeDynamicPointCloud.html +16 -16
- package/Documentation/TimeInterval.html +21 -21
- package/Documentation/TimeIntervalCollection.html +23 -23
- package/Documentation/TimeIntervalCollectionPositionProperty.html +8 -8
- package/Documentation/TimeIntervalCollectionProperty.html +6 -6
- package/Documentation/Timeline.html +6 -6
- package/Documentation/ToggleButtonViewModel.html +4 -4
- package/Documentation/Tooltip.html +5 -5
- package/Documentation/TransactionImplement.html +5 -5
- package/Documentation/Transforms.html +16 -16
- package/Documentation/TranslationRotationScale.html +5 -5
- package/Documentation/TriangulationTool.html +8 -8
- package/Documentation/TridiagonalSystemSolver.html +2 -2
- package/Documentation/TrustedServers.html +5 -5
- package/Documentation/UrlTemplateImageryProvider.html +130 -33
- package/Documentation/UserInterfaceControl.html +10 -10
- package/Documentation/VRButton.html +5 -5
- package/Documentation/VRButtonViewModel.html +8 -8
- package/Documentation/VRTheWorldTerrainProvider.html +13 -13
- package/Documentation/VelocityOrientationProperty.html +7 -7
- package/Documentation/VelocityVectorProperty.html +7 -7
- package/Documentation/VertexFormat.html +18 -18
- package/Documentation/VideoSynchronizer.html +7 -7
- package/Documentation/Viewer.html +56 -56
- package/Documentation/ViewportQuad.html +7 -7
- package/Documentation/ViewshedAnalysis.html +190 -10
- package/Documentation/VisiblityAnalysis.html +13 -13
- package/Documentation/VisualAnalysisManager.html +179 -7
- package/Documentation/Visualizer.html +4 -4
- package/Documentation/VoxelPrimitive.html +9 -9
- package/Documentation/WallGeometry.html +6 -6
- package/Documentation/WallGeometryUpdater.html +3 -3
- package/Documentation/WallGraphics.html +17 -17
- package/Documentation/WallOutlineGeometry.html +6 -6
- package/Documentation/WaterReflection.html +9 -9
- package/Documentation/WeatherEffect.html +8 -8
- package/Documentation/WebMapServiceImageryProvider.html +36 -36
- package/Documentation/WebMapTileServiceImageryProvider.html +33 -33
- package/Documentation/WebMercatorProjection.html +97 -7
- package/Documentation/WebMercatorTilingScheme.html +10 -10
- package/Documentation/WeightSpline.html +7 -7
- package/Documentation/WfsProvider.html +9 -9
- package/Documentation/Wind3D.html +13 -13
- package/Documentation/WindowLightEffect.html +4 -4
- package/Documentation/ZoomNavigationControl.html +5 -5
- package/Documentation/global.html +141 -141
- package/Documentation/global.html#ArcType +4 -4
- package/Documentation/global.html#Axis +11 -11
- package/Documentation/global.html#BaiduProject +19 -19
- package/Documentation/global.html#BingMapsStyle +11 -11
- package/Documentation/global.html#BlendEquation +6 -6
- package/Documentation/global.html#BlendFunction +16 -16
- package/Documentation/global.html#BlendOption +4 -4
- package/Documentation/global.html#CameraEventType +6 -6
- package/Documentation/global.html#Cesium3DTileColorBlendMode +4 -4
- package/Documentation/global.html#ClassificationType +4 -4
- package/Documentation/global.html#ClippingGeometryType +8 -8
- package/Documentation/global.html#ClockRange +4 -4
- package/Documentation/global.html#ClockStep +4 -4
- package/Documentation/global.html#ColorBlendMode +4 -4
- package/Documentation/global.html#ComponentDatatype +15 -15
- package/Documentation/global.html#CoordnateTransform +6 -6
- package/Documentation/global.html#CornerType +4 -4
- package/Documentation/global.html#CullFace +4 -4
- package/Documentation/global.html#DepthFunction +9 -9
- package/Documentation/global.html#ExtrapolationType +4 -4
- package/Documentation/global.html#GeocodeType +3 -3
- package/Documentation/global.html#HeightReference +4 -4
- package/Documentation/global.html#HeightmapEncoding +3 -3
- package/Documentation/global.html#HorizontalOrigin +4 -4
- package/Documentation/global.html#ImagerySplitDirection +4 -4
- package/Documentation/global.html#IndexDatatype +9 -9
- package/Documentation/global.html#InterceptorsUtil +1 -1
- package/Documentation/global.html#Intersect +4 -4
- package/Documentation/global.html#IonWorldImageryStyle +4 -4
- package/Documentation/global.html#KeyboardEventModifier +4 -4
- package/Documentation/global.html#LabelStyle +4 -4
- package/Documentation/global.html#LightingMode +3 -3
- package/Documentation/global.html#MapGISCustomTilingScheme +16 -16
- package/Documentation/global.html#MapMode2D +3 -3
- package/Documentation/global.html#ModelAnimationLoop +4 -4
- package/Documentation/global.html#ModelExplosionType +5 -5
- package/Documentation/global.html#OutlineRenderMode +4 -4
- package/Documentation/global.html#Pass +17 -17
- package/Documentation/global.html#PixelDatatype +10 -10
- package/Documentation/global.html#PixelFormat +21 -21
- package/Documentation/global.html#PointLight +1 -1
- package/Documentation/global.html#PostProcessStageSampleMode +3 -3
- package/Documentation/global.html#PrimitiveType +8 -8
- package/Documentation/global.html#ReferenceFrame +3 -3
- package/Documentation/global.html#RequestState +7 -7
- package/Documentation/global.html#RequestType +5 -5
- package/Documentation/global.html#SceneMode +6 -6
- package/Documentation/global.html#ScreenSpaceEventType +16 -16
- package/Documentation/global.html#SectionRender +1 -1
- package/Documentation/global.html#ShadowMode +5 -5
- package/Documentation/global.html#ShadowRateDrawCommand +3 -3
- package/Documentation/global.html#SpotLight +1 -1
- package/Documentation/global.html#Spyglass +1 -1
- package/Documentation/global.html#StencilFunction +9 -9
- package/Documentation/global.html#StencilOperation +9 -9
- package/Documentation/global.html#StripeOrientation +3 -3
- package/Documentation/global.html#SwipeModeType +7 -7
- package/Documentation/global.html#SwiperController +1 -1
- package/Documentation/global.html#TextureMagnificationFilter +3 -3
- package/Documentation/global.html#TextureMinificationFilter +7 -7
- package/Documentation/global.html#TimeStandard +3 -3
- package/Documentation/global.html#TopoJSONUtil +1 -1
- package/Documentation/global.html#UrlUtil +1 -1
- package/Documentation/global.html#VerticalOrigin +5 -5
- package/Documentation/global.html#Visibility +4 -4
- package/Documentation/global.html#WebGLConstants +583 -583
- package/Documentation/global.html#WindingOrder +3 -3
- package/Documentation/global.html#XmlUtil +137 -2
- package/Documentation/global.html#angle +1 -1
- package/Documentation/global.html#barycentricCoordinates +1 -1
- package/Documentation/global.html#binarySearch +1 -1
- package/Documentation/global.html#binarySearchComparator +1 -1
- package/Documentation/global.html#buildModuleUrl +3 -3
- package/Documentation/global.html#cancelAnimationFrame +1 -1
- package/Documentation/global.html#clippingFillImage +1 -1
- package/Documentation/global.html#clone +1 -1
- package/Documentation/global.html#color +3 -3
- package/Documentation/global.html#combine +1 -1
- package/Documentation/global.html#createCommand +1 -1
- package/Documentation/global.html#createCommonTileInfo +3 -1
- package/Documentation/global.html#createElevationBandMaterial +1 -1
- package/Documentation/global.html#createElevationBandMaterialBand +1 -1
- package/Documentation/global.html#createElevationBandMaterialEntry +1 -1
- package/Documentation/global.html#createGuid +1 -1
- package/Documentation/global.html#createOsmBuildings +1 -1
- package/Documentation/global.html#createTangentSpaceDebugPrimitive +1 -1
- package/Documentation/global.html#createWorldImagery +1 -1
- package/Documentation/global.html#createWorldTerrain +1 -1
- package/Documentation/global.html#decay +2 -2
- package/Documentation/global.html#defaultValue +2 -2
- package/Documentation/global.html#defined +1 -1
- package/Documentation/global.html#destroyObject +1 -1
- package/Documentation/global.html#direction +2 -2
- package/Documentation/global.html#distance +2 -2
- package/Documentation/global.html#enableExplosion +1 -1
- package/Documentation/global.html#exportKml +1 -1
- package/Documentation/global.html#exportKmlModelCallback +1 -1
- package/Documentation/global.html#exportKmlResultKml +1 -1
- package/Documentation/global.html#exportKmlResultKmz +1 -1
- package/Documentation/global.html#formatError +1 -1
- package/Documentation/global.html#getAbsoluteUri +1 -1
- package/Documentation/global.html#getBaseUri +1 -1
- package/Documentation/global.html#getExtensionFromUri +1 -1
- package/Documentation/global.html#getFilenameFromUri +1 -1
- package/Documentation/global.html#getImagePixels +1 -1
- package/Documentation/global.html#getLayerToUse +150 -0
- package/Documentation/global.html#getTimestamp +1 -1
- package/Documentation/global.html#getViewModel +1 -1
- package/Documentation/global.html#hasText +1 -1
- package/Documentation/global.html#id +3 -3
- package/Documentation/global.html#intensity +3 -3
- package/Documentation/global.html#isGeographic +1 -1
- package/Documentation/global.html#isLeapYear +1 -1
- package/Documentation/global.html#mergeSort +1 -1
- package/Documentation/global.html#mergeSortComparator +1 -1
- package/Documentation/global.html#objectToQuery +1 -1
- package/Documentation/global.html#penumbra +1 -1
- package/Documentation/global.html#pointInsideTriangle +1 -1
- package/Documentation/global.html#position +2 -2
- package/Documentation/global.html#queryToObject +1 -1
- package/Documentation/global.html#requestAnimationFrame +1 -1
- package/Documentation/global.html#requestAnimationFrameCallback +1 -1
- package/Documentation/global.html#sampleTerrain +1 -1
- package/Documentation/global.html#sampleTerrainMostDetailed +1 -1
- package/Documentation/global.html#show +1 -1
- package/Documentation/global.html#startTime +1 -1
- package/Documentation/global.html#subdivideArray +1 -1
- package/Documentation/global.html#terrainProvider +1 -1
- package/Documentation/global.html#viewerCesium3DTilesInspectorMixin +1 -1
- package/Documentation/global.html#viewerCesiumInspectorMixin +1 -1
- package/Documentation/global.html#viewerDragDropMixin +8 -8
- package/Documentation/global.html#viewerPerformanceWatchdogMixin +1 -1
- package/Documentation/global.html#writeTextToCanvas +1 -1
- package/Documentation/types.txt +1 -1
- package/README.md +91 -25
- package/dist/Cesium.d.ts +719 -84
- package/dist/Cesium.js +298 -19
- package/dist/Workers/Color-ff1fdef4.js +1 -0
- package/dist/Workers/PrimitivePipeline-a7cf99d1.js +1 -0
- package/dist/Workers/combineGeometry.js +1 -1
- package/dist/Workers/createBoxGeometry.js +1 -1
- package/dist/Workers/createBoxOutlineGeometry.js +1 -1
- package/dist/Workers/createCircleGeometry.js +1 -1
- package/dist/Workers/createCircleOutlineGeometry.js +1 -1
- package/dist/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/dist/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/dist/Workers/createCorridorGeometry.js +1 -1
- package/dist/Workers/createCorridorOutlineGeometry.js +1 -1
- package/dist/Workers/createCylinderGeometry.js +1 -1
- package/dist/Workers/createCylinderOutlineGeometry.js +1 -1
- package/dist/Workers/createEllipseGeometry.js +1 -1
- package/dist/Workers/createEllipseOutlineGeometry.js +1 -1
- package/dist/Workers/createEllipsoidGeometry.js +1 -1
- package/dist/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/dist/Workers/createFrustumGeometry.js +1 -1
- package/dist/Workers/createFrustumOutlineGeometry.js +1 -1
- package/dist/Workers/createGeometry.js +1 -1
- package/dist/Workers/createGroundPolylineGeometry.js +1 -1
- package/dist/Workers/createPlaneGeometry.js +1 -1
- package/dist/Workers/createPlaneOutlineGeometry.js +1 -1
- package/dist/Workers/createPolygonGeometry.js +1 -1
- package/dist/Workers/createPolygonOutlineGeometry.js +1 -1
- package/dist/Workers/createPolylineGeometry.js +1 -1
- package/dist/Workers/createPolylineVolumeGeometry.js +1 -1
- package/dist/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/dist/Workers/createRectangleGeometry.js +1 -1
- package/dist/Workers/createRectangleOutlineGeometry.js +1 -1
- package/dist/Workers/createSimplePolylineGeometry.js +1 -1
- package/dist/Workers/createSphereGeometry.js +1 -1
- package/dist/Workers/createSphereOutlineGeometry.js +1 -1
- package/dist/Workers/createVectorTileGeometries.js +1 -1
- package/dist/Workers/createVectorTilePolygons.js +1 -1
- package/dist/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/dist/Workers/createVerticesFromHeightmap.js +1 -1
- package/dist/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/dist/Workers/createWallGeometry.js +1 -1
- package/dist/Workers/createWallOutlineGeometry.js +1 -1
- package/dist/Workers/uncompressZip.js +1 -1
- package/dist/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/package.json +1 -1
- package/Documentation/M3DTile.html +0 -854
- package/Documentation/M3DTileFeature.html +0 -1113
- package/Documentation/M3DTileset.html +0 -4589
- package/Documentation/global.html#inherits +0 -150
- package/dist/ThirdParty/unzip.min.js +0 -1
- package/dist/Workers/AttributeCompression-7a920947.js +0 -1
- package/dist/Workers/AttributeCompression-b9605c73.js +0 -1
- package/dist/Workers/AttributeCompression-ceaf1f7d.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-3005be1a.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-6524b214.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-73a9d462.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-cf02d6c7.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-d2a93b66.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-fe8fad3e.js +0 -1
- package/dist/Workers/BoundingRectangle-2bb5d73d.js +0 -1
- package/dist/Workers/BoundingRectangle-487613f3.js +0 -1
- package/dist/Workers/BoundingRectangle-7f4e0022.js +0 -1
- package/dist/Workers/BoundingRectangle-8d042be0.js +0 -1
- package/dist/Workers/BoundingRectangle-b3ae8525.js +0 -1
- package/dist/Workers/BoundingRectangle-ce593811.js +0 -1
- package/dist/Workers/BoxGeometry-2d60329e.js +0 -1
- package/dist/Workers/BoxGeometry-3726be8b.js +0 -1
- package/dist/Workers/BoxGeometry-76f70c3f.js +0 -1
- package/dist/Workers/BoxGeometry-91ce90fe.js +0 -1
- package/dist/Workers/BoxGeometry-d1b4ef4f.js +0 -1
- package/dist/Workers/BoxGeometry-f55ff093.js +0 -1
- package/dist/Workers/Cartesian2-078e6458.js +0 -1
- package/dist/Workers/Cartesian2-c1eb9da0.js +0 -1
- package/dist/Workers/Check-f996273c.js +0 -1
- package/dist/Workers/Color-3aa21182.js +0 -1
- package/dist/Workers/Color-527894a9.js +0 -1
- package/dist/Workers/Color-68105b00.js +0 -1
- package/dist/Workers/Color-d7f86623.js +0 -1
- package/dist/Workers/Color-e9b0b56b.js +0 -1
- package/dist/Workers/Color-fb7b0391.js +0 -1
- package/dist/Workers/ComponentDatatype-e44126e4.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-4529853e.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-bd04145a.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-c9ea5c4a.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-cd63dc83.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-df225097.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-ed9489b1.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-259dc831.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-353eec0a.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-4c3150e8.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-6546be88.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-83c470f2.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-90fffecc.js +0 -1
- package/dist/Workers/CylinderGeometry-325283f2.js +0 -1
- package/dist/Workers/CylinderGeometry-5f25fc13.js +0 -1
- package/dist/Workers/CylinderGeometry-6c32efdc.js +0 -1
- package/dist/Workers/CylinderGeometry-7cfc0752.js +0 -1
- package/dist/Workers/CylinderGeometry-a8375e63.js +0 -1
- package/dist/Workers/CylinderGeometry-c16b0480.js +0 -1
- package/dist/Workers/CylinderGeometryLibrary-88cb80d2.js +0 -1
- package/dist/Workers/EllipseGeometry-4dc2f3cd.js +0 -1
- package/dist/Workers/EllipseGeometry-5bc7efb7.js +0 -1
- package/dist/Workers/EllipseGeometry-7ba3aa6f.js +0 -1
- package/dist/Workers/EllipseGeometry-9a5145f6.js +0 -1
- package/dist/Workers/EllipseGeometry-a00d9fde.js +0 -1
- package/dist/Workers/EllipseGeometry-d5153296.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-46efe941.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-4c7e22bb.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-716ccbc1.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-8b1f8e47.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-9dd8ed16.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-cde71e7f.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-18088f7f.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-5b7ad7d6.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-72c1fd73.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-97648130.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-c0b0a9a4.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-e46b4af5.js +0 -1
- package/dist/Workers/EllipsoidGeodesic-2992081b.js +0 -1
- package/dist/Workers/EllipsoidGeodesic-a0581819.js +0 -1
- package/dist/Workers/EllipsoidGeodesic-e1197ec2.js +0 -1
- package/dist/Workers/EllipsoidGeometry-5af792d2.js +0 -1
- package/dist/Workers/EllipsoidGeometry-751dd3dc.js +0 -1
- package/dist/Workers/EllipsoidGeometry-9c399bf7.js +0 -1
- package/dist/Workers/EllipsoidGeometry-ad61339f.js +0 -1
- package/dist/Workers/EllipsoidGeometry-d0a3d570.js +0 -1
- package/dist/Workers/EllipsoidGeometry-d28fa7b5.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-14372733.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-34940155.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-8ca051b2.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-aa49f341.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-bf6fec74.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-f557c9da.js +0 -1
- package/dist/Workers/EllipsoidRhumbLine-2fd480f5.js +0 -1
- package/dist/Workers/EllipsoidRhumbLine-809f5074.js +0 -1
- package/dist/Workers/EllipsoidRhumbLine-d9133c69.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-2b15994f.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-67eb8fd7.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-7e7cce04.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-badcc339.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-d5fd24ed.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-eed317db.js +0 -1
- package/dist/Workers/EncodedCartesian3-6f721b97.js +0 -1
- package/dist/Workers/EncodedCartesian3-9b5052a5.js +0 -1
- package/dist/Workers/EncodedCartesian3-ac19e14b.js +0 -1
- package/dist/Workers/FrustumGeometry-38234739.js +0 -1
- package/dist/Workers/FrustumGeometry-697158a6.js +0 -1
- package/dist/Workers/FrustumGeometry-705dc598.js +0 -1
- package/dist/Workers/FrustumGeometry-7cc95152.js +0 -1
- package/dist/Workers/FrustumGeometry-a0988373.js +0 -1
- package/dist/Workers/FrustumGeometry-bf3f376b.js +0 -1
- package/dist/Workers/FullArray.js +0 -1
- package/dist/Workers/GeometryAttribute-51995e5a.js +0 -1
- package/dist/Workers/GeometryAttribute-8106b887.js +0 -1
- package/dist/Workers/GeometryAttribute-9cc31675.js +0 -1
- package/dist/Workers/GeometryAttribute-ccf4e0b6.js +0 -1
- package/dist/Workers/GeometryAttribute-e03451d8.js +0 -1
- package/dist/Workers/GeometryAttribute-e89ef932.js +0 -1
- package/dist/Workers/GeometryInstance-083d7584.js +0 -1
- package/dist/Workers/GeometryInstance-3287a41d.js +0 -1
- package/dist/Workers/GeometryInstance-5729d1a7.js +0 -1
- package/dist/Workers/GeometryInstance-75eda02f.js +0 -1
- package/dist/Workers/GeometryInstance-a24fc358.js +0 -1
- package/dist/Workers/GeometryInstance-a29ed6fd.js +0 -1
- package/dist/Workers/GeometryOffsetAttribute-b02d5bb9.js +0 -1
- package/dist/Workers/GeometryPipeline-160871a5.js +0 -1
- package/dist/Workers/GeometryPipeline-21c7c817.js +0 -1
- package/dist/Workers/GeometryPipeline-46833021.js +0 -1
- package/dist/Workers/GeometryPipeline-64734a0f.js +0 -1
- package/dist/Workers/GeometryPipeline-868a22d5.js +0 -1
- package/dist/Workers/GeometryPipeline-dd278883.js +0 -1
- package/dist/Workers/IndexDatatype-516320ea.js +0 -1
- package/dist/Workers/IntersectionTests-318fd637.js +0 -1
- package/dist/Workers/IntersectionTests-46ce3a3a.js +0 -1
- package/dist/Workers/IntersectionTests-5403be00.js +0 -1
- package/dist/Workers/IntersectionTests-7cdfef0c.js +0 -1
- package/dist/Workers/IntersectionTests-ca6d4041.js +0 -1
- package/dist/Workers/IntersectionTests-f3d5850d.js +0 -1
- package/dist/Workers/Math-5bbcea10.js +0 -1
- package/dist/Workers/Matrix2-10a61a55.js +0 -1
- package/dist/Workers/OrientedBoundingBox-2f174fe3.js +0 -1
- package/dist/Workers/OrientedBoundingBox-6c372bbc.js +0 -1
- package/dist/Workers/OrientedBoundingBox-6eb17dbb.js +0 -1
- package/dist/Workers/OrientedBoundingBox-6ff47a8a.js +0 -1
- package/dist/Workers/OrientedBoundingBox-a6a4c32b.js +0 -1
- package/dist/Workers/OrientedBoundingBox-d8d60f95.js +0 -1
- package/dist/Workers/Plane-0ec594f2.js +0 -1
- package/dist/Workers/Plane-0f30f65b.js +0 -1
- package/dist/Workers/Plane-d53c8e90.js +0 -1
- package/dist/Workers/Plane-f7823f4c.js +0 -1
- package/dist/Workers/Plane-fa12edbb.js +0 -1
- package/dist/Workers/Plane-fa98d6ca.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-1b173d8c.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-2394a24c.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-336d42f5.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-5bb2def1.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-c4287ef2.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-e7ef9273.js +0 -1
- package/dist/Workers/PolygonPipeline-01006d79.js +0 -1
- package/dist/Workers/PolygonPipeline-19b66f06.js +0 -1
- package/dist/Workers/PolygonPipeline-37a33a39.js +0 -1
- package/dist/Workers/PolygonPipeline-5983aa11.js +0 -1
- package/dist/Workers/PolygonPipeline-7c54e19e.js +0 -1
- package/dist/Workers/PolygonPipeline-d1b4c320.js +0 -1
- package/dist/Workers/PolylinePipeline-45329d56.js +0 -1
- package/dist/Workers/PolylinePipeline-6484d4ee.js +0 -1
- package/dist/Workers/PolylinePipeline-971ba240.js +0 -1
- package/dist/Workers/PolylinePipeline-d5024385.js +0 -1
- package/dist/Workers/PolylinePipeline-d59947c4.js +0 -1
- package/dist/Workers/PolylinePipeline-eeb6f648.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-2f82c4db.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-81481506.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-955f4335.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-d57282e3.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-e2e6c33b.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-e435332a.js +0 -1
- package/dist/Workers/PrimitivePipeline-100ea173.js +0 -1
- package/dist/Workers/PrimitivePipeline-757ec521.js +0 -1
- package/dist/Workers/PrimitivePipeline-928d43fe.js +0 -1
- package/dist/Workers/PrimitivePipeline-986742a6.js +0 -1
- package/dist/Workers/PrimitivePipeline-9deb0937.js +0 -1
- package/dist/Workers/PrimitivePipeline-b3cc986b.js +0 -1
- package/dist/Workers/PrimitivePipeline-ed7c0918.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-02221243.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-336b3589.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-3c449dce.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-44075333.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-9e402320.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-af611323.js +0 -1
- package/dist/Workers/RuntimeError-ac2797b4.js +0 -1
- package/dist/Workers/TerrainEncoding-03f4779b.js +0 -1
- package/dist/Workers/TerrainEncoding-652abf1d.js +0 -1
- package/dist/Workers/TerrainEncoding-6f894d6e.js +0 -1
- package/dist/Workers/TerrainEncoding-7ea7a6aa.js +0 -1
- package/dist/Workers/TerrainEncoding-a621a0f9.js +0 -1
- package/dist/Workers/TerrainEncoding-d2f48ea1.js +0 -1
- package/dist/Workers/Transforms-1fa85493.js +0 -1
- package/dist/Workers/Transforms-5aeb1d5e.js +0 -1
- package/dist/Workers/Transforms-70ded1e8.js +0 -1
- package/dist/Workers/Transforms-713e2e92.js +0 -1
- package/dist/Workers/Transforms-8c8e0c6f.js +0 -1
- package/dist/Workers/Transforms-984eb057.js +0 -1
- package/dist/Workers/VertexFormat-90d15264.js +0 -1
- package/dist/Workers/WallGeometryLibrary-40d299b6.js +0 -1
- package/dist/Workers/WallGeometryLibrary-5386b8d1.js +0 -1
- package/dist/Workers/WallGeometryLibrary-62af8286.js +0 -1
- package/dist/Workers/WallGeometryLibrary-8e2f0582.js +0 -1
- package/dist/Workers/WallGeometryLibrary-c815a7b8.js +0 -1
- package/dist/Workers/WallGeometryLibrary-fcee93b1.js +0 -1
- package/dist/Workers/WebMercatorProjection-941959a9.js +0 -1
- package/dist/Workers/WebMercatorProjection-9d47817f.js +0 -1
- package/dist/Workers/WebMercatorProjection-e6de5e67.js +0 -1
- package/dist/Workers/arrayRemoveDuplicates-bdf50aa0.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-078e6458","./Check-f996273c","./when-ae2e0b60","./Transforms-984eb057","./WebGLConstants-35626ea2"],function(e,x,t,a,L,n){"use strict";var r=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});function w(e,t,n,r){this[0]=a.defaultValue(e,0),this[1]=a.defaultValue(n,0),this[2]=a.defaultValue(t,0),this[3]=a.defaultValue(r,0)}w.packedLength=4,w.pack=function(e,t,n){return n=a.defaultValue(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t},w.unpack=function(e,t,n){return t=a.defaultValue(t,0),(n=a.defined(n)?n:new w)[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n},w.clone=function(e,t){if(a.defined(e))return a.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new w(e[0],e[2],e[1],e[3])},w.fromArray=function(e,t,n){return t=a.defaultValue(t,0),(n=a.defined(n)?n:new w)[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n},w.fromColumnMajorArray=function(e,t){return w.clone(e,t)},w.fromRowMajorArray=function(e,t){return a.defined(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new w(e[0],e[1],e[2],e[3])},w.fromScale=function(e,t){return a.defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new w(e.x,0,0,e.y)},w.fromUniformScale=function(e,t){return a.defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new w(e,0,0,e)},w.fromRotation=function(e,t){var n=Math.cos(e),e=Math.sin(e);return a.defined(t)?(t[0]=n,t[1]=e,t[2]=-e,t[3]=n,t):new w(n,-e,e,n)},w.toArray=function(e,t){return a.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},w.getElementIndex=function(e,t){return 2*e+t},w.getColumn=function(e,t,n){var t=2*t,r=e[t],e=e[1+t];return n.x=r,n.y=e,n},w.setColumn=function(e,t,n,r){t*=2;return(r=w.clone(e,r))[t]=n.x,r[1+t]=n.y,r},w.getRow=function(e,t,n){var r=e[t],e=e[t+2];return n.x=r,n.y=e,n},w.setRow=function(e,t,n,r){return(r=w.clone(e,r))[t]=n.x,r[t+2]=n.y,r};var i=new x.Cartesian2,u=(w.getScale=function(e,t){return t.x=x.Cartesian2.magnitude(x.Cartesian2.fromElements(e[0],e[1],i)),t.y=x.Cartesian2.magnitude(x.Cartesian2.fromElements(e[2],e[3],i)),t},new x.Cartesian2),o=(w.getMaximumScale=function(e){return w.getScale(e,u),x.Cartesian2.maximumComponent(u)},w.multiply=function(e,t,n){var r=e[0]*t[0]+e[2]*t[1],a=e[0]*t[2]+e[2]*t[3],i=e[1]*t[0]+e[3]*t[1],e=e[1]*t[2]+e[3]*t[3];return n[0]=r,n[1]=i,n[2]=a,n[3]=e,n},w.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n},w.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n},w.multiplyByVector=function(e,t,n){var r=e[0]*t.x+e[2]*t.y,e=e[1]*t.x+e[3]*t.y;return n.x=r,n.y=e,n},w.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n},w.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n},w.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},w.transpose=function(e,t){var n=e[0],r=e[2],a=e[1],e=e[3];return t[0]=n,t[1]=r,t[2]=a,t[3]=e,t},w.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},w.equals=function(e,t){return e===t||a.defined(e)&&a.defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},w.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]},w.equalsEpsilon=function(e,t,n){return n=a.defaultValue(n,0),e===t||a.defined(e)&&a.defined(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n},w.IDENTITY=Object.freeze(new w(1,0,0,1)),w.ZERO=Object.freeze(new w(0,0,0,0)),w.COLUMN0ROW0=0,w.COLUMN0ROW1=1,w.COLUMN1ROW0=2,w.COLUMN1ROW1=3,Object.defineProperties(w.prototype,{length:{get:function(){return w.packedLength}}}),w.prototype.clone=function(e){return w.clone(this,e)},w.prototype.equals=function(e){return w.equals(this,e)},w.prototype.equalsEpsilon=function(e,t){return w.equalsEpsilon(this,e,t)},w.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"},{POINTS:n.WebGLConstants.POINTS,LINES:n.WebGLConstants.LINES,LINE_LOOP:n.WebGLConstants.LINE_LOOP,LINE_STRIP:n.WebGLConstants.LINE_STRIP,TRIANGLES:n.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:n.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:n.WebGLConstants.TRIANGLE_FAN}),s=(o.validate=function(e){return e===o.POINTS||e===o.LINES||e===o.LINE_LOOP||e===o.LINE_STRIP||e===o.TRIANGLES||e===o.TRIANGLE_STRIP||e===o.TRIANGLE_FAN},Object.freeze(o));function f(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=a.defaultValue(e.primitiveType,s.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=a.defaultValue(e.geometryType,r.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}f.computeNumberOfVertices=function(e){var t,n,r=-1;for(t in e.attributes)e.attributes.hasOwnProperty(t)&&a.defined(e.attributes[t])&&a.defined(e.attributes[t].values)&&(r=(n=e.attributes[t]).values.length/n.componentsPerAttribute);return r};var g=new x.Cartographic,S=new x.Cartesian3,A=new L.Matrix4,O=[new x.Cartographic,new x.Cartographic,new x.Cartographic],M=[new x.Cartesian2,new x.Cartesian2,new x.Cartesian2],R=[new x.Cartesian2,new x.Cartesian2,new x.Cartesian2],V=new x.Cartesian3,P=new L.Quaternion,v=new L.Matrix4,G=new w;f._textureCoordinateRotationPoints=function(e,t,n,r){for(var a=x.Rectangle.center(r,g),a=x.Cartographic.toCartesian(a,n,S),a=L.Transforms.eastNorthUpToFixedFrame(a,n,A),i=L.Matrix4.inverse(a,A),u=M,o=O,s=(o[0].longitude=r.west,o[0].latitude=r.south,o[1].longitude=r.west,o[1].latitude=r.north,o[2].longitude=r.east,o[2].latitude=r.south,V),f=0;f<3;f++)x.Cartographic.toCartesian(o[f],n,s),s=L.Matrix4.multiplyByPointAsVector(i,s,s),u[f].x=s.x,u[f].y=s.y;var a=L.Quaternion.fromAxisAngle(x.Cartesian3.UNIT_Z,-t,P),c=L.Matrix3.fromQuaternion(a,v),l=e.length,d=Number.POSITIVE_INFINITY,y=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;for(f=0;f<l;f++)s=L.Matrix4.multiplyByPointAsVector(i,e[f],s),s=L.Matrix3.multiplyByVector(c,s,s),d=Math.min(d,s.x),y=Math.min(y,s.y),m=Math.max(m,s.x),p=Math.max(p,s.y);var h=w.fromRotation(t,G),N=R,I=(N[0].x=d,N[0].y=y,N[1].x=d,N[1].y=p,N[2].x=m,N[2].y=y,u[0]),C=u[2].x-I.x,b=u[1].y-I.y;for(f=0;f<3;f++){var T=N[f];w.multiplyByVector(h,T,T),T.x=(T.x-I.x)/C,T.y=(T.y-I.y)/b}var r=N[0],a=N[1],t=N[2],E=new Array(6);return x.Cartesian2.pack(r,E),x.Cartesian2.pack(a,E,2),x.Cartesian2.pack(t,E,4),E},e.Geometry=f,e.GeometryAttribute=function(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=a.defaultValue(e.normalize,!1),this.values=e.values},e.GeometryType=r,e.Matrix2=w,e.PrimitiveType=s});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-c1eb9da0","./Check-f996273c","./when-ae2e0b60","./Transforms-8c8e0c6f","./WebGLConstants-35626ea2"],function(e,x,t,a,L,n){"use strict";var r=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});function w(e,t,n,r){this[0]=a.defaultValue(e,0),this[1]=a.defaultValue(n,0),this[2]=a.defaultValue(t,0),this[3]=a.defaultValue(r,0)}w.packedLength=4,w.pack=function(e,t,n){return n=a.defaultValue(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t},w.unpack=function(e,t,n){return t=a.defaultValue(t,0),(n=a.defined(n)?n:new w)[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n},w.clone=function(e,t){if(a.defined(e))return a.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new w(e[0],e[2],e[1],e[3])},w.fromArray=function(e,t,n){return t=a.defaultValue(t,0),(n=a.defined(n)?n:new w)[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n},w.fromColumnMajorArray=function(e,t){return w.clone(e,t)},w.fromRowMajorArray=function(e,t){return a.defined(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new w(e[0],e[1],e[2],e[3])},w.fromScale=function(e,t){return a.defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new w(e.x,0,0,e.y)},w.fromUniformScale=function(e,t){return a.defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new w(e,0,0,e)},w.fromRotation=function(e,t){var n=Math.cos(e),e=Math.sin(e);return a.defined(t)?(t[0]=n,t[1]=e,t[2]=-e,t[3]=n,t):new w(n,-e,e,n)},w.toArray=function(e,t){return a.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},w.getElementIndex=function(e,t){return 2*e+t},w.getColumn=function(e,t,n){var t=2*t,r=e[t],e=e[1+t];return n.x=r,n.y=e,n},w.setColumn=function(e,t,n,r){t*=2;return(r=w.clone(e,r))[t]=n.x,r[1+t]=n.y,r},w.getRow=function(e,t,n){var r=e[t],e=e[t+2];return n.x=r,n.y=e,n},w.setRow=function(e,t,n,r){return(r=w.clone(e,r))[t]=n.x,r[t+2]=n.y,r};var i=new x.Cartesian2,u=(w.getScale=function(e,t){return t.x=x.Cartesian2.magnitude(x.Cartesian2.fromElements(e[0],e[1],i)),t.y=x.Cartesian2.magnitude(x.Cartesian2.fromElements(e[2],e[3],i)),t},new x.Cartesian2),o=(w.getMaximumScale=function(e){return w.getScale(e,u),x.Cartesian2.maximumComponent(u)},w.multiply=function(e,t,n){var r=e[0]*t[0]+e[2]*t[1],a=e[0]*t[2]+e[2]*t[3],i=e[1]*t[0]+e[3]*t[1],e=e[1]*t[2]+e[3]*t[3];return n[0]=r,n[1]=i,n[2]=a,n[3]=e,n},w.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n},w.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n},w.multiplyByVector=function(e,t,n){var r=e[0]*t.x+e[2]*t.y,e=e[1]*t.x+e[3]*t.y;return n.x=r,n.y=e,n},w.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n},w.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n},w.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},w.transpose=function(e,t){var n=e[0],r=e[2],a=e[1],e=e[3];return t[0]=n,t[1]=r,t[2]=a,t[3]=e,t},w.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},w.equals=function(e,t){return e===t||a.defined(e)&&a.defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},w.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]},w.equalsEpsilon=function(e,t,n){return n=a.defaultValue(n,0),e===t||a.defined(e)&&a.defined(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n},w.IDENTITY=Object.freeze(new w(1,0,0,1)),w.ZERO=Object.freeze(new w(0,0,0,0)),w.COLUMN0ROW0=0,w.COLUMN0ROW1=1,w.COLUMN1ROW0=2,w.COLUMN1ROW1=3,Object.defineProperties(w.prototype,{length:{get:function(){return w.packedLength}}}),w.prototype.clone=function(e){return w.clone(this,e)},w.prototype.equals=function(e){return w.equals(this,e)},w.prototype.equalsEpsilon=function(e,t){return w.equalsEpsilon(this,e,t)},w.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"},{POINTS:n.WebGLConstants.POINTS,LINES:n.WebGLConstants.LINES,LINE_LOOP:n.WebGLConstants.LINE_LOOP,LINE_STRIP:n.WebGLConstants.LINE_STRIP,TRIANGLES:n.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:n.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:n.WebGLConstants.TRIANGLE_FAN}),s=(o.validate=function(e){return e===o.POINTS||e===o.LINES||e===o.LINE_LOOP||e===o.LINE_STRIP||e===o.TRIANGLES||e===o.TRIANGLE_STRIP||e===o.TRIANGLE_FAN},Object.freeze(o));function f(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=a.defaultValue(e.primitiveType,s.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=a.defaultValue(e.geometryType,r.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}f.computeNumberOfVertices=function(e){var t,n,r=-1;for(t in e.attributes)e.attributes.hasOwnProperty(t)&&a.defined(e.attributes[t])&&a.defined(e.attributes[t].values)&&(r=(n=e.attributes[t]).values.length/n.componentsPerAttribute);return r};var g=new x.Cartographic,S=new x.Cartesian3,A=new L.Matrix4,O=[new x.Cartographic,new x.Cartographic,new x.Cartographic],M=[new x.Cartesian2,new x.Cartesian2,new x.Cartesian2],R=[new x.Cartesian2,new x.Cartesian2,new x.Cartesian2],V=new x.Cartesian3,P=new L.Quaternion,v=new L.Matrix4,G=new w;f._textureCoordinateRotationPoints=function(e,t,n,r){for(var a=x.Rectangle.center(r,g),a=x.Cartographic.toCartesian(a,n,S),a=L.Transforms.eastNorthUpToFixedFrame(a,n,A),i=L.Matrix4.inverse(a,A),u=M,o=O,s=(o[0].longitude=r.west,o[0].latitude=r.south,o[1].longitude=r.west,o[1].latitude=r.north,o[2].longitude=r.east,o[2].latitude=r.south,V),f=0;f<3;f++)x.Cartographic.toCartesian(o[f],n,s),s=L.Matrix4.multiplyByPointAsVector(i,s,s),u[f].x=s.x,u[f].y=s.y;var a=L.Quaternion.fromAxisAngle(x.Cartesian3.UNIT_Z,-t,P),c=L.Matrix3.fromQuaternion(a,v),l=e.length,d=Number.POSITIVE_INFINITY,y=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;for(f=0;f<l;f++)s=L.Matrix4.multiplyByPointAsVector(i,e[f],s),s=L.Matrix3.multiplyByVector(c,s,s),d=Math.min(d,s.x),y=Math.min(y,s.y),m=Math.max(m,s.x),p=Math.max(p,s.y);var h=w.fromRotation(t,G),N=R,I=(N[0].x=d,N[0].y=y,N[1].x=d,N[1].y=p,N[2].x=m,N[2].y=y,u[0]),C=u[2].x-I.x,b=u[1].y-I.y;for(f=0;f<3;f++){var T=N[f];w.multiplyByVector(h,T,T),T.x=(T.x-I.x)/C,T.y=(T.y-I.y)/b}var r=N[0],a=N[1],t=N[2],E=new Array(6);return x.Cartesian2.pack(r,E),x.Cartesian2.pack(a,E,2),x.Cartesian2.pack(t,E,4),E},e.Geometry=f,e.GeometryAttribute=function(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=a.defaultValue(e.normalize,!1),this.values=e.values},e.GeometryType=r,e.Matrix2=w,e.PrimitiveType=s});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-c1eb9da0","./Check-f996273c","./when-ae2e0b60","./Transforms-1fa85493","./WebGLConstants-35626ea2"],function(e,x,t,a,L,n){"use strict";var r=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});function w(e,t,n,r){this[0]=a.defaultValue(e,0),this[1]=a.defaultValue(n,0),this[2]=a.defaultValue(t,0),this[3]=a.defaultValue(r,0)}w.packedLength=4,w.pack=function(e,t,n){return n=a.defaultValue(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t},w.unpack=function(e,t,n){return t=a.defaultValue(t,0),(n=a.defined(n)?n:new w)[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n},w.clone=function(e,t){if(a.defined(e))return a.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new w(e[0],e[2],e[1],e[3])},w.fromArray=function(e,t,n){return t=a.defaultValue(t,0),(n=a.defined(n)?n:new w)[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n},w.fromColumnMajorArray=function(e,t){return w.clone(e,t)},w.fromRowMajorArray=function(e,t){return a.defined(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new w(e[0],e[1],e[2],e[3])},w.fromScale=function(e,t){return a.defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new w(e.x,0,0,e.y)},w.fromUniformScale=function(e,t){return a.defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new w(e,0,0,e)},w.fromRotation=function(e,t){var n=Math.cos(e),e=Math.sin(e);return a.defined(t)?(t[0]=n,t[1]=e,t[2]=-e,t[3]=n,t):new w(n,-e,e,n)},w.toArray=function(e,t){return a.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},w.getElementIndex=function(e,t){return 2*e+t},w.getColumn=function(e,t,n){var t=2*t,r=e[t],e=e[1+t];return n.x=r,n.y=e,n},w.setColumn=function(e,t,n,r){t*=2;return(r=w.clone(e,r))[t]=n.x,r[1+t]=n.y,r},w.getRow=function(e,t,n){var r=e[t],e=e[t+2];return n.x=r,n.y=e,n},w.setRow=function(e,t,n,r){return(r=w.clone(e,r))[t]=n.x,r[t+2]=n.y,r};var i=new x.Cartesian2,u=(w.getScale=function(e,t){return t.x=x.Cartesian2.magnitude(x.Cartesian2.fromElements(e[0],e[1],i)),t.y=x.Cartesian2.magnitude(x.Cartesian2.fromElements(e[2],e[3],i)),t},new x.Cartesian2),o=(w.getMaximumScale=function(e){return w.getScale(e,u),x.Cartesian2.maximumComponent(u)},w.multiply=function(e,t,n){var r=e[0]*t[0]+e[2]*t[1],a=e[0]*t[2]+e[2]*t[3],i=e[1]*t[0]+e[3]*t[1],e=e[1]*t[2]+e[3]*t[3];return n[0]=r,n[1]=i,n[2]=a,n[3]=e,n},w.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n},w.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n},w.multiplyByVector=function(e,t,n){var r=e[0]*t.x+e[2]*t.y,e=e[1]*t.x+e[3]*t.y;return n.x=r,n.y=e,n},w.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n},w.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n},w.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},w.transpose=function(e,t){var n=e[0],r=e[2],a=e[1],e=e[3];return t[0]=n,t[1]=r,t[2]=a,t[3]=e,t},w.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},w.equals=function(e,t){return e===t||a.defined(e)&&a.defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},w.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]},w.equalsEpsilon=function(e,t,n){return n=a.defaultValue(n,0),e===t||a.defined(e)&&a.defined(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n},w.IDENTITY=Object.freeze(new w(1,0,0,1)),w.ZERO=Object.freeze(new w(0,0,0,0)),w.COLUMN0ROW0=0,w.COLUMN0ROW1=1,w.COLUMN1ROW0=2,w.COLUMN1ROW1=3,Object.defineProperties(w.prototype,{length:{get:function(){return w.packedLength}}}),w.prototype.clone=function(e){return w.clone(this,e)},w.prototype.equals=function(e){return w.equals(this,e)},w.prototype.equalsEpsilon=function(e,t){return w.equalsEpsilon(this,e,t)},w.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"},{POINTS:n.WebGLConstants.POINTS,LINES:n.WebGLConstants.LINES,LINE_LOOP:n.WebGLConstants.LINE_LOOP,LINE_STRIP:n.WebGLConstants.LINE_STRIP,TRIANGLES:n.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:n.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:n.WebGLConstants.TRIANGLE_FAN}),s=(o.validate=function(e){return e===o.POINTS||e===o.LINES||e===o.LINE_LOOP||e===o.LINE_STRIP||e===o.TRIANGLES||e===o.TRIANGLE_STRIP||e===o.TRIANGLE_FAN},Object.freeze(o));function f(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=a.defaultValue(e.primitiveType,s.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=a.defaultValue(e.geometryType,r.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}f.computeNumberOfVertices=function(e){var t,n,r=-1;for(t in e.attributes)e.attributes.hasOwnProperty(t)&&a.defined(e.attributes[t])&&a.defined(e.attributes[t].values)&&(r=(n=e.attributes[t]).values.length/n.componentsPerAttribute);return r};var g=new x.Cartographic,S=new x.Cartesian3,A=new L.Matrix4,O=[new x.Cartographic,new x.Cartographic,new x.Cartographic],M=[new x.Cartesian2,new x.Cartesian2,new x.Cartesian2],R=[new x.Cartesian2,new x.Cartesian2,new x.Cartesian2],V=new x.Cartesian3,P=new L.Quaternion,v=new L.Matrix4,G=new w;f._textureCoordinateRotationPoints=function(e,t,n,r){for(var a=x.Rectangle.center(r,g),a=x.Cartographic.toCartesian(a,n,S),a=L.Transforms.eastNorthUpToFixedFrame(a,n,A),i=L.Matrix4.inverse(a,A),u=M,o=O,s=(o[0].longitude=r.west,o[0].latitude=r.south,o[1].longitude=r.west,o[1].latitude=r.north,o[2].longitude=r.east,o[2].latitude=r.south,V),f=0;f<3;f++)x.Cartographic.toCartesian(o[f],n,s),s=L.Matrix4.multiplyByPointAsVector(i,s,s),u[f].x=s.x,u[f].y=s.y;var a=L.Quaternion.fromAxisAngle(x.Cartesian3.UNIT_Z,-t,P),c=L.Matrix3.fromQuaternion(a,v),l=e.length,d=Number.POSITIVE_INFINITY,y=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;for(f=0;f<l;f++)s=L.Matrix4.multiplyByPointAsVector(i,e[f],s),s=L.Matrix3.multiplyByVector(c,s,s),d=Math.min(d,s.x),y=Math.min(y,s.y),m=Math.max(m,s.x),p=Math.max(p,s.y);var h=w.fromRotation(t,G),N=R,I=(N[0].x=d,N[0].y=y,N[1].x=d,N[1].y=p,N[2].x=m,N[2].y=y,u[0]),C=u[2].x-I.x,b=u[1].y-I.y;for(f=0;f<3;f++){var T=N[f];w.multiplyByVector(h,T,T),T.x=(T.x-I.x)/C,T.y=(T.y-I.y)/b}var r=N[0],a=N[1],t=N[2],E=new Array(6);return x.Cartesian2.pack(r,E),x.Cartesian2.pack(a,E,2),x.Cartesian2.pack(t,E,4),E},e.Geometry=f,e.GeometryAttribute=function(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=a.defaultValue(e.normalize,!1),this.values=e.values},e.GeometryType=r,e.Matrix2=w,e.PrimitiveType=s});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-078e6458","./Check-f996273c","./when-ae2e0b60","./Transforms-5aeb1d5e","./WebGLConstants-35626ea2"],function(e,x,t,a,L,n){"use strict";var r=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});function w(e,t,n,r){this[0]=a.defaultValue(e,0),this[1]=a.defaultValue(n,0),this[2]=a.defaultValue(t,0),this[3]=a.defaultValue(r,0)}w.packedLength=4,w.pack=function(e,t,n){return n=a.defaultValue(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t},w.unpack=function(e,t,n){return t=a.defaultValue(t,0),(n=a.defined(n)?n:new w)[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n},w.clone=function(e,t){if(a.defined(e))return a.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new w(e[0],e[2],e[1],e[3])},w.fromArray=function(e,t,n){return t=a.defaultValue(t,0),(n=a.defined(n)?n:new w)[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n},w.fromColumnMajorArray=function(e,t){return w.clone(e,t)},w.fromRowMajorArray=function(e,t){return a.defined(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new w(e[0],e[1],e[2],e[3])},w.fromScale=function(e,t){return a.defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new w(e.x,0,0,e.y)},w.fromUniformScale=function(e,t){return a.defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new w(e,0,0,e)},w.fromRotation=function(e,t){var n=Math.cos(e),e=Math.sin(e);return a.defined(t)?(t[0]=n,t[1]=e,t[2]=-e,t[3]=n,t):new w(n,-e,e,n)},w.toArray=function(e,t){return a.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},w.getElementIndex=function(e,t){return 2*e+t},w.getColumn=function(e,t,n){var t=2*t,r=e[t],e=e[1+t];return n.x=r,n.y=e,n},w.setColumn=function(e,t,n,r){t*=2;return(r=w.clone(e,r))[t]=n.x,r[1+t]=n.y,r},w.getRow=function(e,t,n){var r=e[t],e=e[t+2];return n.x=r,n.y=e,n},w.setRow=function(e,t,n,r){return(r=w.clone(e,r))[t]=n.x,r[t+2]=n.y,r};var i=new x.Cartesian2,u=(w.getScale=function(e,t){return t.x=x.Cartesian2.magnitude(x.Cartesian2.fromElements(e[0],e[1],i)),t.y=x.Cartesian2.magnitude(x.Cartesian2.fromElements(e[2],e[3],i)),t},new x.Cartesian2),o=(w.getMaximumScale=function(e){return w.getScale(e,u),x.Cartesian2.maximumComponent(u)},w.multiply=function(e,t,n){var r=e[0]*t[0]+e[2]*t[1],a=e[0]*t[2]+e[2]*t[3],i=e[1]*t[0]+e[3]*t[1],e=e[1]*t[2]+e[3]*t[3];return n[0]=r,n[1]=i,n[2]=a,n[3]=e,n},w.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n},w.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n},w.multiplyByVector=function(e,t,n){var r=e[0]*t.x+e[2]*t.y,e=e[1]*t.x+e[3]*t.y;return n.x=r,n.y=e,n},w.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n},w.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n},w.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},w.transpose=function(e,t){var n=e[0],r=e[2],a=e[1],e=e[3];return t[0]=n,t[1]=r,t[2]=a,t[3]=e,t},w.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},w.equals=function(e,t){return e===t||a.defined(e)&&a.defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},w.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]},w.equalsEpsilon=function(e,t,n){return n=a.defaultValue(n,0),e===t||a.defined(e)&&a.defined(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n},w.IDENTITY=Object.freeze(new w(1,0,0,1)),w.ZERO=Object.freeze(new w(0,0,0,0)),w.COLUMN0ROW0=0,w.COLUMN0ROW1=1,w.COLUMN1ROW0=2,w.COLUMN1ROW1=3,Object.defineProperties(w.prototype,{length:{get:function(){return w.packedLength}}}),w.prototype.clone=function(e){return w.clone(this,e)},w.prototype.equals=function(e){return w.equals(this,e)},w.prototype.equalsEpsilon=function(e,t){return w.equalsEpsilon(this,e,t)},w.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"},{POINTS:n.WebGLConstants.POINTS,LINES:n.WebGLConstants.LINES,LINE_LOOP:n.WebGLConstants.LINE_LOOP,LINE_STRIP:n.WebGLConstants.LINE_STRIP,TRIANGLES:n.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:n.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:n.WebGLConstants.TRIANGLE_FAN}),s=(o.validate=function(e){return e===o.POINTS||e===o.LINES||e===o.LINE_LOOP||e===o.LINE_STRIP||e===o.TRIANGLES||e===o.TRIANGLE_STRIP||e===o.TRIANGLE_FAN},Object.freeze(o));function f(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=a.defaultValue(e.primitiveType,s.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=a.defaultValue(e.geometryType,r.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}f.computeNumberOfVertices=function(e){var t,n,r=-1;for(t in e.attributes)e.attributes.hasOwnProperty(t)&&a.defined(e.attributes[t])&&a.defined(e.attributes[t].values)&&(r=(n=e.attributes[t]).values.length/n.componentsPerAttribute);return r};var g=new x.Cartographic,S=new x.Cartesian3,A=new L.Matrix4,O=[new x.Cartographic,new x.Cartographic,new x.Cartographic],M=[new x.Cartesian2,new x.Cartesian2,new x.Cartesian2],R=[new x.Cartesian2,new x.Cartesian2,new x.Cartesian2],V=new x.Cartesian3,P=new L.Quaternion,v=new L.Matrix4,G=new w;f._textureCoordinateRotationPoints=function(e,t,n,r){for(var a=x.Rectangle.center(r,g),a=x.Cartographic.toCartesian(a,n,S),a=L.Transforms.eastNorthUpToFixedFrame(a,n,A),i=L.Matrix4.inverse(a,A),u=M,o=O,s=(o[0].longitude=r.west,o[0].latitude=r.south,o[1].longitude=r.west,o[1].latitude=r.north,o[2].longitude=r.east,o[2].latitude=r.south,V),f=0;f<3;f++)x.Cartographic.toCartesian(o[f],n,s),s=L.Matrix4.multiplyByPointAsVector(i,s,s),u[f].x=s.x,u[f].y=s.y;var a=L.Quaternion.fromAxisAngle(x.Cartesian3.UNIT_Z,-t,P),c=L.Matrix3.fromQuaternion(a,v),l=e.length,d=Number.POSITIVE_INFINITY,y=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;for(f=0;f<l;f++)s=L.Matrix4.multiplyByPointAsVector(i,e[f],s),s=L.Matrix3.multiplyByVector(c,s,s),d=Math.min(d,s.x),y=Math.min(y,s.y),m=Math.max(m,s.x),p=Math.max(p,s.y);var h=w.fromRotation(t,G),N=R,I=(N[0].x=d,N[0].y=y,N[1].x=d,N[1].y=p,N[2].x=m,N[2].y=y,u[0]),C=u[2].x-I.x,b=u[1].y-I.y;for(f=0;f<3;f++){var T=N[f];w.multiplyByVector(h,T,T),T.x=(T.x-I.x)/C,T.y=(T.y-I.y)/b}var r=N[0],a=N[1],t=N[2],E=new Array(6);return x.Cartesian2.pack(r,E),x.Cartesian2.pack(a,E,2),x.Cartesian2.pack(t,E,4),E},e.Geometry=f,e.GeometryAttribute=function(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=a.defaultValue(e.normalize,!1),this.values=e.values},e.GeometryType=r,e.Matrix2=w,e.PrimitiveType=s});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-c1eb9da0","./Check-f996273c","./when-ae2e0b60","./Transforms-713e2e92","./WebGLConstants-35626ea2"],function(e,x,t,a,L,n){"use strict";var r=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});function w(e,t,n,r){this[0]=a.defaultValue(e,0),this[1]=a.defaultValue(n,0),this[2]=a.defaultValue(t,0),this[3]=a.defaultValue(r,0)}w.packedLength=4,w.pack=function(e,t,n){return n=a.defaultValue(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t},w.unpack=function(e,t,n){return t=a.defaultValue(t,0),(n=a.defined(n)?n:new w)[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n},w.clone=function(e,t){if(a.defined(e))return a.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new w(e[0],e[2],e[1],e[3])},w.fromArray=function(e,t,n){return t=a.defaultValue(t,0),(n=a.defined(n)?n:new w)[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n},w.fromColumnMajorArray=function(e,t){return w.clone(e,t)},w.fromRowMajorArray=function(e,t){return a.defined(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new w(e[0],e[1],e[2],e[3])},w.fromScale=function(e,t){return a.defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new w(e.x,0,0,e.y)},w.fromUniformScale=function(e,t){return a.defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new w(e,0,0,e)},w.fromRotation=function(e,t){var n=Math.cos(e),e=Math.sin(e);return a.defined(t)?(t[0]=n,t[1]=e,t[2]=-e,t[3]=n,t):new w(n,-e,e,n)},w.toArray=function(e,t){return a.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},w.getElementIndex=function(e,t){return 2*e+t},w.getColumn=function(e,t,n){var t=2*t,r=e[t],e=e[1+t];return n.x=r,n.y=e,n},w.setColumn=function(e,t,n,r){t*=2;return(r=w.clone(e,r))[t]=n.x,r[1+t]=n.y,r},w.getRow=function(e,t,n){var r=e[t],e=e[t+2];return n.x=r,n.y=e,n},w.setRow=function(e,t,n,r){return(r=w.clone(e,r))[t]=n.x,r[t+2]=n.y,r};var i=new x.Cartesian2,u=(w.getScale=function(e,t){return t.x=x.Cartesian2.magnitude(x.Cartesian2.fromElements(e[0],e[1],i)),t.y=x.Cartesian2.magnitude(x.Cartesian2.fromElements(e[2],e[3],i)),t},new x.Cartesian2),o=(w.getMaximumScale=function(e){return w.getScale(e,u),x.Cartesian2.maximumComponent(u)},w.multiply=function(e,t,n){var r=e[0]*t[0]+e[2]*t[1],a=e[0]*t[2]+e[2]*t[3],i=e[1]*t[0]+e[3]*t[1],e=e[1]*t[2]+e[3]*t[3];return n[0]=r,n[1]=i,n[2]=a,n[3]=e,n},w.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n},w.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n},w.multiplyByVector=function(e,t,n){var r=e[0]*t.x+e[2]*t.y,e=e[1]*t.x+e[3]*t.y;return n.x=r,n.y=e,n},w.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n},w.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n},w.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},w.transpose=function(e,t){var n=e[0],r=e[2],a=e[1],e=e[3];return t[0]=n,t[1]=r,t[2]=a,t[3]=e,t},w.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},w.equals=function(e,t){return e===t||a.defined(e)&&a.defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},w.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]},w.equalsEpsilon=function(e,t,n){return n=a.defaultValue(n,0),e===t||a.defined(e)&&a.defined(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n},w.IDENTITY=Object.freeze(new w(1,0,0,1)),w.ZERO=Object.freeze(new w(0,0,0,0)),w.COLUMN0ROW0=0,w.COLUMN0ROW1=1,w.COLUMN1ROW0=2,w.COLUMN1ROW1=3,Object.defineProperties(w.prototype,{length:{get:function(){return w.packedLength}}}),w.prototype.clone=function(e){return w.clone(this,e)},w.prototype.equals=function(e){return w.equals(this,e)},w.prototype.equalsEpsilon=function(e,t){return w.equalsEpsilon(this,e,t)},w.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"},{POINTS:n.WebGLConstants.POINTS,LINES:n.WebGLConstants.LINES,LINE_LOOP:n.WebGLConstants.LINE_LOOP,LINE_STRIP:n.WebGLConstants.LINE_STRIP,TRIANGLES:n.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:n.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:n.WebGLConstants.TRIANGLE_FAN}),s=(o.validate=function(e){return e===o.POINTS||e===o.LINES||e===o.LINE_LOOP||e===o.LINE_STRIP||e===o.TRIANGLES||e===o.TRIANGLE_STRIP||e===o.TRIANGLE_FAN},Object.freeze(o));function f(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=a.defaultValue(e.primitiveType,s.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=a.defaultValue(e.geometryType,r.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}f.computeNumberOfVertices=function(e){var t,n,r=-1;for(t in e.attributes)e.attributes.hasOwnProperty(t)&&a.defined(e.attributes[t])&&a.defined(e.attributes[t].values)&&(r=(n=e.attributes[t]).values.length/n.componentsPerAttribute);return r};var g=new x.Cartographic,S=new x.Cartesian3,A=new L.Matrix4,O=[new x.Cartographic,new x.Cartographic,new x.Cartographic],M=[new x.Cartesian2,new x.Cartesian2,new x.Cartesian2],R=[new x.Cartesian2,new x.Cartesian2,new x.Cartesian2],V=new x.Cartesian3,P=new L.Quaternion,v=new L.Matrix4,G=new w;f._textureCoordinateRotationPoints=function(e,t,n,r){for(var a=x.Rectangle.center(r,g),a=x.Cartographic.toCartesian(a,n,S),a=L.Transforms.eastNorthUpToFixedFrame(a,n,A),i=L.Matrix4.inverse(a,A),u=M,o=O,s=(o[0].longitude=r.west,o[0].latitude=r.south,o[1].longitude=r.west,o[1].latitude=r.north,o[2].longitude=r.east,o[2].latitude=r.south,V),f=0;f<3;f++)x.Cartographic.toCartesian(o[f],n,s),s=L.Matrix4.multiplyByPointAsVector(i,s,s),u[f].x=s.x,u[f].y=s.y;var a=L.Quaternion.fromAxisAngle(x.Cartesian3.UNIT_Z,-t,P),c=L.Matrix3.fromQuaternion(a,v),l=e.length,d=Number.POSITIVE_INFINITY,y=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;for(f=0;f<l;f++)s=L.Matrix4.multiplyByPointAsVector(i,e[f],s),s=L.Matrix3.multiplyByVector(c,s,s),d=Math.min(d,s.x),y=Math.min(y,s.y),m=Math.max(m,s.x),p=Math.max(p,s.y);var h=w.fromRotation(t,G),N=R,I=(N[0].x=d,N[0].y=y,N[1].x=d,N[1].y=p,N[2].x=m,N[2].y=y,u[0]),C=u[2].x-I.x,b=u[1].y-I.y;for(f=0;f<3;f++){var T=N[f];w.multiplyByVector(h,T,T),T.x=(T.x-I.x)/C,T.y=(T.y-I.y)/b}var r=N[0],a=N[1],t=N[2],E=new Array(6);return x.Cartesian2.pack(r,E),x.Cartesian2.pack(a,E,2),x.Cartesian2.pack(t,E,4),E},e.Geometry=f,e.GeometryAttribute=function(e){e=a.defaultValue(e,a.defaultValue.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=a.defaultValue(e.normalize,!1),this.values=e.values},e.GeometryType=r,e.Matrix2=w,e.PrimitiveType=s});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Matrix2-10a61a55","./RuntimeError-24b14c10","./when-ae2e0b60","./WebGLConstants-35626ea2","./Transforms-70ded1e8"],function(t,d,e,n,a,x){"use strict";var r=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3}),i={POINTS:a.WebGLConstants.POINTS,LINES:a.WebGLConstants.LINES,LINE_LOOP:a.WebGLConstants.LINE_LOOP,LINE_STRIP:a.WebGLConstants.LINE_STRIP,TRIANGLES:a.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:a.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:a.WebGLConstants.TRIANGLE_FAN,validate:function(t){return t===i.POINTS||t===i.LINES||t===i.LINE_LOOP||t===i.LINE_STRIP||t===i.TRIANGLES||t===i.TRIANGLE_STRIP||t===i.TRIANGLE_FAN}},o=Object.freeze(i);function s(t){t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=n.defaultValue(t.primitiveType,o.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=n.defaultValue(t.geometryType,r.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}s.computeNumberOfVertices=function(t){var e,a,r=-1;for(e in t.attributes)t.attributes.hasOwnProperty(e)&&n.defined(t.attributes[e])&&n.defined(t.attributes[e].values)&&(r=(a=t.attributes[e]).values.length/a.componentsPerAttribute);return r};var A=new d.Cartographic,P=new d.Cartesian3,S=new d.Matrix4,G=[new d.Cartographic,new d.Cartographic,new d.Cartographic],w=[new d.Cartesian2,new d.Cartesian2,new d.Cartesian2],R=[new d.Cartesian2,new d.Cartesian2,new d.Cartesian2],O=new d.Cartesian3,_=new x.Quaternion,g=new d.Matrix4,V=new d.Matrix2;s._textureCoordinateRotationPoints=function(t,e,a,r){for(var n=d.Rectangle.center(r,A),n=d.Cartographic.toCartesian(n,a,P),n=x.Transforms.eastNorthUpToFixedFrame(n,a,S),i=d.Matrix4.inverse(n,S),o=w,s=G,u=(s[0].longitude=r.west,s[0].latitude=r.south,s[1].longitude=r.west,s[1].latitude=r.north,s[2].longitude=r.east,s[2].latitude=r.south,O),I=0;I<3;I++)d.Cartographic.toCartesian(s[I],a,u),u=d.Matrix4.multiplyByPointAsVector(i,u,u),o[I].x=u.x,o[I].y=u.y;var n=x.Quaternion.fromAxisAngle(d.Cartesian3.UNIT_Z,-e,_),N=d.Matrix3.fromQuaternion(n,g),T=t.length,l=Number.POSITIVE_INFINITY,m=Number.POSITIVE_INFINITY,p=Number.NEGATIVE_INFINITY,y=Number.NEGATIVE_INFINITY;for(I=0;I<T;I++)u=d.Matrix4.multiplyByPointAsVector(i,t[I],u),u=d.Matrix3.multiplyByVector(N,u,u),l=Math.min(l,u.x),m=Math.min(m,u.y),p=Math.max(p,u.x),y=Math.max(y,u.y);var E=d.Matrix2.fromRotation(e,V),b=R,c=(b[0].x=l,b[0].y=m,b[1].x=l,b[1].y=y,b[2].x=p,b[2].y=m,o[0]),L=o[2].x-c.x,h=o[1].y-c.y;for(I=0;I<3;I++){var C=b[I];d.Matrix2.multiplyByVector(E,C,C),C.x=(C.x-c.x)/L,C.y=(C.y-c.y)/h}var r=b[0],n=b[1],e=b[2],f=new Array(6);return d.Cartesian2.pack(r,f),d.Cartesian2.pack(n,f,2),d.Cartesian2.pack(e,f,4),f},t.Geometry=s,t.GeometryAttribute=function(t){t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT),this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=n.defaultValue(t.normalize,!1),this.values=t.values},t.GeometryType=r,t.PrimitiveType=o});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./when-ae2e0b60","./Check-f996273c","./Transforms-1fa85493"],function(e,t,i,a){"use strict";e.GeometryInstance=function(e){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=a.Matrix4.clone(t.defaultValue(e.modelMatrix,a.Matrix4.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=t.defaultValue(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./when-ae2e0b60","./Check-f996273c","./Transforms-5aeb1d5e"],function(e,t,i,a){"use strict";e.GeometryInstance=function(e){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=a.Matrix4.clone(t.defaultValue(e.modelMatrix,a.Matrix4.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=t.defaultValue(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./when-ae2e0b60","./Check-f996273c","./Transforms-713e2e92"],function(e,t,i,r){"use strict";e.GeometryInstance=function(e){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=r.Matrix4.clone(t.defaultValue(e.modelMatrix,r.Matrix4.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=t.defaultValue(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./when-ae2e0b60","./Check-f996273c","./Transforms-984eb057"],function(e,t,i,r){"use strict";e.GeometryInstance=function(e){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=r.Matrix4.clone(t.defaultValue(e.modelMatrix,r.Matrix4.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=t.defaultValue(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./when-ae2e0b60","./Check-f996273c","./Transforms-8c8e0c6f"],function(e,t,i,r){"use strict";e.GeometryInstance=function(e){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=r.Matrix4.clone(t.defaultValue(e.modelMatrix,r.Matrix4.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=t.defaultValue(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./when-ae2e0b60","./RuntimeError-24b14c10","./Matrix2-10a61a55"],function(e,t,i,r){"use strict";e.GeometryInstance=function(e){e=t.defaultValue(e,t.defaultValue.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=r.Matrix4.clone(t.defaultValue(e.modelMatrix,r.Matrix4.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=t.defaultValue(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Check-f996273c","./when-ae2e0b60"],function(e,t,l){"use strict";var a=Object.freeze({NONE:0,TOP:1,ALL:2});e.GeometryOffsetAttribute=a,e.arrayFill=function(e,t,a,f){if("function"==typeof e.fill)return e.fill(t,a,f);for(var r=e.length>>>0,n=(a=l.defaultValue(a,0))<0?Math.max(r+a,0):Math.min(a,r),i=(a=l.defaultValue(f,r))<0?Math.max(r+a,0):Math.min(a,r);n<i;)e[n]=t,n++;return e}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./AttributeCompression-b9605c73","./Cartesian2-c1eb9da0","./Check-f996273c","./when-ae2e0b60","./Math-5bbcea10","./Transforms-713e2e92","./ComponentDatatype-e44126e4","./EncodedCartesian3-6f721b97","./GeometryAttribute-e03451d8","./IndexDatatype-516320ea","./IntersectionTests-f3d5850d","./Plane-d53c8e90"],function(t,A,R,r,V,D,M,w,v,G,S,U,Y){"use strict";var Z=new R.Cartesian3,H=new R.Cartesian3,W=new R.Cartesian3;var C={calculateACMR:function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,r=e.maximumIndex,a=V.defaultValue(e.cacheSize,24),i=t.length;if(!V.defined(r))for(var r=0,n=0,s=t[n];n<i;)r<s&&(r=s),s=t[++n];for(var o=[],u=0;u<r+1;u++)o[u]=0;for(var p=a+1,d=0;d<i;++d)p-o[t[d]]>a&&(o[t[d]]=p,++p);return(p-a+1)/(i/3)}},e=(C.tipsify=function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,r=e.maximumIndex,a=V.defaultValue(e.cacheSize,24);function i(e,t,r,a,i,n,s){for(var o,u=-1,p=-1,d=0;d<r.length;){var l=r[d];a[l].numLiveTriangles&&(o=0,p<(o=i-a[l].timeStamp+2*a[l].numLiveTriangles<=t?i-a[l].timeStamp:o)||-1===p)&&(p=o,u=l),++d}if(-1!==u)return u;for(var y=a,f=n,m=s;1<=f.length;){var c=f[f.length-1];if(f.splice(f.length-1,1),0<y[c].numLiveTriangles)return c}for(;v<m;){if(0<y[v].numLiveTriangles)return++v-1;++v}return-1}var e=t.length,n=0,s=t[P=0],o=e;if(V.defined(r))n=r+1;else{for(;P<o;)n<s&&(n=s),s=t[++P];if(-1===n)return 0;++n}for(var u=[],p=0;p<n;p++)u[p]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};for(var d=P=0;P<o;)u[t[P]].vertexTriangles.push(d),++u[t[P]].numLiveTriangles,u[t[P+1]].vertexTriangles.push(d),++u[t[P+1]].numLiveTriangles,u[t[P+2]].vertexTriangles.push(d),++u[t[P+2]].numLiveTriangles,++d,P+=3;var l,y=0,f=a+1,v=1,m=[],c=[],C=0,h=[],b=e/3,g=[];for(p=0;p<b;p++)g[p]=!1;for(;-1!==y;){for(var A,m=[],T=(A=u[y]).vertexTriangles.length,x=0;x<T;++x)if(!g[d=A.vertexTriangles[x]]){g[d]=!0;for(var P=d+d+d,w=0;w<3;++w)l=t[P],m.push(l),c.push(l),h[C]=l,++C,--(l=u[l]).numLiveTriangles,f-l.timeStamp>a&&(l.timeStamp=f,++f),++P}y=i(0,a,m,u,f,c,n)}return h},{});function s(e,t,r,a,i){e[t++]=r,e[t++]=a,e[t++]=a,e[t++]=i,e[t++]=i,e[t]=r}function g(e){var t,r,a={};for(t in e)e.hasOwnProperty(t)&&V.defined(e[t])&&V.defined(e[t].values)&&(r=e[t],a[t]=new G.GeometryAttribute({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]}));return a}e.toWireframe=function(e){var t=e.indices;if(V.defined(t)){switch(e.primitiveType){case G.PrimitiveType.TRIANGLES:e.indices=function(e){for(var t=e.length,r=S.IndexDatatype.createTypedArray(t,t/3*6),a=0,i=0;i<t;i+=3,a+=6)s(r,a,e[i],e[i+1],e[i+2]);return r}(t);break;case G.PrimitiveType.TRIANGLE_STRIP:e.indices=function(e){var t=e.length;if(3<=t){for(var r=S.IndexDatatype.createTypedArray(t,6*(t-2)),a=(s(r,0,e[0],e[1],e[2]),6),i=3;i<t;++i,a+=6)s(r,a,e[i-1],e[i],e[i-2]);return r}return new Uint16Array}(t);break;case G.PrimitiveType.TRIANGLE_FAN:e.indices=function(e){if(0<e.length){for(var t=e.length-1,r=S.IndexDatatype.createTypedArray(t,6*(t-1)),a=e[0],i=0,n=1;n<t;++n,i+=6)s(r,i,a,e[n],e[n+1]);return r}return new Uint16Array}(t)}e.primitiveType=G.PrimitiveType.LINES}return e},e.createLineSegmentsForVectors=function(e,t,r){t=V.defaultValue(t,"normal"),r=V.defaultValue(r,1e4);for(var a,i=e.attributes.position.values,n=e.attributes[t].values,s=i.length,o=new Float64Array(2*s),u=0,p=0;p<s;p+=3)o[u++]=i[p],o[u++]=i[p+1],o[u++]=i[p+2],o[u++]=i[p]+n[p]*r,o[u++]=i[p+1]+n[p+1]*r,o[u++]=i[p+2]+n[p+2]*r;t=e.boundingSphere;return V.defined(t)&&(a=new M.BoundingSphere(t.center,t.radius+r)),new G.Geometry({attributes:{position:new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:G.PrimitiveType.LINES,boundingSphere:a})},e.createAttributeLocations=function(e){for(var t,r=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],a=e.attributes,i={},n=0,s=r.length,o=0;o<s;++o){var u=r[o];V.defined(a[u])&&(i[u]=n++)}for(t in a)a.hasOwnProperty(t)&&!V.defined(i[t])&&(i[t]=n++);return i},e.reorderForPreVertexCache=function(e){var t=G.Geometry.computeNumberOfVertices(e),r=e.indices;if(V.defined(r)){for(var a=new Int32Array(t),i=0;i<t;i++)a[i]=-1;for(var n,s=r,o=s.length,u=S.IndexDatatype.createTypedArray(t,o),p=0,d=0,l=0;p<o;)-1!==(n=a[s[p]])?u[d]=n:(a[s[p]]=l,u[d]=l,++l),++p,++d;e.indices=u;var y,f=e.attributes;for(y in f)if(f.hasOwnProperty(y)&&V.defined(f[y])&&V.defined(f[y].values)){for(var m=f[y],c=m.values,v=0,C=m.componentsPerAttribute,h=w.ComponentDatatype.createTypedArray(m.componentDatatype,l*C);v<t;){var b=a[v];if(-1!==b)for(var g=0;g<C;g++)h[C*b+g]=c[C*v+g];++v}m.values=h}}return e},e.reorderForPostVertexCache=function(e,t){var r=e.indices;if(e.primitiveType===G.PrimitiveType.TRIANGLES&&V.defined(r)){for(var a=r.length,i=0,n=0;n<a;n++)r[n]>i&&(i=r[n]);e.indices=C.tipsify({indices:r,maximumIndex:i,cacheSize:t})}return e},e.fitToUnsignedShortIndices=function(e){var t=[],r=G.Geometry.computeNumberOfVertices(e);if(V.defined(e.indices)&&r>=D.CesiumMath.SIXTY_FOUR_KILOBYTES){var a,i=[],n=[],s=0,o=g(e.attributes),u=e.indices,p=u.length;e.primitiveType===G.PrimitiveType.TRIANGLES?a=3:e.primitiveType===G.PrimitiveType.LINES?a=2:e.primitiveType===G.PrimitiveType.POINTS&&(a=1);for(var d=0;d<p;d+=a){for(var l=0;l<a;++l){var y=u[d+l],f=i[y];if(!V.defined(f)){f=s++,i[y]=f,b=h=m=C=v=c=void 0;var m,c=o,v=e.attributes,C=y;for(m in v)if(v.hasOwnProperty(m)&&V.defined(v[m])&&V.defined(v[m].values))for(var h=v[m],b=0;b<h.componentsPerAttribute;++b)c[m].values.push(h.values[C*h.componentsPerAttribute+b])}n.push(f)}s+a>=D.CesiumMath.SIXTY_FOUR_KILOBYTES&&(t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],n=[],s=0,o=g(e.attributes))}0!==n.length&&t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var h=new R.Cartesian3,b=new R.Cartographic,d=(e.projectTo2D=function(e,t,r,a,i){for(var n=e.attributes[t],s=(i=V.defined(i)?i:new M.GeographicProjection).ellipsoid,o=n.values,u=new Float64Array(o.length),p=0,d=0;d<o.length;d+=3){var l=R.Cartesian3.fromArray(o,d,h),l=s.cartesianToCartographic(l,b),l=i.project(l,h);u[p++]=l.x,u[p++]=l.y,u[p++]=l.z}return e.attributes[r]=n,e.attributes[a]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),delete e.attributes[t],e},{high:0,low:0}),n=(e.encodeAttribute=function(e,t,r,a){for(var i=e.attributes[t],n=i.values,s=n.length,o=new Float32Array(s),u=new Float32Array(s),p=0;p<s;++p)v.EncodedCartesian3.encode(n[p],d),o[p]=d.high,u[p]=d.low;i=i.componentsPerAttribute;return e.attributes[r]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:o}),e.attributes[a]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:u}),delete e.attributes[t],e},new R.Cartesian3);function a(e,t){if(V.defined(t))for(var r=t.values,a=r.length,i=0;i<a;i+=3)R.Cartesian3.unpack(r,i,n),M.Matrix4.multiplyByPoint(e,n,n),R.Cartesian3.pack(n,r,i)}function i(e,t){if(V.defined(t))for(var r=t.values,a=r.length,i=0;i<a;i+=3)R.Cartesian3.unpack(r,i,n),M.Matrix3.multiplyByVector(e,n,n),n=R.Cartesian3.normalize(n,n),R.Cartesian3.pack(n,r,i)}var o=new M.Matrix4,u=new M.Matrix3;e.transformToWorldCoordinates=function(e){var t,r=e.modelMatrix;return M.Matrix4.equals(r,M.Matrix4.IDENTITY)||(a(r,(t=e.geometry.attributes).position),a(r,t.prevPosition),a(r,t.nextPosition),(V.defined(t.normal)||V.defined(t.tangent)||V.defined(t.bitangent))&&(M.Matrix4.inverse(r,o),M.Matrix4.transpose(o,o),M.Matrix4.getMatrix3(o,u),i(u,t.normal),i(u,t.tangent),i(u,t.bitangent)),t=e.geometry.boundingSphere,V.defined(t)&&(e.geometry.boundingSphere=M.BoundingSphere.transform(t,r,t)),e.modelMatrix=M.Matrix4.clone(M.Matrix4.IDENTITY)),e};var X=new R.Cartesian3;function j(e,t){var r,a,i,n,s,o,u=e.length,p=(e[0].modelMatrix,V.defined(e[0][t].indices)),d=e[0][t].primitiveType,l=function(e,t){var r,a=e.length,i={},n=e[0][t].attributes;for(r in n)if(n.hasOwnProperty(r)&&V.defined(n[r])&&V.defined(n[r].values)){for(var s=n[r],o=s.values.length,u=!0,p=1;p<a;++p){var d=e[p][t].attributes[r];if(!V.defined(d)||s.componentDatatype!==d.componentDatatype||s.componentsPerAttribute!==d.componentsPerAttribute||s.normalize!==d.normalize){u=!1;break}o+=d.values.length}u&&(i[r]=new G.GeometryAttribute({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:w.ComponentDatatype.createTypedArray(s.componentDatatype,o)}))}return i}(e,t);for(r in l)if(l.hasOwnProperty(r))for(i=l[r].values,f=b=0;f<u;++f)for(s=(n=e[f][t].attributes[r].values).length,a=0;a<s;++a)i[b++]=n[a];if(p){for(var y=0,f=0;f<u;++f)y+=e[f][t].indices.length;var p=G.Geometry.computeNumberOfVertices(new G.Geometry({attributes:l,primitiveType:G.PrimitiveType.POINTS})),m=S.IndexDatatype.createTypedArray(p,y),c=0,v=0;for(f=0;f<u;++f){for(var C=e[f][t].indices,h=C.length,b=0;b<h;++b)m[c++]=v+C[b];v+=G.Geometry.computeNumberOfVertices(e[f][t])}o=m}var g=new R.Cartesian3,A=0;for(f=0;f<u;++f){if(T=e[f][t].boundingSphere,!V.defined(T)){g=void 0;break}R.Cartesian3.add(T.center,g,g)}if(V.defined(g))for(R.Cartesian3.divideByScalar(g,u,g),f=0;f<u;++f){var T=e[f][t].boundingSphere,x=R.Cartesian3.magnitude(R.Cartesian3.subtract(T.center,g,X))+T.radius;A<x&&(A=x)}return new G.Geometry({attributes:l,indices:o,primitiveType:d,boundingSphere:V.defined(g)?new M.BoundingSphere(g,A):void 0})}e.combineInstances=function(e){for(var t=[],r=[],a=e.length,i=0;i<a;++i){var n=e[i];V.defined(n.geometry)?t.push(n):V.defined(n.westHemisphereGeometry)&&V.defined(n.eastHemisphereGeometry)&&r.push(n)}var s=[];return 0<t.length&&s.push(j(t,"geometry")),0<r.length&&(s.push(j(r,"westHemisphereGeometry")),s.push(j(r,"eastHemisphereGeometry"))),s};var T=new R.Cartesian3,x=new R.Cartesian3,P=new R.Cartesian3,I=new R.Cartesian3,J=(e.computeNormal=function(e){for(var t=e.indices,r=e.attributes,a=r.position.values,i=r.position.values.length/3,n=t.length,s=new Array(i),o=new Array(n/3),u=new Array(n),p=0;p<i;p++)s[p]={indexOffset:0,count:0,currentCount:0};var d=0;for(p=0;p<n;p+=3){var l=t[p],y=t[p+1],f=t[p+2],m=3*l,c=3*y,v=3*f;x.x=a[m],x.y=a[1+m],x.z=a[2+m],P.x=a[c],P.y=a[1+c],P.z=a[2+c],I.x=a[v],I.y=a[1+v],I.z=a[2+v],s[l].count++,s[y].count++,s[f].count++,R.Cartesian3.subtract(P,x,P),R.Cartesian3.subtract(I,x,I),o[d]=R.Cartesian3.cross(P,I,new R.Cartesian3),d++}var C,h=0;for(p=0;p<i;p++)s[p].indexOffset+=h,h+=s[p].count;for(p=d=0;p<n;p+=3)u[(C=s[t[p]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+1]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+2]]).indexOffset+C.currentCount]=d,C.currentCount++,d++;var b=new Float32Array(3*i);for(p=0;p<i;p++){var g=3*p;if(C=s[p],R.Cartesian3.clone(R.Cartesian3.ZERO,T),0<C.count){for(d=0;d<C.count;d++)R.Cartesian3.add(T,o[u[C.indexOffset+d]],T);R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&R.Cartesian3.clone(o[u[C.indexOffset]],T)}R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&(T.z=1),R.Cartesian3.normalize(T,T),b[g]=T.x,b[1+g]=T.y,b[2+g]=T.z}return e.attributes.normal=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:b}),e},new R.Cartesian3),K=new R.Cartesian3,Q=new R.Cartesian3,O=(e.computeTangentAndBitangent=function(e){e.attributes;for(var t=e.indices,r=e.attributes.position.values,a=e.attributes.normal.values,i=e.attributes.st.values,n=e.attributes.position.values.length/3,s=t.length,o=new Array(3*n),u=0;u<o.length;u++)o[u]=0;for(u=0;u<s;u+=3){var p,d=t[u],l=t[u+1],y=t[u+2],f=3*l,m=3*y,c=2*d,l=2*l,y=2*y,d=r[p=3*d],v=r[p+1],C=r[p+2],h=i[c],c=i[1+c],b=i[1+l]-c,c=i[1+y]-c,l=1/((i[l]-h)*c-(i[y]-h)*b),y=(c*(r[f]-d)-b*(r[m]-d))*l,h=(c*(r[f+1]-v)-b*(r[m+1]-v))*l,d=(c*(r[f+2]-C)-b*(r[m+2]-C))*l;o[p]+=y,o[p+1]+=h,o[p+2]+=d,o[f]+=y,o[f+1]+=h,o[f+2]+=d,o[m]+=y,o[m+1]+=h,o[m+2]+=d}var g=new Float32Array(3*n),A=new Float32Array(3*n);for(u=0;u<n;u++){f=(p=3*u)+1,m=p+2;var T=R.Cartesian3.fromArray(a,p,J),x=R.Cartesian3.fromArray(o,p,Q),P=R.Cartesian3.dot(T,x);R.Cartesian3.multiplyByScalar(T,P,K),R.Cartesian3.normalize(R.Cartesian3.subtract(x,K,x),x),g[p]=x.x,g[f]=x.y,g[m]=x.z,R.Cartesian3.normalize(R.Cartesian3.cross(T,x,x),x),A[p]=x.x,A[f]=x.y,A[m]=x.z}return e.attributes.tangent=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:g}),e.attributes.bitangent=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A}),e},new R.Cartesian2),E=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartesian3,N=new R.Cartesian2;function te(e){switch(e.primitiveType){case G.PrimitiveType.TRIANGLE_FAN:for(var t=e,r=G.Geometry.computeNumberOfVertices(t),a=S.IndexDatatype.createTypedArray(r,3*(r-2)),i=(a[0]=1,a[1]=0,a[2]=2,3),n=3;n<r;++n)a[i++]=n-1,a[i++]=0,a[i++]=n;return t.indices=a,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLE_STRIP:for(var t=e,s=G.Geometry.computeNumberOfVertices(t),o=S.IndexDatatype.createTypedArray(s,3*(s-2)),u=(o[0]=0,o[1]=1,o[2]=2,3<s&&(o[3]=0,o[4]=2,o[5]=3),6),p=3;p<s-1;p+=2)o[u++]=p,o[u++]=p-1,o[u++]=p+1,p+2<s&&(o[u++]=p,o[u++]=p+1,o[u++]=p+2);return t.indices=o,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLES:var d=e;if(!V.defined(d.indices)){for(var l=G.Geometry.computeNumberOfVertices(d),y=S.IndexDatatype.createTypedArray(l,l),f=0;f<l;++f)y[f]=f;d.indices=y}return d;case G.PrimitiveType.LINE_STRIP:for(var d=e,m=G.Geometry.computeNumberOfVertices(d),c=S.IndexDatatype.createTypedArray(m,2*(m-1)),v=(c[0]=0,c[1]=1,2),C=2;C<m;++C)c[v++]=C-1,c[v++]=C;return d.indices=c,d.primitiveType=G.PrimitiveType.LINES,d;case G.PrimitiveType.LINE_LOOP:for(var h=e,b=G.Geometry.computeNumberOfVertices(h),g=S.IndexDatatype.createTypedArray(b,2*b),A=(g[0]=0,g[1]=1,2),T=2;T<b;++T)g[A++]=T-1,g[A++]=T;return g[A++]=b-1,g[A]=0,h.indices=g,h.primitiveType=G.PrimitiveType.LINES,h;case G.PrimitiveType.LINES:h=e;if(!V.defined(h.indices)){for(var x=G.Geometry.computeNumberOfVertices(h),P=S.IndexDatatype.createTypedArray(x,x),w=0;w<x;++w)P[w]=w;h.indices=P}return h}}function p(e,t){Math.abs(e.y)<D.CesiumMath.EPSILON6&&(e.y=t?-D.CesiumMath.EPSILON6:D.CesiumMath.EPSILON6)}e.compressVertices=function(e){var t=e.attributes.extrudeDirection;if(V.defined(t)){for(var r=t.values,a=r.length/3,i=new Float32Array(2*a),n=0,s=0;s<a;++s)R.Cartesian3.fromArray(r,3*s,E),R.Cartesian3.equals(E,R.Cartesian3.ZERO)?n+=2:(N=A.AttributeCompression.octEncodeInRange(E,65535,N),i[n++]=N.x,i[n++]=N.y);e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i}),delete e.attributes.extrudeDirection}else{var t=e.attributes.normal,o=e.attributes.st,u=V.defined(t),p=V.defined(o);if(u||p){var d,l,y,f,m=e.attributes.tangent,c=e.attributes.bitangent,v=V.defined(m),C=V.defined(c);u&&(d=t.values),p&&(l=o.values),v&&(y=m.values),C&&(f=c.values);var t=a=(u?d:l).length/(u?3:2),o=p&&u?2:1,h=(t*=o+=v||C?1:0,new Float32Array(t)),b=0;for(s=0;s<a;++s){p&&(R.Cartesian2.fromArray(l,2*s,O),h[b++]=A.AttributeCompression.compressTextureCoordinates(O));var g=3*s;u&&V.defined(y)&&V.defined(f)?(R.Cartesian3.fromArray(d,g,E),R.Cartesian3.fromArray(y,g,$),R.Cartesian3.fromArray(f,g,ee),A.AttributeCompression.octPack(E,$,ee,O),h[b++]=O.x,h[b++]=O.y):(u&&(R.Cartesian3.fromArray(d,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)),v&&(R.Cartesian3.fromArray(y,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)),C&&(R.Cartesian3.fromArray(f,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)))}e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:o,values:h}),u&&delete e.attributes.normal,p&&delete e.attributes.st,C&&delete e.attributes.bitangent,v&&delete e.attributes.tangent}}return e};var re=new R.Cartesian3;function l(e,t,r,a){R.Cartesian3.add(e,R.Cartesian3.multiplyByScalar(R.Cartesian3.subtract(t,e,re),e.y/(e.y-t.y),re),r),R.Cartesian3.clone(r,a),p(r,!0),p(a,!1)}var y=new R.Cartesian3,f=new R.Cartesian3,m=new R.Cartesian3,c=new R.Cartesian3,ae={positions:new Array(7),indices:new Array(9)};function ie(e,t,r){var a,i,n,s,o,u;if(!(0<=e.x||0<=t.x||0<=r.x))return s=t,o=r,0!==(a=e).y&&0!==s.y&&0!==o.y?(p(a,a.y<0),p(s,s.y<0),p(o,o.y<0)):(u=Math.abs(a.y),n=Math.abs(s.y),i=Math.abs(o.y),p(a,u=(n<u?i<u?D.CesiumMath.sign(a.y):D.CesiumMath.sign(o.y):i<n?D.CesiumMath.sign(s.y):D.CesiumMath.sign(o.y))<0),p(s,u),p(o,u)),a=e.y<0,i=t.y<0,n=r.y<0,s=0,o=ae.indices,1==(s=(s+=a?1:0)+(i?1:0)+(n?1:0))?(o[1]=3,o[2]=4,o[5]=6,o[7]=6,o[8]=5,a?(l(e,t,y,m),l(e,r,f,c),o[0]=0,o[3]=1,o[4]=2,o[6]=1):i?(l(t,r,y,m),l(t,e,f,c),o[0]=1,o[3]=2,o[4]=0,o[6]=2):n&&(l(r,e,y,m),l(r,t,f,c),o[0]=2,o[3]=0,o[4]=1,o[6]=0)):2==s&&(o[2]=4,o[4]=4,o[5]=3,o[7]=5,o[8]=6,a?i?n||(l(r,e,y,m),l(r,t,f,c),o[0]=0,o[1]=1,o[3]=0,o[6]=2):(l(t,r,y,m),l(t,e,f,c),o[0]=2,o[1]=0,o[3]=2,o[6]=1):(l(e,t,y,m),l(e,r,f,c),o[0]=1,o[1]=2,o[3]=1,o[6]=0)),(u=ae.positions)[0]=e,u[1]=t,u[2]=r,u.length=3,1!=s&&2!=s||(u[3]=y,u[4]=f,u[5]=m,u[6]=c,u.length=7),ae}function ne(e,t){var r=e.attributes;if(0!==r.position.values.length){for(var a in r)r.hasOwnProperty(a)&&V.defined(r[a])&&V.defined(r[a].values)&&((a=r[a]).values=w.ComponentDatatype.createTypedArray(a.componentDatatype,a.values));var i=G.Geometry.computeNumberOfVertices(e);return e.indices=S.IndexDatatype.createTypedArray(i,e.indices),t&&(e.boundingSphere=M.BoundingSphere.fromVertices(r.position.values)),e}}function F(e){var t,r,a=e.attributes,i={};for(t in a)a.hasOwnProperty(t)&&V.defined(a[t])&&V.defined(a[t].values)&&(r=a[t],i[t]=new G.GeometryAttribute({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]}));return new G.Geometry({attributes:i,indices:[],primitiveType:e.primitiveType})}function se(e,t,r){var a=V.defined(e.geometry.boundingSphere);t=ne(t,a),r=ne(r,a),V.defined(r)&&!V.defined(t)?e.geometry=r:!V.defined(r)&&V.defined(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=r,e.geometry=void 0)}function oe(u,p){var d=new u,l=new u,y=new u;return function(e,t,r,a,i,n,s,o){e=u.fromArray(i,e*p,d),t=u.fromArray(i,t*p,l),i=u.fromArray(i,r*p,y),u.multiplyByScalar(e,a.x,e),u.multiplyByScalar(t,a.y,t),u.multiplyByScalar(i,a.z,i),r=u.add(e,t,e);u.add(r,i,r),o&&u.normalize(r,r),u.pack(r,n,s*p)}}var ue=oe(M.Cartesian4,4),L=oe(R.Cartesian3,3),pe=oe(R.Cartesian2,2),de=function(e,t,r,a,i,n,s){e=i[e]*a.x,t=i[t]*a.y,i=i[r]*a.z;n[s]=e+t+i>D.CesiumMath.EPSILON6?1:0},z=new R.Cartesian3,le=new R.Cartesian3,ye=new R.Cartesian3,fe=new R.Cartesian3;function B(e,t,r,a,i,n,s,o,u,p,d,l,y,f,m,c){if(V.defined(n)||V.defined(s)||V.defined(o)||V.defined(u)||V.defined(p)||0!==f){var v,C=function(e,t,r,a,i){var n,s,o,u,p,d,l,y;if(V.defined(i)||(i=new R.Cartesian3),V.defined(t.z)){if(R.Cartesian3.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian3.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian3.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian3.subtract(r,t,Z),s=R.Cartesian3.subtract(a,t,H),o=R.Cartesian3.subtract(e,t,W),u=R.Cartesian3.dot(n,n),p=R.Cartesian3.dot(n,s),d=R.Cartesian3.dot(n,o),l=R.Cartesian3.dot(s,s),y=R.Cartesian3.dot(s,o)}else{if(R.Cartesian2.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian2.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian2.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian2.subtract(r,t,Z),s=R.Cartesian2.subtract(a,t,H),o=R.Cartesian2.subtract(e,t,W),u=R.Cartesian2.dot(n,n),p=R.Cartesian2.dot(n,s),d=R.Cartesian2.dot(n,o),l=R.Cartesian2.dot(s,s),y=R.Cartesian2.dot(s,o)}if(i.y=l*d-p*y,i.z=u*y-p*d,0!=(r=u*l-p*p))return i.y/=r,i.z/=r,i.x=1-i.y-i.z,i}(a,R.Cartesian3.fromArray(i,3*e,z),R.Cartesian3.fromArray(i,3*t,le),R.Cartesian3.fromArray(i,3*r,ye),fe);if(V.defined(C))if(V.defined(n)&&L(e,t,r,C,n,l.normal.values,c,!0),V.defined(p)&&(a=R.Cartesian3.fromArray(p,3*e,z),i=R.Cartesian3.fromArray(p,3*t,le),n=R.Cartesian3.fromArray(p,3*r,ye),R.Cartesian3.multiplyByScalar(a,C.x,a),R.Cartesian3.multiplyByScalar(i,C.y,i),R.Cartesian3.multiplyByScalar(n,C.z,n),R.Cartesian3.equals(a,R.Cartesian3.ZERO)&&R.Cartesian3.equals(i,R.Cartesian3.ZERO)&&R.Cartesian3.equals(n,R.Cartesian3.ZERO)?((v=z).x=0,v.y=0,v.z=0):(v=R.Cartesian3.add(a,i,a),R.Cartesian3.add(v,n,v),R.Cartesian3.normalize(v,v)),R.Cartesian3.pack(v,l.extrudeDirection.values,3*c)),V.defined(d)&&de(e,t,r,C,d,l.applyOffset.values,c),V.defined(s)&&L(e,t,r,C,s,l.tangent.values,c,!0),V.defined(o)&&L(e,t,r,C,o,l.bitangent.values,c,!0),V.defined(u)&&pe(e,t,r,C,u,l.st.values,c),0<f)for(var h=0;h<f;h++){var b=y[h],g=(E=O=I=S=w=P=x=T=A=g=void 0,e),A=t,T=r,x=C,P=c,w=m[b],S=l[b],I=w.componentsPerAttribute,O=w.values,E=S.values;switch(I){case 4:ue(g,A,T,x,O,E,P,!1);break;case 3:L(g,A,T,x,O,E,P,!1);break;case 2:pe(g,A,T,x,O,E,P,!1);break;default:E[P]=O[g]*x.x+O[A]*x.y+O[T]*x.z}}}}function k(e,t,r,a,i,n){var s=e.position.values.length/3;return-1!==i?-1===(i=r[a=a[i]])?(r[a]=s,e.position.values.push(n.x,n.y,n.z),t.push(s),s):(t.push(i),i):(e.position.values.push(n.x,n.y,n.z),t.push(s),s)}var me={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function ce(e){var t,r=e.geometry,a=r.attributes,i=a.position.values,n=V.defined(a.normal)?a.normal.values:void 0,s=V.defined(a.bitangent)?a.bitangent.values:void 0,o=V.defined(a.tangent)?a.tangent.values:void 0,u=V.defined(a.st)?a.st.values:void 0,p=V.defined(a.extrudeDirection)?a.extrudeDirection.values:void 0,d=V.defined(a.applyOffset)?a.applyOffset.values:void 0,l=r.indices,y=[];for(t in a)a.hasOwnProperty(t)&&!me[t]&&V.defined(a[t])&&y.push(t);var f,m,c=y.length,v=F(r),C=F(r),h=[],b=(h.length=i.length/3,[]);for(b.length=i.length/3,A=0;A<h.length;++A)b[A]=h[A]=-1;for(var g=l.length,A=0;A<g;A+=3){var T=l[A],x=l[A+1],P=l[A+2],w=R.Cartesian3.fromArray(i,3*T),S=R.Cartesian3.fromArray(i,3*x),I=R.Cartesian3.fromArray(i,3*P),O=ie(w,S,I);if(V.defined(O)&&3<O.positions.length)for(var E=O.positions,N=O.indices,L=N.length,z=0;z<L;++z){var D=N[z],M=E[D],G=M.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b);B(T,x,P,M,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,D<3?A+D:-1,M))}else V.defined(O)&&(w=O.positions[0],S=O.positions[1],I=O.positions[2]),G=w.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b),B(T,x,P,w,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A,w)),B(T,x,P,S,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A+1,S)),B(T,x,P,I,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A+2,I))}se(e,C,v)}var ve=Y.Plane.fromPointNormal(R.Cartesian3.ZERO,R.Cartesian3.UNIT_Y),Ce=new R.Cartesian3,he=new R.Cartesian3;function _(e,t,r,a,i,n,s){V.defined(s)&&(a=R.Cartesian3.fromArray(a,3*e,z),R.Cartesian3.equalsEpsilon(a,r,D.CesiumMath.EPSILON10)?n.applyOffset.values[i]=s[e]:n.applyOffset.values[i]=s[t])}function be(e){var t,r=e.geometry,a=r.attributes,i=a.position.values,n=V.defined(a.applyOffset)?a.applyOffset.values:void 0,s=r.indices,o=F(r),u=F(r),p=s.length,d=[],l=(d.length=i.length/3,[]);for(l.length=i.length/3,t=0;t<d.length;++t)l[t]=d[t]=-1;for(t=0;t<p;t+=2){var y,f,m,c,v=s[t],C=s[t+1],h=R.Cartesian3.fromArray(i,3*v,z),b=R.Cartesian3.fromArray(i,3*C,le),g=(Math.abs(h.y)<D.CesiumMath.EPSILON6&&(h.y<0?h.y=-D.CesiumMath.EPSILON6:h.y=D.CesiumMath.EPSILON6),Math.abs(b.y)<D.CesiumMath.EPSILON6&&(b.y<0?b.y=-D.CesiumMath.EPSILON6:b.y=D.CesiumMath.EPSILON6),o.attributes),A=o.indices,T=l,x=u.attributes,P=u.indices,w=d,S=U.IntersectionTests.lineSegmentPlane(h,b,ve,ye);V.defined(S)?(y=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,5*D.CesiumMath.EPSILON9,Ce),h.y<0&&(R.Cartesian3.negate(y,y),g=u.attributes,A=u.indices,T=d,x=o.attributes,P=o.indices,w=l),f=R.Cartesian3.add(S,y,he),_(v,C,h,i,k(g,A,T,s,t,h),g,n),_(v,C,f,i,k(g,A,T,s,-1,f),g,n),R.Cartesian3.negate(y,y),R.Cartesian3.add(S,y,f),_(v,C,f,i,k(x,P,w,s,-1,f),x,n),_(v,C,b,i,k(x,P,w,s,t+1,b),x,n)):(A=h.y<0?(m=u.attributes,c=u.indices,d):(m=o.attributes,c=o.indices,l),_(v,C,h,i,k(m,c,A,s,t,h),m,n),_(v,C,b,i,k(m,c,A,s,t+1,b),m,n))}se(e,u,o)}var ge=new R.Cartesian2,Ae=new R.Cartesian2,Te=new R.Cartesian3,xe=new R.Cartesian3,Pe=new R.Cartesian3,we=new R.Cartesian3,Se=new R.Cartesian3,Ie=new R.Cartesian3,Oe=new M.Cartesian4;function Ee(e){for(var e=e.attributes,t=e.position.values,r=e.prevPosition.values,a=e.nextPosition.values,i=t.length,n=0;n<i;n+=3){var s,o=R.Cartesian3.unpack(t,n,Te);0<o.x||(s=R.Cartesian3.unpack(r,n,xe),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(0<n-3?(r[n]=t[n-3],r[n+1]=t[n-2],r[n+2]=t[n-1]):R.Cartesian3.pack(o,r,n)),s=R.Cartesian3.unpack(a,n,Pe),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(n+3<i?(a[n]=t[n+3],a[n+1]=t[n+4],a[n+2]=t[n+5]):R.Cartesian3.pack(o,a,n)))}}var Ne=5*D.CesiumMath.EPSILON9,q=D.CesiumMath.EPSILON6;e.splitLongitude=function(e){var t=e.geometry,r=t.boundingSphere;if(V.defined(r)&&(0<r.center.x-r.radius||M.BoundingSphere.intersectPlane(r,Y.Plane.ORIGIN_ZX_PLANE)!==M.Intersect.INTERSECTING))return e;if(t.geometryType!==G.GeometryType.NONE)switch(t.geometryType){case G.GeometryType.POLYLINES:for(var a=e,i=a.geometry,n=i.attributes,s=n.position.values,o=n.prevPosition.values,u=n.nextPosition.values,p=n.expandAndWidth.values,d=V.defined(n.st)?n.st.values:void 0,l=V.defined(n.color)?n.color.values:void 0,y=F(i),f=F(i),m=!1,c=s.length/3,v=0;v<c;v+=4){var C=v,h=v+2,b=R.Cartesian3.fromArray(s,3*C,Te),g=R.Cartesian3.fromArray(s,3*h,xe);if(Math.abs(b.y)<q)for(b.y=q*(g.y<0?-1:1),s[3*v+1]=b.y,s[3*(v+1)+1]=b.y,L=3*C;L<3*C+12;L+=3)o[L]=s[3*v],o[L+1]=s[3*v+1],o[L+2]=s[3*v+2];if(Math.abs(g.y)<q)for(g.y=q*(b.y<0?-1:1),s[3*(v+2)+1]=g.y,s[3*(v+3)+1]=g.y,L=3*C;L<3*C+12;L+=3)u[L]=s[3*(v+2)],u[L+1]=s[3*(v+2)+1],u[L+2]=s[3*(v+2)+2];var A=y.attributes,T=y.indices,x=f.attributes,P=f.indices,w=U.IntersectionTests.lineSegmentPlane(b,g,ve,we);if(V.defined(w)){var m=!0,S=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,Ne,Se),I=(b.y<0&&(R.Cartesian3.negate(S,S),A=f.attributes,T=f.indices,x=y.attributes,P=y.indices),R.Cartesian3.add(w,S,Ie)),S=(A.position.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.position.values.push(I.x,I.y,I.z),A.position.values.push(I.x,I.y,I.z),A.prevPosition.values.push(o[3*C],o[3*C+1],o[3*C+2]),A.prevPosition.values.push(o[3*C+3],o[3*C+4],o[3*C+5]),A.prevPosition.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),R.Cartesian3.negate(S,S),R.Cartesian3.add(w,S,I),x.position.values.push(I.x,I.y,I.z),x.position.values.push(I.x,I.y,I.z),x.position.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.nextPosition.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.nextPosition.values.push(u[3*h],u[3*h+1],u[3*h+2]),x.nextPosition.values.push(u[3*h+3],u[3*h+4],u[3*h+5]),R.Cartesian2.fromArray(p,2*C,ge)),I=Math.abs(S.y),S=(A.expandAndWidth.values.push(-1,I,1,I),A.expandAndWidth.values.push(-1,-I,1,-I),x.expandAndWidth.values.push(-1,I,1,I),x.expandAndWidth.values.push(-1,-I,1,-I),R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(w,b,Pe)));if(S/=R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(g,b,Pe)),V.defined(l)){for(var I=M.Cartesian4.fromArray(l,4*C,Oe),w=M.Cartesian4.fromArray(l,4*h,Oe),O=D.CesiumMath.lerp(I.x,w.x,S),E=D.CesiumMath.lerp(I.y,w.y,S),N=D.CesiumMath.lerp(I.z,w.z,S),I=D.CesiumMath.lerp(I.w,w.w,S),L=4*C;L<4*C+8;++L)A.color.values.push(l[L]);for(A.color.values.push(O,E,N,I),A.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),L=4*h;L<4*h+8;++L)x.color.values.push(l[L])}if(V.defined(d)){w=R.Cartesian2.fromArray(d,2*C,ge),O=R.Cartesian2.fromArray(d,2*(v+3),Ae),E=D.CesiumMath.lerp(w.x,O.x,S);for(L=2*C;L<2*C+4;++L)A.st.values.push(d[L]);for(A.st.values.push(E,w.y),A.st.values.push(E,O.y),x.st.values.push(E,w.y),x.st.values.push(E,O.y),L=2*h;L<2*h+4;++L)x.st.values.push(d[L])}N=A.position.values.length/3-4,T.push(N,N+2,N+1),T.push(N+1,N+2,N+3),N=x.position.values.length/3-4,P.push(N,N+2,N+1),P.push(N+1,N+2,N+3)}else{var z,I=(b.y<0?(z=f.attributes,f):(z=y.attributes,y)).indices;for(z.position.values.push(b.x,b.y,b.z),z.position.values.push(b.x,b.y,b.z),z.position.values.push(g.x,g.y,g.z),z.position.values.push(g.x,g.y,g.z),L=3*v;L<3*v+12;++L)z.prevPosition.values.push(o[L]),z.nextPosition.values.push(u[L]);for(L=2*v;L<2*v+8;++L)z.expandAndWidth.values.push(p[L]),V.defined(d)&&z.st.values.push(d[L]);if(V.defined(l))for(L=4*v;L<4*v+16;++L)z.color.values.push(l[L]);N=z.position.values.length/3-4,I.push(N,N+2,N+1),I.push(N+1,N+2,N+3)}}m&&(Ee(f),Ee(y)),se(a,f,y);break;case G.GeometryType.TRIANGLES:ce(e);break;case G.GeometryType.LINES:be(e)}else te(t),t.primitiveType===G.PrimitiveType.TRIANGLES?ce(e):t.primitiveType===G.PrimitiveType.LINES&&be(e);return e},t.GeometryPipeline=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./AttributeCompression-b9605c73","./Cartesian2-c1eb9da0","./Check-f996273c","./when-ae2e0b60","./Math-5bbcea10","./Transforms-8c8e0c6f","./ComponentDatatype-e44126e4","./EncodedCartesian3-6f721b97","./GeometryAttribute-8106b887","./IndexDatatype-516320ea","./IntersectionTests-46ce3a3a","./Plane-0f30f65b"],function(t,A,R,r,V,D,M,w,v,G,S,U,Y){"use strict";var Z=new R.Cartesian3,H=new R.Cartesian3,W=new R.Cartesian3;var C={calculateACMR:function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,r=e.maximumIndex,a=V.defaultValue(e.cacheSize,24),i=t.length;if(!V.defined(r))for(var r=0,n=0,s=t[n];n<i;)r<s&&(r=s),s=t[++n];for(var o=[],u=0;u<r+1;u++)o[u]=0;for(var p=a+1,d=0;d<i;++d)p-o[t[d]]>a&&(o[t[d]]=p,++p);return(p-a+1)/(i/3)}},e=(C.tipsify=function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,r=e.maximumIndex,a=V.defaultValue(e.cacheSize,24);function i(e,t,r,a,i,n,s){for(var o,u=-1,p=-1,d=0;d<r.length;){var l=r[d];a[l].numLiveTriangles&&(o=0,p<(o=i-a[l].timeStamp+2*a[l].numLiveTriangles<=t?i-a[l].timeStamp:o)||-1===p)&&(p=o,u=l),++d}if(-1!==u)return u;for(var y=a,f=n,m=s;1<=f.length;){var c=f[f.length-1];if(f.splice(f.length-1,1),0<y[c].numLiveTriangles)return c}for(;v<m;){if(0<y[v].numLiveTriangles)return++v-1;++v}return-1}var e=t.length,n=0,s=t[P=0],o=e;if(V.defined(r))n=r+1;else{for(;P<o;)n<s&&(n=s),s=t[++P];if(-1===n)return 0;++n}for(var u=[],p=0;p<n;p++)u[p]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};for(var d=P=0;P<o;)u[t[P]].vertexTriangles.push(d),++u[t[P]].numLiveTriangles,u[t[P+1]].vertexTriangles.push(d),++u[t[P+1]].numLiveTriangles,u[t[P+2]].vertexTriangles.push(d),++u[t[P+2]].numLiveTriangles,++d,P+=3;var l,y=0,f=a+1,v=1,m=[],c=[],C=0,h=[],b=e/3,g=[];for(p=0;p<b;p++)g[p]=!1;for(;-1!==y;){for(var A,m=[],T=(A=u[y]).vertexTriangles.length,x=0;x<T;++x)if(!g[d=A.vertexTriangles[x]]){g[d]=!0;for(var P=d+d+d,w=0;w<3;++w)l=t[P],m.push(l),c.push(l),h[C]=l,++C,--(l=u[l]).numLiveTriangles,f-l.timeStamp>a&&(l.timeStamp=f,++f),++P}y=i(0,a,m,u,f,c,n)}return h},{});function s(e,t,r,a,i){e[t++]=r,e[t++]=a,e[t++]=a,e[t++]=i,e[t++]=i,e[t]=r}function g(e){var t,r,a={};for(t in e)e.hasOwnProperty(t)&&V.defined(e[t])&&V.defined(e[t].values)&&(r=e[t],a[t]=new G.GeometryAttribute({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]}));return a}e.toWireframe=function(e){var t=e.indices;if(V.defined(t)){switch(e.primitiveType){case G.PrimitiveType.TRIANGLES:e.indices=function(e){for(var t=e.length,r=S.IndexDatatype.createTypedArray(t,t/3*6),a=0,i=0;i<t;i+=3,a+=6)s(r,a,e[i],e[i+1],e[i+2]);return r}(t);break;case G.PrimitiveType.TRIANGLE_STRIP:e.indices=function(e){var t=e.length;if(3<=t){for(var r=S.IndexDatatype.createTypedArray(t,6*(t-2)),a=(s(r,0,e[0],e[1],e[2]),6),i=3;i<t;++i,a+=6)s(r,a,e[i-1],e[i],e[i-2]);return r}return new Uint16Array}(t);break;case G.PrimitiveType.TRIANGLE_FAN:e.indices=function(e){if(0<e.length){for(var t=e.length-1,r=S.IndexDatatype.createTypedArray(t,6*(t-1)),a=e[0],i=0,n=1;n<t;++n,i+=6)s(r,i,a,e[n],e[n+1]);return r}return new Uint16Array}(t)}e.primitiveType=G.PrimitiveType.LINES}return e},e.createLineSegmentsForVectors=function(e,t,r){t=V.defaultValue(t,"normal"),r=V.defaultValue(r,1e4);for(var a,i=e.attributes.position.values,n=e.attributes[t].values,s=i.length,o=new Float64Array(2*s),u=0,p=0;p<s;p+=3)o[u++]=i[p],o[u++]=i[p+1],o[u++]=i[p+2],o[u++]=i[p]+n[p]*r,o[u++]=i[p+1]+n[p+1]*r,o[u++]=i[p+2]+n[p+2]*r;t=e.boundingSphere;return V.defined(t)&&(a=new M.BoundingSphere(t.center,t.radius+r)),new G.Geometry({attributes:{position:new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:G.PrimitiveType.LINES,boundingSphere:a})},e.createAttributeLocations=function(e){for(var t,r=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],a=e.attributes,i={},n=0,s=r.length,o=0;o<s;++o){var u=r[o];V.defined(a[u])&&(i[u]=n++)}for(t in a)a.hasOwnProperty(t)&&!V.defined(i[t])&&(i[t]=n++);return i},e.reorderForPreVertexCache=function(e){var t=G.Geometry.computeNumberOfVertices(e),r=e.indices;if(V.defined(r)){for(var a=new Int32Array(t),i=0;i<t;i++)a[i]=-1;for(var n,s=r,o=s.length,u=S.IndexDatatype.createTypedArray(t,o),p=0,d=0,l=0;p<o;)-1!==(n=a[s[p]])?u[d]=n:(a[s[p]]=l,u[d]=l,++l),++p,++d;e.indices=u;var y,f=e.attributes;for(y in f)if(f.hasOwnProperty(y)&&V.defined(f[y])&&V.defined(f[y].values)){for(var m=f[y],c=m.values,v=0,C=m.componentsPerAttribute,h=w.ComponentDatatype.createTypedArray(m.componentDatatype,l*C);v<t;){var b=a[v];if(-1!==b)for(var g=0;g<C;g++)h[C*b+g]=c[C*v+g];++v}m.values=h}}return e},e.reorderForPostVertexCache=function(e,t){var r=e.indices;if(e.primitiveType===G.PrimitiveType.TRIANGLES&&V.defined(r)){for(var a=r.length,i=0,n=0;n<a;n++)r[n]>i&&(i=r[n]);e.indices=C.tipsify({indices:r,maximumIndex:i,cacheSize:t})}return e},e.fitToUnsignedShortIndices=function(e){var t=[],r=G.Geometry.computeNumberOfVertices(e);if(V.defined(e.indices)&&r>=D.CesiumMath.SIXTY_FOUR_KILOBYTES){var a,i=[],n=[],s=0,o=g(e.attributes),u=e.indices,p=u.length;e.primitiveType===G.PrimitiveType.TRIANGLES?a=3:e.primitiveType===G.PrimitiveType.LINES?a=2:e.primitiveType===G.PrimitiveType.POINTS&&(a=1);for(var d=0;d<p;d+=a){for(var l=0;l<a;++l){var y=u[d+l],f=i[y];if(!V.defined(f)){f=s++,i[y]=f,b=h=m=C=v=c=void 0;var m,c=o,v=e.attributes,C=y;for(m in v)if(v.hasOwnProperty(m)&&V.defined(v[m])&&V.defined(v[m].values))for(var h=v[m],b=0;b<h.componentsPerAttribute;++b)c[m].values.push(h.values[C*h.componentsPerAttribute+b])}n.push(f)}s+a>=D.CesiumMath.SIXTY_FOUR_KILOBYTES&&(t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],n=[],s=0,o=g(e.attributes))}0!==n.length&&t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var h=new R.Cartesian3,b=new R.Cartographic,d=(e.projectTo2D=function(e,t,r,a,i){for(var n=e.attributes[t],s=(i=V.defined(i)?i:new M.GeographicProjection).ellipsoid,o=n.values,u=new Float64Array(o.length),p=0,d=0;d<o.length;d+=3){var l=R.Cartesian3.fromArray(o,d,h),l=s.cartesianToCartographic(l,b),l=i.project(l,h);u[p++]=l.x,u[p++]=l.y,u[p++]=l.z}return e.attributes[r]=n,e.attributes[a]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),delete e.attributes[t],e},{high:0,low:0}),n=(e.encodeAttribute=function(e,t,r,a){for(var i=e.attributes[t],n=i.values,s=n.length,o=new Float32Array(s),u=new Float32Array(s),p=0;p<s;++p)v.EncodedCartesian3.encode(n[p],d),o[p]=d.high,u[p]=d.low;i=i.componentsPerAttribute;return e.attributes[r]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:o}),e.attributes[a]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:u}),delete e.attributes[t],e},new R.Cartesian3);function a(e,t){if(V.defined(t))for(var r=t.values,a=r.length,i=0;i<a;i+=3)R.Cartesian3.unpack(r,i,n),M.Matrix4.multiplyByPoint(e,n,n),R.Cartesian3.pack(n,r,i)}function i(e,t){if(V.defined(t))for(var r=t.values,a=r.length,i=0;i<a;i+=3)R.Cartesian3.unpack(r,i,n),M.Matrix3.multiplyByVector(e,n,n),n=R.Cartesian3.normalize(n,n),R.Cartesian3.pack(n,r,i)}var o=new M.Matrix4,u=new M.Matrix3;e.transformToWorldCoordinates=function(e){var t,r=e.modelMatrix;return M.Matrix4.equals(r,M.Matrix4.IDENTITY)||(a(r,(t=e.geometry.attributes).position),a(r,t.prevPosition),a(r,t.nextPosition),(V.defined(t.normal)||V.defined(t.tangent)||V.defined(t.bitangent))&&(M.Matrix4.inverse(r,o),M.Matrix4.transpose(o,o),M.Matrix4.getMatrix3(o,u),i(u,t.normal),i(u,t.tangent),i(u,t.bitangent)),t=e.geometry.boundingSphere,V.defined(t)&&(e.geometry.boundingSphere=M.BoundingSphere.transform(t,r,t)),e.modelMatrix=M.Matrix4.clone(M.Matrix4.IDENTITY)),e};var X=new R.Cartesian3;function j(e,t){var r,a,i,n,s,o,u=e.length,p=(e[0].modelMatrix,V.defined(e[0][t].indices)),d=e[0][t].primitiveType,l=function(e,t){var r,a=e.length,i={},n=e[0][t].attributes;for(r in n)if(n.hasOwnProperty(r)&&V.defined(n[r])&&V.defined(n[r].values)){for(var s=n[r],o=s.values.length,u=!0,p=1;p<a;++p){var d=e[p][t].attributes[r];if(!V.defined(d)||s.componentDatatype!==d.componentDatatype||s.componentsPerAttribute!==d.componentsPerAttribute||s.normalize!==d.normalize){u=!1;break}o+=d.values.length}u&&(i[r]=new G.GeometryAttribute({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:w.ComponentDatatype.createTypedArray(s.componentDatatype,o)}))}return i}(e,t);for(r in l)if(l.hasOwnProperty(r))for(i=l[r].values,f=b=0;f<u;++f)for(s=(n=e[f][t].attributes[r].values).length,a=0;a<s;++a)i[b++]=n[a];if(p){for(var y=0,f=0;f<u;++f)y+=e[f][t].indices.length;var p=G.Geometry.computeNumberOfVertices(new G.Geometry({attributes:l,primitiveType:G.PrimitiveType.POINTS})),m=S.IndexDatatype.createTypedArray(p,y),c=0,v=0;for(f=0;f<u;++f){for(var C=e[f][t].indices,h=C.length,b=0;b<h;++b)m[c++]=v+C[b];v+=G.Geometry.computeNumberOfVertices(e[f][t])}o=m}var g=new R.Cartesian3,A=0;for(f=0;f<u;++f){if(T=e[f][t].boundingSphere,!V.defined(T)){g=void 0;break}R.Cartesian3.add(T.center,g,g)}if(V.defined(g))for(R.Cartesian3.divideByScalar(g,u,g),f=0;f<u;++f){var T=e[f][t].boundingSphere,x=R.Cartesian3.magnitude(R.Cartesian3.subtract(T.center,g,X))+T.radius;A<x&&(A=x)}return new G.Geometry({attributes:l,indices:o,primitiveType:d,boundingSphere:V.defined(g)?new M.BoundingSphere(g,A):void 0})}e.combineInstances=function(e){for(var t=[],r=[],a=e.length,i=0;i<a;++i){var n=e[i];V.defined(n.geometry)?t.push(n):V.defined(n.westHemisphereGeometry)&&V.defined(n.eastHemisphereGeometry)&&r.push(n)}var s=[];return 0<t.length&&s.push(j(t,"geometry")),0<r.length&&(s.push(j(r,"westHemisphereGeometry")),s.push(j(r,"eastHemisphereGeometry"))),s};var T=new R.Cartesian3,x=new R.Cartesian3,P=new R.Cartesian3,I=new R.Cartesian3,J=(e.computeNormal=function(e){for(var t=e.indices,r=e.attributes,a=r.position.values,i=r.position.values.length/3,n=t.length,s=new Array(i),o=new Array(n/3),u=new Array(n),p=0;p<i;p++)s[p]={indexOffset:0,count:0,currentCount:0};var d=0;for(p=0;p<n;p+=3){var l=t[p],y=t[p+1],f=t[p+2],m=3*l,c=3*y,v=3*f;x.x=a[m],x.y=a[1+m],x.z=a[2+m],P.x=a[c],P.y=a[1+c],P.z=a[2+c],I.x=a[v],I.y=a[1+v],I.z=a[2+v],s[l].count++,s[y].count++,s[f].count++,R.Cartesian3.subtract(P,x,P),R.Cartesian3.subtract(I,x,I),o[d]=R.Cartesian3.cross(P,I,new R.Cartesian3),d++}var C,h=0;for(p=0;p<i;p++)s[p].indexOffset+=h,h+=s[p].count;for(p=d=0;p<n;p+=3)u[(C=s[t[p]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+1]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+2]]).indexOffset+C.currentCount]=d,C.currentCount++,d++;var b=new Float32Array(3*i);for(p=0;p<i;p++){var g=3*p;if(C=s[p],R.Cartesian3.clone(R.Cartesian3.ZERO,T),0<C.count){for(d=0;d<C.count;d++)R.Cartesian3.add(T,o[u[C.indexOffset+d]],T);R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&R.Cartesian3.clone(o[u[C.indexOffset]],T)}R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&(T.z=1),R.Cartesian3.normalize(T,T),b[g]=T.x,b[1+g]=T.y,b[2+g]=T.z}return e.attributes.normal=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:b}),e},new R.Cartesian3),K=new R.Cartesian3,Q=new R.Cartesian3,O=(e.computeTangentAndBitangent=function(e){e.attributes;for(var t=e.indices,r=e.attributes.position.values,a=e.attributes.normal.values,i=e.attributes.st.values,n=e.attributes.position.values.length/3,s=t.length,o=new Array(3*n),u=0;u<o.length;u++)o[u]=0;for(u=0;u<s;u+=3){var p,d=t[u],l=t[u+1],y=t[u+2],f=3*l,m=3*y,c=2*d,l=2*l,y=2*y,d=r[p=3*d],v=r[p+1],C=r[p+2],h=i[c],c=i[1+c],b=i[1+l]-c,c=i[1+y]-c,l=1/((i[l]-h)*c-(i[y]-h)*b),y=(c*(r[f]-d)-b*(r[m]-d))*l,h=(c*(r[f+1]-v)-b*(r[m+1]-v))*l,d=(c*(r[f+2]-C)-b*(r[m+2]-C))*l;o[p]+=y,o[p+1]+=h,o[p+2]+=d,o[f]+=y,o[f+1]+=h,o[f+2]+=d,o[m]+=y,o[m+1]+=h,o[m+2]+=d}var g=new Float32Array(3*n),A=new Float32Array(3*n);for(u=0;u<n;u++){f=(p=3*u)+1,m=p+2;var T=R.Cartesian3.fromArray(a,p,J),x=R.Cartesian3.fromArray(o,p,Q),P=R.Cartesian3.dot(T,x);R.Cartesian3.multiplyByScalar(T,P,K),R.Cartesian3.normalize(R.Cartesian3.subtract(x,K,x),x),g[p]=x.x,g[f]=x.y,g[m]=x.z,R.Cartesian3.normalize(R.Cartesian3.cross(T,x,x),x),A[p]=x.x,A[f]=x.y,A[m]=x.z}return e.attributes.tangent=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:g}),e.attributes.bitangent=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A}),e},new R.Cartesian2),E=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartesian3,N=new R.Cartesian2;function te(e){switch(e.primitiveType){case G.PrimitiveType.TRIANGLE_FAN:for(var t=e,r=G.Geometry.computeNumberOfVertices(t),a=S.IndexDatatype.createTypedArray(r,3*(r-2)),i=(a[0]=1,a[1]=0,a[2]=2,3),n=3;n<r;++n)a[i++]=n-1,a[i++]=0,a[i++]=n;return t.indices=a,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLE_STRIP:for(var t=e,s=G.Geometry.computeNumberOfVertices(t),o=S.IndexDatatype.createTypedArray(s,3*(s-2)),u=(o[0]=0,o[1]=1,o[2]=2,3<s&&(o[3]=0,o[4]=2,o[5]=3),6),p=3;p<s-1;p+=2)o[u++]=p,o[u++]=p-1,o[u++]=p+1,p+2<s&&(o[u++]=p,o[u++]=p+1,o[u++]=p+2);return t.indices=o,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLES:var d=e;if(!V.defined(d.indices)){for(var l=G.Geometry.computeNumberOfVertices(d),y=S.IndexDatatype.createTypedArray(l,l),f=0;f<l;++f)y[f]=f;d.indices=y}return d;case G.PrimitiveType.LINE_STRIP:for(var d=e,m=G.Geometry.computeNumberOfVertices(d),c=S.IndexDatatype.createTypedArray(m,2*(m-1)),v=(c[0]=0,c[1]=1,2),C=2;C<m;++C)c[v++]=C-1,c[v++]=C;return d.indices=c,d.primitiveType=G.PrimitiveType.LINES,d;case G.PrimitiveType.LINE_LOOP:for(var h=e,b=G.Geometry.computeNumberOfVertices(h),g=S.IndexDatatype.createTypedArray(b,2*b),A=(g[0]=0,g[1]=1,2),T=2;T<b;++T)g[A++]=T-1,g[A++]=T;return g[A++]=b-1,g[A]=0,h.indices=g,h.primitiveType=G.PrimitiveType.LINES,h;case G.PrimitiveType.LINES:h=e;if(!V.defined(h.indices)){for(var x=G.Geometry.computeNumberOfVertices(h),P=S.IndexDatatype.createTypedArray(x,x),w=0;w<x;++w)P[w]=w;h.indices=P}return h}}function p(e,t){Math.abs(e.y)<D.CesiumMath.EPSILON6&&(e.y=t?-D.CesiumMath.EPSILON6:D.CesiumMath.EPSILON6)}e.compressVertices=function(e){var t=e.attributes.extrudeDirection;if(V.defined(t)){for(var r=t.values,a=r.length/3,i=new Float32Array(2*a),n=0,s=0;s<a;++s)R.Cartesian3.fromArray(r,3*s,E),R.Cartesian3.equals(E,R.Cartesian3.ZERO)?n+=2:(N=A.AttributeCompression.octEncodeInRange(E,65535,N),i[n++]=N.x,i[n++]=N.y);e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i}),delete e.attributes.extrudeDirection}else{var t=e.attributes.normal,o=e.attributes.st,u=V.defined(t),p=V.defined(o);if(u||p){var d,l,y,f,m=e.attributes.tangent,c=e.attributes.bitangent,v=V.defined(m),C=V.defined(c);u&&(d=t.values),p&&(l=o.values),v&&(y=m.values),C&&(f=c.values);var t=a=(u?d:l).length/(u?3:2),o=p&&u?2:1,h=(t*=o+=v||C?1:0,new Float32Array(t)),b=0;for(s=0;s<a;++s){p&&(R.Cartesian2.fromArray(l,2*s,O),h[b++]=A.AttributeCompression.compressTextureCoordinates(O));var g=3*s;u&&V.defined(y)&&V.defined(f)?(R.Cartesian3.fromArray(d,g,E),R.Cartesian3.fromArray(y,g,$),R.Cartesian3.fromArray(f,g,ee),A.AttributeCompression.octPack(E,$,ee,O),h[b++]=O.x,h[b++]=O.y):(u&&(R.Cartesian3.fromArray(d,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)),v&&(R.Cartesian3.fromArray(y,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)),C&&(R.Cartesian3.fromArray(f,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)))}e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:o,values:h}),u&&delete e.attributes.normal,p&&delete e.attributes.st,C&&delete e.attributes.bitangent,v&&delete e.attributes.tangent}}return e};var re=new R.Cartesian3;function l(e,t,r,a){R.Cartesian3.add(e,R.Cartesian3.multiplyByScalar(R.Cartesian3.subtract(t,e,re),e.y/(e.y-t.y),re),r),R.Cartesian3.clone(r,a),p(r,!0),p(a,!1)}var y=new R.Cartesian3,f=new R.Cartesian3,m=new R.Cartesian3,c=new R.Cartesian3,ae={positions:new Array(7),indices:new Array(9)};function ie(e,t,r){var a,i,n,s,o,u;if(!(0<=e.x||0<=t.x||0<=r.x))return s=t,o=r,0!==(a=e).y&&0!==s.y&&0!==o.y?(p(a,a.y<0),p(s,s.y<0),p(o,o.y<0)):(u=Math.abs(a.y),n=Math.abs(s.y),i=Math.abs(o.y),p(a,u=(n<u?i<u?D.CesiumMath.sign(a.y):D.CesiumMath.sign(o.y):i<n?D.CesiumMath.sign(s.y):D.CesiumMath.sign(o.y))<0),p(s,u),p(o,u)),a=e.y<0,i=t.y<0,n=r.y<0,s=0,o=ae.indices,1==(s=(s+=a?1:0)+(i?1:0)+(n?1:0))?(o[1]=3,o[2]=4,o[5]=6,o[7]=6,o[8]=5,a?(l(e,t,y,m),l(e,r,f,c),o[0]=0,o[3]=1,o[4]=2,o[6]=1):i?(l(t,r,y,m),l(t,e,f,c),o[0]=1,o[3]=2,o[4]=0,o[6]=2):n&&(l(r,e,y,m),l(r,t,f,c),o[0]=2,o[3]=0,o[4]=1,o[6]=0)):2==s&&(o[2]=4,o[4]=4,o[5]=3,o[7]=5,o[8]=6,a?i?n||(l(r,e,y,m),l(r,t,f,c),o[0]=0,o[1]=1,o[3]=0,o[6]=2):(l(t,r,y,m),l(t,e,f,c),o[0]=2,o[1]=0,o[3]=2,o[6]=1):(l(e,t,y,m),l(e,r,f,c),o[0]=1,o[1]=2,o[3]=1,o[6]=0)),(u=ae.positions)[0]=e,u[1]=t,u[2]=r,u.length=3,1!=s&&2!=s||(u[3]=y,u[4]=f,u[5]=m,u[6]=c,u.length=7),ae}function ne(e,t){var r=e.attributes;if(0!==r.position.values.length){for(var a in r)r.hasOwnProperty(a)&&V.defined(r[a])&&V.defined(r[a].values)&&((a=r[a]).values=w.ComponentDatatype.createTypedArray(a.componentDatatype,a.values));var i=G.Geometry.computeNumberOfVertices(e);return e.indices=S.IndexDatatype.createTypedArray(i,e.indices),t&&(e.boundingSphere=M.BoundingSphere.fromVertices(r.position.values)),e}}function F(e){var t,r,a=e.attributes,i={};for(t in a)a.hasOwnProperty(t)&&V.defined(a[t])&&V.defined(a[t].values)&&(r=a[t],i[t]=new G.GeometryAttribute({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]}));return new G.Geometry({attributes:i,indices:[],primitiveType:e.primitiveType})}function se(e,t,r){var a=V.defined(e.geometry.boundingSphere);t=ne(t,a),r=ne(r,a),V.defined(r)&&!V.defined(t)?e.geometry=r:!V.defined(r)&&V.defined(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=r,e.geometry=void 0)}function oe(u,p){var d=new u,l=new u,y=new u;return function(e,t,r,a,i,n,s,o){e=u.fromArray(i,e*p,d),t=u.fromArray(i,t*p,l),i=u.fromArray(i,r*p,y),u.multiplyByScalar(e,a.x,e),u.multiplyByScalar(t,a.y,t),u.multiplyByScalar(i,a.z,i),r=u.add(e,t,e);u.add(r,i,r),o&&u.normalize(r,r),u.pack(r,n,s*p)}}var ue=oe(M.Cartesian4,4),L=oe(R.Cartesian3,3),pe=oe(R.Cartesian2,2),de=function(e,t,r,a,i,n,s){e=i[e]*a.x,t=i[t]*a.y,i=i[r]*a.z;n[s]=e+t+i>D.CesiumMath.EPSILON6?1:0},z=new R.Cartesian3,le=new R.Cartesian3,ye=new R.Cartesian3,fe=new R.Cartesian3;function B(e,t,r,a,i,n,s,o,u,p,d,l,y,f,m,c){if(V.defined(n)||V.defined(s)||V.defined(o)||V.defined(u)||V.defined(p)||0!==f){var v,C=function(e,t,r,a,i){var n,s,o,u,p,d,l,y;if(V.defined(i)||(i=new R.Cartesian3),V.defined(t.z)){if(R.Cartesian3.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian3.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian3.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian3.subtract(r,t,Z),s=R.Cartesian3.subtract(a,t,H),o=R.Cartesian3.subtract(e,t,W),u=R.Cartesian3.dot(n,n),p=R.Cartesian3.dot(n,s),d=R.Cartesian3.dot(n,o),l=R.Cartesian3.dot(s,s),y=R.Cartesian3.dot(s,o)}else{if(R.Cartesian2.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian2.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian2.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian2.subtract(r,t,Z),s=R.Cartesian2.subtract(a,t,H),o=R.Cartesian2.subtract(e,t,W),u=R.Cartesian2.dot(n,n),p=R.Cartesian2.dot(n,s),d=R.Cartesian2.dot(n,o),l=R.Cartesian2.dot(s,s),y=R.Cartesian2.dot(s,o)}if(i.y=l*d-p*y,i.z=u*y-p*d,0!=(r=u*l-p*p))return i.y/=r,i.z/=r,i.x=1-i.y-i.z,i}(a,R.Cartesian3.fromArray(i,3*e,z),R.Cartesian3.fromArray(i,3*t,le),R.Cartesian3.fromArray(i,3*r,ye),fe);if(V.defined(C))if(V.defined(n)&&L(e,t,r,C,n,l.normal.values,c,!0),V.defined(p)&&(a=R.Cartesian3.fromArray(p,3*e,z),i=R.Cartesian3.fromArray(p,3*t,le),n=R.Cartesian3.fromArray(p,3*r,ye),R.Cartesian3.multiplyByScalar(a,C.x,a),R.Cartesian3.multiplyByScalar(i,C.y,i),R.Cartesian3.multiplyByScalar(n,C.z,n),R.Cartesian3.equals(a,R.Cartesian3.ZERO)&&R.Cartesian3.equals(i,R.Cartesian3.ZERO)&&R.Cartesian3.equals(n,R.Cartesian3.ZERO)?((v=z).x=0,v.y=0,v.z=0):(v=R.Cartesian3.add(a,i,a),R.Cartesian3.add(v,n,v),R.Cartesian3.normalize(v,v)),R.Cartesian3.pack(v,l.extrudeDirection.values,3*c)),V.defined(d)&&de(e,t,r,C,d,l.applyOffset.values,c),V.defined(s)&&L(e,t,r,C,s,l.tangent.values,c,!0),V.defined(o)&&L(e,t,r,C,o,l.bitangent.values,c,!0),V.defined(u)&&pe(e,t,r,C,u,l.st.values,c),0<f)for(var h=0;h<f;h++){var b=y[h],g=(E=O=I=S=w=P=x=T=A=g=void 0,e),A=t,T=r,x=C,P=c,w=m[b],S=l[b],I=w.componentsPerAttribute,O=w.values,E=S.values;switch(I){case 4:ue(g,A,T,x,O,E,P,!1);break;case 3:L(g,A,T,x,O,E,P,!1);break;case 2:pe(g,A,T,x,O,E,P,!1);break;default:E[P]=O[g]*x.x+O[A]*x.y+O[T]*x.z}}}}function k(e,t,r,a,i,n){var s=e.position.values.length/3;return-1!==i?-1===(i=r[a=a[i]])?(r[a]=s,e.position.values.push(n.x,n.y,n.z),t.push(s),s):(t.push(i),i):(e.position.values.push(n.x,n.y,n.z),t.push(s),s)}var me={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function ce(e){var t,r=e.geometry,a=r.attributes,i=a.position.values,n=V.defined(a.normal)?a.normal.values:void 0,s=V.defined(a.bitangent)?a.bitangent.values:void 0,o=V.defined(a.tangent)?a.tangent.values:void 0,u=V.defined(a.st)?a.st.values:void 0,p=V.defined(a.extrudeDirection)?a.extrudeDirection.values:void 0,d=V.defined(a.applyOffset)?a.applyOffset.values:void 0,l=r.indices,y=[];for(t in a)a.hasOwnProperty(t)&&!me[t]&&V.defined(a[t])&&y.push(t);var f,m,c=y.length,v=F(r),C=F(r),h=[],b=(h.length=i.length/3,[]);for(b.length=i.length/3,A=0;A<h.length;++A)b[A]=h[A]=-1;for(var g=l.length,A=0;A<g;A+=3){var T=l[A],x=l[A+1],P=l[A+2],w=R.Cartesian3.fromArray(i,3*T),S=R.Cartesian3.fromArray(i,3*x),I=R.Cartesian3.fromArray(i,3*P),O=ie(w,S,I);if(V.defined(O)&&3<O.positions.length)for(var E=O.positions,N=O.indices,L=N.length,z=0;z<L;++z){var D=N[z],M=E[D],G=M.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b);B(T,x,P,M,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,D<3?A+D:-1,M))}else V.defined(O)&&(w=O.positions[0],S=O.positions[1],I=O.positions[2]),G=w.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b),B(T,x,P,w,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A,w)),B(T,x,P,S,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A+1,S)),B(T,x,P,I,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A+2,I))}se(e,C,v)}var ve=Y.Plane.fromPointNormal(R.Cartesian3.ZERO,R.Cartesian3.UNIT_Y),Ce=new R.Cartesian3,he=new R.Cartesian3;function _(e,t,r,a,i,n,s){V.defined(s)&&(a=R.Cartesian3.fromArray(a,3*e,z),R.Cartesian3.equalsEpsilon(a,r,D.CesiumMath.EPSILON10)?n.applyOffset.values[i]=s[e]:n.applyOffset.values[i]=s[t])}function be(e){var t,r=e.geometry,a=r.attributes,i=a.position.values,n=V.defined(a.applyOffset)?a.applyOffset.values:void 0,s=r.indices,o=F(r),u=F(r),p=s.length,d=[],l=(d.length=i.length/3,[]);for(l.length=i.length/3,t=0;t<d.length;++t)l[t]=d[t]=-1;for(t=0;t<p;t+=2){var y,f,m,c,v=s[t],C=s[t+1],h=R.Cartesian3.fromArray(i,3*v,z),b=R.Cartesian3.fromArray(i,3*C,le),g=(Math.abs(h.y)<D.CesiumMath.EPSILON6&&(h.y<0?h.y=-D.CesiumMath.EPSILON6:h.y=D.CesiumMath.EPSILON6),Math.abs(b.y)<D.CesiumMath.EPSILON6&&(b.y<0?b.y=-D.CesiumMath.EPSILON6:b.y=D.CesiumMath.EPSILON6),o.attributes),A=o.indices,T=l,x=u.attributes,P=u.indices,w=d,S=U.IntersectionTests.lineSegmentPlane(h,b,ve,ye);V.defined(S)?(y=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,5*D.CesiumMath.EPSILON9,Ce),h.y<0&&(R.Cartesian3.negate(y,y),g=u.attributes,A=u.indices,T=d,x=o.attributes,P=o.indices,w=l),f=R.Cartesian3.add(S,y,he),_(v,C,h,i,k(g,A,T,s,t,h),g,n),_(v,C,f,i,k(g,A,T,s,-1,f),g,n),R.Cartesian3.negate(y,y),R.Cartesian3.add(S,y,f),_(v,C,f,i,k(x,P,w,s,-1,f),x,n),_(v,C,b,i,k(x,P,w,s,t+1,b),x,n)):(A=h.y<0?(m=u.attributes,c=u.indices,d):(m=o.attributes,c=o.indices,l),_(v,C,h,i,k(m,c,A,s,t,h),m,n),_(v,C,b,i,k(m,c,A,s,t+1,b),m,n))}se(e,u,o)}var ge=new R.Cartesian2,Ae=new R.Cartesian2,Te=new R.Cartesian3,xe=new R.Cartesian3,Pe=new R.Cartesian3,we=new R.Cartesian3,Se=new R.Cartesian3,Ie=new R.Cartesian3,Oe=new M.Cartesian4;function Ee(e){for(var e=e.attributes,t=e.position.values,r=e.prevPosition.values,a=e.nextPosition.values,i=t.length,n=0;n<i;n+=3){var s,o=R.Cartesian3.unpack(t,n,Te);0<o.x||(s=R.Cartesian3.unpack(r,n,xe),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(0<n-3?(r[n]=t[n-3],r[n+1]=t[n-2],r[n+2]=t[n-1]):R.Cartesian3.pack(o,r,n)),s=R.Cartesian3.unpack(a,n,Pe),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(n+3<i?(a[n]=t[n+3],a[n+1]=t[n+4],a[n+2]=t[n+5]):R.Cartesian3.pack(o,a,n)))}}var Ne=5*D.CesiumMath.EPSILON9,q=D.CesiumMath.EPSILON6;e.splitLongitude=function(e){var t=e.geometry,r=t.boundingSphere;if(V.defined(r)&&(0<r.center.x-r.radius||M.BoundingSphere.intersectPlane(r,Y.Plane.ORIGIN_ZX_PLANE)!==M.Intersect.INTERSECTING))return e;if(t.geometryType!==G.GeometryType.NONE)switch(t.geometryType){case G.GeometryType.POLYLINES:for(var a=e,i=a.geometry,n=i.attributes,s=n.position.values,o=n.prevPosition.values,u=n.nextPosition.values,p=n.expandAndWidth.values,d=V.defined(n.st)?n.st.values:void 0,l=V.defined(n.color)?n.color.values:void 0,y=F(i),f=F(i),m=!1,c=s.length/3,v=0;v<c;v+=4){var C=v,h=v+2,b=R.Cartesian3.fromArray(s,3*C,Te),g=R.Cartesian3.fromArray(s,3*h,xe);if(Math.abs(b.y)<q)for(b.y=q*(g.y<0?-1:1),s[3*v+1]=b.y,s[3*(v+1)+1]=b.y,L=3*C;L<3*C+12;L+=3)o[L]=s[3*v],o[L+1]=s[3*v+1],o[L+2]=s[3*v+2];if(Math.abs(g.y)<q)for(g.y=q*(b.y<0?-1:1),s[3*(v+2)+1]=g.y,s[3*(v+3)+1]=g.y,L=3*C;L<3*C+12;L+=3)u[L]=s[3*(v+2)],u[L+1]=s[3*(v+2)+1],u[L+2]=s[3*(v+2)+2];var A=y.attributes,T=y.indices,x=f.attributes,P=f.indices,w=U.IntersectionTests.lineSegmentPlane(b,g,ve,we);if(V.defined(w)){var m=!0,S=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,Ne,Se),I=(b.y<0&&(R.Cartesian3.negate(S,S),A=f.attributes,T=f.indices,x=y.attributes,P=y.indices),R.Cartesian3.add(w,S,Ie)),S=(A.position.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.position.values.push(I.x,I.y,I.z),A.position.values.push(I.x,I.y,I.z),A.prevPosition.values.push(o[3*C],o[3*C+1],o[3*C+2]),A.prevPosition.values.push(o[3*C+3],o[3*C+4],o[3*C+5]),A.prevPosition.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),R.Cartesian3.negate(S,S),R.Cartesian3.add(w,S,I),x.position.values.push(I.x,I.y,I.z),x.position.values.push(I.x,I.y,I.z),x.position.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.nextPosition.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.nextPosition.values.push(u[3*h],u[3*h+1],u[3*h+2]),x.nextPosition.values.push(u[3*h+3],u[3*h+4],u[3*h+5]),R.Cartesian2.fromArray(p,2*C,ge)),I=Math.abs(S.y),S=(A.expandAndWidth.values.push(-1,I,1,I),A.expandAndWidth.values.push(-1,-I,1,-I),x.expandAndWidth.values.push(-1,I,1,I),x.expandAndWidth.values.push(-1,-I,1,-I),R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(w,b,Pe)));if(S/=R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(g,b,Pe)),V.defined(l)){for(var I=M.Cartesian4.fromArray(l,4*C,Oe),w=M.Cartesian4.fromArray(l,4*h,Oe),O=D.CesiumMath.lerp(I.x,w.x,S),E=D.CesiumMath.lerp(I.y,w.y,S),N=D.CesiumMath.lerp(I.z,w.z,S),I=D.CesiumMath.lerp(I.w,w.w,S),L=4*C;L<4*C+8;++L)A.color.values.push(l[L]);for(A.color.values.push(O,E,N,I),A.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),L=4*h;L<4*h+8;++L)x.color.values.push(l[L])}if(V.defined(d)){w=R.Cartesian2.fromArray(d,2*C,ge),O=R.Cartesian2.fromArray(d,2*(v+3),Ae),E=D.CesiumMath.lerp(w.x,O.x,S);for(L=2*C;L<2*C+4;++L)A.st.values.push(d[L]);for(A.st.values.push(E,w.y),A.st.values.push(E,O.y),x.st.values.push(E,w.y),x.st.values.push(E,O.y),L=2*h;L<2*h+4;++L)x.st.values.push(d[L])}N=A.position.values.length/3-4,T.push(N,N+2,N+1),T.push(N+1,N+2,N+3),N=x.position.values.length/3-4,P.push(N,N+2,N+1),P.push(N+1,N+2,N+3)}else{var z,I=(b.y<0?(z=f.attributes,f):(z=y.attributes,y)).indices;for(z.position.values.push(b.x,b.y,b.z),z.position.values.push(b.x,b.y,b.z),z.position.values.push(g.x,g.y,g.z),z.position.values.push(g.x,g.y,g.z),L=3*v;L<3*v+12;++L)z.prevPosition.values.push(o[L]),z.nextPosition.values.push(u[L]);for(L=2*v;L<2*v+8;++L)z.expandAndWidth.values.push(p[L]),V.defined(d)&&z.st.values.push(d[L]);if(V.defined(l))for(L=4*v;L<4*v+16;++L)z.color.values.push(l[L]);N=z.position.values.length/3-4,I.push(N,N+2,N+1),I.push(N+1,N+2,N+3)}}m&&(Ee(f),Ee(y)),se(a,f,y);break;case G.GeometryType.TRIANGLES:ce(e);break;case G.GeometryType.LINES:be(e)}else te(t),t.primitiveType===G.PrimitiveType.TRIANGLES?ce(e):t.primitiveType===G.PrimitiveType.LINES&&be(e);return e},t.GeometryPipeline=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./AttributeCompression-ceaf1f7d","./Matrix2-10a61a55","./RuntimeError-24b14c10","./when-ae2e0b60","./ComponentDatatype-b7b5db18","./Transforms-70ded1e8","./EncodedCartesian3-ac19e14b","./GeometryAttribute-e89ef932","./IndexDatatype-6902a37d","./IntersectionTests-7cdfef0c","./Plane-f7823f4c"],function(t,A,R,r,V,D,M,C,G,S,q,U){"use strict";var Y=new R.Cartesian3,Z=new R.Cartesian3,H=new R.Cartesian3;var h={calculateACMR:function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,r=e.maximumIndex,a=V.defaultValue(e.cacheSize,24),i=t.length;if(!V.defined(r))for(var r=0,n=0,s=t[n];n<i;)r<s&&(r=s),s=t[++n];for(var o=[],u=0;u<r+1;u++)o[u]=0;for(var p=a+1,d=0;d<i;++d)p-o[t[d]]>a&&(o[t[d]]=p,++p);return(p-a+1)/(i/3)}},e=(h.tipsify=function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,r=e.maximumIndex,a=V.defaultValue(e.cacheSize,24);function i(e,t,r,a,i,n,s){for(var o,u=-1,p=-1,d=0;d<r.length;){var l=r[d];a[l].numLiveTriangles&&(o=0,p<(o=i-a[l].timeStamp+2*a[l].numLiveTriangles<=t?i-a[l].timeStamp:o)||-1===p)&&(p=o,u=l),++d}if(-1!==u)return u;for(var y=a,f=n,m=s;1<=f.length;){var c=f[f.length-1];if(f.splice(f.length-1,1),0<y[c].numLiveTriangles)return c}for(;v<m;){if(0<y[v].numLiveTriangles)return++v-1;++v}return-1}var e=t.length,n=0,s=t[P=0],o=e;if(V.defined(r))n=r+1;else{for(;P<o;)n<s&&(n=s),s=t[++P];if(-1===n)return 0;++n}for(var u=[],p=0;p<n;p++)u[p]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};for(var d=P=0;P<o;)u[t[P]].vertexTriangles.push(d),++u[t[P]].numLiveTriangles,u[t[P+1]].vertexTriangles.push(d),++u[t[P+1]].numLiveTriangles,u[t[P+2]].vertexTriangles.push(d),++u[t[P+2]].numLiveTriangles,++d,P+=3;var l,y=0,f=a+1,v=1,m=[],c=[],C=0,h=[],b=e/3,g=[];for(p=0;p<b;p++)g[p]=!1;for(;-1!==y;){for(var A,m=[],T=(A=u[y]).vertexTriangles.length,x=0;x<T;++x)if(!g[d=A.vertexTriangles[x]]){g[d]=!0;for(var P=d+d+d,w=0;w<3;++w)l=t[P],m.push(l),c.push(l),h[C]=l,++C,--(l=u[l]).numLiveTriangles,f-l.timeStamp>a&&(l.timeStamp=f,++f),++P}y=i(0,a,m,u,f,c,n)}return h},{});function s(e,t,r,a,i){e[t++]=r,e[t++]=a,e[t++]=a,e[t++]=i,e[t++]=i,e[t]=r}function g(e){var t,r,a={};for(t in e)e.hasOwnProperty(t)&&V.defined(e[t])&&V.defined(e[t].values)&&(r=e[t],a[t]=new G.GeometryAttribute({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]}));return a}e.toWireframe=function(e){var t=e.indices;if(V.defined(t)){switch(e.primitiveType){case G.PrimitiveType.TRIANGLES:e.indices=function(e){for(var t=e.length,r=S.IndexDatatype.createTypedArray(t,t/3*6),a=0,i=0;i<t;i+=3,a+=6)s(r,a,e[i],e[i+1],e[i+2]);return r}(t);break;case G.PrimitiveType.TRIANGLE_STRIP:e.indices=function(e){var t=e.length;if(3<=t){for(var r=S.IndexDatatype.createTypedArray(t,6*(t-2)),a=(s(r,0,e[0],e[1],e[2]),6),i=3;i<t;++i,a+=6)s(r,a,e[i-1],e[i],e[i-2]);return r}return new Uint16Array}(t);break;case G.PrimitiveType.TRIANGLE_FAN:e.indices=function(e){if(0<e.length){for(var t=e.length-1,r=S.IndexDatatype.createTypedArray(t,6*(t-1)),a=e[0],i=0,n=1;n<t;++n,i+=6)s(r,i,a,e[n],e[n+1]);return r}return new Uint16Array}(t)}e.primitiveType=G.PrimitiveType.LINES}return e},e.createLineSegmentsForVectors=function(e,t,r){t=V.defaultValue(t,"normal"),r=V.defaultValue(r,1e4);for(var a,i=e.attributes.position.values,n=e.attributes[t].values,s=i.length,o=new Float64Array(2*s),u=0,p=0;p<s;p+=3)o[u++]=i[p],o[u++]=i[p+1],o[u++]=i[p+2],o[u++]=i[p]+n[p]*r,o[u++]=i[p+1]+n[p+1]*r,o[u++]=i[p+2]+n[p+2]*r;t=e.boundingSphere;return V.defined(t)&&(a=new M.BoundingSphere(t.center,t.radius+r)),new G.Geometry({attributes:{position:new G.GeometryAttribute({componentDatatype:D.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:G.PrimitiveType.LINES,boundingSphere:a})},e.createAttributeLocations=function(e){for(var t,r=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],a=e.attributes,i={},n=0,s=r.length,o=0;o<s;++o){var u=r[o];V.defined(a[u])&&(i[u]=n++)}for(t in a)a.hasOwnProperty(t)&&!V.defined(i[t])&&(i[t]=n++);return i},e.reorderForPreVertexCache=function(e){var t=G.Geometry.computeNumberOfVertices(e),r=e.indices;if(V.defined(r)){for(var a=new Int32Array(t),i=0;i<t;i++)a[i]=-1;for(var n,s=r,o=s.length,u=S.IndexDatatype.createTypedArray(t,o),p=0,d=0,l=0;p<o;)-1!==(n=a[s[p]])?u[d]=n:(a[s[p]]=l,u[d]=l,++l),++p,++d;e.indices=u;var y,f=e.attributes;for(y in f)if(f.hasOwnProperty(y)&&V.defined(f[y])&&V.defined(f[y].values)){for(var m=f[y],c=m.values,v=0,C=m.componentsPerAttribute,h=D.ComponentDatatype.createTypedArray(m.componentDatatype,l*C);v<t;){var b=a[v];if(-1!==b)for(var g=0;g<C;g++)h[C*b+g]=c[C*v+g];++v}m.values=h}}return e},e.reorderForPostVertexCache=function(e,t){var r=e.indices;if(e.primitiveType===G.PrimitiveType.TRIANGLES&&V.defined(r)){for(var a=r.length,i=0,n=0;n<a;n++)r[n]>i&&(i=r[n]);e.indices=h.tipsify({indices:r,maximumIndex:i,cacheSize:t})}return e},e.fitToUnsignedShortIndices=function(e){var t=[],r=G.Geometry.computeNumberOfVertices(e);if(V.defined(e.indices)&&r>=D.CesiumMath.SIXTY_FOUR_KILOBYTES){var a,i=[],n=[],s=0,o=g(e.attributes),u=e.indices,p=u.length;e.primitiveType===G.PrimitiveType.TRIANGLES?a=3:e.primitiveType===G.PrimitiveType.LINES?a=2:e.primitiveType===G.PrimitiveType.POINTS&&(a=1);for(var d=0;d<p;d+=a){for(var l=0;l<a;++l){var y=u[d+l],f=i[y];if(!V.defined(f)){f=s++,i[y]=f,b=h=m=C=v=c=void 0;var m,c=o,v=e.attributes,C=y;for(m in v)if(v.hasOwnProperty(m)&&V.defined(v[m])&&V.defined(v[m].values))for(var h=v[m],b=0;b<h.componentsPerAttribute;++b)c[m].values.push(h.values[C*h.componentsPerAttribute+b])}n.push(f)}s+a>=D.CesiumMath.SIXTY_FOUR_KILOBYTES&&(t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],n=[],s=0,o=g(e.attributes))}0!==n.length&&t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var b=new R.Cartesian3,W=new R.Cartographic,d=(e.projectTo2D=function(e,t,r,a,i){for(var n=e.attributes[t],s=(i=V.defined(i)?i:new M.GeographicProjection).ellipsoid,o=n.values,u=new Float64Array(o.length),p=0,d=0;d<o.length;d+=3){var l=R.Cartesian3.fromArray(o,d,b),l=s.cartesianToCartographic(l,W),l=i.project(l,b);u[p++]=l.x,u[p++]=l.y,u[p++]=l.z}return e.attributes[r]=n,e.attributes[a]=new G.GeometryAttribute({componentDatatype:D.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),delete e.attributes[t],e},{high:0,low:0}),n=(e.encodeAttribute=function(e,t,r,a){for(var i=e.attributes[t],n=i.values,s=n.length,o=new Float32Array(s),u=new Float32Array(s),p=0;p<s;++p)C.EncodedCartesian3.encode(n[p],d),o[p]=d.high,u[p]=d.low;i=i.componentsPerAttribute;return e.attributes[r]=new G.GeometryAttribute({componentDatatype:D.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:o}),e.attributes[a]=new G.GeometryAttribute({componentDatatype:D.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:u}),delete e.attributes[t],e},new R.Cartesian3);function a(e,t){if(V.defined(t))for(var r=t.values,a=r.length,i=0;i<a;i+=3)R.Cartesian3.unpack(r,i,n),R.Matrix4.multiplyByPoint(e,n,n),R.Cartesian3.pack(n,r,i)}function i(e,t){if(V.defined(t))for(var r=t.values,a=r.length,i=0;i<a;i+=3)R.Cartesian3.unpack(r,i,n),R.Matrix3.multiplyByVector(e,n,n),n=R.Cartesian3.normalize(n,n),R.Cartesian3.pack(n,r,i)}var o=new R.Matrix4,u=new R.Matrix3;e.transformToWorldCoordinates=function(e){var t,r=e.modelMatrix;return R.Matrix4.equals(r,R.Matrix4.IDENTITY)||(a(r,(t=e.geometry.attributes).position),a(r,t.prevPosition),a(r,t.nextPosition),(V.defined(t.normal)||V.defined(t.tangent)||V.defined(t.bitangent))&&(R.Matrix4.inverse(r,o),R.Matrix4.transpose(o,o),R.Matrix4.getMatrix3(o,u),i(u,t.normal),i(u,t.tangent),i(u,t.bitangent)),t=e.geometry.boundingSphere,V.defined(t)&&(e.geometry.boundingSphere=M.BoundingSphere.transform(t,r,t)),e.modelMatrix=R.Matrix4.clone(R.Matrix4.IDENTITY)),e};var X=new R.Cartesian3;function p(e,t){var r,a,i,n,s,o,u=e.length,p=(e[0].modelMatrix,V.defined(e[0][t].indices)),d=e[0][t].primitiveType,l=function(e,t){var r,a=e.length,i={},n=e[0][t].attributes;for(r in n)if(n.hasOwnProperty(r)&&V.defined(n[r])&&V.defined(n[r].values)){for(var s=n[r],o=s.values.length,u=!0,p=1;p<a;++p){var d=e[p][t].attributes[r];if(!V.defined(d)||s.componentDatatype!==d.componentDatatype||s.componentsPerAttribute!==d.componentsPerAttribute||s.normalize!==d.normalize){u=!1;break}o+=d.values.length}u&&(i[r]=new G.GeometryAttribute({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:D.ComponentDatatype.createTypedArray(s.componentDatatype,o)}))}return i}(e,t);for(r in l)if(l.hasOwnProperty(r))for(i=l[r].values,f=b=0;f<u;++f)for(s=(n=e[f][t].attributes[r].values).length,a=0;a<s;++a)i[b++]=n[a];if(p){for(var y=0,f=0;f<u;++f)y+=e[f][t].indices.length;var p=G.Geometry.computeNumberOfVertices(new G.Geometry({attributes:l,primitiveType:G.PrimitiveType.POINTS})),m=S.IndexDatatype.createTypedArray(p,y),c=0,v=0;for(f=0;f<u;++f){for(var C=e[f][t].indices,h=C.length,b=0;b<h;++b)m[c++]=v+C[b];v+=G.Geometry.computeNumberOfVertices(e[f][t])}o=m}var g=new R.Cartesian3,A=0;for(f=0;f<u;++f){if(T=e[f][t].boundingSphere,!V.defined(T)){g=void 0;break}R.Cartesian3.add(T.center,g,g)}if(V.defined(g))for(R.Cartesian3.divideByScalar(g,u,g),f=0;f<u;++f){var T=e[f][t].boundingSphere,x=R.Cartesian3.magnitude(R.Cartesian3.subtract(T.center,g,X))+T.radius;A<x&&(A=x)}return new G.Geometry({attributes:l,indices:o,primitiveType:d,boundingSphere:V.defined(g)?new M.BoundingSphere(g,A):void 0})}e.combineInstances=function(e){for(var t=[],r=[],a=e.length,i=0;i<a;++i){var n=e[i];V.defined(n.geometry)?t.push(n):V.defined(n.westHemisphereGeometry)&&V.defined(n.eastHemisphereGeometry)&&r.push(n)}var s=[];return 0<t.length&&s.push(p(t,"geometry")),0<r.length&&(s.push(p(r,"westHemisphereGeometry")),s.push(p(r,"eastHemisphereGeometry"))),s};var T=new R.Cartesian3,x=new R.Cartesian3,P=new R.Cartesian3,w=new R.Cartesian3,j=(e.computeNormal=function(e){for(var t=e.indices,r=e.attributes,a=r.position.values,i=r.position.values.length/3,n=t.length,s=new Array(i),o=new Array(n/3),u=new Array(n),p=0;p<i;p++)s[p]={indexOffset:0,count:0,currentCount:0};var d=0;for(p=0;p<n;p+=3){var l=t[p],y=t[p+1],f=t[p+2],m=3*l,c=3*y,v=3*f;x.x=a[m],x.y=a[1+m],x.z=a[2+m],P.x=a[c],P.y=a[1+c],P.z=a[2+c],w.x=a[v],w.y=a[1+v],w.z=a[2+v],s[l].count++,s[y].count++,s[f].count++,R.Cartesian3.subtract(P,x,P),R.Cartesian3.subtract(w,x,w),o[d]=R.Cartesian3.cross(P,w,new R.Cartesian3),d++}var C,h=0;for(p=0;p<i;p++)s[p].indexOffset+=h,h+=s[p].count;for(p=d=0;p<n;p+=3)u[(C=s[t[p]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+1]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+2]]).indexOffset+C.currentCount]=d,C.currentCount++,d++;var b=new Float32Array(3*i);for(p=0;p<i;p++){var g=3*p;if(C=s[p],R.Cartesian3.clone(R.Cartesian3.ZERO,T),0<C.count){for(d=0;d<C.count;d++)R.Cartesian3.add(T,o[u[C.indexOffset+d]],T);R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&R.Cartesian3.clone(o[u[C.indexOffset]],T)}R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&(T.z=1),R.Cartesian3.normalize(T,T),b[g]=T.x,b[1+g]=T.y,b[2+g]=T.z}return e.attributes.normal=new G.GeometryAttribute({componentDatatype:D.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:b}),e},new R.Cartesian3),J=new R.Cartesian3,K=new R.Cartesian3,I=(e.computeTangentAndBitangent=function(e){e.attributes;for(var t=e.indices,r=e.attributes.position.values,a=e.attributes.normal.values,i=e.attributes.st.values,n=e.attributes.position.values.length/3,s=t.length,o=new Array(3*n),u=0;u<o.length;u++)o[u]=0;for(u=0;u<s;u+=3){var p,d=t[u],l=t[u+1],y=t[u+2],f=3*l,m=3*y,c=2*d,l=2*l,y=2*y,d=r[p=3*d],v=r[p+1],C=r[p+2],h=i[c],c=i[1+c],b=i[1+l]-c,c=i[1+y]-c,l=1/((i[l]-h)*c-(i[y]-h)*b),y=(c*(r[f]-d)-b*(r[m]-d))*l,h=(c*(r[f+1]-v)-b*(r[m+1]-v))*l,d=(c*(r[f+2]-C)-b*(r[m+2]-C))*l;o[p]+=y,o[p+1]+=h,o[p+2]+=d,o[f]+=y,o[f+1]+=h,o[f+2]+=d,o[m]+=y,o[m+1]+=h,o[m+2]+=d}var g=new Float32Array(3*n),A=new Float32Array(3*n);for(u=0;u<n;u++){f=(p=3*u)+1,m=p+2;var T=R.Cartesian3.fromArray(a,p,j),x=R.Cartesian3.fromArray(o,p,K),P=R.Cartesian3.dot(T,x);R.Cartesian3.multiplyByScalar(T,P,J),R.Cartesian3.normalize(R.Cartesian3.subtract(x,J,x),x),g[p]=x.x,g[f]=x.y,g[m]=x.z,R.Cartesian3.normalize(R.Cartesian3.cross(T,x,x),x),A[p]=x.x,A[f]=x.y,A[m]=x.z}return e.attributes.tangent=new G.GeometryAttribute({componentDatatype:D.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:g}),e.attributes.bitangent=new G.GeometryAttribute({componentDatatype:D.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A}),e},new R.Cartesian2),O=new R.Cartesian3,Q=new R.Cartesian3,$=new R.Cartesian3,E=new R.Cartesian2;function ee(e){switch(e.primitiveType){case G.PrimitiveType.TRIANGLE_FAN:for(var t=e,r=G.Geometry.computeNumberOfVertices(t),a=S.IndexDatatype.createTypedArray(r,3*(r-2)),i=(a[0]=1,a[1]=0,a[2]=2,3),n=3;n<r;++n)a[i++]=n-1,a[i++]=0,a[i++]=n;return t.indices=a,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLE_STRIP:for(var t=e,s=G.Geometry.computeNumberOfVertices(t),o=S.IndexDatatype.createTypedArray(s,3*(s-2)),u=(o[0]=0,o[1]=1,o[2]=2,3<s&&(o[3]=0,o[4]=2,o[5]=3),6),p=3;p<s-1;p+=2)o[u++]=p,o[u++]=p-1,o[u++]=p+1,p+2<s&&(o[u++]=p,o[u++]=p+1,o[u++]=p+2);return t.indices=o,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLES:var d=e;if(!V.defined(d.indices)){for(var l=G.Geometry.computeNumberOfVertices(d),y=S.IndexDatatype.createTypedArray(l,l),f=0;f<l;++f)y[f]=f;d.indices=y}return d;case G.PrimitiveType.LINE_STRIP:for(var d=e,m=G.Geometry.computeNumberOfVertices(d),c=S.IndexDatatype.createTypedArray(m,2*(m-1)),v=(c[0]=0,c[1]=1,2),C=2;C<m;++C)c[v++]=C-1,c[v++]=C;return d.indices=c,d.primitiveType=G.PrimitiveType.LINES,d;case G.PrimitiveType.LINE_LOOP:for(var h=e,b=G.Geometry.computeNumberOfVertices(h),g=S.IndexDatatype.createTypedArray(b,2*b),A=(g[0]=0,g[1]=1,2),T=2;T<b;++T)g[A++]=T-1,g[A++]=T;return g[A++]=b-1,g[A]=0,h.indices=g,h.primitiveType=G.PrimitiveType.LINES,h;case G.PrimitiveType.LINES:h=e;if(!V.defined(h.indices)){for(var x=G.Geometry.computeNumberOfVertices(h),P=S.IndexDatatype.createTypedArray(x,x),w=0;w<x;++w)P[w]=w;h.indices=P}return h}}function l(e,t){Math.abs(e.y)<D.CesiumMath.EPSILON6&&(e.y=t?-D.CesiumMath.EPSILON6:D.CesiumMath.EPSILON6)}e.compressVertices=function(e){var t=e.attributes.extrudeDirection;if(V.defined(t)){for(var r=t.values,a=r.length/3,i=new Float32Array(2*a),n=0,s=0;s<a;++s)R.Cartesian3.fromArray(r,3*s,O),R.Cartesian3.equals(O,R.Cartesian3.ZERO)?n+=2:(E=A.AttributeCompression.octEncodeInRange(O,65535,E),i[n++]=E.x,i[n++]=E.y);e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:D.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i}),delete e.attributes.extrudeDirection}else{var t=e.attributes.normal,o=e.attributes.st,u=V.defined(t),p=V.defined(o);if(u||p){var d,l,y,f,m=e.attributes.tangent,c=e.attributes.bitangent,v=V.defined(m),C=V.defined(c);u&&(d=t.values),p&&(l=o.values),v&&(y=m.values),C&&(f=c.values);var t=a=(u?d:l).length/(u?3:2),o=p&&u?2:1,h=(t*=o+=v||C?1:0,new Float32Array(t)),b=0;for(s=0;s<a;++s){p&&(R.Cartesian2.fromArray(l,2*s,I),h[b++]=A.AttributeCompression.compressTextureCoordinates(I));var g=3*s;u&&V.defined(y)&&V.defined(f)?(R.Cartesian3.fromArray(d,g,O),R.Cartesian3.fromArray(y,g,Q),R.Cartesian3.fromArray(f,g,$),A.AttributeCompression.octPack(O,Q,$,I),h[b++]=I.x,h[b++]=I.y):(u&&(R.Cartesian3.fromArray(d,g,O),h[b++]=A.AttributeCompression.octEncodeFloat(O)),v&&(R.Cartesian3.fromArray(y,g,O),h[b++]=A.AttributeCompression.octEncodeFloat(O)),C&&(R.Cartesian3.fromArray(f,g,O),h[b++]=A.AttributeCompression.octEncodeFloat(O)))}e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:D.ComponentDatatype.FLOAT,componentsPerAttribute:o,values:h}),u&&delete e.attributes.normal,p&&delete e.attributes.st,C&&delete e.attributes.bitangent,v&&delete e.attributes.tangent}}return e};var te=new R.Cartesian3;function y(e,t,r,a){R.Cartesian3.add(e,R.Cartesian3.multiplyByScalar(R.Cartesian3.subtract(t,e,te),e.y/(e.y-t.y),te),r),R.Cartesian3.clone(r,a),l(r,!0),l(a,!1)}var f=new R.Cartesian3,m=new R.Cartesian3,c=new R.Cartesian3,v=new R.Cartesian3,re={positions:new Array(7),indices:new Array(9)};function ae(e,t,r){var a,i,n,s,o,u;if(!(0<=e.x||0<=t.x||0<=r.x))return s=t,o=r,0!==(a=e).y&&0!==s.y&&0!==o.y?(l(a,a.y<0),l(s,s.y<0),l(o,o.y<0)):(u=Math.abs(a.y),n=Math.abs(s.y),i=Math.abs(o.y),l(a,u=(n<u?i<u?D.CesiumMath.sign(a.y):D.CesiumMath.sign(o.y):i<n?D.CesiumMath.sign(s.y):D.CesiumMath.sign(o.y))<0),l(s,u),l(o,u)),a=e.y<0,i=t.y<0,n=r.y<0,s=0,o=re.indices,1==(s=(s+=a?1:0)+(i?1:0)+(n?1:0))?(o[1]=3,o[2]=4,o[5]=6,o[7]=6,o[8]=5,a?(y(e,t,f,c),y(e,r,m,v),o[0]=0,o[3]=1,o[4]=2,o[6]=1):i?(y(t,r,f,c),y(t,e,m,v),o[0]=1,o[3]=2,o[4]=0,o[6]=2):n&&(y(r,e,f,c),y(r,t,m,v),o[0]=2,o[3]=0,o[4]=1,o[6]=0)):2==s&&(o[2]=4,o[4]=4,o[5]=3,o[7]=5,o[8]=6,a?i?n||(y(r,e,f,c),y(r,t,m,v),o[0]=0,o[1]=1,o[3]=0,o[6]=2):(y(t,r,f,c),y(t,e,m,v),o[0]=2,o[1]=0,o[3]=2,o[6]=1):(y(e,t,f,c),y(e,r,m,v),o[0]=1,o[1]=2,o[3]=1,o[6]=0)),(u=re.positions)[0]=e,u[1]=t,u[2]=r,u.length=3,1!=s&&2!=s||(u[3]=f,u[4]=m,u[5]=c,u[6]=v,u.length=7),re}function ie(e,t){var r=e.attributes;if(0!==r.position.values.length){for(var a in r)r.hasOwnProperty(a)&&V.defined(r[a])&&V.defined(r[a].values)&&((a=r[a]).values=D.ComponentDatatype.createTypedArray(a.componentDatatype,a.values));var i=G.Geometry.computeNumberOfVertices(e);return e.indices=S.IndexDatatype.createTypedArray(i,e.indices),t&&(e.boundingSphere=M.BoundingSphere.fromVertices(r.position.values)),e}}function F(e){var t,r,a=e.attributes,i={};for(t in a)a.hasOwnProperty(t)&&V.defined(a[t])&&V.defined(a[t].values)&&(r=a[t],i[t]=new G.GeometryAttribute({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]}));return new G.Geometry({attributes:i,indices:[],primitiveType:e.primitiveType})}function ne(e,t,r){var a=V.defined(e.geometry.boundingSphere);t=ie(t,a),r=ie(r,a),V.defined(r)&&!V.defined(t)?e.geometry=r:!V.defined(r)&&V.defined(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=r,e.geometry=void 0)}function se(u,p){var d=new u,l=new u,y=new u;return function(e,t,r,a,i,n,s,o){e=u.fromArray(i,e*p,d),t=u.fromArray(i,t*p,l),i=u.fromArray(i,r*p,y),u.multiplyByScalar(e,a.x,e),u.multiplyByScalar(t,a.y,t),u.multiplyByScalar(i,a.z,i),r=u.add(e,t,e);u.add(r,i,r),o&&u.normalize(r,r),u.pack(r,n,s*p)}}var oe=se(R.Cartesian4,4),N=se(R.Cartesian3,3),ue=se(R.Cartesian2,2),pe=function(e,t,r,a,i,n,s){e=i[e]*a.x,t=i[t]*a.y,i=i[r]*a.z;n[s]=e+t+i>D.CesiumMath.EPSILON6?1:0},L=new R.Cartesian3,de=new R.Cartesian3,le=new R.Cartesian3,ye=new R.Cartesian3;function B(e,t,r,a,i,n,s,o,u,p,d,l,y,f,m,c){if(V.defined(n)||V.defined(s)||V.defined(o)||V.defined(u)||V.defined(p)||0!==f){var v,C=function(e,t,r,a,i){var n,s,o,u,p,d,l,y;if(V.defined(i)||(i=new R.Cartesian3),V.defined(t.z)){if(R.Cartesian3.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian3.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian3.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian3.subtract(r,t,Y),s=R.Cartesian3.subtract(a,t,Z),o=R.Cartesian3.subtract(e,t,H),u=R.Cartesian3.dot(n,n),p=R.Cartesian3.dot(n,s),d=R.Cartesian3.dot(n,o),l=R.Cartesian3.dot(s,s),y=R.Cartesian3.dot(s,o)}else{if(R.Cartesian2.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian2.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian2.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian2.subtract(r,t,Y),s=R.Cartesian2.subtract(a,t,Z),o=R.Cartesian2.subtract(e,t,H),u=R.Cartesian2.dot(n,n),p=R.Cartesian2.dot(n,s),d=R.Cartesian2.dot(n,o),l=R.Cartesian2.dot(s,s),y=R.Cartesian2.dot(s,o)}if(i.y=l*d-p*y,i.z=u*y-p*d,0!=(r=u*l-p*p))return i.y/=r,i.z/=r,i.x=1-i.y-i.z,i}(a,R.Cartesian3.fromArray(i,3*e,L),R.Cartesian3.fromArray(i,3*t,de),R.Cartesian3.fromArray(i,3*r,le),ye);if(V.defined(C))if(V.defined(n)&&N(e,t,r,C,n,l.normal.values,c,!0),V.defined(p)&&(a=R.Cartesian3.fromArray(p,3*e,L),i=R.Cartesian3.fromArray(p,3*t,de),n=R.Cartesian3.fromArray(p,3*r,le),R.Cartesian3.multiplyByScalar(a,C.x,a),R.Cartesian3.multiplyByScalar(i,C.y,i),R.Cartesian3.multiplyByScalar(n,C.z,n),R.Cartesian3.equals(a,R.Cartesian3.ZERO)&&R.Cartesian3.equals(i,R.Cartesian3.ZERO)&&R.Cartesian3.equals(n,R.Cartesian3.ZERO)?((v=L).x=0,v.y=0,v.z=0):(v=R.Cartesian3.add(a,i,a),R.Cartesian3.add(v,n,v),R.Cartesian3.normalize(v,v)),R.Cartesian3.pack(v,l.extrudeDirection.values,3*c)),V.defined(d)&&pe(e,t,r,C,d,l.applyOffset.values,c),V.defined(s)&&N(e,t,r,C,s,l.tangent.values,c,!0),V.defined(o)&&N(e,t,r,C,o,l.bitangent.values,c,!0),V.defined(u)&&ue(e,t,r,C,u,l.st.values,c),0<f)for(var h=0;h<f;h++){var b=y[h],g=(E=O=I=S=w=P=x=T=A=g=void 0,e),A=t,T=r,x=C,P=c,w=m[b],S=l[b],I=w.componentsPerAttribute,O=w.values,E=S.values;switch(I){case 4:oe(g,A,T,x,O,E,P,!1);break;case 3:N(g,A,T,x,O,E,P,!1);break;case 2:ue(g,A,T,x,O,E,P,!1);break;default:E[P]=O[g]*x.x+O[A]*x.y+O[T]*x.z}}}}function _(e,t,r,a,i,n){var s=e.position.values.length/3;return-1!==i?-1===(i=r[a=a[i]])?(r[a]=s,e.position.values.push(n.x,n.y,n.z),t.push(s),s):(t.push(i),i):(e.position.values.push(n.x,n.y,n.z),t.push(s),s)}var fe={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function me(e){var t,r=e.geometry,a=r.attributes,i=a.position.values,n=V.defined(a.normal)?a.normal.values:void 0,s=V.defined(a.bitangent)?a.bitangent.values:void 0,o=V.defined(a.tangent)?a.tangent.values:void 0,u=V.defined(a.st)?a.st.values:void 0,p=V.defined(a.extrudeDirection)?a.extrudeDirection.values:void 0,d=V.defined(a.applyOffset)?a.applyOffset.values:void 0,l=r.indices,y=[];for(t in a)a.hasOwnProperty(t)&&!fe[t]&&V.defined(a[t])&&y.push(t);var f,m,c=y.length,v=F(r),C=F(r),h=[],b=(h.length=i.length/3,[]);for(b.length=i.length/3,A=0;A<h.length;++A)b[A]=h[A]=-1;for(var g=l.length,A=0;A<g;A+=3){var T=l[A],x=l[A+1],P=l[A+2],w=R.Cartesian3.fromArray(i,3*T),S=R.Cartesian3.fromArray(i,3*x),I=R.Cartesian3.fromArray(i,3*P),O=ae(w,S,I);if(V.defined(O)&&3<O.positions.length)for(var E=O.positions,N=O.indices,L=N.length,z=0;z<L;++z){var D=N[z],M=E[D],G=M.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b);B(T,x,P,M,i,n,o,s,u,p,d,f,y,c,a,_(f,m,G,l,D<3?A+D:-1,M))}else V.defined(O)&&(w=O.positions[0],S=O.positions[1],I=O.positions[2]),G=w.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b),B(T,x,P,w,i,n,o,s,u,p,d,f,y,c,a,_(f,m,G,l,A,w)),B(T,x,P,S,i,n,o,s,u,p,d,f,y,c,a,_(f,m,G,l,A+1,S)),B(T,x,P,I,i,n,o,s,u,p,d,f,y,c,a,_(f,m,G,l,A+2,I))}ne(e,C,v)}var ce=U.Plane.fromPointNormal(R.Cartesian3.ZERO,R.Cartesian3.UNIT_Y),ve=new R.Cartesian3,Ce=new R.Cartesian3;function z(e,t,r,a,i,n,s){V.defined(s)&&(a=R.Cartesian3.fromArray(a,3*e,L),R.Cartesian3.equalsEpsilon(a,r,D.CesiumMath.EPSILON10)?n.applyOffset.values[i]=s[e]:n.applyOffset.values[i]=s[t])}function he(e){var t,r=e.geometry,a=r.attributes,i=a.position.values,n=V.defined(a.applyOffset)?a.applyOffset.values:void 0,s=r.indices,o=F(r),u=F(r),p=s.length,d=[],l=(d.length=i.length/3,[]);for(l.length=i.length/3,t=0;t<d.length;++t)l[t]=d[t]=-1;for(t=0;t<p;t+=2){var y,f,m,c,v=s[t],C=s[t+1],h=R.Cartesian3.fromArray(i,3*v,L),b=R.Cartesian3.fromArray(i,3*C,de),g=(Math.abs(h.y)<D.CesiumMath.EPSILON6&&(h.y<0?h.y=-D.CesiumMath.EPSILON6:h.y=D.CesiumMath.EPSILON6),Math.abs(b.y)<D.CesiumMath.EPSILON6&&(b.y<0?b.y=-D.CesiumMath.EPSILON6:b.y=D.CesiumMath.EPSILON6),o.attributes),A=o.indices,T=l,x=u.attributes,P=u.indices,w=d,S=q.IntersectionTests.lineSegmentPlane(h,b,ce,le);V.defined(S)?(y=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,5*D.CesiumMath.EPSILON9,ve),h.y<0&&(R.Cartesian3.negate(y,y),g=u.attributes,A=u.indices,T=d,x=o.attributes,P=o.indices,w=l),f=R.Cartesian3.add(S,y,Ce),z(v,C,h,i,_(g,A,T,s,t,h),g,n),z(v,C,f,i,_(g,A,T,s,-1,f),g,n),R.Cartesian3.negate(y,y),R.Cartesian3.add(S,y,f),z(v,C,f,i,_(x,P,w,s,-1,f),x,n),z(v,C,b,i,_(x,P,w,s,t+1,b),x,n)):(A=h.y<0?(m=u.attributes,c=u.indices,d):(m=o.attributes,c=o.indices,l),z(v,C,h,i,_(m,c,A,s,t,h),m,n),z(v,C,b,i,_(m,c,A,s,t+1,b),m,n))}ne(e,u,o)}var be=new R.Cartesian2,ge=new R.Cartesian2,Ae=new R.Cartesian3,Te=new R.Cartesian3,xe=new R.Cartesian3,Pe=new R.Cartesian3,we=new R.Cartesian3,Se=new R.Cartesian3,Ie=new R.Cartesian4;function Oe(e){for(var e=e.attributes,t=e.position.values,r=e.prevPosition.values,a=e.nextPosition.values,i=t.length,n=0;n<i;n+=3){var s,o=R.Cartesian3.unpack(t,n,Ae);0<o.x||(s=R.Cartesian3.unpack(r,n,Te),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(0<n-3?(r[n]=t[n-3],r[n+1]=t[n-2],r[n+2]=t[n-1]):R.Cartesian3.pack(o,r,n)),s=R.Cartesian3.unpack(a,n,xe),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(n+3<i?(a[n]=t[n+3],a[n+1]=t[n+4],a[n+2]=t[n+5]):R.Cartesian3.pack(o,a,n)))}}var Ee=5*D.CesiumMath.EPSILON9,k=D.CesiumMath.EPSILON6;e.splitLongitude=function(e){var t=e.geometry,r=t.boundingSphere;if(V.defined(r)&&(0<r.center.x-r.radius||M.BoundingSphere.intersectPlane(r,U.Plane.ORIGIN_ZX_PLANE)!==M.Intersect.INTERSECTING))return e;if(t.geometryType!==G.GeometryType.NONE)switch(t.geometryType){case G.GeometryType.POLYLINES:for(var a=e,i=a.geometry,n=i.attributes,s=n.position.values,o=n.prevPosition.values,u=n.nextPosition.values,p=n.expandAndWidth.values,d=V.defined(n.st)?n.st.values:void 0,l=V.defined(n.color)?n.color.values:void 0,y=F(i),f=F(i),m=!1,c=s.length/3,v=0;v<c;v+=4){var C=v,h=v+2,b=R.Cartesian3.fromArray(s,3*C,Ae),g=R.Cartesian3.fromArray(s,3*h,Te);if(Math.abs(b.y)<k)for(b.y=k*(g.y<0?-1:1),s[3*v+1]=b.y,s[3*(v+1)+1]=b.y,L=3*C;L<3*C+12;L+=3)o[L]=s[3*v],o[L+1]=s[3*v+1],o[L+2]=s[3*v+2];if(Math.abs(g.y)<k)for(g.y=k*(b.y<0?-1:1),s[3*(v+2)+1]=g.y,s[3*(v+3)+1]=g.y,L=3*C;L<3*C+12;L+=3)u[L]=s[3*(v+2)],u[L+1]=s[3*(v+2)+1],u[L+2]=s[3*(v+2)+2];var A=y.attributes,T=y.indices,x=f.attributes,P=f.indices,w=q.IntersectionTests.lineSegmentPlane(b,g,ce,Pe);if(V.defined(w)){var m=!0,S=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,Ee,we),I=(b.y<0&&(R.Cartesian3.negate(S,S),A=f.attributes,T=f.indices,x=y.attributes,P=y.indices),R.Cartesian3.add(w,S,Se)),S=(A.position.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.position.values.push(I.x,I.y,I.z),A.position.values.push(I.x,I.y,I.z),A.prevPosition.values.push(o[3*C],o[3*C+1],o[3*C+2]),A.prevPosition.values.push(o[3*C+3],o[3*C+4],o[3*C+5]),A.prevPosition.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),R.Cartesian3.negate(S,S),R.Cartesian3.add(w,S,I),x.position.values.push(I.x,I.y,I.z),x.position.values.push(I.x,I.y,I.z),x.position.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.nextPosition.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.nextPosition.values.push(u[3*h],u[3*h+1],u[3*h+2]),x.nextPosition.values.push(u[3*h+3],u[3*h+4],u[3*h+5]),R.Cartesian2.fromArray(p,2*C,be)),I=Math.abs(S.y),S=(A.expandAndWidth.values.push(-1,I,1,I),A.expandAndWidth.values.push(-1,-I,1,-I),x.expandAndWidth.values.push(-1,I,1,I),x.expandAndWidth.values.push(-1,-I,1,-I),R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(w,b,xe)));if(S/=R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(g,b,xe)),V.defined(l)){for(var I=R.Cartesian4.fromArray(l,4*C,Ie),w=R.Cartesian4.fromArray(l,4*h,Ie),O=D.CesiumMath.lerp(I.x,w.x,S),E=D.CesiumMath.lerp(I.y,w.y,S),N=D.CesiumMath.lerp(I.z,w.z,S),I=D.CesiumMath.lerp(I.w,w.w,S),L=4*C;L<4*C+8;++L)A.color.values.push(l[L]);for(A.color.values.push(O,E,N,I),A.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),L=4*h;L<4*h+8;++L)x.color.values.push(l[L])}if(V.defined(d)){w=R.Cartesian2.fromArray(d,2*C,be),O=R.Cartesian2.fromArray(d,2*(v+3),ge),E=D.CesiumMath.lerp(w.x,O.x,S);for(L=2*C;L<2*C+4;++L)A.st.values.push(d[L]);for(A.st.values.push(E,w.y),A.st.values.push(E,O.y),x.st.values.push(E,w.y),x.st.values.push(E,O.y),L=2*h;L<2*h+4;++L)x.st.values.push(d[L])}N=A.position.values.length/3-4,T.push(N,N+2,N+1),T.push(N+1,N+2,N+3),N=x.position.values.length/3-4,P.push(N,N+2,N+1),P.push(N+1,N+2,N+3)}else{var z,I=(b.y<0?(z=f.attributes,f):(z=y.attributes,y)).indices;for(z.position.values.push(b.x,b.y,b.z),z.position.values.push(b.x,b.y,b.z),z.position.values.push(g.x,g.y,g.z),z.position.values.push(g.x,g.y,g.z),L=3*v;L<3*v+12;++L)z.prevPosition.values.push(o[L]),z.nextPosition.values.push(u[L]);for(L=2*v;L<2*v+8;++L)z.expandAndWidth.values.push(p[L]),V.defined(d)&&z.st.values.push(d[L]);if(V.defined(l))for(L=4*v;L<4*v+16;++L)z.color.values.push(l[L]);N=z.position.values.length/3-4,I.push(N,N+2,N+1),I.push(N+1,N+2,N+3)}}m&&(Oe(f),Oe(y)),ne(a,f,y);break;case G.GeometryType.TRIANGLES:me(e);break;case G.GeometryType.LINES:he(e)}else ee(t),t.primitiveType===G.PrimitiveType.TRIANGLES?me(e):t.primitiveType===G.PrimitiveType.LINES&&he(e);return e},t.GeometryPipeline=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./AttributeCompression-b9605c73","./Cartesian2-c1eb9da0","./Check-f996273c","./when-ae2e0b60","./Math-5bbcea10","./Transforms-1fa85493","./ComponentDatatype-e44126e4","./EncodedCartesian3-6f721b97","./GeometryAttribute-9cc31675","./IndexDatatype-516320ea","./IntersectionTests-318fd637","./Plane-fa12edbb"],function(t,A,R,r,V,D,M,w,v,G,S,U,Y){"use strict";var Z=new R.Cartesian3,H=new R.Cartesian3,W=new R.Cartesian3;var C={calculateACMR:function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,r=e.maximumIndex,a=V.defaultValue(e.cacheSize,24),i=t.length;if(!V.defined(r))for(var r=0,n=0,s=t[n];n<i;)r<s&&(r=s),s=t[++n];for(var o=[],u=0;u<r+1;u++)o[u]=0;for(var p=a+1,d=0;d<i;++d)p-o[t[d]]>a&&(o[t[d]]=p,++p);return(p-a+1)/(i/3)}},e=(C.tipsify=function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,r=e.maximumIndex,a=V.defaultValue(e.cacheSize,24);function i(e,t,r,a,i,n,s){for(var o,u=-1,p=-1,d=0;d<r.length;){var l=r[d];a[l].numLiveTriangles&&(o=0,p<(o=i-a[l].timeStamp+2*a[l].numLiveTriangles<=t?i-a[l].timeStamp:o)||-1===p)&&(p=o,u=l),++d}if(-1!==u)return u;for(var y=a,f=n,m=s;1<=f.length;){var c=f[f.length-1];if(f.splice(f.length-1,1),0<y[c].numLiveTriangles)return c}for(;v<m;){if(0<y[v].numLiveTriangles)return++v-1;++v}return-1}var e=t.length,n=0,s=t[P=0],o=e;if(V.defined(r))n=r+1;else{for(;P<o;)n<s&&(n=s),s=t[++P];if(-1===n)return 0;++n}for(var u=[],p=0;p<n;p++)u[p]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};for(var d=P=0;P<o;)u[t[P]].vertexTriangles.push(d),++u[t[P]].numLiveTriangles,u[t[P+1]].vertexTriangles.push(d),++u[t[P+1]].numLiveTriangles,u[t[P+2]].vertexTriangles.push(d),++u[t[P+2]].numLiveTriangles,++d,P+=3;var l,y=0,f=a+1,v=1,m=[],c=[],C=0,h=[],b=e/3,g=[];for(p=0;p<b;p++)g[p]=!1;for(;-1!==y;){for(var A,m=[],T=(A=u[y]).vertexTriangles.length,x=0;x<T;++x)if(!g[d=A.vertexTriangles[x]]){g[d]=!0;for(var P=d+d+d,w=0;w<3;++w)l=t[P],m.push(l),c.push(l),h[C]=l,++C,--(l=u[l]).numLiveTriangles,f-l.timeStamp>a&&(l.timeStamp=f,++f),++P}y=i(0,a,m,u,f,c,n)}return h},{});function s(e,t,r,a,i){e[t++]=r,e[t++]=a,e[t++]=a,e[t++]=i,e[t++]=i,e[t]=r}function g(e){var t,r,a={};for(t in e)e.hasOwnProperty(t)&&V.defined(e[t])&&V.defined(e[t].values)&&(r=e[t],a[t]=new G.GeometryAttribute({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]}));return a}e.toWireframe=function(e){var t=e.indices;if(V.defined(t)){switch(e.primitiveType){case G.PrimitiveType.TRIANGLES:e.indices=function(e){for(var t=e.length,r=S.IndexDatatype.createTypedArray(t,t/3*6),a=0,i=0;i<t;i+=3,a+=6)s(r,a,e[i],e[i+1],e[i+2]);return r}(t);break;case G.PrimitiveType.TRIANGLE_STRIP:e.indices=function(e){var t=e.length;if(3<=t){for(var r=S.IndexDatatype.createTypedArray(t,6*(t-2)),a=(s(r,0,e[0],e[1],e[2]),6),i=3;i<t;++i,a+=6)s(r,a,e[i-1],e[i],e[i-2]);return r}return new Uint16Array}(t);break;case G.PrimitiveType.TRIANGLE_FAN:e.indices=function(e){if(0<e.length){for(var t=e.length-1,r=S.IndexDatatype.createTypedArray(t,6*(t-1)),a=e[0],i=0,n=1;n<t;++n,i+=6)s(r,i,a,e[n],e[n+1]);return r}return new Uint16Array}(t)}e.primitiveType=G.PrimitiveType.LINES}return e},e.createLineSegmentsForVectors=function(e,t,r){t=V.defaultValue(t,"normal"),r=V.defaultValue(r,1e4);for(var a,i=e.attributes.position.values,n=e.attributes[t].values,s=i.length,o=new Float64Array(2*s),u=0,p=0;p<s;p+=3)o[u++]=i[p],o[u++]=i[p+1],o[u++]=i[p+2],o[u++]=i[p]+n[p]*r,o[u++]=i[p+1]+n[p+1]*r,o[u++]=i[p+2]+n[p+2]*r;t=e.boundingSphere;return V.defined(t)&&(a=new M.BoundingSphere(t.center,t.radius+r)),new G.Geometry({attributes:{position:new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:G.PrimitiveType.LINES,boundingSphere:a})},e.createAttributeLocations=function(e){for(var t,r=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],a=e.attributes,i={},n=0,s=r.length,o=0;o<s;++o){var u=r[o];V.defined(a[u])&&(i[u]=n++)}for(t in a)a.hasOwnProperty(t)&&!V.defined(i[t])&&(i[t]=n++);return i},e.reorderForPreVertexCache=function(e){var t=G.Geometry.computeNumberOfVertices(e),r=e.indices;if(V.defined(r)){for(var a=new Int32Array(t),i=0;i<t;i++)a[i]=-1;for(var n,s=r,o=s.length,u=S.IndexDatatype.createTypedArray(t,o),p=0,d=0,l=0;p<o;)-1!==(n=a[s[p]])?u[d]=n:(a[s[p]]=l,u[d]=l,++l),++p,++d;e.indices=u;var y,f=e.attributes;for(y in f)if(f.hasOwnProperty(y)&&V.defined(f[y])&&V.defined(f[y].values)){for(var m=f[y],c=m.values,v=0,C=m.componentsPerAttribute,h=w.ComponentDatatype.createTypedArray(m.componentDatatype,l*C);v<t;){var b=a[v];if(-1!==b)for(var g=0;g<C;g++)h[C*b+g]=c[C*v+g];++v}m.values=h}}return e},e.reorderForPostVertexCache=function(e,t){var r=e.indices;if(e.primitiveType===G.PrimitiveType.TRIANGLES&&V.defined(r)){for(var a=r.length,i=0,n=0;n<a;n++)r[n]>i&&(i=r[n]);e.indices=C.tipsify({indices:r,maximumIndex:i,cacheSize:t})}return e},e.fitToUnsignedShortIndices=function(e){var t=[],r=G.Geometry.computeNumberOfVertices(e);if(V.defined(e.indices)&&r>=D.CesiumMath.SIXTY_FOUR_KILOBYTES){var a,i=[],n=[],s=0,o=g(e.attributes),u=e.indices,p=u.length;e.primitiveType===G.PrimitiveType.TRIANGLES?a=3:e.primitiveType===G.PrimitiveType.LINES?a=2:e.primitiveType===G.PrimitiveType.POINTS&&(a=1);for(var d=0;d<p;d+=a){for(var l=0;l<a;++l){var y=u[d+l],f=i[y];if(!V.defined(f)){f=s++,i[y]=f,b=h=m=C=v=c=void 0;var m,c=o,v=e.attributes,C=y;for(m in v)if(v.hasOwnProperty(m)&&V.defined(v[m])&&V.defined(v[m].values))for(var h=v[m],b=0;b<h.componentsPerAttribute;++b)c[m].values.push(h.values[C*h.componentsPerAttribute+b])}n.push(f)}s+a>=D.CesiumMath.SIXTY_FOUR_KILOBYTES&&(t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],n=[],s=0,o=g(e.attributes))}0!==n.length&&t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var h=new R.Cartesian3,b=new R.Cartographic,d=(e.projectTo2D=function(e,t,r,a,i){for(var n=e.attributes[t],s=(i=V.defined(i)?i:new M.GeographicProjection).ellipsoid,o=n.values,u=new Float64Array(o.length),p=0,d=0;d<o.length;d+=3){var l=R.Cartesian3.fromArray(o,d,h),l=s.cartesianToCartographic(l,b),l=i.project(l,h);u[p++]=l.x,u[p++]=l.y,u[p++]=l.z}return e.attributes[r]=n,e.attributes[a]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),delete e.attributes[t],e},{high:0,low:0}),n=(e.encodeAttribute=function(e,t,r,a){for(var i=e.attributes[t],n=i.values,s=n.length,o=new Float32Array(s),u=new Float32Array(s),p=0;p<s;++p)v.EncodedCartesian3.encode(n[p],d),o[p]=d.high,u[p]=d.low;i=i.componentsPerAttribute;return e.attributes[r]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:o}),e.attributes[a]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:u}),delete e.attributes[t],e},new R.Cartesian3);function a(e,t){if(V.defined(t))for(var r=t.values,a=r.length,i=0;i<a;i+=3)R.Cartesian3.unpack(r,i,n),M.Matrix4.multiplyByPoint(e,n,n),R.Cartesian3.pack(n,r,i)}function i(e,t){if(V.defined(t))for(var r=t.values,a=r.length,i=0;i<a;i+=3)R.Cartesian3.unpack(r,i,n),M.Matrix3.multiplyByVector(e,n,n),n=R.Cartesian3.normalize(n,n),R.Cartesian3.pack(n,r,i)}var o=new M.Matrix4,u=new M.Matrix3;e.transformToWorldCoordinates=function(e){var t,r=e.modelMatrix;return M.Matrix4.equals(r,M.Matrix4.IDENTITY)||(a(r,(t=e.geometry.attributes).position),a(r,t.prevPosition),a(r,t.nextPosition),(V.defined(t.normal)||V.defined(t.tangent)||V.defined(t.bitangent))&&(M.Matrix4.inverse(r,o),M.Matrix4.transpose(o,o),M.Matrix4.getMatrix3(o,u),i(u,t.normal),i(u,t.tangent),i(u,t.bitangent)),t=e.geometry.boundingSphere,V.defined(t)&&(e.geometry.boundingSphere=M.BoundingSphere.transform(t,r,t)),e.modelMatrix=M.Matrix4.clone(M.Matrix4.IDENTITY)),e};var X=new R.Cartesian3;function j(e,t){var r,a,i,n,s,o,u=e.length,p=(e[0].modelMatrix,V.defined(e[0][t].indices)),d=e[0][t].primitiveType,l=function(e,t){var r,a=e.length,i={},n=e[0][t].attributes;for(r in n)if(n.hasOwnProperty(r)&&V.defined(n[r])&&V.defined(n[r].values)){for(var s=n[r],o=s.values.length,u=!0,p=1;p<a;++p){var d=e[p][t].attributes[r];if(!V.defined(d)||s.componentDatatype!==d.componentDatatype||s.componentsPerAttribute!==d.componentsPerAttribute||s.normalize!==d.normalize){u=!1;break}o+=d.values.length}u&&(i[r]=new G.GeometryAttribute({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:w.ComponentDatatype.createTypedArray(s.componentDatatype,o)}))}return i}(e,t);for(r in l)if(l.hasOwnProperty(r))for(i=l[r].values,f=b=0;f<u;++f)for(s=(n=e[f][t].attributes[r].values).length,a=0;a<s;++a)i[b++]=n[a];if(p){for(var y=0,f=0;f<u;++f)y+=e[f][t].indices.length;var p=G.Geometry.computeNumberOfVertices(new G.Geometry({attributes:l,primitiveType:G.PrimitiveType.POINTS})),m=S.IndexDatatype.createTypedArray(p,y),c=0,v=0;for(f=0;f<u;++f){for(var C=e[f][t].indices,h=C.length,b=0;b<h;++b)m[c++]=v+C[b];v+=G.Geometry.computeNumberOfVertices(e[f][t])}o=m}var g=new R.Cartesian3,A=0;for(f=0;f<u;++f){if(T=e[f][t].boundingSphere,!V.defined(T)){g=void 0;break}R.Cartesian3.add(T.center,g,g)}if(V.defined(g))for(R.Cartesian3.divideByScalar(g,u,g),f=0;f<u;++f){var T=e[f][t].boundingSphere,x=R.Cartesian3.magnitude(R.Cartesian3.subtract(T.center,g,X))+T.radius;A<x&&(A=x)}return new G.Geometry({attributes:l,indices:o,primitiveType:d,boundingSphere:V.defined(g)?new M.BoundingSphere(g,A):void 0})}e.combineInstances=function(e){for(var t=[],r=[],a=e.length,i=0;i<a;++i){var n=e[i];V.defined(n.geometry)?t.push(n):V.defined(n.westHemisphereGeometry)&&V.defined(n.eastHemisphereGeometry)&&r.push(n)}var s=[];return 0<t.length&&s.push(j(t,"geometry")),0<r.length&&(s.push(j(r,"westHemisphereGeometry")),s.push(j(r,"eastHemisphereGeometry"))),s};var T=new R.Cartesian3,x=new R.Cartesian3,P=new R.Cartesian3,I=new R.Cartesian3,J=(e.computeNormal=function(e){for(var t=e.indices,r=e.attributes,a=r.position.values,i=r.position.values.length/3,n=t.length,s=new Array(i),o=new Array(n/3),u=new Array(n),p=0;p<i;p++)s[p]={indexOffset:0,count:0,currentCount:0};var d=0;for(p=0;p<n;p+=3){var l=t[p],y=t[p+1],f=t[p+2],m=3*l,c=3*y,v=3*f;x.x=a[m],x.y=a[1+m],x.z=a[2+m],P.x=a[c],P.y=a[1+c],P.z=a[2+c],I.x=a[v],I.y=a[1+v],I.z=a[2+v],s[l].count++,s[y].count++,s[f].count++,R.Cartesian3.subtract(P,x,P),R.Cartesian3.subtract(I,x,I),o[d]=R.Cartesian3.cross(P,I,new R.Cartesian3),d++}var C,h=0;for(p=0;p<i;p++)s[p].indexOffset+=h,h+=s[p].count;for(p=d=0;p<n;p+=3)u[(C=s[t[p]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+1]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+2]]).indexOffset+C.currentCount]=d,C.currentCount++,d++;var b=new Float32Array(3*i);for(p=0;p<i;p++){var g=3*p;if(C=s[p],R.Cartesian3.clone(R.Cartesian3.ZERO,T),0<C.count){for(d=0;d<C.count;d++)R.Cartesian3.add(T,o[u[C.indexOffset+d]],T);R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&R.Cartesian3.clone(o[u[C.indexOffset]],T)}R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&(T.z=1),R.Cartesian3.normalize(T,T),b[g]=T.x,b[1+g]=T.y,b[2+g]=T.z}return e.attributes.normal=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:b}),e},new R.Cartesian3),K=new R.Cartesian3,Q=new R.Cartesian3,O=(e.computeTangentAndBitangent=function(e){e.attributes;for(var t=e.indices,r=e.attributes.position.values,a=e.attributes.normal.values,i=e.attributes.st.values,n=e.attributes.position.values.length/3,s=t.length,o=new Array(3*n),u=0;u<o.length;u++)o[u]=0;for(u=0;u<s;u+=3){var p,d=t[u],l=t[u+1],y=t[u+2],f=3*l,m=3*y,c=2*d,l=2*l,y=2*y,d=r[p=3*d],v=r[p+1],C=r[p+2],h=i[c],c=i[1+c],b=i[1+l]-c,c=i[1+y]-c,l=1/((i[l]-h)*c-(i[y]-h)*b),y=(c*(r[f]-d)-b*(r[m]-d))*l,h=(c*(r[f+1]-v)-b*(r[m+1]-v))*l,d=(c*(r[f+2]-C)-b*(r[m+2]-C))*l;o[p]+=y,o[p+1]+=h,o[p+2]+=d,o[f]+=y,o[f+1]+=h,o[f+2]+=d,o[m]+=y,o[m+1]+=h,o[m+2]+=d}var g=new Float32Array(3*n),A=new Float32Array(3*n);for(u=0;u<n;u++){f=(p=3*u)+1,m=p+2;var T=R.Cartesian3.fromArray(a,p,J),x=R.Cartesian3.fromArray(o,p,Q),P=R.Cartesian3.dot(T,x);R.Cartesian3.multiplyByScalar(T,P,K),R.Cartesian3.normalize(R.Cartesian3.subtract(x,K,x),x),g[p]=x.x,g[f]=x.y,g[m]=x.z,R.Cartesian3.normalize(R.Cartesian3.cross(T,x,x),x),A[p]=x.x,A[f]=x.y,A[m]=x.z}return e.attributes.tangent=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:g}),e.attributes.bitangent=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A}),e},new R.Cartesian2),E=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartesian3,N=new R.Cartesian2;function te(e){switch(e.primitiveType){case G.PrimitiveType.TRIANGLE_FAN:for(var t=e,r=G.Geometry.computeNumberOfVertices(t),a=S.IndexDatatype.createTypedArray(r,3*(r-2)),i=(a[0]=1,a[1]=0,a[2]=2,3),n=3;n<r;++n)a[i++]=n-1,a[i++]=0,a[i++]=n;return t.indices=a,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLE_STRIP:for(var t=e,s=G.Geometry.computeNumberOfVertices(t),o=S.IndexDatatype.createTypedArray(s,3*(s-2)),u=(o[0]=0,o[1]=1,o[2]=2,3<s&&(o[3]=0,o[4]=2,o[5]=3),6),p=3;p<s-1;p+=2)o[u++]=p,o[u++]=p-1,o[u++]=p+1,p+2<s&&(o[u++]=p,o[u++]=p+1,o[u++]=p+2);return t.indices=o,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLES:var d=e;if(!V.defined(d.indices)){for(var l=G.Geometry.computeNumberOfVertices(d),y=S.IndexDatatype.createTypedArray(l,l),f=0;f<l;++f)y[f]=f;d.indices=y}return d;case G.PrimitiveType.LINE_STRIP:for(var d=e,m=G.Geometry.computeNumberOfVertices(d),c=S.IndexDatatype.createTypedArray(m,2*(m-1)),v=(c[0]=0,c[1]=1,2),C=2;C<m;++C)c[v++]=C-1,c[v++]=C;return d.indices=c,d.primitiveType=G.PrimitiveType.LINES,d;case G.PrimitiveType.LINE_LOOP:for(var h=e,b=G.Geometry.computeNumberOfVertices(h),g=S.IndexDatatype.createTypedArray(b,2*b),A=(g[0]=0,g[1]=1,2),T=2;T<b;++T)g[A++]=T-1,g[A++]=T;return g[A++]=b-1,g[A]=0,h.indices=g,h.primitiveType=G.PrimitiveType.LINES,h;case G.PrimitiveType.LINES:h=e;if(!V.defined(h.indices)){for(var x=G.Geometry.computeNumberOfVertices(h),P=S.IndexDatatype.createTypedArray(x,x),w=0;w<x;++w)P[w]=w;h.indices=P}return h}}function p(e,t){Math.abs(e.y)<D.CesiumMath.EPSILON6&&(e.y=t?-D.CesiumMath.EPSILON6:D.CesiumMath.EPSILON6)}e.compressVertices=function(e){var t=e.attributes.extrudeDirection;if(V.defined(t)){for(var r=t.values,a=r.length/3,i=new Float32Array(2*a),n=0,s=0;s<a;++s)R.Cartesian3.fromArray(r,3*s,E),R.Cartesian3.equals(E,R.Cartesian3.ZERO)?n+=2:(N=A.AttributeCompression.octEncodeInRange(E,65535,N),i[n++]=N.x,i[n++]=N.y);e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i}),delete e.attributes.extrudeDirection}else{var t=e.attributes.normal,o=e.attributes.st,u=V.defined(t),p=V.defined(o);if(u||p){var d,l,y,f,m=e.attributes.tangent,c=e.attributes.bitangent,v=V.defined(m),C=V.defined(c);u&&(d=t.values),p&&(l=o.values),v&&(y=m.values),C&&(f=c.values);var t=a=(u?d:l).length/(u?3:2),o=p&&u?2:1,h=(t*=o+=v||C?1:0,new Float32Array(t)),b=0;for(s=0;s<a;++s){p&&(R.Cartesian2.fromArray(l,2*s,O),h[b++]=A.AttributeCompression.compressTextureCoordinates(O));var g=3*s;u&&V.defined(y)&&V.defined(f)?(R.Cartesian3.fromArray(d,g,E),R.Cartesian3.fromArray(y,g,$),R.Cartesian3.fromArray(f,g,ee),A.AttributeCompression.octPack(E,$,ee,O),h[b++]=O.x,h[b++]=O.y):(u&&(R.Cartesian3.fromArray(d,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)),v&&(R.Cartesian3.fromArray(y,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)),C&&(R.Cartesian3.fromArray(f,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)))}e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:o,values:h}),u&&delete e.attributes.normal,p&&delete e.attributes.st,C&&delete e.attributes.bitangent,v&&delete e.attributes.tangent}}return e};var re=new R.Cartesian3;function l(e,t,r,a){R.Cartesian3.add(e,R.Cartesian3.multiplyByScalar(R.Cartesian3.subtract(t,e,re),e.y/(e.y-t.y),re),r),R.Cartesian3.clone(r,a),p(r,!0),p(a,!1)}var y=new R.Cartesian3,f=new R.Cartesian3,m=new R.Cartesian3,c=new R.Cartesian3,ae={positions:new Array(7),indices:new Array(9)};function ie(e,t,r){var a,i,n,s,o,u;if(!(0<=e.x||0<=t.x||0<=r.x))return s=t,o=r,0!==(a=e).y&&0!==s.y&&0!==o.y?(p(a,a.y<0),p(s,s.y<0),p(o,o.y<0)):(u=Math.abs(a.y),n=Math.abs(s.y),i=Math.abs(o.y),p(a,u=(n<u?i<u?D.CesiumMath.sign(a.y):D.CesiumMath.sign(o.y):i<n?D.CesiumMath.sign(s.y):D.CesiumMath.sign(o.y))<0),p(s,u),p(o,u)),a=e.y<0,i=t.y<0,n=r.y<0,s=0,o=ae.indices,1==(s=(s+=a?1:0)+(i?1:0)+(n?1:0))?(o[1]=3,o[2]=4,o[5]=6,o[7]=6,o[8]=5,a?(l(e,t,y,m),l(e,r,f,c),o[0]=0,o[3]=1,o[4]=2,o[6]=1):i?(l(t,r,y,m),l(t,e,f,c),o[0]=1,o[3]=2,o[4]=0,o[6]=2):n&&(l(r,e,y,m),l(r,t,f,c),o[0]=2,o[3]=0,o[4]=1,o[6]=0)):2==s&&(o[2]=4,o[4]=4,o[5]=3,o[7]=5,o[8]=6,a?i?n||(l(r,e,y,m),l(r,t,f,c),o[0]=0,o[1]=1,o[3]=0,o[6]=2):(l(t,r,y,m),l(t,e,f,c),o[0]=2,o[1]=0,o[3]=2,o[6]=1):(l(e,t,y,m),l(e,r,f,c),o[0]=1,o[1]=2,o[3]=1,o[6]=0)),(u=ae.positions)[0]=e,u[1]=t,u[2]=r,u.length=3,1!=s&&2!=s||(u[3]=y,u[4]=f,u[5]=m,u[6]=c,u.length=7),ae}function ne(e,t){var r=e.attributes;if(0!==r.position.values.length){for(var a in r)r.hasOwnProperty(a)&&V.defined(r[a])&&V.defined(r[a].values)&&((a=r[a]).values=w.ComponentDatatype.createTypedArray(a.componentDatatype,a.values));var i=G.Geometry.computeNumberOfVertices(e);return e.indices=S.IndexDatatype.createTypedArray(i,e.indices),t&&(e.boundingSphere=M.BoundingSphere.fromVertices(r.position.values)),e}}function F(e){var t,r,a=e.attributes,i={};for(t in a)a.hasOwnProperty(t)&&V.defined(a[t])&&V.defined(a[t].values)&&(r=a[t],i[t]=new G.GeometryAttribute({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]}));return new G.Geometry({attributes:i,indices:[],primitiveType:e.primitiveType})}function se(e,t,r){var a=V.defined(e.geometry.boundingSphere);t=ne(t,a),r=ne(r,a),V.defined(r)&&!V.defined(t)?e.geometry=r:!V.defined(r)&&V.defined(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=r,e.geometry=void 0)}function oe(u,p){var d=new u,l=new u,y=new u;return function(e,t,r,a,i,n,s,o){e=u.fromArray(i,e*p,d),t=u.fromArray(i,t*p,l),i=u.fromArray(i,r*p,y),u.multiplyByScalar(e,a.x,e),u.multiplyByScalar(t,a.y,t),u.multiplyByScalar(i,a.z,i),r=u.add(e,t,e);u.add(r,i,r),o&&u.normalize(r,r),u.pack(r,n,s*p)}}var ue=oe(M.Cartesian4,4),L=oe(R.Cartesian3,3),pe=oe(R.Cartesian2,2),de=function(e,t,r,a,i,n,s){e=i[e]*a.x,t=i[t]*a.y,i=i[r]*a.z;n[s]=e+t+i>D.CesiumMath.EPSILON6?1:0},z=new R.Cartesian3,le=new R.Cartesian3,ye=new R.Cartesian3,fe=new R.Cartesian3;function B(e,t,r,a,i,n,s,o,u,p,d,l,y,f,m,c){if(V.defined(n)||V.defined(s)||V.defined(o)||V.defined(u)||V.defined(p)||0!==f){var v,C=function(e,t,r,a,i){var n,s,o,u,p,d,l,y;if(V.defined(i)||(i=new R.Cartesian3),V.defined(t.z)){if(R.Cartesian3.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian3.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian3.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian3.subtract(r,t,Z),s=R.Cartesian3.subtract(a,t,H),o=R.Cartesian3.subtract(e,t,W),u=R.Cartesian3.dot(n,n),p=R.Cartesian3.dot(n,s),d=R.Cartesian3.dot(n,o),l=R.Cartesian3.dot(s,s),y=R.Cartesian3.dot(s,o)}else{if(R.Cartesian2.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian2.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian2.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian2.subtract(r,t,Z),s=R.Cartesian2.subtract(a,t,H),o=R.Cartesian2.subtract(e,t,W),u=R.Cartesian2.dot(n,n),p=R.Cartesian2.dot(n,s),d=R.Cartesian2.dot(n,o),l=R.Cartesian2.dot(s,s),y=R.Cartesian2.dot(s,o)}if(i.y=l*d-p*y,i.z=u*y-p*d,0!=(r=u*l-p*p))return i.y/=r,i.z/=r,i.x=1-i.y-i.z,i}(a,R.Cartesian3.fromArray(i,3*e,z),R.Cartesian3.fromArray(i,3*t,le),R.Cartesian3.fromArray(i,3*r,ye),fe);if(V.defined(C))if(V.defined(n)&&L(e,t,r,C,n,l.normal.values,c,!0),V.defined(p)&&(a=R.Cartesian3.fromArray(p,3*e,z),i=R.Cartesian3.fromArray(p,3*t,le),n=R.Cartesian3.fromArray(p,3*r,ye),R.Cartesian3.multiplyByScalar(a,C.x,a),R.Cartesian3.multiplyByScalar(i,C.y,i),R.Cartesian3.multiplyByScalar(n,C.z,n),R.Cartesian3.equals(a,R.Cartesian3.ZERO)&&R.Cartesian3.equals(i,R.Cartesian3.ZERO)&&R.Cartesian3.equals(n,R.Cartesian3.ZERO)?((v=z).x=0,v.y=0,v.z=0):(v=R.Cartesian3.add(a,i,a),R.Cartesian3.add(v,n,v),R.Cartesian3.normalize(v,v)),R.Cartesian3.pack(v,l.extrudeDirection.values,3*c)),V.defined(d)&&de(e,t,r,C,d,l.applyOffset.values,c),V.defined(s)&&L(e,t,r,C,s,l.tangent.values,c,!0),V.defined(o)&&L(e,t,r,C,o,l.bitangent.values,c,!0),V.defined(u)&&pe(e,t,r,C,u,l.st.values,c),0<f)for(var h=0;h<f;h++){var b=y[h],g=(E=O=I=S=w=P=x=T=A=g=void 0,e),A=t,T=r,x=C,P=c,w=m[b],S=l[b],I=w.componentsPerAttribute,O=w.values,E=S.values;switch(I){case 4:ue(g,A,T,x,O,E,P,!1);break;case 3:L(g,A,T,x,O,E,P,!1);break;case 2:pe(g,A,T,x,O,E,P,!1);break;default:E[P]=O[g]*x.x+O[A]*x.y+O[T]*x.z}}}}function k(e,t,r,a,i,n){var s=e.position.values.length/3;return-1!==i?-1===(i=r[a=a[i]])?(r[a]=s,e.position.values.push(n.x,n.y,n.z),t.push(s),s):(t.push(i),i):(e.position.values.push(n.x,n.y,n.z),t.push(s),s)}var me={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function ce(e){var t,r=e.geometry,a=r.attributes,i=a.position.values,n=V.defined(a.normal)?a.normal.values:void 0,s=V.defined(a.bitangent)?a.bitangent.values:void 0,o=V.defined(a.tangent)?a.tangent.values:void 0,u=V.defined(a.st)?a.st.values:void 0,p=V.defined(a.extrudeDirection)?a.extrudeDirection.values:void 0,d=V.defined(a.applyOffset)?a.applyOffset.values:void 0,l=r.indices,y=[];for(t in a)a.hasOwnProperty(t)&&!me[t]&&V.defined(a[t])&&y.push(t);var f,m,c=y.length,v=F(r),C=F(r),h=[],b=(h.length=i.length/3,[]);for(b.length=i.length/3,A=0;A<h.length;++A)b[A]=h[A]=-1;for(var g=l.length,A=0;A<g;A+=3){var T=l[A],x=l[A+1],P=l[A+2],w=R.Cartesian3.fromArray(i,3*T),S=R.Cartesian3.fromArray(i,3*x),I=R.Cartesian3.fromArray(i,3*P),O=ie(w,S,I);if(V.defined(O)&&3<O.positions.length)for(var E=O.positions,N=O.indices,L=N.length,z=0;z<L;++z){var D=N[z],M=E[D],G=M.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b);B(T,x,P,M,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,D<3?A+D:-1,M))}else V.defined(O)&&(w=O.positions[0],S=O.positions[1],I=O.positions[2]),G=w.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b),B(T,x,P,w,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A,w)),B(T,x,P,S,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A+1,S)),B(T,x,P,I,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A+2,I))}se(e,C,v)}var ve=Y.Plane.fromPointNormal(R.Cartesian3.ZERO,R.Cartesian3.UNIT_Y),Ce=new R.Cartesian3,he=new R.Cartesian3;function _(e,t,r,a,i,n,s){V.defined(s)&&(a=R.Cartesian3.fromArray(a,3*e,z),R.Cartesian3.equalsEpsilon(a,r,D.CesiumMath.EPSILON10)?n.applyOffset.values[i]=s[e]:n.applyOffset.values[i]=s[t])}function be(e){var t,r=e.geometry,a=r.attributes,i=a.position.values,n=V.defined(a.applyOffset)?a.applyOffset.values:void 0,s=r.indices,o=F(r),u=F(r),p=s.length,d=[],l=(d.length=i.length/3,[]);for(l.length=i.length/3,t=0;t<d.length;++t)l[t]=d[t]=-1;for(t=0;t<p;t+=2){var y,f,m,c,v=s[t],C=s[t+1],h=R.Cartesian3.fromArray(i,3*v,z),b=R.Cartesian3.fromArray(i,3*C,le),g=(Math.abs(h.y)<D.CesiumMath.EPSILON6&&(h.y<0?h.y=-D.CesiumMath.EPSILON6:h.y=D.CesiumMath.EPSILON6),Math.abs(b.y)<D.CesiumMath.EPSILON6&&(b.y<0?b.y=-D.CesiumMath.EPSILON6:b.y=D.CesiumMath.EPSILON6),o.attributes),A=o.indices,T=l,x=u.attributes,P=u.indices,w=d,S=U.IntersectionTests.lineSegmentPlane(h,b,ve,ye);V.defined(S)?(y=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,5*D.CesiumMath.EPSILON9,Ce),h.y<0&&(R.Cartesian3.negate(y,y),g=u.attributes,A=u.indices,T=d,x=o.attributes,P=o.indices,w=l),f=R.Cartesian3.add(S,y,he),_(v,C,h,i,k(g,A,T,s,t,h),g,n),_(v,C,f,i,k(g,A,T,s,-1,f),g,n),R.Cartesian3.negate(y,y),R.Cartesian3.add(S,y,f),_(v,C,f,i,k(x,P,w,s,-1,f),x,n),_(v,C,b,i,k(x,P,w,s,t+1,b),x,n)):(A=h.y<0?(m=u.attributes,c=u.indices,d):(m=o.attributes,c=o.indices,l),_(v,C,h,i,k(m,c,A,s,t,h),m,n),_(v,C,b,i,k(m,c,A,s,t+1,b),m,n))}se(e,u,o)}var ge=new R.Cartesian2,Ae=new R.Cartesian2,Te=new R.Cartesian3,xe=new R.Cartesian3,Pe=new R.Cartesian3,we=new R.Cartesian3,Se=new R.Cartesian3,Ie=new R.Cartesian3,Oe=new M.Cartesian4;function Ee(e){for(var e=e.attributes,t=e.position.values,r=e.prevPosition.values,a=e.nextPosition.values,i=t.length,n=0;n<i;n+=3){var s,o=R.Cartesian3.unpack(t,n,Te);0<o.x||(s=R.Cartesian3.unpack(r,n,xe),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(0<n-3?(r[n]=t[n-3],r[n+1]=t[n-2],r[n+2]=t[n-1]):R.Cartesian3.pack(o,r,n)),s=R.Cartesian3.unpack(a,n,Pe),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(n+3<i?(a[n]=t[n+3],a[n+1]=t[n+4],a[n+2]=t[n+5]):R.Cartesian3.pack(o,a,n)))}}var Ne=5*D.CesiumMath.EPSILON9,q=D.CesiumMath.EPSILON6;e.splitLongitude=function(e){var t=e.geometry,r=t.boundingSphere;if(V.defined(r)&&(0<r.center.x-r.radius||M.BoundingSphere.intersectPlane(r,Y.Plane.ORIGIN_ZX_PLANE)!==M.Intersect.INTERSECTING))return e;if(t.geometryType!==G.GeometryType.NONE)switch(t.geometryType){case G.GeometryType.POLYLINES:for(var a=e,i=a.geometry,n=i.attributes,s=n.position.values,o=n.prevPosition.values,u=n.nextPosition.values,p=n.expandAndWidth.values,d=V.defined(n.st)?n.st.values:void 0,l=V.defined(n.color)?n.color.values:void 0,y=F(i),f=F(i),m=!1,c=s.length/3,v=0;v<c;v+=4){var C=v,h=v+2,b=R.Cartesian3.fromArray(s,3*C,Te),g=R.Cartesian3.fromArray(s,3*h,xe);if(Math.abs(b.y)<q)for(b.y=q*(g.y<0?-1:1),s[3*v+1]=b.y,s[3*(v+1)+1]=b.y,L=3*C;L<3*C+12;L+=3)o[L]=s[3*v],o[L+1]=s[3*v+1],o[L+2]=s[3*v+2];if(Math.abs(g.y)<q)for(g.y=q*(b.y<0?-1:1),s[3*(v+2)+1]=g.y,s[3*(v+3)+1]=g.y,L=3*C;L<3*C+12;L+=3)u[L]=s[3*(v+2)],u[L+1]=s[3*(v+2)+1],u[L+2]=s[3*(v+2)+2];var A=y.attributes,T=y.indices,x=f.attributes,P=f.indices,w=U.IntersectionTests.lineSegmentPlane(b,g,ve,we);if(V.defined(w)){var m=!0,S=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,Ne,Se),I=(b.y<0&&(R.Cartesian3.negate(S,S),A=f.attributes,T=f.indices,x=y.attributes,P=y.indices),R.Cartesian3.add(w,S,Ie)),S=(A.position.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.position.values.push(I.x,I.y,I.z),A.position.values.push(I.x,I.y,I.z),A.prevPosition.values.push(o[3*C],o[3*C+1],o[3*C+2]),A.prevPosition.values.push(o[3*C+3],o[3*C+4],o[3*C+5]),A.prevPosition.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),R.Cartesian3.negate(S,S),R.Cartesian3.add(w,S,I),x.position.values.push(I.x,I.y,I.z),x.position.values.push(I.x,I.y,I.z),x.position.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.nextPosition.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.nextPosition.values.push(u[3*h],u[3*h+1],u[3*h+2]),x.nextPosition.values.push(u[3*h+3],u[3*h+4],u[3*h+5]),R.Cartesian2.fromArray(p,2*C,ge)),I=Math.abs(S.y),S=(A.expandAndWidth.values.push(-1,I,1,I),A.expandAndWidth.values.push(-1,-I,1,-I),x.expandAndWidth.values.push(-1,I,1,I),x.expandAndWidth.values.push(-1,-I,1,-I),R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(w,b,Pe)));if(S/=R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(g,b,Pe)),V.defined(l)){for(var I=M.Cartesian4.fromArray(l,4*C,Oe),w=M.Cartesian4.fromArray(l,4*h,Oe),O=D.CesiumMath.lerp(I.x,w.x,S),E=D.CesiumMath.lerp(I.y,w.y,S),N=D.CesiumMath.lerp(I.z,w.z,S),I=D.CesiumMath.lerp(I.w,w.w,S),L=4*C;L<4*C+8;++L)A.color.values.push(l[L]);for(A.color.values.push(O,E,N,I),A.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),L=4*h;L<4*h+8;++L)x.color.values.push(l[L])}if(V.defined(d)){w=R.Cartesian2.fromArray(d,2*C,ge),O=R.Cartesian2.fromArray(d,2*(v+3),Ae),E=D.CesiumMath.lerp(w.x,O.x,S);for(L=2*C;L<2*C+4;++L)A.st.values.push(d[L]);for(A.st.values.push(E,w.y),A.st.values.push(E,O.y),x.st.values.push(E,w.y),x.st.values.push(E,O.y),L=2*h;L<2*h+4;++L)x.st.values.push(d[L])}N=A.position.values.length/3-4,T.push(N,N+2,N+1),T.push(N+1,N+2,N+3),N=x.position.values.length/3-4,P.push(N,N+2,N+1),P.push(N+1,N+2,N+3)}else{var z,I=(b.y<0?(z=f.attributes,f):(z=y.attributes,y)).indices;for(z.position.values.push(b.x,b.y,b.z),z.position.values.push(b.x,b.y,b.z),z.position.values.push(g.x,g.y,g.z),z.position.values.push(g.x,g.y,g.z),L=3*v;L<3*v+12;++L)z.prevPosition.values.push(o[L]),z.nextPosition.values.push(u[L]);for(L=2*v;L<2*v+8;++L)z.expandAndWidth.values.push(p[L]),V.defined(d)&&z.st.values.push(d[L]);if(V.defined(l))for(L=4*v;L<4*v+16;++L)z.color.values.push(l[L]);N=z.position.values.length/3-4,I.push(N,N+2,N+1),I.push(N+1,N+2,N+3)}}m&&(Ee(f),Ee(y)),se(a,f,y);break;case G.GeometryType.TRIANGLES:ce(e);break;case G.GeometryType.LINES:be(e)}else te(t),t.primitiveType===G.PrimitiveType.TRIANGLES?ce(e):t.primitiveType===G.PrimitiveType.LINES&&be(e);return e},t.GeometryPipeline=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./AttributeCompression-7a920947","./Cartesian2-078e6458","./Check-f996273c","./when-ae2e0b60","./Math-5bbcea10","./Transforms-984eb057","./ComponentDatatype-e44126e4","./EncodedCartesian3-9b5052a5","./GeometryAttribute-51995e5a","./IndexDatatype-516320ea","./IntersectionTests-ca6d4041","./Plane-fa98d6ca"],function(t,A,R,a,V,D,M,w,v,G,S,U,Y){"use strict";var Z=new R.Cartesian3,H=new R.Cartesian3,W=new R.Cartesian3;var C={calculateACMR:function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,a=e.maximumIndex,r=V.defaultValue(e.cacheSize,24),i=t.length;if(!V.defined(a))for(var a=0,n=0,s=t[n];n<i;)a<s&&(a=s),s=t[++n];for(var o=[],u=0;u<a+1;u++)o[u]=0;for(var p=r+1,d=0;d<i;++d)p-o[t[d]]>r&&(o[t[d]]=p,++p);return(p-r+1)/(i/3)}},e=(C.tipsify=function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,a=e.maximumIndex,r=V.defaultValue(e.cacheSize,24);function i(e,t,a,r,i,n,s){for(var o,u=-1,p=-1,d=0;d<a.length;){var l=a[d];r[l].numLiveTriangles&&(o=0,p<(o=i-r[l].timeStamp+2*r[l].numLiveTriangles<=t?i-r[l].timeStamp:o)||-1===p)&&(p=o,u=l),++d}if(-1!==u)return u;for(var y=r,f=n,m=s;1<=f.length;){var c=f[f.length-1];if(f.splice(f.length-1,1),0<y[c].numLiveTriangles)return c}for(;v<m;){if(0<y[v].numLiveTriangles)return++v-1;++v}return-1}var e=t.length,n=0,s=t[P=0],o=e;if(V.defined(a))n=a+1;else{for(;P<o;)n<s&&(n=s),s=t[++P];if(-1===n)return 0;++n}for(var u=[],p=0;p<n;p++)u[p]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};for(var d=P=0;P<o;)u[t[P]].vertexTriangles.push(d),++u[t[P]].numLiveTriangles,u[t[P+1]].vertexTriangles.push(d),++u[t[P+1]].numLiveTriangles,u[t[P+2]].vertexTriangles.push(d),++u[t[P+2]].numLiveTriangles,++d,P+=3;var l,y=0,f=r+1,v=1,m=[],c=[],C=0,h=[],b=e/3,g=[];for(p=0;p<b;p++)g[p]=!1;for(;-1!==y;){for(var A,m=[],T=(A=u[y]).vertexTriangles.length,x=0;x<T;++x)if(!g[d=A.vertexTriangles[x]]){g[d]=!0;for(var P=d+d+d,w=0;w<3;++w)l=t[P],m.push(l),c.push(l),h[C]=l,++C,--(l=u[l]).numLiveTriangles,f-l.timeStamp>r&&(l.timeStamp=f,++f),++P}y=i(0,r,m,u,f,c,n)}return h},{});function s(e,t,a,r,i){e[t++]=a,e[t++]=r,e[t++]=r,e[t++]=i,e[t++]=i,e[t]=a}function g(e){var t,a,r={};for(t in e)e.hasOwnProperty(t)&&V.defined(e[t])&&V.defined(e[t].values)&&(a=e[t],r[t]=new G.GeometryAttribute({componentDatatype:a.componentDatatype,componentsPerAttribute:a.componentsPerAttribute,normalize:a.normalize,values:[]}));return r}e.toWireframe=function(e){var t=e.indices;if(V.defined(t)){switch(e.primitiveType){case G.PrimitiveType.TRIANGLES:e.indices=function(e){for(var t=e.length,a=S.IndexDatatype.createTypedArray(t,t/3*6),r=0,i=0;i<t;i+=3,r+=6)s(a,r,e[i],e[i+1],e[i+2]);return a}(t);break;case G.PrimitiveType.TRIANGLE_STRIP:e.indices=function(e){var t=e.length;if(3<=t){for(var a=S.IndexDatatype.createTypedArray(t,6*(t-2)),r=(s(a,0,e[0],e[1],e[2]),6),i=3;i<t;++i,r+=6)s(a,r,e[i-1],e[i],e[i-2]);return a}return new Uint16Array}(t);break;case G.PrimitiveType.TRIANGLE_FAN:e.indices=function(e){if(0<e.length){for(var t=e.length-1,a=S.IndexDatatype.createTypedArray(t,6*(t-1)),r=e[0],i=0,n=1;n<t;++n,i+=6)s(a,i,r,e[n],e[n+1]);return a}return new Uint16Array}(t)}e.primitiveType=G.PrimitiveType.LINES}return e},e.createLineSegmentsForVectors=function(e,t,a){t=V.defaultValue(t,"normal"),a=V.defaultValue(a,1e4);for(var r,i=e.attributes.position.values,n=e.attributes[t].values,s=i.length,o=new Float64Array(2*s),u=0,p=0;p<s;p+=3)o[u++]=i[p],o[u++]=i[p+1],o[u++]=i[p+2],o[u++]=i[p]+n[p]*a,o[u++]=i[p+1]+n[p+1]*a,o[u++]=i[p+2]+n[p+2]*a;t=e.boundingSphere;return V.defined(t)&&(r=new M.BoundingSphere(t.center,t.radius+a)),new G.Geometry({attributes:{position:new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:G.PrimitiveType.LINES,boundingSphere:r})},e.createAttributeLocations=function(e){for(var t,a=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],r=e.attributes,i={},n=0,s=a.length,o=0;o<s;++o){var u=a[o];V.defined(r[u])&&(i[u]=n++)}for(t in r)r.hasOwnProperty(t)&&!V.defined(i[t])&&(i[t]=n++);return i},e.reorderForPreVertexCache=function(e){var t=G.Geometry.computeNumberOfVertices(e),a=e.indices;if(V.defined(a)){for(var r=new Int32Array(t),i=0;i<t;i++)r[i]=-1;for(var n,s=a,o=s.length,u=S.IndexDatatype.createTypedArray(t,o),p=0,d=0,l=0;p<o;)-1!==(n=r[s[p]])?u[d]=n:(r[s[p]]=l,u[d]=l,++l),++p,++d;e.indices=u;var y,f=e.attributes;for(y in f)if(f.hasOwnProperty(y)&&V.defined(f[y])&&V.defined(f[y].values)){for(var m=f[y],c=m.values,v=0,C=m.componentsPerAttribute,h=w.ComponentDatatype.createTypedArray(m.componentDatatype,l*C);v<t;){var b=r[v];if(-1!==b)for(var g=0;g<C;g++)h[C*b+g]=c[C*v+g];++v}m.values=h}}return e},e.reorderForPostVertexCache=function(e,t){var a=e.indices;if(e.primitiveType===G.PrimitiveType.TRIANGLES&&V.defined(a)){for(var r=a.length,i=0,n=0;n<r;n++)a[n]>i&&(i=a[n]);e.indices=C.tipsify({indices:a,maximumIndex:i,cacheSize:t})}return e},e.fitToUnsignedShortIndices=function(e){var t=[],a=G.Geometry.computeNumberOfVertices(e);if(V.defined(e.indices)&&a>=D.CesiumMath.SIXTY_FOUR_KILOBYTES){var r,i=[],n=[],s=0,o=g(e.attributes),u=e.indices,p=u.length;e.primitiveType===G.PrimitiveType.TRIANGLES?r=3:e.primitiveType===G.PrimitiveType.LINES?r=2:e.primitiveType===G.PrimitiveType.POINTS&&(r=1);for(var d=0;d<p;d+=r){for(var l=0;l<r;++l){var y=u[d+l],f=i[y];if(!V.defined(f)){f=s++,i[y]=f,b=h=m=C=v=c=void 0;var m,c=o,v=e.attributes,C=y;for(m in v)if(v.hasOwnProperty(m)&&V.defined(v[m])&&V.defined(v[m].values))for(var h=v[m],b=0;b<h.componentsPerAttribute;++b)c[m].values.push(h.values[C*h.componentsPerAttribute+b])}n.push(f)}s+r>=D.CesiumMath.SIXTY_FOUR_KILOBYTES&&(t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],n=[],s=0,o=g(e.attributes))}0!==n.length&&t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var h=new R.Cartesian3,b=new R.Cartographic,d=(e.projectTo2D=function(e,t,a,r,i){for(var n=e.attributes[t],s=(i=V.defined(i)?i:new M.GeographicProjection).ellipsoid,o=n.values,u=new Float64Array(o.length),p=0,d=0;d<o.length;d+=3){var l=R.Cartesian3.fromArray(o,d,h),l=s.cartesianToCartographic(l,b),l=i.project(l,h);u[p++]=l.x,u[p++]=l.y,u[p++]=l.z}return e.attributes[a]=n,e.attributes[r]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),delete e.attributes[t],e},{high:0,low:0}),n=(e.encodeAttribute=function(e,t,a,r){for(var i=e.attributes[t],n=i.values,s=n.length,o=new Float32Array(s),u=new Float32Array(s),p=0;p<s;++p)v.EncodedCartesian3.encode(n[p],d),o[p]=d.high,u[p]=d.low;i=i.componentsPerAttribute;return e.attributes[a]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:o}),e.attributes[r]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:u}),delete e.attributes[t],e},new R.Cartesian3);function r(e,t){if(V.defined(t))for(var a=t.values,r=a.length,i=0;i<r;i+=3)R.Cartesian3.unpack(a,i,n),M.Matrix4.multiplyByPoint(e,n,n),R.Cartesian3.pack(n,a,i)}function i(e,t){if(V.defined(t))for(var a=t.values,r=a.length,i=0;i<r;i+=3)R.Cartesian3.unpack(a,i,n),M.Matrix3.multiplyByVector(e,n,n),n=R.Cartesian3.normalize(n,n),R.Cartesian3.pack(n,a,i)}var o=new M.Matrix4,u=new M.Matrix3;e.transformToWorldCoordinates=function(e){var t,a=e.modelMatrix;return M.Matrix4.equals(a,M.Matrix4.IDENTITY)||(r(a,(t=e.geometry.attributes).position),r(a,t.prevPosition),r(a,t.nextPosition),(V.defined(t.normal)||V.defined(t.tangent)||V.defined(t.bitangent))&&(M.Matrix4.inverse(a,o),M.Matrix4.transpose(o,o),M.Matrix4.getMatrix3(o,u),i(u,t.normal),i(u,t.tangent),i(u,t.bitangent)),t=e.geometry.boundingSphere,V.defined(t)&&(e.geometry.boundingSphere=M.BoundingSphere.transform(t,a,t)),e.modelMatrix=M.Matrix4.clone(M.Matrix4.IDENTITY)),e};var X=new R.Cartesian3;function j(e,t){var a,r,i,n,s,o,u=e.length,p=(e[0].modelMatrix,V.defined(e[0][t].indices)),d=e[0][t].primitiveType,l=function(e,t){var a,r=e.length,i={},n=e[0][t].attributes;for(a in n)if(n.hasOwnProperty(a)&&V.defined(n[a])&&V.defined(n[a].values)){for(var s=n[a],o=s.values.length,u=!0,p=1;p<r;++p){var d=e[p][t].attributes[a];if(!V.defined(d)||s.componentDatatype!==d.componentDatatype||s.componentsPerAttribute!==d.componentsPerAttribute||s.normalize!==d.normalize){u=!1;break}o+=d.values.length}u&&(i[a]=new G.GeometryAttribute({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:w.ComponentDatatype.createTypedArray(s.componentDatatype,o)}))}return i}(e,t);for(a in l)if(l.hasOwnProperty(a))for(i=l[a].values,f=b=0;f<u;++f)for(s=(n=e[f][t].attributes[a].values).length,r=0;r<s;++r)i[b++]=n[r];if(p){for(var y=0,f=0;f<u;++f)y+=e[f][t].indices.length;var p=G.Geometry.computeNumberOfVertices(new G.Geometry({attributes:l,primitiveType:G.PrimitiveType.POINTS})),m=S.IndexDatatype.createTypedArray(p,y),c=0,v=0;for(f=0;f<u;++f){for(var C=e[f][t].indices,h=C.length,b=0;b<h;++b)m[c++]=v+C[b];v+=G.Geometry.computeNumberOfVertices(e[f][t])}o=m}var g=new R.Cartesian3,A=0;for(f=0;f<u;++f){if(T=e[f][t].boundingSphere,!V.defined(T)){g=void 0;break}R.Cartesian3.add(T.center,g,g)}if(V.defined(g))for(R.Cartesian3.divideByScalar(g,u,g),f=0;f<u;++f){var T=e[f][t].boundingSphere,x=R.Cartesian3.magnitude(R.Cartesian3.subtract(T.center,g,X))+T.radius;A<x&&(A=x)}return new G.Geometry({attributes:l,indices:o,primitiveType:d,boundingSphere:V.defined(g)?new M.BoundingSphere(g,A):void 0})}e.combineInstances=function(e){for(var t=[],a=[],r=e.length,i=0;i<r;++i){var n=e[i];V.defined(n.geometry)?t.push(n):V.defined(n.westHemisphereGeometry)&&V.defined(n.eastHemisphereGeometry)&&a.push(n)}var s=[];return 0<t.length&&s.push(j(t,"geometry")),0<a.length&&(s.push(j(a,"westHemisphereGeometry")),s.push(j(a,"eastHemisphereGeometry"))),s};var T=new R.Cartesian3,x=new R.Cartesian3,P=new R.Cartesian3,I=new R.Cartesian3,J=(e.computeNormal=function(e){for(var t=e.indices,a=e.attributes,r=a.position.values,i=a.position.values.length/3,n=t.length,s=new Array(i),o=new Array(n/3),u=new Array(n),p=0;p<i;p++)s[p]={indexOffset:0,count:0,currentCount:0};var d=0;for(p=0;p<n;p+=3){var l=t[p],y=t[p+1],f=t[p+2],m=3*l,c=3*y,v=3*f;x.x=r[m],x.y=r[1+m],x.z=r[2+m],P.x=r[c],P.y=r[1+c],P.z=r[2+c],I.x=r[v],I.y=r[1+v],I.z=r[2+v],s[l].count++,s[y].count++,s[f].count++,R.Cartesian3.subtract(P,x,P),R.Cartesian3.subtract(I,x,I),o[d]=R.Cartesian3.cross(P,I,new R.Cartesian3),d++}var C,h=0;for(p=0;p<i;p++)s[p].indexOffset+=h,h+=s[p].count;for(p=d=0;p<n;p+=3)u[(C=s[t[p]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+1]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+2]]).indexOffset+C.currentCount]=d,C.currentCount++,d++;var b=new Float32Array(3*i);for(p=0;p<i;p++){var g=3*p;if(C=s[p],R.Cartesian3.clone(R.Cartesian3.ZERO,T),0<C.count){for(d=0;d<C.count;d++)R.Cartesian3.add(T,o[u[C.indexOffset+d]],T);R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&R.Cartesian3.clone(o[u[C.indexOffset]],T)}R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&(T.z=1),R.Cartesian3.normalize(T,T),b[g]=T.x,b[1+g]=T.y,b[2+g]=T.z}return e.attributes.normal=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:b}),e},new R.Cartesian3),K=new R.Cartesian3,Q=new R.Cartesian3,O=(e.computeTangentAndBitangent=function(e){e.attributes;for(var t=e.indices,a=e.attributes.position.values,r=e.attributes.normal.values,i=e.attributes.st.values,n=e.attributes.position.values.length/3,s=t.length,o=new Array(3*n),u=0;u<o.length;u++)o[u]=0;for(u=0;u<s;u+=3){var p,d=t[u],l=t[u+1],y=t[u+2],f=3*l,m=3*y,c=2*d,l=2*l,y=2*y,d=a[p=3*d],v=a[p+1],C=a[p+2],h=i[c],c=i[1+c],b=i[1+l]-c,c=i[1+y]-c,l=1/((i[l]-h)*c-(i[y]-h)*b),y=(c*(a[f]-d)-b*(a[m]-d))*l,h=(c*(a[f+1]-v)-b*(a[m+1]-v))*l,d=(c*(a[f+2]-C)-b*(a[m+2]-C))*l;o[p]+=y,o[p+1]+=h,o[p+2]+=d,o[f]+=y,o[f+1]+=h,o[f+2]+=d,o[m]+=y,o[m+1]+=h,o[m+2]+=d}var g=new Float32Array(3*n),A=new Float32Array(3*n);for(u=0;u<n;u++){f=(p=3*u)+1,m=p+2;var T=R.Cartesian3.fromArray(r,p,J),x=R.Cartesian3.fromArray(o,p,Q),P=R.Cartesian3.dot(T,x);R.Cartesian3.multiplyByScalar(T,P,K),R.Cartesian3.normalize(R.Cartesian3.subtract(x,K,x),x),g[p]=x.x,g[f]=x.y,g[m]=x.z,R.Cartesian3.normalize(R.Cartesian3.cross(T,x,x),x),A[p]=x.x,A[f]=x.y,A[m]=x.z}return e.attributes.tangent=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:g}),e.attributes.bitangent=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A}),e},new R.Cartesian2),E=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartesian3,N=new R.Cartesian2;function te(e){switch(e.primitiveType){case G.PrimitiveType.TRIANGLE_FAN:for(var t=e,a=G.Geometry.computeNumberOfVertices(t),r=S.IndexDatatype.createTypedArray(a,3*(a-2)),i=(r[0]=1,r[1]=0,r[2]=2,3),n=3;n<a;++n)r[i++]=n-1,r[i++]=0,r[i++]=n;return t.indices=r,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLE_STRIP:for(var t=e,s=G.Geometry.computeNumberOfVertices(t),o=S.IndexDatatype.createTypedArray(s,3*(s-2)),u=(o[0]=0,o[1]=1,o[2]=2,3<s&&(o[3]=0,o[4]=2,o[5]=3),6),p=3;p<s-1;p+=2)o[u++]=p,o[u++]=p-1,o[u++]=p+1,p+2<s&&(o[u++]=p,o[u++]=p+1,o[u++]=p+2);return t.indices=o,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLES:var d=e;if(!V.defined(d.indices)){for(var l=G.Geometry.computeNumberOfVertices(d),y=S.IndexDatatype.createTypedArray(l,l),f=0;f<l;++f)y[f]=f;d.indices=y}return d;case G.PrimitiveType.LINE_STRIP:for(var d=e,m=G.Geometry.computeNumberOfVertices(d),c=S.IndexDatatype.createTypedArray(m,2*(m-1)),v=(c[0]=0,c[1]=1,2),C=2;C<m;++C)c[v++]=C-1,c[v++]=C;return d.indices=c,d.primitiveType=G.PrimitiveType.LINES,d;case G.PrimitiveType.LINE_LOOP:for(var h=e,b=G.Geometry.computeNumberOfVertices(h),g=S.IndexDatatype.createTypedArray(b,2*b),A=(g[0]=0,g[1]=1,2),T=2;T<b;++T)g[A++]=T-1,g[A++]=T;return g[A++]=b-1,g[A]=0,h.indices=g,h.primitiveType=G.PrimitiveType.LINES,h;case G.PrimitiveType.LINES:h=e;if(!V.defined(h.indices)){for(var x=G.Geometry.computeNumberOfVertices(h),P=S.IndexDatatype.createTypedArray(x,x),w=0;w<x;++w)P[w]=w;h.indices=P}return h}}function p(e,t){Math.abs(e.y)<D.CesiumMath.EPSILON6&&(e.y=t?-D.CesiumMath.EPSILON6:D.CesiumMath.EPSILON6)}e.compressVertices=function(e){var t=e.attributes.extrudeDirection;if(V.defined(t)){for(var a=t.values,r=a.length/3,i=new Float32Array(2*r),n=0,s=0;s<r;++s)R.Cartesian3.fromArray(a,3*s,E),R.Cartesian3.equals(E,R.Cartesian3.ZERO)?n+=2:(N=A.AttributeCompression.octEncodeInRange(E,65535,N),i[n++]=N.x,i[n++]=N.y);e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i}),delete e.attributes.extrudeDirection}else{var t=e.attributes.normal,o=e.attributes.st,u=V.defined(t),p=V.defined(o);if(u||p){var d,l,y,f,m=e.attributes.tangent,c=e.attributes.bitangent,v=V.defined(m),C=V.defined(c);u&&(d=t.values),p&&(l=o.values),v&&(y=m.values),C&&(f=c.values);var t=r=(u?d:l).length/(u?3:2),o=p&&u?2:1,h=(t*=o+=v||C?1:0,new Float32Array(t)),b=0;for(s=0;s<r;++s){p&&(R.Cartesian2.fromArray(l,2*s,O),h[b++]=A.AttributeCompression.compressTextureCoordinates(O));var g=3*s;u&&V.defined(y)&&V.defined(f)?(R.Cartesian3.fromArray(d,g,E),R.Cartesian3.fromArray(y,g,$),R.Cartesian3.fromArray(f,g,ee),A.AttributeCompression.octPack(E,$,ee,O),h[b++]=O.x,h[b++]=O.y):(u&&(R.Cartesian3.fromArray(d,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)),v&&(R.Cartesian3.fromArray(y,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)),C&&(R.Cartesian3.fromArray(f,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)))}e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:o,values:h}),u&&delete e.attributes.normal,p&&delete e.attributes.st,C&&delete e.attributes.bitangent,v&&delete e.attributes.tangent}}return e};var ae=new R.Cartesian3;function l(e,t,a,r){R.Cartesian3.add(e,R.Cartesian3.multiplyByScalar(R.Cartesian3.subtract(t,e,ae),e.y/(e.y-t.y),ae),a),R.Cartesian3.clone(a,r),p(a,!0),p(r,!1)}var y=new R.Cartesian3,f=new R.Cartesian3,m=new R.Cartesian3,c=new R.Cartesian3,re={positions:new Array(7),indices:new Array(9)};function ie(e,t,a){var r,i,n,s,o,u;if(!(0<=e.x||0<=t.x||0<=a.x))return s=t,o=a,0!==(r=e).y&&0!==s.y&&0!==o.y?(p(r,r.y<0),p(s,s.y<0),p(o,o.y<0)):(u=Math.abs(r.y),n=Math.abs(s.y),i=Math.abs(o.y),p(r,u=(n<u?i<u?D.CesiumMath.sign(r.y):D.CesiumMath.sign(o.y):i<n?D.CesiumMath.sign(s.y):D.CesiumMath.sign(o.y))<0),p(s,u),p(o,u)),r=e.y<0,i=t.y<0,n=a.y<0,s=0,o=re.indices,1==(s=(s+=r?1:0)+(i?1:0)+(n?1:0))?(o[1]=3,o[2]=4,o[5]=6,o[7]=6,o[8]=5,r?(l(e,t,y,m),l(e,a,f,c),o[0]=0,o[3]=1,o[4]=2,o[6]=1):i?(l(t,a,y,m),l(t,e,f,c),o[0]=1,o[3]=2,o[4]=0,o[6]=2):n&&(l(a,e,y,m),l(a,t,f,c),o[0]=2,o[3]=0,o[4]=1,o[6]=0)):2==s&&(o[2]=4,o[4]=4,o[5]=3,o[7]=5,o[8]=6,r?i?n||(l(a,e,y,m),l(a,t,f,c),o[0]=0,o[1]=1,o[3]=0,o[6]=2):(l(t,a,y,m),l(t,e,f,c),o[0]=2,o[1]=0,o[3]=2,o[6]=1):(l(e,t,y,m),l(e,a,f,c),o[0]=1,o[1]=2,o[3]=1,o[6]=0)),(u=re.positions)[0]=e,u[1]=t,u[2]=a,u.length=3,1!=s&&2!=s||(u[3]=y,u[4]=f,u[5]=m,u[6]=c,u.length=7),re}function ne(e,t){var a=e.attributes;if(0!==a.position.values.length){for(var r in a)a.hasOwnProperty(r)&&V.defined(a[r])&&V.defined(a[r].values)&&((r=a[r]).values=w.ComponentDatatype.createTypedArray(r.componentDatatype,r.values));var i=G.Geometry.computeNumberOfVertices(e);return e.indices=S.IndexDatatype.createTypedArray(i,e.indices),t&&(e.boundingSphere=M.BoundingSphere.fromVertices(a.position.values)),e}}function F(e){var t,a,r=e.attributes,i={};for(t in r)r.hasOwnProperty(t)&&V.defined(r[t])&&V.defined(r[t].values)&&(a=r[t],i[t]=new G.GeometryAttribute({componentDatatype:a.componentDatatype,componentsPerAttribute:a.componentsPerAttribute,normalize:a.normalize,values:[]}));return new G.Geometry({attributes:i,indices:[],primitiveType:e.primitiveType})}function se(e,t,a){var r=V.defined(e.geometry.boundingSphere);t=ne(t,r),a=ne(a,r),V.defined(a)&&!V.defined(t)?e.geometry=a:!V.defined(a)&&V.defined(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=a,e.geometry=void 0)}function oe(u,p){var d=new u,l=new u,y=new u;return function(e,t,a,r,i,n,s,o){e=u.fromArray(i,e*p,d),t=u.fromArray(i,t*p,l),i=u.fromArray(i,a*p,y),u.multiplyByScalar(e,r.x,e),u.multiplyByScalar(t,r.y,t),u.multiplyByScalar(i,r.z,i),a=u.add(e,t,e);u.add(a,i,a),o&&u.normalize(a,a),u.pack(a,n,s*p)}}var ue=oe(M.Cartesian4,4),L=oe(R.Cartesian3,3),pe=oe(R.Cartesian2,2),de=function(e,t,a,r,i,n,s){e=i[e]*r.x,t=i[t]*r.y,i=i[a]*r.z;n[s]=e+t+i>D.CesiumMath.EPSILON6?1:0},z=new R.Cartesian3,le=new R.Cartesian3,ye=new R.Cartesian3,fe=new R.Cartesian3;function B(e,t,a,r,i,n,s,o,u,p,d,l,y,f,m,c){if(V.defined(n)||V.defined(s)||V.defined(o)||V.defined(u)||V.defined(p)||0!==f){var v,C=function(e,t,a,r,i){var n,s,o,u,p,d,l,y;if(V.defined(i)||(i=new R.Cartesian3),V.defined(t.z)){if(R.Cartesian3.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian3.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian3.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian3.subtract(a,t,Z),s=R.Cartesian3.subtract(r,t,H),o=R.Cartesian3.subtract(e,t,W),u=R.Cartesian3.dot(n,n),p=R.Cartesian3.dot(n,s),d=R.Cartesian3.dot(n,o),l=R.Cartesian3.dot(s,s),y=R.Cartesian3.dot(s,o)}else{if(R.Cartesian2.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian2.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian2.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian2.subtract(a,t,Z),s=R.Cartesian2.subtract(r,t,H),o=R.Cartesian2.subtract(e,t,W),u=R.Cartesian2.dot(n,n),p=R.Cartesian2.dot(n,s),d=R.Cartesian2.dot(n,o),l=R.Cartesian2.dot(s,s),y=R.Cartesian2.dot(s,o)}if(i.y=l*d-p*y,i.z=u*y-p*d,0!=(a=u*l-p*p))return i.y/=a,i.z/=a,i.x=1-i.y-i.z,i}(r,R.Cartesian3.fromArray(i,3*e,z),R.Cartesian3.fromArray(i,3*t,le),R.Cartesian3.fromArray(i,3*a,ye),fe);if(V.defined(C))if(V.defined(n)&&L(e,t,a,C,n,l.normal.values,c,!0),V.defined(p)&&(r=R.Cartesian3.fromArray(p,3*e,z),i=R.Cartesian3.fromArray(p,3*t,le),n=R.Cartesian3.fromArray(p,3*a,ye),R.Cartesian3.multiplyByScalar(r,C.x,r),R.Cartesian3.multiplyByScalar(i,C.y,i),R.Cartesian3.multiplyByScalar(n,C.z,n),R.Cartesian3.equals(r,R.Cartesian3.ZERO)&&R.Cartesian3.equals(i,R.Cartesian3.ZERO)&&R.Cartesian3.equals(n,R.Cartesian3.ZERO)?((v=z).x=0,v.y=0,v.z=0):(v=R.Cartesian3.add(r,i,r),R.Cartesian3.add(v,n,v),R.Cartesian3.normalize(v,v)),R.Cartesian3.pack(v,l.extrudeDirection.values,3*c)),V.defined(d)&&de(e,t,a,C,d,l.applyOffset.values,c),V.defined(s)&&L(e,t,a,C,s,l.tangent.values,c,!0),V.defined(o)&&L(e,t,a,C,o,l.bitangent.values,c,!0),V.defined(u)&&pe(e,t,a,C,u,l.st.values,c),0<f)for(var h=0;h<f;h++){var b=y[h],g=(E=O=I=S=w=P=x=T=A=g=void 0,e),A=t,T=a,x=C,P=c,w=m[b],S=l[b],I=w.componentsPerAttribute,O=w.values,E=S.values;switch(I){case 4:ue(g,A,T,x,O,E,P,!1);break;case 3:L(g,A,T,x,O,E,P,!1);break;case 2:pe(g,A,T,x,O,E,P,!1);break;default:E[P]=O[g]*x.x+O[A]*x.y+O[T]*x.z}}}}function k(e,t,a,r,i,n){var s=e.position.values.length/3;return-1!==i?-1===(i=a[r=r[i]])?(a[r]=s,e.position.values.push(n.x,n.y,n.z),t.push(s),s):(t.push(i),i):(e.position.values.push(n.x,n.y,n.z),t.push(s),s)}var me={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function ce(e){var t,a=e.geometry,r=a.attributes,i=r.position.values,n=V.defined(r.normal)?r.normal.values:void 0,s=V.defined(r.bitangent)?r.bitangent.values:void 0,o=V.defined(r.tangent)?r.tangent.values:void 0,u=V.defined(r.st)?r.st.values:void 0,p=V.defined(r.extrudeDirection)?r.extrudeDirection.values:void 0,d=V.defined(r.applyOffset)?r.applyOffset.values:void 0,l=a.indices,y=[];for(t in r)r.hasOwnProperty(t)&&!me[t]&&V.defined(r[t])&&y.push(t);var f,m,c=y.length,v=F(a),C=F(a),h=[],b=(h.length=i.length/3,[]);for(b.length=i.length/3,A=0;A<h.length;++A)b[A]=h[A]=-1;for(var g=l.length,A=0;A<g;A+=3){var T=l[A],x=l[A+1],P=l[A+2],w=R.Cartesian3.fromArray(i,3*T),S=R.Cartesian3.fromArray(i,3*x),I=R.Cartesian3.fromArray(i,3*P),O=ie(w,S,I);if(V.defined(O)&&3<O.positions.length)for(var E=O.positions,N=O.indices,L=N.length,z=0;z<L;++z){var D=N[z],M=E[D],G=M.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b);B(T,x,P,M,i,n,o,s,u,p,d,f,y,c,r,k(f,m,G,l,D<3?A+D:-1,M))}else V.defined(O)&&(w=O.positions[0],S=O.positions[1],I=O.positions[2]),G=w.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b),B(T,x,P,w,i,n,o,s,u,p,d,f,y,c,r,k(f,m,G,l,A,w)),B(T,x,P,S,i,n,o,s,u,p,d,f,y,c,r,k(f,m,G,l,A+1,S)),B(T,x,P,I,i,n,o,s,u,p,d,f,y,c,r,k(f,m,G,l,A+2,I))}se(e,C,v)}var ve=Y.Plane.fromPointNormal(R.Cartesian3.ZERO,R.Cartesian3.UNIT_Y),Ce=new R.Cartesian3,he=new R.Cartesian3;function _(e,t,a,r,i,n,s){V.defined(s)&&(r=R.Cartesian3.fromArray(r,3*e,z),R.Cartesian3.equalsEpsilon(r,a,D.CesiumMath.EPSILON10)?n.applyOffset.values[i]=s[e]:n.applyOffset.values[i]=s[t])}function be(e){var t,a=e.geometry,r=a.attributes,i=r.position.values,n=V.defined(r.applyOffset)?r.applyOffset.values:void 0,s=a.indices,o=F(a),u=F(a),p=s.length,d=[],l=(d.length=i.length/3,[]);for(l.length=i.length/3,t=0;t<d.length;++t)l[t]=d[t]=-1;for(t=0;t<p;t+=2){var y,f,m,c,v=s[t],C=s[t+1],h=R.Cartesian3.fromArray(i,3*v,z),b=R.Cartesian3.fromArray(i,3*C,le),g=(Math.abs(h.y)<D.CesiumMath.EPSILON6&&(h.y<0?h.y=-D.CesiumMath.EPSILON6:h.y=D.CesiumMath.EPSILON6),Math.abs(b.y)<D.CesiumMath.EPSILON6&&(b.y<0?b.y=-D.CesiumMath.EPSILON6:b.y=D.CesiumMath.EPSILON6),o.attributes),A=o.indices,T=l,x=u.attributes,P=u.indices,w=d,S=U.IntersectionTests.lineSegmentPlane(h,b,ve,ye);V.defined(S)?(y=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,5*D.CesiumMath.EPSILON9,Ce),h.y<0&&(R.Cartesian3.negate(y,y),g=u.attributes,A=u.indices,T=d,x=o.attributes,P=o.indices,w=l),f=R.Cartesian3.add(S,y,he),_(v,C,h,i,k(g,A,T,s,t,h),g,n),_(v,C,f,i,k(g,A,T,s,-1,f),g,n),R.Cartesian3.negate(y,y),R.Cartesian3.add(S,y,f),_(v,C,f,i,k(x,P,w,s,-1,f),x,n),_(v,C,b,i,k(x,P,w,s,t+1,b),x,n)):(A=h.y<0?(m=u.attributes,c=u.indices,d):(m=o.attributes,c=o.indices,l),_(v,C,h,i,k(m,c,A,s,t,h),m,n),_(v,C,b,i,k(m,c,A,s,t+1,b),m,n))}se(e,u,o)}var ge=new R.Cartesian2,Ae=new R.Cartesian2,Te=new R.Cartesian3,xe=new R.Cartesian3,Pe=new R.Cartesian3,we=new R.Cartesian3,Se=new R.Cartesian3,Ie=new R.Cartesian3,Oe=new M.Cartesian4;function Ee(e){for(var e=e.attributes,t=e.position.values,a=e.prevPosition.values,r=e.nextPosition.values,i=t.length,n=0;n<i;n+=3){var s,o=R.Cartesian3.unpack(t,n,Te);0<o.x||(s=R.Cartesian3.unpack(a,n,xe),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(0<n-3?(a[n]=t[n-3],a[n+1]=t[n-2],a[n+2]=t[n-1]):R.Cartesian3.pack(o,a,n)),s=R.Cartesian3.unpack(r,n,Pe),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(n+3<i?(r[n]=t[n+3],r[n+1]=t[n+4],r[n+2]=t[n+5]):R.Cartesian3.pack(o,r,n)))}}var Ne=5*D.CesiumMath.EPSILON9,q=D.CesiumMath.EPSILON6;e.splitLongitude=function(e){var t=e.geometry,a=t.boundingSphere;if(V.defined(a)&&(0<a.center.x-a.radius||M.BoundingSphere.intersectPlane(a,Y.Plane.ORIGIN_ZX_PLANE)!==M.Intersect.INTERSECTING))return e;if(t.geometryType!==G.GeometryType.NONE)switch(t.geometryType){case G.GeometryType.POLYLINES:for(var r=e,i=r.geometry,n=i.attributes,s=n.position.values,o=n.prevPosition.values,u=n.nextPosition.values,p=n.expandAndWidth.values,d=V.defined(n.st)?n.st.values:void 0,l=V.defined(n.color)?n.color.values:void 0,y=F(i),f=F(i),m=!1,c=s.length/3,v=0;v<c;v+=4){var C=v,h=v+2,b=R.Cartesian3.fromArray(s,3*C,Te),g=R.Cartesian3.fromArray(s,3*h,xe);if(Math.abs(b.y)<q)for(b.y=q*(g.y<0?-1:1),s[3*v+1]=b.y,s[3*(v+1)+1]=b.y,L=3*C;L<3*C+12;L+=3)o[L]=s[3*v],o[L+1]=s[3*v+1],o[L+2]=s[3*v+2];if(Math.abs(g.y)<q)for(g.y=q*(b.y<0?-1:1),s[3*(v+2)+1]=g.y,s[3*(v+3)+1]=g.y,L=3*C;L<3*C+12;L+=3)u[L]=s[3*(v+2)],u[L+1]=s[3*(v+2)+1],u[L+2]=s[3*(v+2)+2];var A=y.attributes,T=y.indices,x=f.attributes,P=f.indices,w=U.IntersectionTests.lineSegmentPlane(b,g,ve,we);if(V.defined(w)){var m=!0,S=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,Ne,Se),I=(b.y<0&&(R.Cartesian3.negate(S,S),A=f.attributes,T=f.indices,x=y.attributes,P=y.indices),R.Cartesian3.add(w,S,Ie)),S=(A.position.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.position.values.push(I.x,I.y,I.z),A.position.values.push(I.x,I.y,I.z),A.prevPosition.values.push(o[3*C],o[3*C+1],o[3*C+2]),A.prevPosition.values.push(o[3*C+3],o[3*C+4],o[3*C+5]),A.prevPosition.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),R.Cartesian3.negate(S,S),R.Cartesian3.add(w,S,I),x.position.values.push(I.x,I.y,I.z),x.position.values.push(I.x,I.y,I.z),x.position.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.nextPosition.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.nextPosition.values.push(u[3*h],u[3*h+1],u[3*h+2]),x.nextPosition.values.push(u[3*h+3],u[3*h+4],u[3*h+5]),R.Cartesian2.fromArray(p,2*C,ge)),I=Math.abs(S.y),S=(A.expandAndWidth.values.push(-1,I,1,I),A.expandAndWidth.values.push(-1,-I,1,-I),x.expandAndWidth.values.push(-1,I,1,I),x.expandAndWidth.values.push(-1,-I,1,-I),R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(w,b,Pe)));if(S/=R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(g,b,Pe)),V.defined(l)){for(var I=M.Cartesian4.fromArray(l,4*C,Oe),w=M.Cartesian4.fromArray(l,4*h,Oe),O=D.CesiumMath.lerp(I.x,w.x,S),E=D.CesiumMath.lerp(I.y,w.y,S),N=D.CesiumMath.lerp(I.z,w.z,S),I=D.CesiumMath.lerp(I.w,w.w,S),L=4*C;L<4*C+8;++L)A.color.values.push(l[L]);for(A.color.values.push(O,E,N,I),A.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),L=4*h;L<4*h+8;++L)x.color.values.push(l[L])}if(V.defined(d)){w=R.Cartesian2.fromArray(d,2*C,ge),O=R.Cartesian2.fromArray(d,2*(v+3),Ae),E=D.CesiumMath.lerp(w.x,O.x,S);for(L=2*C;L<2*C+4;++L)A.st.values.push(d[L]);for(A.st.values.push(E,w.y),A.st.values.push(E,O.y),x.st.values.push(E,w.y),x.st.values.push(E,O.y),L=2*h;L<2*h+4;++L)x.st.values.push(d[L])}N=A.position.values.length/3-4,T.push(N,N+2,N+1),T.push(N+1,N+2,N+3),N=x.position.values.length/3-4,P.push(N,N+2,N+1),P.push(N+1,N+2,N+3)}else{var z,I=(b.y<0?(z=f.attributes,f):(z=y.attributes,y)).indices;for(z.position.values.push(b.x,b.y,b.z),z.position.values.push(b.x,b.y,b.z),z.position.values.push(g.x,g.y,g.z),z.position.values.push(g.x,g.y,g.z),L=3*v;L<3*v+12;++L)z.prevPosition.values.push(o[L]),z.nextPosition.values.push(u[L]);for(L=2*v;L<2*v+8;++L)z.expandAndWidth.values.push(p[L]),V.defined(d)&&z.st.values.push(d[L]);if(V.defined(l))for(L=4*v;L<4*v+16;++L)z.color.values.push(l[L]);N=z.position.values.length/3-4,I.push(N,N+2,N+1),I.push(N+1,N+2,N+3)}}m&&(Ee(f),Ee(y)),se(r,f,y);break;case G.GeometryType.TRIANGLES:ce(e);break;case G.GeometryType.LINES:be(e)}else te(t),t.primitiveType===G.PrimitiveType.TRIANGLES?ce(e):t.primitiveType===G.PrimitiveType.LINES&&be(e);return e},t.GeometryPipeline=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./AttributeCompression-7a920947","./Cartesian2-078e6458","./Check-f996273c","./when-ae2e0b60","./Math-5bbcea10","./Transforms-5aeb1d5e","./ComponentDatatype-e44126e4","./EncodedCartesian3-9b5052a5","./GeometryAttribute-ccf4e0b6","./IndexDatatype-516320ea","./IntersectionTests-5403be00","./Plane-0ec594f2"],function(t,A,R,r,V,D,M,w,v,G,S,U,Y){"use strict";var Z=new R.Cartesian3,H=new R.Cartesian3,W=new R.Cartesian3;var C={calculateACMR:function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,r=e.maximumIndex,a=V.defaultValue(e.cacheSize,24),i=t.length;if(!V.defined(r))for(var r=0,n=0,s=t[n];n<i;)r<s&&(r=s),s=t[++n];for(var o=[],u=0;u<r+1;u++)o[u]=0;for(var p=a+1,d=0;d<i;++d)p-o[t[d]]>a&&(o[t[d]]=p,++p);return(p-a+1)/(i/3)}},e=(C.tipsify=function(e){var t=(e=V.defaultValue(e,V.defaultValue.EMPTY_OBJECT)).indices,r=e.maximumIndex,a=V.defaultValue(e.cacheSize,24);function i(e,t,r,a,i,n,s){for(var o,u=-1,p=-1,d=0;d<r.length;){var l=r[d];a[l].numLiveTriangles&&(o=0,p<(o=i-a[l].timeStamp+2*a[l].numLiveTriangles<=t?i-a[l].timeStamp:o)||-1===p)&&(p=o,u=l),++d}if(-1!==u)return u;for(var y=a,f=n,m=s;1<=f.length;){var c=f[f.length-1];if(f.splice(f.length-1,1),0<y[c].numLiveTriangles)return c}for(;v<m;){if(0<y[v].numLiveTriangles)return++v-1;++v}return-1}var e=t.length,n=0,s=t[P=0],o=e;if(V.defined(r))n=r+1;else{for(;P<o;)n<s&&(n=s),s=t[++P];if(-1===n)return 0;++n}for(var u=[],p=0;p<n;p++)u[p]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};for(var d=P=0;P<o;)u[t[P]].vertexTriangles.push(d),++u[t[P]].numLiveTriangles,u[t[P+1]].vertexTriangles.push(d),++u[t[P+1]].numLiveTriangles,u[t[P+2]].vertexTriangles.push(d),++u[t[P+2]].numLiveTriangles,++d,P+=3;var l,y=0,f=a+1,v=1,m=[],c=[],C=0,h=[],b=e/3,g=[];for(p=0;p<b;p++)g[p]=!1;for(;-1!==y;){for(var A,m=[],T=(A=u[y]).vertexTriangles.length,x=0;x<T;++x)if(!g[d=A.vertexTriangles[x]]){g[d]=!0;for(var P=d+d+d,w=0;w<3;++w)l=t[P],m.push(l),c.push(l),h[C]=l,++C,--(l=u[l]).numLiveTriangles,f-l.timeStamp>a&&(l.timeStamp=f,++f),++P}y=i(0,a,m,u,f,c,n)}return h},{});function s(e,t,r,a,i){e[t++]=r,e[t++]=a,e[t++]=a,e[t++]=i,e[t++]=i,e[t]=r}function g(e){var t,r,a={};for(t in e)e.hasOwnProperty(t)&&V.defined(e[t])&&V.defined(e[t].values)&&(r=e[t],a[t]=new G.GeometryAttribute({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]}));return a}e.toWireframe=function(e){var t=e.indices;if(V.defined(t)){switch(e.primitiveType){case G.PrimitiveType.TRIANGLES:e.indices=function(e){for(var t=e.length,r=S.IndexDatatype.createTypedArray(t,t/3*6),a=0,i=0;i<t;i+=3,a+=6)s(r,a,e[i],e[i+1],e[i+2]);return r}(t);break;case G.PrimitiveType.TRIANGLE_STRIP:e.indices=function(e){var t=e.length;if(3<=t){for(var r=S.IndexDatatype.createTypedArray(t,6*(t-2)),a=(s(r,0,e[0],e[1],e[2]),6),i=3;i<t;++i,a+=6)s(r,a,e[i-1],e[i],e[i-2]);return r}return new Uint16Array}(t);break;case G.PrimitiveType.TRIANGLE_FAN:e.indices=function(e){if(0<e.length){for(var t=e.length-1,r=S.IndexDatatype.createTypedArray(t,6*(t-1)),a=e[0],i=0,n=1;n<t;++n,i+=6)s(r,i,a,e[n],e[n+1]);return r}return new Uint16Array}(t)}e.primitiveType=G.PrimitiveType.LINES}return e},e.createLineSegmentsForVectors=function(e,t,r){t=V.defaultValue(t,"normal"),r=V.defaultValue(r,1e4);for(var a,i=e.attributes.position.values,n=e.attributes[t].values,s=i.length,o=new Float64Array(2*s),u=0,p=0;p<s;p+=3)o[u++]=i[p],o[u++]=i[p+1],o[u++]=i[p+2],o[u++]=i[p]+n[p]*r,o[u++]=i[p+1]+n[p+1]*r,o[u++]=i[p+2]+n[p+2]*r;t=e.boundingSphere;return V.defined(t)&&(a=new M.BoundingSphere(t.center,t.radius+r)),new G.Geometry({attributes:{position:new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:G.PrimitiveType.LINES,boundingSphere:a})},e.createAttributeLocations=function(e){for(var t,r=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],a=e.attributes,i={},n=0,s=r.length,o=0;o<s;++o){var u=r[o];V.defined(a[u])&&(i[u]=n++)}for(t in a)a.hasOwnProperty(t)&&!V.defined(i[t])&&(i[t]=n++);return i},e.reorderForPreVertexCache=function(e){var t=G.Geometry.computeNumberOfVertices(e),r=e.indices;if(V.defined(r)){for(var a=new Int32Array(t),i=0;i<t;i++)a[i]=-1;for(var n,s=r,o=s.length,u=S.IndexDatatype.createTypedArray(t,o),p=0,d=0,l=0;p<o;)-1!==(n=a[s[p]])?u[d]=n:(a[s[p]]=l,u[d]=l,++l),++p,++d;e.indices=u;var y,f=e.attributes;for(y in f)if(f.hasOwnProperty(y)&&V.defined(f[y])&&V.defined(f[y].values)){for(var m=f[y],c=m.values,v=0,C=m.componentsPerAttribute,h=w.ComponentDatatype.createTypedArray(m.componentDatatype,l*C);v<t;){var b=a[v];if(-1!==b)for(var g=0;g<C;g++)h[C*b+g]=c[C*v+g];++v}m.values=h}}return e},e.reorderForPostVertexCache=function(e,t){var r=e.indices;if(e.primitiveType===G.PrimitiveType.TRIANGLES&&V.defined(r)){for(var a=r.length,i=0,n=0;n<a;n++)r[n]>i&&(i=r[n]);e.indices=C.tipsify({indices:r,maximumIndex:i,cacheSize:t})}return e},e.fitToUnsignedShortIndices=function(e){var t=[],r=G.Geometry.computeNumberOfVertices(e);if(V.defined(e.indices)&&r>=D.CesiumMath.SIXTY_FOUR_KILOBYTES){var a,i=[],n=[],s=0,o=g(e.attributes),u=e.indices,p=u.length;e.primitiveType===G.PrimitiveType.TRIANGLES?a=3:e.primitiveType===G.PrimitiveType.LINES?a=2:e.primitiveType===G.PrimitiveType.POINTS&&(a=1);for(var d=0;d<p;d+=a){for(var l=0;l<a;++l){var y=u[d+l],f=i[y];if(!V.defined(f)){f=s++,i[y]=f,b=h=m=C=v=c=void 0;var m,c=o,v=e.attributes,C=y;for(m in v)if(v.hasOwnProperty(m)&&V.defined(v[m])&&V.defined(v[m].values))for(var h=v[m],b=0;b<h.componentsPerAttribute;++b)c[m].values.push(h.values[C*h.componentsPerAttribute+b])}n.push(f)}s+a>=D.CesiumMath.SIXTY_FOUR_KILOBYTES&&(t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],n=[],s=0,o=g(e.attributes))}0!==n.length&&t.push(new G.Geometry({attributes:o,indices:n,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var h=new R.Cartesian3,b=new R.Cartographic,d=(e.projectTo2D=function(e,t,r,a,i){for(var n=e.attributes[t],s=(i=V.defined(i)?i:new M.GeographicProjection).ellipsoid,o=n.values,u=new Float64Array(o.length),p=0,d=0;d<o.length;d+=3){var l=R.Cartesian3.fromArray(o,d,h),l=s.cartesianToCartographic(l,b),l=i.project(l,h);u[p++]=l.x,u[p++]=l.y,u[p++]=l.z}return e.attributes[r]=n,e.attributes[a]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u}),delete e.attributes[t],e},{high:0,low:0}),n=(e.encodeAttribute=function(e,t,r,a){for(var i=e.attributes[t],n=i.values,s=n.length,o=new Float32Array(s),u=new Float32Array(s),p=0;p<s;++p)v.EncodedCartesian3.encode(n[p],d),o[p]=d.high,u[p]=d.low;i=i.componentsPerAttribute;return e.attributes[r]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:o}),e.attributes[a]=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:i,values:u}),delete e.attributes[t],e},new R.Cartesian3);function a(e,t){if(V.defined(t))for(var r=t.values,a=r.length,i=0;i<a;i+=3)R.Cartesian3.unpack(r,i,n),M.Matrix4.multiplyByPoint(e,n,n),R.Cartesian3.pack(n,r,i)}function i(e,t){if(V.defined(t))for(var r=t.values,a=r.length,i=0;i<a;i+=3)R.Cartesian3.unpack(r,i,n),M.Matrix3.multiplyByVector(e,n,n),n=R.Cartesian3.normalize(n,n),R.Cartesian3.pack(n,r,i)}var o=new M.Matrix4,u=new M.Matrix3;e.transformToWorldCoordinates=function(e){var t,r=e.modelMatrix;return M.Matrix4.equals(r,M.Matrix4.IDENTITY)||(a(r,(t=e.geometry.attributes).position),a(r,t.prevPosition),a(r,t.nextPosition),(V.defined(t.normal)||V.defined(t.tangent)||V.defined(t.bitangent))&&(M.Matrix4.inverse(r,o),M.Matrix4.transpose(o,o),M.Matrix4.getMatrix3(o,u),i(u,t.normal),i(u,t.tangent),i(u,t.bitangent)),t=e.geometry.boundingSphere,V.defined(t)&&(e.geometry.boundingSphere=M.BoundingSphere.transform(t,r,t)),e.modelMatrix=M.Matrix4.clone(M.Matrix4.IDENTITY)),e};var X=new R.Cartesian3;function j(e,t){var r,a,i,n,s,o,u=e.length,p=(e[0].modelMatrix,V.defined(e[0][t].indices)),d=e[0][t].primitiveType,l=function(e,t){var r,a=e.length,i={},n=e[0][t].attributes;for(r in n)if(n.hasOwnProperty(r)&&V.defined(n[r])&&V.defined(n[r].values)){for(var s=n[r],o=s.values.length,u=!0,p=1;p<a;++p){var d=e[p][t].attributes[r];if(!V.defined(d)||s.componentDatatype!==d.componentDatatype||s.componentsPerAttribute!==d.componentsPerAttribute||s.normalize!==d.normalize){u=!1;break}o+=d.values.length}u&&(i[r]=new G.GeometryAttribute({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:w.ComponentDatatype.createTypedArray(s.componentDatatype,o)}))}return i}(e,t);for(r in l)if(l.hasOwnProperty(r))for(i=l[r].values,f=b=0;f<u;++f)for(s=(n=e[f][t].attributes[r].values).length,a=0;a<s;++a)i[b++]=n[a];if(p){for(var y=0,f=0;f<u;++f)y+=e[f][t].indices.length;var p=G.Geometry.computeNumberOfVertices(new G.Geometry({attributes:l,primitiveType:G.PrimitiveType.POINTS})),m=S.IndexDatatype.createTypedArray(p,y),c=0,v=0;for(f=0;f<u;++f){for(var C=e[f][t].indices,h=C.length,b=0;b<h;++b)m[c++]=v+C[b];v+=G.Geometry.computeNumberOfVertices(e[f][t])}o=m}var g=new R.Cartesian3,A=0;for(f=0;f<u;++f){if(T=e[f][t].boundingSphere,!V.defined(T)){g=void 0;break}R.Cartesian3.add(T.center,g,g)}if(V.defined(g))for(R.Cartesian3.divideByScalar(g,u,g),f=0;f<u;++f){var T=e[f][t].boundingSphere,x=R.Cartesian3.magnitude(R.Cartesian3.subtract(T.center,g,X))+T.radius;A<x&&(A=x)}return new G.Geometry({attributes:l,indices:o,primitiveType:d,boundingSphere:V.defined(g)?new M.BoundingSphere(g,A):void 0})}e.combineInstances=function(e){for(var t=[],r=[],a=e.length,i=0;i<a;++i){var n=e[i];V.defined(n.geometry)?t.push(n):V.defined(n.westHemisphereGeometry)&&V.defined(n.eastHemisphereGeometry)&&r.push(n)}var s=[];return 0<t.length&&s.push(j(t,"geometry")),0<r.length&&(s.push(j(r,"westHemisphereGeometry")),s.push(j(r,"eastHemisphereGeometry"))),s};var T=new R.Cartesian3,x=new R.Cartesian3,P=new R.Cartesian3,I=new R.Cartesian3,J=(e.computeNormal=function(e){for(var t=e.indices,r=e.attributes,a=r.position.values,i=r.position.values.length/3,n=t.length,s=new Array(i),o=new Array(n/3),u=new Array(n),p=0;p<i;p++)s[p]={indexOffset:0,count:0,currentCount:0};var d=0;for(p=0;p<n;p+=3){var l=t[p],y=t[p+1],f=t[p+2],m=3*l,c=3*y,v=3*f;x.x=a[m],x.y=a[1+m],x.z=a[2+m],P.x=a[c],P.y=a[1+c],P.z=a[2+c],I.x=a[v],I.y=a[1+v],I.z=a[2+v],s[l].count++,s[y].count++,s[f].count++,R.Cartesian3.subtract(P,x,P),R.Cartesian3.subtract(I,x,I),o[d]=R.Cartesian3.cross(P,I,new R.Cartesian3),d++}var C,h=0;for(p=0;p<i;p++)s[p].indexOffset+=h,h+=s[p].count;for(p=d=0;p<n;p+=3)u[(C=s[t[p]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+1]]).indexOffset+C.currentCount]=d,C.currentCount++,u[(C=s[t[p+2]]).indexOffset+C.currentCount]=d,C.currentCount++,d++;var b=new Float32Array(3*i);for(p=0;p<i;p++){var g=3*p;if(C=s[p],R.Cartesian3.clone(R.Cartesian3.ZERO,T),0<C.count){for(d=0;d<C.count;d++)R.Cartesian3.add(T,o[u[C.indexOffset+d]],T);R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&R.Cartesian3.clone(o[u[C.indexOffset]],T)}R.Cartesian3.equalsEpsilon(R.Cartesian3.ZERO,T,D.CesiumMath.EPSILON10)&&(T.z=1),R.Cartesian3.normalize(T,T),b[g]=T.x,b[1+g]=T.y,b[2+g]=T.z}return e.attributes.normal=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:b}),e},new R.Cartesian3),K=new R.Cartesian3,Q=new R.Cartesian3,O=(e.computeTangentAndBitangent=function(e){e.attributes;for(var t=e.indices,r=e.attributes.position.values,a=e.attributes.normal.values,i=e.attributes.st.values,n=e.attributes.position.values.length/3,s=t.length,o=new Array(3*n),u=0;u<o.length;u++)o[u]=0;for(u=0;u<s;u+=3){var p,d=t[u],l=t[u+1],y=t[u+2],f=3*l,m=3*y,c=2*d,l=2*l,y=2*y,d=r[p=3*d],v=r[p+1],C=r[p+2],h=i[c],c=i[1+c],b=i[1+l]-c,c=i[1+y]-c,l=1/((i[l]-h)*c-(i[y]-h)*b),y=(c*(r[f]-d)-b*(r[m]-d))*l,h=(c*(r[f+1]-v)-b*(r[m+1]-v))*l,d=(c*(r[f+2]-C)-b*(r[m+2]-C))*l;o[p]+=y,o[p+1]+=h,o[p+2]+=d,o[f]+=y,o[f+1]+=h,o[f+2]+=d,o[m]+=y,o[m+1]+=h,o[m+2]+=d}var g=new Float32Array(3*n),A=new Float32Array(3*n);for(u=0;u<n;u++){f=(p=3*u)+1,m=p+2;var T=R.Cartesian3.fromArray(a,p,J),x=R.Cartesian3.fromArray(o,p,Q),P=R.Cartesian3.dot(T,x);R.Cartesian3.multiplyByScalar(T,P,K),R.Cartesian3.normalize(R.Cartesian3.subtract(x,K,x),x),g[p]=x.x,g[f]=x.y,g[m]=x.z,R.Cartesian3.normalize(R.Cartesian3.cross(T,x,x),x),A[p]=x.x,A[f]=x.y,A[m]=x.z}return e.attributes.tangent=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:g}),e.attributes.bitangent=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A}),e},new R.Cartesian2),E=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartesian3,N=new R.Cartesian2;function te(e){switch(e.primitiveType){case G.PrimitiveType.TRIANGLE_FAN:for(var t=e,r=G.Geometry.computeNumberOfVertices(t),a=S.IndexDatatype.createTypedArray(r,3*(r-2)),i=(a[0]=1,a[1]=0,a[2]=2,3),n=3;n<r;++n)a[i++]=n-1,a[i++]=0,a[i++]=n;return t.indices=a,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLE_STRIP:for(var t=e,s=G.Geometry.computeNumberOfVertices(t),o=S.IndexDatatype.createTypedArray(s,3*(s-2)),u=(o[0]=0,o[1]=1,o[2]=2,3<s&&(o[3]=0,o[4]=2,o[5]=3),6),p=3;p<s-1;p+=2)o[u++]=p,o[u++]=p-1,o[u++]=p+1,p+2<s&&(o[u++]=p,o[u++]=p+1,o[u++]=p+2);return t.indices=o,t.primitiveType=G.PrimitiveType.TRIANGLES,t;case G.PrimitiveType.TRIANGLES:var d=e;if(!V.defined(d.indices)){for(var l=G.Geometry.computeNumberOfVertices(d),y=S.IndexDatatype.createTypedArray(l,l),f=0;f<l;++f)y[f]=f;d.indices=y}return d;case G.PrimitiveType.LINE_STRIP:for(var d=e,m=G.Geometry.computeNumberOfVertices(d),c=S.IndexDatatype.createTypedArray(m,2*(m-1)),v=(c[0]=0,c[1]=1,2),C=2;C<m;++C)c[v++]=C-1,c[v++]=C;return d.indices=c,d.primitiveType=G.PrimitiveType.LINES,d;case G.PrimitiveType.LINE_LOOP:for(var h=e,b=G.Geometry.computeNumberOfVertices(h),g=S.IndexDatatype.createTypedArray(b,2*b),A=(g[0]=0,g[1]=1,2),T=2;T<b;++T)g[A++]=T-1,g[A++]=T;return g[A++]=b-1,g[A]=0,h.indices=g,h.primitiveType=G.PrimitiveType.LINES,h;case G.PrimitiveType.LINES:h=e;if(!V.defined(h.indices)){for(var x=G.Geometry.computeNumberOfVertices(h),P=S.IndexDatatype.createTypedArray(x,x),w=0;w<x;++w)P[w]=w;h.indices=P}return h}}function p(e,t){Math.abs(e.y)<D.CesiumMath.EPSILON6&&(e.y=t?-D.CesiumMath.EPSILON6:D.CesiumMath.EPSILON6)}e.compressVertices=function(e){var t=e.attributes.extrudeDirection;if(V.defined(t)){for(var r=t.values,a=r.length/3,i=new Float32Array(2*a),n=0,s=0;s<a;++s)R.Cartesian3.fromArray(r,3*s,E),R.Cartesian3.equals(E,R.Cartesian3.ZERO)?n+=2:(N=A.AttributeCompression.octEncodeInRange(E,65535,N),i[n++]=N.x,i[n++]=N.y);e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i}),delete e.attributes.extrudeDirection}else{var t=e.attributes.normal,o=e.attributes.st,u=V.defined(t),p=V.defined(o);if(u||p){var d,l,y,f,m=e.attributes.tangent,c=e.attributes.bitangent,v=V.defined(m),C=V.defined(c);u&&(d=t.values),p&&(l=o.values),v&&(y=m.values),C&&(f=c.values);var t=a=(u?d:l).length/(u?3:2),o=p&&u?2:1,h=(t*=o+=v||C?1:0,new Float32Array(t)),b=0;for(s=0;s<a;++s){p&&(R.Cartesian2.fromArray(l,2*s,O),h[b++]=A.AttributeCompression.compressTextureCoordinates(O));var g=3*s;u&&V.defined(y)&&V.defined(f)?(R.Cartesian3.fromArray(d,g,E),R.Cartesian3.fromArray(y,g,$),R.Cartesian3.fromArray(f,g,ee),A.AttributeCompression.octPack(E,$,ee,O),h[b++]=O.x,h[b++]=O.y):(u&&(R.Cartesian3.fromArray(d,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)),v&&(R.Cartesian3.fromArray(y,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)),C&&(R.Cartesian3.fromArray(f,g,E),h[b++]=A.AttributeCompression.octEncodeFloat(E)))}e.attributes.compressedAttributes=new G.GeometryAttribute({componentDatatype:w.ComponentDatatype.FLOAT,componentsPerAttribute:o,values:h}),u&&delete e.attributes.normal,p&&delete e.attributes.st,C&&delete e.attributes.bitangent,v&&delete e.attributes.tangent}}return e};var re=new R.Cartesian3;function l(e,t,r,a){R.Cartesian3.add(e,R.Cartesian3.multiplyByScalar(R.Cartesian3.subtract(t,e,re),e.y/(e.y-t.y),re),r),R.Cartesian3.clone(r,a),p(r,!0),p(a,!1)}var y=new R.Cartesian3,f=new R.Cartesian3,m=new R.Cartesian3,c=new R.Cartesian3,ae={positions:new Array(7),indices:new Array(9)};function ie(e,t,r){var a,i,n,s,o,u;if(!(0<=e.x||0<=t.x||0<=r.x))return s=t,o=r,0!==(a=e).y&&0!==s.y&&0!==o.y?(p(a,a.y<0),p(s,s.y<0),p(o,o.y<0)):(u=Math.abs(a.y),n=Math.abs(s.y),i=Math.abs(o.y),p(a,u=(n<u?i<u?D.CesiumMath.sign(a.y):D.CesiumMath.sign(o.y):i<n?D.CesiumMath.sign(s.y):D.CesiumMath.sign(o.y))<0),p(s,u),p(o,u)),a=e.y<0,i=t.y<0,n=r.y<0,s=0,o=ae.indices,1==(s=(s+=a?1:0)+(i?1:0)+(n?1:0))?(o[1]=3,o[2]=4,o[5]=6,o[7]=6,o[8]=5,a?(l(e,t,y,m),l(e,r,f,c),o[0]=0,o[3]=1,o[4]=2,o[6]=1):i?(l(t,r,y,m),l(t,e,f,c),o[0]=1,o[3]=2,o[4]=0,o[6]=2):n&&(l(r,e,y,m),l(r,t,f,c),o[0]=2,o[3]=0,o[4]=1,o[6]=0)):2==s&&(o[2]=4,o[4]=4,o[5]=3,o[7]=5,o[8]=6,a?i?n||(l(r,e,y,m),l(r,t,f,c),o[0]=0,o[1]=1,o[3]=0,o[6]=2):(l(t,r,y,m),l(t,e,f,c),o[0]=2,o[1]=0,o[3]=2,o[6]=1):(l(e,t,y,m),l(e,r,f,c),o[0]=1,o[1]=2,o[3]=1,o[6]=0)),(u=ae.positions)[0]=e,u[1]=t,u[2]=r,u.length=3,1!=s&&2!=s||(u[3]=y,u[4]=f,u[5]=m,u[6]=c,u.length=7),ae}function ne(e,t){var r=e.attributes;if(0!==r.position.values.length){for(var a in r)r.hasOwnProperty(a)&&V.defined(r[a])&&V.defined(r[a].values)&&((a=r[a]).values=w.ComponentDatatype.createTypedArray(a.componentDatatype,a.values));var i=G.Geometry.computeNumberOfVertices(e);return e.indices=S.IndexDatatype.createTypedArray(i,e.indices),t&&(e.boundingSphere=M.BoundingSphere.fromVertices(r.position.values)),e}}function F(e){var t,r,a=e.attributes,i={};for(t in a)a.hasOwnProperty(t)&&V.defined(a[t])&&V.defined(a[t].values)&&(r=a[t],i[t]=new G.GeometryAttribute({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]}));return new G.Geometry({attributes:i,indices:[],primitiveType:e.primitiveType})}function se(e,t,r){var a=V.defined(e.geometry.boundingSphere);t=ne(t,a),r=ne(r,a),V.defined(r)&&!V.defined(t)?e.geometry=r:!V.defined(r)&&V.defined(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=r,e.geometry=void 0)}function oe(u,p){var d=new u,l=new u,y=new u;return function(e,t,r,a,i,n,s,o){e=u.fromArray(i,e*p,d),t=u.fromArray(i,t*p,l),i=u.fromArray(i,r*p,y),u.multiplyByScalar(e,a.x,e),u.multiplyByScalar(t,a.y,t),u.multiplyByScalar(i,a.z,i),r=u.add(e,t,e);u.add(r,i,r),o&&u.normalize(r,r),u.pack(r,n,s*p)}}var ue=oe(M.Cartesian4,4),L=oe(R.Cartesian3,3),pe=oe(R.Cartesian2,2),de=function(e,t,r,a,i,n,s){e=i[e]*a.x,t=i[t]*a.y,i=i[r]*a.z;n[s]=e+t+i>D.CesiumMath.EPSILON6?1:0},z=new R.Cartesian3,le=new R.Cartesian3,ye=new R.Cartesian3,fe=new R.Cartesian3;function B(e,t,r,a,i,n,s,o,u,p,d,l,y,f,m,c){if(V.defined(n)||V.defined(s)||V.defined(o)||V.defined(u)||V.defined(p)||0!==f){var v,C=function(e,t,r,a,i){var n,s,o,u,p,d,l,y;if(V.defined(i)||(i=new R.Cartesian3),V.defined(t.z)){if(R.Cartesian3.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian3.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian3.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian3.subtract(r,t,Z),s=R.Cartesian3.subtract(a,t,H),o=R.Cartesian3.subtract(e,t,W),u=R.Cartesian3.dot(n,n),p=R.Cartesian3.dot(n,s),d=R.Cartesian3.dot(n,o),l=R.Cartesian3.dot(s,s),y=R.Cartesian3.dot(s,o)}else{if(R.Cartesian2.equalsEpsilon(e,t,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_X,i);if(R.Cartesian2.equalsEpsilon(e,r,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Y,i);if(R.Cartesian2.equalsEpsilon(e,a,D.CesiumMath.EPSILON14))return R.Cartesian3.clone(R.Cartesian3.UNIT_Z,i);n=R.Cartesian2.subtract(r,t,Z),s=R.Cartesian2.subtract(a,t,H),o=R.Cartesian2.subtract(e,t,W),u=R.Cartesian2.dot(n,n),p=R.Cartesian2.dot(n,s),d=R.Cartesian2.dot(n,o),l=R.Cartesian2.dot(s,s),y=R.Cartesian2.dot(s,o)}if(i.y=l*d-p*y,i.z=u*y-p*d,0!=(r=u*l-p*p))return i.y/=r,i.z/=r,i.x=1-i.y-i.z,i}(a,R.Cartesian3.fromArray(i,3*e,z),R.Cartesian3.fromArray(i,3*t,le),R.Cartesian3.fromArray(i,3*r,ye),fe);if(V.defined(C))if(V.defined(n)&&L(e,t,r,C,n,l.normal.values,c,!0),V.defined(p)&&(a=R.Cartesian3.fromArray(p,3*e,z),i=R.Cartesian3.fromArray(p,3*t,le),n=R.Cartesian3.fromArray(p,3*r,ye),R.Cartesian3.multiplyByScalar(a,C.x,a),R.Cartesian3.multiplyByScalar(i,C.y,i),R.Cartesian3.multiplyByScalar(n,C.z,n),R.Cartesian3.equals(a,R.Cartesian3.ZERO)&&R.Cartesian3.equals(i,R.Cartesian3.ZERO)&&R.Cartesian3.equals(n,R.Cartesian3.ZERO)?((v=z).x=0,v.y=0,v.z=0):(v=R.Cartesian3.add(a,i,a),R.Cartesian3.add(v,n,v),R.Cartesian3.normalize(v,v)),R.Cartesian3.pack(v,l.extrudeDirection.values,3*c)),V.defined(d)&&de(e,t,r,C,d,l.applyOffset.values,c),V.defined(s)&&L(e,t,r,C,s,l.tangent.values,c,!0),V.defined(o)&&L(e,t,r,C,o,l.bitangent.values,c,!0),V.defined(u)&&pe(e,t,r,C,u,l.st.values,c),0<f)for(var h=0;h<f;h++){var b=y[h],g=(E=O=I=S=w=P=x=T=A=g=void 0,e),A=t,T=r,x=C,P=c,w=m[b],S=l[b],I=w.componentsPerAttribute,O=w.values,E=S.values;switch(I){case 4:ue(g,A,T,x,O,E,P,!1);break;case 3:L(g,A,T,x,O,E,P,!1);break;case 2:pe(g,A,T,x,O,E,P,!1);break;default:E[P]=O[g]*x.x+O[A]*x.y+O[T]*x.z}}}}function k(e,t,r,a,i,n){var s=e.position.values.length/3;return-1!==i?-1===(i=r[a=a[i]])?(r[a]=s,e.position.values.push(n.x,n.y,n.z),t.push(s),s):(t.push(i),i):(e.position.values.push(n.x,n.y,n.z),t.push(s),s)}var me={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function ce(e){var t,r=e.geometry,a=r.attributes,i=a.position.values,n=V.defined(a.normal)?a.normal.values:void 0,s=V.defined(a.bitangent)?a.bitangent.values:void 0,o=V.defined(a.tangent)?a.tangent.values:void 0,u=V.defined(a.st)?a.st.values:void 0,p=V.defined(a.extrudeDirection)?a.extrudeDirection.values:void 0,d=V.defined(a.applyOffset)?a.applyOffset.values:void 0,l=r.indices,y=[];for(t in a)a.hasOwnProperty(t)&&!me[t]&&V.defined(a[t])&&y.push(t);var f,m,c=y.length,v=F(r),C=F(r),h=[],b=(h.length=i.length/3,[]);for(b.length=i.length/3,A=0;A<h.length;++A)b[A]=h[A]=-1;for(var g=l.length,A=0;A<g;A+=3){var T=l[A],x=l[A+1],P=l[A+2],w=R.Cartesian3.fromArray(i,3*T),S=R.Cartesian3.fromArray(i,3*x),I=R.Cartesian3.fromArray(i,3*P),O=ie(w,S,I);if(V.defined(O)&&3<O.positions.length)for(var E=O.positions,N=O.indices,L=N.length,z=0;z<L;++z){var D=N[z],M=E[D],G=M.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b);B(T,x,P,M,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,D<3?A+D:-1,M))}else V.defined(O)&&(w=O.positions[0],S=O.positions[1],I=O.positions[2]),G=w.y<0?(f=C.attributes,m=C.indices,h):(f=v.attributes,m=v.indices,b),B(T,x,P,w,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A,w)),B(T,x,P,S,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A+1,S)),B(T,x,P,I,i,n,o,s,u,p,d,f,y,c,a,k(f,m,G,l,A+2,I))}se(e,C,v)}var ve=Y.Plane.fromPointNormal(R.Cartesian3.ZERO,R.Cartesian3.UNIT_Y),Ce=new R.Cartesian3,he=new R.Cartesian3;function _(e,t,r,a,i,n,s){V.defined(s)&&(a=R.Cartesian3.fromArray(a,3*e,z),R.Cartesian3.equalsEpsilon(a,r,D.CesiumMath.EPSILON10)?n.applyOffset.values[i]=s[e]:n.applyOffset.values[i]=s[t])}function be(e){var t,r=e.geometry,a=r.attributes,i=a.position.values,n=V.defined(a.applyOffset)?a.applyOffset.values:void 0,s=r.indices,o=F(r),u=F(r),p=s.length,d=[],l=(d.length=i.length/3,[]);for(l.length=i.length/3,t=0;t<d.length;++t)l[t]=d[t]=-1;for(t=0;t<p;t+=2){var y,f,m,c,v=s[t],C=s[t+1],h=R.Cartesian3.fromArray(i,3*v,z),b=R.Cartesian3.fromArray(i,3*C,le),g=(Math.abs(h.y)<D.CesiumMath.EPSILON6&&(h.y<0?h.y=-D.CesiumMath.EPSILON6:h.y=D.CesiumMath.EPSILON6),Math.abs(b.y)<D.CesiumMath.EPSILON6&&(b.y<0?b.y=-D.CesiumMath.EPSILON6:b.y=D.CesiumMath.EPSILON6),o.attributes),A=o.indices,T=l,x=u.attributes,P=u.indices,w=d,S=U.IntersectionTests.lineSegmentPlane(h,b,ve,ye);V.defined(S)?(y=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,5*D.CesiumMath.EPSILON9,Ce),h.y<0&&(R.Cartesian3.negate(y,y),g=u.attributes,A=u.indices,T=d,x=o.attributes,P=o.indices,w=l),f=R.Cartesian3.add(S,y,he),_(v,C,h,i,k(g,A,T,s,t,h),g,n),_(v,C,f,i,k(g,A,T,s,-1,f),g,n),R.Cartesian3.negate(y,y),R.Cartesian3.add(S,y,f),_(v,C,f,i,k(x,P,w,s,-1,f),x,n),_(v,C,b,i,k(x,P,w,s,t+1,b),x,n)):(A=h.y<0?(m=u.attributes,c=u.indices,d):(m=o.attributes,c=o.indices,l),_(v,C,h,i,k(m,c,A,s,t,h),m,n),_(v,C,b,i,k(m,c,A,s,t+1,b),m,n))}se(e,u,o)}var ge=new R.Cartesian2,Ae=new R.Cartesian2,Te=new R.Cartesian3,xe=new R.Cartesian3,Pe=new R.Cartesian3,we=new R.Cartesian3,Se=new R.Cartesian3,Ie=new R.Cartesian3,Oe=new M.Cartesian4;function Ee(e){for(var e=e.attributes,t=e.position.values,r=e.prevPosition.values,a=e.nextPosition.values,i=t.length,n=0;n<i;n+=3){var s,o=R.Cartesian3.unpack(t,n,Te);0<o.x||(s=R.Cartesian3.unpack(r,n,xe),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(0<n-3?(r[n]=t[n-3],r[n+1]=t[n-2],r[n+2]=t[n-1]):R.Cartesian3.pack(o,r,n)),s=R.Cartesian3.unpack(a,n,Pe),(o.y<0&&0<s.y||0<o.y&&s.y<0)&&(n+3<i?(a[n]=t[n+3],a[n+1]=t[n+4],a[n+2]=t[n+5]):R.Cartesian3.pack(o,a,n)))}}var Ne=5*D.CesiumMath.EPSILON9,q=D.CesiumMath.EPSILON6;e.splitLongitude=function(e){var t=e.geometry,r=t.boundingSphere;if(V.defined(r)&&(0<r.center.x-r.radius||M.BoundingSphere.intersectPlane(r,Y.Plane.ORIGIN_ZX_PLANE)!==M.Intersect.INTERSECTING))return e;if(t.geometryType!==G.GeometryType.NONE)switch(t.geometryType){case G.GeometryType.POLYLINES:for(var a=e,i=a.geometry,n=i.attributes,s=n.position.values,o=n.prevPosition.values,u=n.nextPosition.values,p=n.expandAndWidth.values,d=V.defined(n.st)?n.st.values:void 0,l=V.defined(n.color)?n.color.values:void 0,y=F(i),f=F(i),m=!1,c=s.length/3,v=0;v<c;v+=4){var C=v,h=v+2,b=R.Cartesian3.fromArray(s,3*C,Te),g=R.Cartesian3.fromArray(s,3*h,xe);if(Math.abs(b.y)<q)for(b.y=q*(g.y<0?-1:1),s[3*v+1]=b.y,s[3*(v+1)+1]=b.y,L=3*C;L<3*C+12;L+=3)o[L]=s[3*v],o[L+1]=s[3*v+1],o[L+2]=s[3*v+2];if(Math.abs(g.y)<q)for(g.y=q*(b.y<0?-1:1),s[3*(v+2)+1]=g.y,s[3*(v+3)+1]=g.y,L=3*C;L<3*C+12;L+=3)u[L]=s[3*(v+2)],u[L+1]=s[3*(v+2)+1],u[L+2]=s[3*(v+2)+2];var A=y.attributes,T=y.indices,x=f.attributes,P=f.indices,w=U.IntersectionTests.lineSegmentPlane(b,g,ve,we);if(V.defined(w)){var m=!0,S=R.Cartesian3.multiplyByScalar(R.Cartesian3.UNIT_Y,Ne,Se),I=(b.y<0&&(R.Cartesian3.negate(S,S),A=f.attributes,T=f.indices,x=y.attributes,P=y.indices),R.Cartesian3.add(w,S,Ie)),S=(A.position.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.position.values.push(I.x,I.y,I.z),A.position.values.push(I.x,I.y,I.z),A.prevPosition.values.push(o[3*C],o[3*C+1],o[3*C+2]),A.prevPosition.values.push(o[3*C+3],o[3*C+4],o[3*C+5]),A.prevPosition.values.push(b.x,b.y,b.z,b.x,b.y,b.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),A.nextPosition.values.push(I.x,I.y,I.z),R.Cartesian3.negate(S,S),R.Cartesian3.add(w,S,I),x.position.values.push(I.x,I.y,I.z),x.position.values.push(I.x,I.y,I.z),x.position.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.prevPosition.values.push(I.x,I.y,I.z),x.nextPosition.values.push(g.x,g.y,g.z,g.x,g.y,g.z),x.nextPosition.values.push(u[3*h],u[3*h+1],u[3*h+2]),x.nextPosition.values.push(u[3*h+3],u[3*h+4],u[3*h+5]),R.Cartesian2.fromArray(p,2*C,ge)),I=Math.abs(S.y),S=(A.expandAndWidth.values.push(-1,I,1,I),A.expandAndWidth.values.push(-1,-I,1,-I),x.expandAndWidth.values.push(-1,I,1,I),x.expandAndWidth.values.push(-1,-I,1,-I),R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(w,b,Pe)));if(S/=R.Cartesian3.magnitudeSquared(R.Cartesian3.subtract(g,b,Pe)),V.defined(l)){for(var I=M.Cartesian4.fromArray(l,4*C,Oe),w=M.Cartesian4.fromArray(l,4*h,Oe),O=D.CesiumMath.lerp(I.x,w.x,S),E=D.CesiumMath.lerp(I.y,w.y,S),N=D.CesiumMath.lerp(I.z,w.z,S),I=D.CesiumMath.lerp(I.w,w.w,S),L=4*C;L<4*C+8;++L)A.color.values.push(l[L]);for(A.color.values.push(O,E,N,I),A.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),x.color.values.push(O,E,N,I),L=4*h;L<4*h+8;++L)x.color.values.push(l[L])}if(V.defined(d)){w=R.Cartesian2.fromArray(d,2*C,ge),O=R.Cartesian2.fromArray(d,2*(v+3),Ae),E=D.CesiumMath.lerp(w.x,O.x,S);for(L=2*C;L<2*C+4;++L)A.st.values.push(d[L]);for(A.st.values.push(E,w.y),A.st.values.push(E,O.y),x.st.values.push(E,w.y),x.st.values.push(E,O.y),L=2*h;L<2*h+4;++L)x.st.values.push(d[L])}N=A.position.values.length/3-4,T.push(N,N+2,N+1),T.push(N+1,N+2,N+3),N=x.position.values.length/3-4,P.push(N,N+2,N+1),P.push(N+1,N+2,N+3)}else{var z,I=(b.y<0?(z=f.attributes,f):(z=y.attributes,y)).indices;for(z.position.values.push(b.x,b.y,b.z),z.position.values.push(b.x,b.y,b.z),z.position.values.push(g.x,g.y,g.z),z.position.values.push(g.x,g.y,g.z),L=3*v;L<3*v+12;++L)z.prevPosition.values.push(o[L]),z.nextPosition.values.push(u[L]);for(L=2*v;L<2*v+8;++L)z.expandAndWidth.values.push(p[L]),V.defined(d)&&z.st.values.push(d[L]);if(V.defined(l))for(L=4*v;L<4*v+16;++L)z.color.values.push(l[L]);N=z.position.values.length/3-4,I.push(N,N+2,N+1),I.push(N+1,N+2,N+3)}}m&&(Ee(f),Ee(y)),se(a,f,y);break;case G.GeometryType.TRIANGLES:ce(e);break;case G.GeometryType.LINES:be(e)}else te(t),t.primitiveType===G.PrimitiveType.TRIANGLES?ce(e):t.primitiveType===G.PrimitiveType.LINES&&be(e);return e},t.GeometryPipeline=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./when-ae2e0b60","./Check-f996273c","./Math-5bbcea10","./WebGLConstants-35626ea2"],function(e,r,t,N,n){"use strict";var E={UNSIGNED_BYTE:n.WebGLConstants.UNSIGNED_BYTE,UNSIGNED_SHORT:n.WebGLConstants.UNSIGNED_SHORT,UNSIGNED_INT:n.WebGLConstants.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case E.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case E.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case E.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}},fromSizeInBytes:function(e){switch(e){case 2:return E.UNSIGNED_SHORT;case 4:return E.UNSIGNED_INT;case 1:return E.UNSIGNED_BYTE}},validate:function(e){return r.defined(e)&&(e===E.UNSIGNED_BYTE||e===E.UNSIGNED_SHORT||e===E.UNSIGNED_INT)},createTypedArray:function(e,r){return new(e>=N.CesiumMath.SIXTY_FOUR_KILOBYTES?Uint32Array:Uint16Array)(r)},createTypedArrayFromArrayBuffer:function(e,r,t,n){return new(e>=N.CesiumMath.SIXTY_FOUR_KILOBYTES?Uint32Array:Uint16Array)(r,t,n)}},n=Object.freeze(E);e.IndexDatatype=n});
|