@openglobus/og 0.19.4 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/css/og.css +18 -4
- package/lib/@openglobus/js/Clock.d.ts +106 -0
- package/lib/@openglobus/js/Deferred.d.ts +6 -0
- package/lib/@openglobus/js/Events.d.ts +90 -0
- package/lib/@openglobus/js/Extent.d.ts +145 -0
- package/lib/@openglobus/js/Globe.d.ts +134 -0
- package/lib/@openglobus/js/ImageCanvas.d.ts +128 -0
- package/lib/@openglobus/js/Lock.d.ts +15 -0
- package/lib/@openglobus/js/LonLat.d.ts +128 -0
- package/lib/@openglobus/js/Object3d.d.ts +64 -0
- package/lib/@openglobus/js/Popup.d.ts +46 -0
- package/lib/@openglobus/js/QueueArray.d.ts +16 -0
- package/lib/@openglobus/js/Rectangle.d.ts +76 -0
- package/lib/@openglobus/js/Stack.d.ts +20 -0
- package/lib/@openglobus/js/astro/astro.d.ts +39 -0
- package/lib/@openglobus/js/astro/earth.d.ts +8 -0
- package/lib/@openglobus/js/astro/jd.d.ts +234 -0
- package/lib/@openglobus/js/astro/orbit.d.ts +5 -0
- package/lib/@openglobus/js/astro/rotation.d.ts +2 -0
- package/lib/@openglobus/js/bv/Box.d.ts +32 -0
- package/lib/@openglobus/js/bv/Sphere.d.ts +37 -0
- package/lib/@openglobus/js/bv/index.d.ts +3 -0
- package/lib/@openglobus/js/camera/Camera.d.ts +314 -0
- package/lib/@openglobus/js/camera/Frustum.d.ts +139 -0
- package/lib/@openglobus/js/camera/PlanetCamera.d.ts +234 -0
- package/lib/@openglobus/js/camera/index.d.ts +3 -0
- package/lib/@openglobus/js/cons.d.ts +40 -0
- package/lib/@openglobus/js/control/Atmosphere.d.ts +16 -0
- package/lib/@openglobus/js/control/CompassButton.d.ts +16 -0
- package/lib/@openglobus/js/control/Control.d.ts +100 -0
- package/lib/@openglobus/js/control/DebugInfo.d.ts +25 -0
- package/lib/@openglobus/js/control/DrawingSwitcher.d.ts +13 -0
- package/lib/@openglobus/js/control/EarthCoordinates.d.ts +41 -0
- package/lib/@openglobus/js/control/EarthNavigation.d.ts +50 -0
- package/lib/@openglobus/js/control/GeoImageDragControl.d.ts +22 -0
- package/lib/@openglobus/js/control/KeyboardNavigation.d.ts +28 -0
- package/lib/@openglobus/js/control/LayerAnimation.d.ts +71 -0
- package/lib/@openglobus/js/control/LayerSwitcher.d.ts +36 -0
- package/lib/@openglobus/js/control/Lighting.d.ts +53 -0
- package/lib/@openglobus/js/control/MouseNavigation.d.ts +64 -0
- package/lib/@openglobus/js/control/MouseWheelZoomControl.d.ts +44 -0
- package/lib/@openglobus/js/control/RulerSwitcher.d.ts +17 -0
- package/lib/@openglobus/js/control/ScaleControl.d.ts +24 -0
- package/lib/@openglobus/js/control/SegmentBoundVisualization.d.ts +12 -0
- package/lib/@openglobus/js/control/ShowFps.d.ts +9 -0
- package/lib/@openglobus/js/control/SimpleNavigation.d.ts +25 -0
- package/lib/@openglobus/js/control/SimpleSkyBackground.d.ts +17 -0
- package/lib/@openglobus/js/control/Sun.d.ts +33 -0
- package/lib/@openglobus/js/control/ToggleWireframe.d.ts +14 -0
- package/lib/@openglobus/js/control/TouchNavigation.d.ts +52 -0
- package/lib/@openglobus/js/control/ZoomControl.d.ts +27 -0
- package/lib/@openglobus/js/control/drawing/DrawingControl.d.ts +12 -0
- package/lib/@openglobus/js/control/drawing/LineStringDrawingScene.d.ts +15 -0
- package/lib/@openglobus/js/control/drawing/PolygonDrawingScene.d.ts +98 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfile.d.ts +77 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileButtonsView.d.ts +14 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileControl.d.ts +33 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileLegend.d.ts +20 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileScene.d.ts +80 -0
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileView.d.ts +63 -0
- package/lib/@openglobus/js/control/elevationProfile/PointListDialog.d.ts +12 -0
- package/lib/@openglobus/js/control/heightRuler/HeightRuler.d.ts +7 -0
- package/lib/@openglobus/js/control/heightRuler/HeightRulerScene.d.ts +35 -0
- package/lib/@openglobus/js/control/heightRuler/HeightRulerSwitcher.d.ts +6 -0
- package/lib/@openglobus/js/control/index.d.ts +29 -0
- package/lib/@openglobus/js/control/ruler/Ruler.d.ts +13 -0
- package/lib/@openglobus/js/control/ruler/RulerScene.d.ts +88 -0
- package/lib/@openglobus/js/control/selection/Selection.d.ts +55 -0
- package/lib/@openglobus/js/control/selection/SelectionScene.d.ts +44 -0
- package/lib/@openglobus/js/control/timeline/TimelineControl.d.ts +18 -0
- package/lib/@openglobus/js/control/timeline/TimelineModel.d.ts +41 -0
- package/lib/@openglobus/js/control/timeline/TimelineView.d.ts +85 -0
- package/lib/@openglobus/js/control/timeline/timelineUtils.d.ts +12 -0
- package/lib/@openglobus/js/control/visibleExtent/drawnode.d.ts +7 -0
- package/lib/@openglobus/js/ellipsoid/Ellipsoid.d.ts +193 -0
- package/lib/@openglobus/js/ellipsoid/index.d.ts +3 -0
- package/lib/@openglobus/js/ellipsoid/wgs84.d.ts +6 -0
- package/lib/@openglobus/js/entity/BaseBillboard.d.ts +222 -0
- package/lib/@openglobus/js/entity/BaseBillboardHandler.d.ts +81 -0
- package/lib/@openglobus/js/entity/Billboard.d.ts +113 -0
- package/lib/@openglobus/js/entity/BillboardHandler.d.ts +15 -0
- package/lib/@openglobus/js/entity/Entity.d.ts +354 -0
- package/lib/@openglobus/js/entity/EntityCollection.d.ts +363 -0
- package/lib/@openglobus/js/entity/GeoObject.d.ts +152 -0
- package/lib/@openglobus/js/entity/GeoObjectHandler.d.ts +104 -0
- package/lib/@openglobus/js/entity/Geometry.d.ts +124 -0
- package/lib/@openglobus/js/entity/GeometryHandler.d.ts +84 -0
- package/lib/@openglobus/js/entity/Label.d.ts +214 -0
- package/lib/@openglobus/js/entity/LabelHandler.d.ts +65 -0
- package/lib/@openglobus/js/entity/LabelWorker.d.ts +15 -0
- package/lib/@openglobus/js/entity/PointCloud.d.ts +179 -0
- package/lib/@openglobus/js/entity/PointCloudHandler.d.ts +42 -0
- package/lib/@openglobus/js/entity/Polyline.d.ts +345 -0
- package/lib/@openglobus/js/entity/PolylineHandler.d.ts +22 -0
- package/lib/@openglobus/js/entity/Ray.d.ts +133 -0
- package/lib/@openglobus/js/entity/RayHandler.d.ts +70 -0
- package/lib/@openglobus/js/entity/Strip.d.ts +139 -0
- package/lib/@openglobus/js/entity/StripHandler.d.ts +42 -0
- package/lib/@openglobus/js/entity/index.d.ts +10 -0
- package/lib/@openglobus/js/index.d.ts +33 -0
- package/lib/@openglobus/js/input/KeyboardHandler.d.ts +33 -0
- package/lib/@openglobus/js/input/MouseHandler.d.ts +16 -0
- package/lib/@openglobus/js/input/TouchHandler.d.ts +11 -0
- package/lib/@openglobus/js/input/input.d.ts +3 -0
- package/lib/@openglobus/js/layer/BaseGeoImage.d.ts +145 -0
- package/lib/@openglobus/js/layer/Bing.d.ts +4 -0
- package/lib/@openglobus/js/layer/CanvasTiles.d.ts +103 -0
- package/lib/@openglobus/js/layer/GeoImage.d.ts +61 -0
- package/lib/@openglobus/js/layer/GeoTexture2d.d.ts +17 -0
- package/lib/@openglobus/js/layer/GeoVideo.d.ts +68 -0
- package/lib/@openglobus/js/layer/KML.d.ts +72 -0
- package/lib/@openglobus/js/layer/Layer.d.ts +415 -0
- package/lib/@openglobus/js/layer/Material.d.ts +34 -0
- package/lib/@openglobus/js/layer/OpenStreetMap.d.ts +4 -0
- package/lib/@openglobus/js/layer/Vector.d.ts +246 -0
- package/lib/@openglobus/js/layer/WMS.d.ts +75 -0
- package/lib/@openglobus/js/layer/XYZ.d.ts +148 -0
- package/lib/@openglobus/js/layer/index.d.ts +12 -0
- package/lib/@openglobus/js/light/LightSource.d.ts +174 -0
- package/lib/@openglobus/js/math/Line2.d.ts +11 -0
- package/lib/@openglobus/js/math/Line3.d.ts +28 -0
- package/lib/@openglobus/js/math/Mat3.d.ts +77 -0
- package/lib/@openglobus/js/math/Mat4.d.ts +195 -0
- package/lib/@openglobus/js/math/Plane.d.ts +20 -0
- package/lib/@openglobus/js/math/Quat.d.ts +373 -0
- package/lib/@openglobus/js/math/Ray.d.ts +76 -0
- package/lib/@openglobus/js/math/Vec2.d.ts +310 -0
- package/lib/@openglobus/js/math/Vec3.d.ts +472 -0
- package/lib/@openglobus/js/math/Vec4.d.ts +163 -0
- package/lib/@openglobus/js/math/coder.d.ts +51 -0
- package/lib/@openglobus/js/math/index.d.ts +11 -0
- package/lib/@openglobus/js/math.d.ts +266 -0
- package/lib/@openglobus/js/mercator.d.ts +92 -0
- package/lib/@openglobus/js/proj/EPSG3857.d.ts +9 -0
- package/lib/@openglobus/js/proj/EPSG4326.d.ts +9 -0
- package/lib/@openglobus/js/proj/Proj.d.ts +43 -0
- package/lib/@openglobus/js/quadTree/EPSG4326QuadTreeStrategy.d.ts +6 -0
- package/lib/@openglobus/js/quadTree/EarthQuadTreeStrategy.d.ts +9 -0
- package/lib/@openglobus/js/quadTree/EntityCollectionNode.d.ts +54 -0
- package/lib/@openglobus/js/quadTree/MarsQuadTreeStrategy.d.ts +11 -0
- package/lib/@openglobus/js/quadTree/Node.d.ts +80 -0
- package/lib/@openglobus/js/quadTree/QuadTreeStrategy.d.ts +28 -0
- package/lib/@openglobus/js/quadTree/Wgs84QuadTreeStrategy.d.ts +6 -0
- package/lib/@openglobus/js/quadTree/index.d.ts +12 -0
- package/lib/@openglobus/js/quadTree/quadTree.d.ts +40 -0
- package/lib/@openglobus/js/renderer/Renderer.d.ts +319 -0
- package/lib/@openglobus/js/renderer/RendererEvents.d.ts +240 -0
- package/lib/@openglobus/js/scene/Axes.d.ts +12 -0
- package/lib/@openglobus/js/scene/BaseNode.d.ts +61 -0
- package/lib/@openglobus/js/scene/Planet.d.ts +652 -0
- package/lib/@openglobus/js/scene/RenderNode.d.ts +150 -0
- package/lib/@openglobus/js/scene/SkyBox.d.ts +13 -0
- package/lib/@openglobus/js/scene/index.d.ts +5 -0
- package/lib/@openglobus/js/segment/Segment.d.ts +288 -0
- package/lib/@openglobus/js/segment/SegmentLonLat.d.ts +44 -0
- package/lib/@openglobus/js/segment/SegmentLonLatWgs84.d.ts +10 -0
- package/lib/@openglobus/js/segment/Slice.d.ts +13 -0
- package/lib/@openglobus/js/segment/segmentHelper.d.ts +18 -0
- package/lib/@openglobus/js/shaders/atmos.d.ts +4 -0
- package/lib/@openglobus/js/shaders/billboard.d.ts +3 -0
- package/lib/@openglobus/js/shaders/bloom.d.ts +2 -0
- package/lib/@openglobus/js/shaders/blur.d.ts +3 -0
- package/lib/@openglobus/js/shaders/depth.d.ts +2 -0
- package/lib/@openglobus/js/shaders/drawnode.d.ts +8 -0
- package/lib/@openglobus/js/shaders/geoObject.d.ts +3 -0
- package/lib/@openglobus/js/shaders/label.d.ts +4 -0
- package/lib/@openglobus/js/shaders/lumFilter.d.ts +2 -0
- package/lib/@openglobus/js/shaders/pointCloud.d.ts +2 -0
- package/lib/@openglobus/js/shaders/polyline.d.ts +3 -0
- package/lib/@openglobus/js/shaders/ray.d.ts +2 -0
- package/lib/@openglobus/js/shaders/screenFrame.d.ts +2 -0
- package/lib/@openglobus/js/shaders/skybox.d.ts +2 -0
- package/lib/@openglobus/js/shaders/toneMapping.d.ts +2 -0
- package/lib/@openglobus/js/shaders/utils.d.ts +1 -0
- package/lib/@openglobus/js/terrain/BilTerrain.d.ts +18 -0
- package/lib/@openglobus/js/terrain/EmptyTerrain.d.ts +113 -0
- package/lib/@openglobus/js/terrain/Geoid.d.ts +33 -0
- package/lib/@openglobus/js/terrain/GlobusRgbTerrain.d.ts +6 -0
- package/lib/@openglobus/js/terrain/GlobusTerrain.d.ts +137 -0
- package/lib/{js/terrain/MapboxTerrain.d.ts → @openglobus/js/terrain/RgbTerrain.d.ts} +5 -5
- package/lib/@openglobus/js/terrain/index.d.ts +6 -0
- package/lib/@openglobus/js/ui/Button.d.ts +32 -0
- package/lib/@openglobus/js/ui/ButtonGroup.d.ts +16 -0
- package/lib/@openglobus/js/ui/Color.d.ts +22 -0
- package/lib/@openglobus/js/ui/Dialog.d.ts +55 -0
- package/lib/@openglobus/js/ui/Slider.d.ts +38 -0
- package/lib/@openglobus/js/ui/ToggleButton.d.ts +20 -0
- package/lib/@openglobus/js/ui/View.d.ts +37 -0
- package/lib/@openglobus/js/ui/icons.d.ts +1 -0
- package/lib/@openglobus/js/utils/BaseWorker.d.ts +14 -0
- package/lib/@openglobus/js/utils/FontAtlas.d.ts +82 -0
- package/lib/@openglobus/js/utils/GeoImageCreator.d.ts +34 -0
- package/lib/@openglobus/js/utils/ImagesCacheManager.d.ts +22 -0
- package/lib/@openglobus/js/utils/Loader.d.ts +63 -0
- package/lib/@openglobus/js/utils/NormalMapCreator.d.ts +52 -0
- package/lib/@openglobus/js/utils/PlainSegmentWorker.d.ts +24 -0
- package/lib/@openglobus/js/utils/TerrainWorker.d.ts +28 -0
- package/lib/@openglobus/js/utils/TextureAtlas.d.ts +113 -0
- package/lib/@openglobus/js/utils/VectorTileCreator.d.ts +18 -0
- package/lib/@openglobus/js/utils/colorTable.d.ts +3 -0
- package/lib/@openglobus/js/utils/earcut.d.ts +7 -0
- package/lib/@openglobus/js/utils/objParser.d.ts +24 -0
- package/lib/@openglobus/js/utils/shared.d.ts +263 -0
- package/lib/@openglobus/js/utils/units.d.ts +16 -0
- package/lib/@openglobus/js/webgl/BaseFramebuffer.d.ts +53 -0
- package/lib/@openglobus/js/webgl/Framebuffer.d.ts +69 -0
- package/lib/@openglobus/js/webgl/Handler.d.ts +473 -0
- package/lib/@openglobus/js/webgl/Multisample.d.ts +27 -0
- package/lib/@openglobus/js/webgl/Program.d.ts +159 -0
- package/lib/@openglobus/js/webgl/ProgramController.d.ts +86 -0
- package/lib/@openglobus/js/webgl/index.d.ts +6 -0
- package/lib/@openglobus/js/webgl/types.d.ts +9 -0
- package/lib/@openglobus/js/webgl/variableHandlers.d.ts +22 -0
- package/lib/@openglobus/og.css +1 -1
- package/lib/@openglobus/og.esm.js +1 -1
- package/lib/@openglobus/og.esm.js.map +1 -1
- package/lib/@openglobus/og.umd.js +1 -1
- package/lib/@openglobus/og.umd.js.map +1 -1
- package/lib/js/Extent.js +2 -2
- package/lib/js/Globe.d.ts +1 -1
- package/lib/js/Object3d.d.ts +8 -1
- package/lib/js/Object3d.js +12 -2
- package/lib/js/camera/Frustum.d.ts +1 -1
- package/lib/js/camera/Frustum.js +3 -2
- package/lib/js/control/DebugInfo.js +19 -18
- package/lib/js/control/Lighting.d.ts +4 -0
- package/lib/js/control/Lighting.js +51 -12
- package/lib/js/control/SimpleSkyBackground.d.ts +2 -0
- package/lib/js/control/SimpleSkyBackground.js +13 -3
- package/lib/js/control/drawing/PolygonDrawingScene.js +2 -2
- package/lib/js/control/visibleExtent/drawnode.js +1 -1
- package/lib/js/entity/GeoObject.d.ts +12 -3
- package/lib/js/entity/GeoObject.js +34 -2
- package/lib/js/entity/GeoObjectHandler.d.ts +5 -0
- package/lib/js/entity/GeoObjectHandler.js +47 -0
- package/lib/js/entity/Geometry.d.ts +24 -11
- package/lib/js/entity/Geometry.js +17 -9
- package/lib/js/entity/GeometryHandler.js +5 -5
- package/lib/js/entity/Label.d.ts +7 -0
- package/lib/js/entity/Label.js +11 -0
- package/lib/js/entity/Polyline.d.ts +15 -7
- package/lib/js/entity/Polyline.js +54 -6
- package/lib/js/entity/Strip.d.ts +12 -0
- package/lib/js/entity/Strip.js +16 -0
- package/lib/js/entity/StripHandler.js +1 -1
- package/lib/js/entity/index.d.ts +10 -11
- package/lib/js/entity/index.js +10 -11
- package/lib/js/index.d.ts +5 -5
- package/lib/js/index.js +5 -5
- package/lib/js/layer/Bing.d.ts +4 -0
- package/lib/js/layer/Bing.js +40 -0
- package/lib/js/layer/GeoImage.d.ts +1 -1
- package/lib/js/layer/GeoVideo.d.ts +1 -1
- package/lib/js/layer/Layer.d.ts +1 -1
- package/lib/js/layer/Layer.js +2 -2
- package/lib/js/layer/OpenStreetMap.d.ts +4 -0
- package/lib/js/layer/OpenStreetMap.js +19 -0
- package/lib/js/layer/Vector.d.ts +3 -0
- package/lib/js/layer/Vector.js +3 -3
- package/lib/js/layer/index.d.ts +12 -11
- package/lib/js/layer/index.js +12 -11
- package/lib/js/math/Mat4.js +18 -17
- package/lib/js/mercator.js +2 -1
- package/lib/js/quadTree/EPSG4326QuadTreeStrategy.js +4 -5
- package/lib/js/quadTree/EarthQuadTreeStrategy.d.ts +3 -0
- package/lib/js/quadTree/EarthQuadTreeStrategy.js +40 -5
- package/lib/js/quadTree/EntityCollectionNode.d.ts +2 -2
- package/lib/js/quadTree/EntityCollectionNode.js +13 -14
- package/lib/js/quadTree/MarsQuadTreeStrategy.d.ts +5 -0
- package/lib/js/quadTree/MarsQuadTreeStrategy.js +31 -5
- package/lib/js/quadTree/Node.d.ts +2 -1
- package/lib/js/quadTree/Node.js +38 -28
- package/lib/js/quadTree/QuadTreeStrategy.d.ts +3 -0
- package/lib/js/quadTree/QuadTreeStrategy.js +17 -0
- package/lib/js/quadTree/Wgs84QuadTreeStrategy.js +3 -3
- package/lib/js/renderer/Renderer.js +1 -0
- package/lib/js/scene/Planet.js +6 -4
- package/lib/js/segment/Segment.d.ts +12 -9
- package/lib/js/segment/Segment.js +47 -24
- package/lib/js/segment/SegmentLonLat.d.ts +1 -5
- package/lib/js/segment/SegmentLonLat.js +8 -100
- package/lib/js/segment/SegmentLonLatWgs84.js +5 -3
- package/lib/js/shaders/billboard.js +4 -4
- package/lib/js/shaders/drawnode.js +16 -19
- package/lib/js/shaders/geoObject.js +4 -5
- package/lib/js/shaders/ray.js +7 -3
- package/lib/js/terrain/BilTerrain.d.ts +1 -1
- package/lib/js/terrain/BilTerrain.js +7 -6
- package/lib/js/terrain/EmptyTerrain.d.ts +7 -0
- package/lib/js/terrain/EmptyTerrain.js +7 -0
- package/lib/js/terrain/GlobusRgbTerrain.d.ts +6 -0
- package/lib/js/terrain/GlobusRgbTerrain.js +25 -0
- package/lib/js/terrain/GlobusTerrain.d.ts +5 -5
- package/lib/js/terrain/GlobusTerrain.js +35 -30
- package/lib/js/terrain/RgbTerrain.d.ts +22 -0
- package/lib/js/terrain/RgbTerrain.js +415 -0
- package/lib/js/terrain/index.d.ts +3 -2
- package/lib/js/terrain/index.js +3 -2
- package/lib/js/ui/Color.d.ts +22 -0
- package/lib/js/ui/Color.js +58 -0
- package/lib/js/utils/GeoImageCreator.js +1 -1
- package/lib/js/utils/NormalMapCreator.js +1 -1
- package/lib/js/utils/VectorTileCreator.js +3 -3
- package/lib/js/utils/shared.d.ts +1 -8
- package/lib/js/utils/shared.js +17 -8
- package/package.json +2 -1
- package/lib/js/terrain/MapboxTerrain.js +0 -305
|
@@ -2,6 +2,14 @@ import * as utils from "../utils/shared";
|
|
|
2
2
|
import { Extent } from "../Extent";
|
|
3
3
|
import { LonLat } from "../LonLat";
|
|
4
4
|
import { Vec4 } from "../math/Vec4";
|
|
5
|
+
export var GeometryTypeEnum;
|
|
6
|
+
(function (GeometryTypeEnum) {
|
|
7
|
+
GeometryTypeEnum[GeometryTypeEnum["POINT"] = 1] = "POINT";
|
|
8
|
+
GeometryTypeEnum[GeometryTypeEnum["LINESTRING"] = 2] = "LINESTRING";
|
|
9
|
+
GeometryTypeEnum[GeometryTypeEnum["POLYGON"] = 3] = "POLYGON";
|
|
10
|
+
GeometryTypeEnum[GeometryTypeEnum["MULTIPOLYGON"] = 4] = "MULTIPOLYGON";
|
|
11
|
+
GeometryTypeEnum[GeometryTypeEnum["MULTILINESTRING"] = 5] = "MULTILINESTRING";
|
|
12
|
+
})(GeometryTypeEnum || (GeometryTypeEnum = {}));
|
|
5
13
|
const GeometryType = {
|
|
6
14
|
POINT: 1,
|
|
7
15
|
LINESTRING: 2,
|
|
@@ -33,10 +41,10 @@ class Geometry {
|
|
|
33
41
|
this._lineIndexesHandlerIndex = -1;
|
|
34
42
|
this._lineThicknessHandlerIndex = -1;
|
|
35
43
|
this._lineColorsHandlerIndex = -1;
|
|
36
|
-
this._type = (options.type && Geometry.getType(options.type)) ||
|
|
37
|
-
this._coordinates = [];
|
|
44
|
+
this._type = (options.type && Geometry.getType(options.type)) || GeometryTypeEnum.POINT;
|
|
45
|
+
this._coordinates = options.coordinates || [];
|
|
38
46
|
this._extent = Geometry.getExtent({
|
|
39
|
-
type: options.type || "
|
|
47
|
+
type: options.type || "POINT",
|
|
40
48
|
coordinates: options.coordinates || []
|
|
41
49
|
}, this._coordinates);
|
|
42
50
|
options.style = options.style || {};
|
|
@@ -70,7 +78,7 @@ class Geometry {
|
|
|
70
78
|
static getExtent(geometryObj, outCoordinates) {
|
|
71
79
|
let res = new Extent(new LonLat(180.0, 90.0), new LonLat(-180.0, -90.0));
|
|
72
80
|
let t = Geometry.getType(geometryObj.type);
|
|
73
|
-
if (t ===
|
|
81
|
+
if (t === GeometryTypeEnum.POINT) {
|
|
74
82
|
let lon = geometryObj.coordinates[0], lat = geometryObj.coordinates[1];
|
|
75
83
|
res.southWest.lon = lon;
|
|
76
84
|
res.southWest.lat = lat;
|
|
@@ -78,7 +86,7 @@ class Geometry {
|
|
|
78
86
|
res.northEast.lat = lat;
|
|
79
87
|
outCoordinates && (outCoordinates[0] = lon) && (outCoordinates[1] = lat);
|
|
80
88
|
}
|
|
81
|
-
else if (t ===
|
|
89
|
+
else if (t === GeometryTypeEnum.LINESTRING) {
|
|
82
90
|
let c = geometryObj.coordinates;
|
|
83
91
|
for (let i = 0; i < c.length; i++) {
|
|
84
92
|
let lon = c[i][0], lat = c[i][1];
|
|
@@ -93,7 +101,7 @@ class Geometry {
|
|
|
93
101
|
outCoordinates && (outCoordinates[i] = [lon, lat]);
|
|
94
102
|
}
|
|
95
103
|
}
|
|
96
|
-
else if (t ===
|
|
104
|
+
else if (t === GeometryTypeEnum.POLYGON) {
|
|
97
105
|
let c = geometryObj.coordinates;
|
|
98
106
|
for (let i = 0; i < c.length; i++) {
|
|
99
107
|
let ci = c[i];
|
|
@@ -113,7 +121,7 @@ class Geometry {
|
|
|
113
121
|
}
|
|
114
122
|
}
|
|
115
123
|
}
|
|
116
|
-
else if (t ===
|
|
124
|
+
else if (t === GeometryTypeEnum.MULTIPOLYGON) {
|
|
117
125
|
let p = geometryObj.coordinates;
|
|
118
126
|
for (let i = 0; i < p.length; i++) {
|
|
119
127
|
let pi = p[i];
|
|
@@ -137,7 +145,7 @@ class Geometry {
|
|
|
137
145
|
}
|
|
138
146
|
}
|
|
139
147
|
}
|
|
140
|
-
else if (t ===
|
|
148
|
+
else if (t === GeometryTypeEnum.MULTILINESTRING) {
|
|
141
149
|
let c = geometryObj.coordinates;
|
|
142
150
|
for (let i = 0; i < c.length; i++) {
|
|
143
151
|
let ci = c[i];
|
|
@@ -280,4 +288,4 @@ class Geometry {
|
|
|
280
288
|
}
|
|
281
289
|
}
|
|
282
290
|
Geometry.__counter__ = 0;
|
|
283
|
-
export { Geometry
|
|
291
|
+
export { Geometry };
|
|
@@ -2,7 +2,7 @@ import * as mercator from "../mercator";
|
|
|
2
2
|
import * as quadTree from "../quadTree/quadTree";
|
|
3
3
|
import { doubleToTwoFloatsV2 } from "../math/coder";
|
|
4
4
|
import { Vec2 } from "../math/Vec2";
|
|
5
|
-
import {
|
|
5
|
+
import { GeometryTypeEnum } from "./Geometry";
|
|
6
6
|
import { earcut, flatten } from "../utils/earcut";
|
|
7
7
|
const POLYVERTICES_BUFFER = 0;
|
|
8
8
|
const POLYINDEXES_BUFFER = 1;
|
|
@@ -203,7 +203,7 @@ class GeometryHandler {
|
|
|
203
203
|
geometry._lineVerticesHighMerc = [];
|
|
204
204
|
geometry._lineVerticesLowMerc = [];
|
|
205
205
|
if (geometry._coordinates[0].length) {
|
|
206
|
-
if (geometry.type ===
|
|
206
|
+
if (geometry.type === GeometryTypeEnum.POLYGON) {
|
|
207
207
|
let coordinates = geometry._coordinates;
|
|
208
208
|
let ci = [];
|
|
209
209
|
for (let j = 0; j < coordinates.length; j++) {
|
|
@@ -249,7 +249,7 @@ class GeometryHandler {
|
|
|
249
249
|
geometry._lineColorsLength = this._lineColors.length - geometry._lineColorsHandlerIndex;
|
|
250
250
|
geometry._lineThicknessLength = this._lineThickness.length - geometry._lineThicknessHandlerIndex;
|
|
251
251
|
}
|
|
252
|
-
else if (geometry.type ===
|
|
252
|
+
else if (geometry.type === GeometryTypeEnum.MULTIPOLYGON) {
|
|
253
253
|
let coordinates = geometry._coordinates;
|
|
254
254
|
let vertices = [], indexes = [];
|
|
255
255
|
// Creates polygon stroke data
|
|
@@ -303,7 +303,7 @@ class GeometryHandler {
|
|
|
303
303
|
geometry._lineColorsLength = this._lineColors.length - geometry._lineColorsHandlerIndex;
|
|
304
304
|
geometry._lineThicknessLength = this._lineThickness.length - geometry._lineThicknessHandlerIndex;
|
|
305
305
|
}
|
|
306
|
-
else if (geometry.type ===
|
|
306
|
+
else if (geometry.type === GeometryTypeEnum.LINESTRING) {
|
|
307
307
|
let coordinates = geometry._coordinates;
|
|
308
308
|
let ci = new Array(coordinates.length);
|
|
309
309
|
for (let j = 0; j < coordinates.length; j++) {
|
|
@@ -322,7 +322,7 @@ class GeometryHandler {
|
|
|
322
322
|
geometry._lineColorsLength = this._lineColors.length - geometry._lineColorsHandlerIndex;
|
|
323
323
|
geometry._lineThicknessLength = this._lineThickness.length - geometry._lineThicknessHandlerIndex;
|
|
324
324
|
}
|
|
325
|
-
else if (geometry.type ===
|
|
325
|
+
else if (geometry.type === GeometryTypeEnum.MULTILINESTRING) {
|
|
326
326
|
let coordinates = geometry._coordinates;
|
|
327
327
|
let ci = [];
|
|
328
328
|
for (let j = 0; j < coordinates.length; j++) {
|
package/lib/js/entity/Label.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export interface ILabelParams extends IBaseBillboardParams {
|
|
|
6
6
|
text?: string;
|
|
7
7
|
face?: string;
|
|
8
8
|
size?: number;
|
|
9
|
+
opacity?: number;
|
|
9
10
|
outline?: number;
|
|
10
11
|
outlineColor?: string | NumberArray4 | Vec4;
|
|
11
12
|
align?: string;
|
|
@@ -91,6 +92,12 @@ declare class Label extends BaseBillboard {
|
|
|
91
92
|
* It can't be bigger than maximum labelHandler _maxLetters value.
|
|
92
93
|
*/
|
|
93
94
|
setText(text: string): void;
|
|
95
|
+
/**
|
|
96
|
+
* Change text direction.
|
|
97
|
+
* @public
|
|
98
|
+
* @param {boolean} isRTL - Text string.
|
|
99
|
+
*/
|
|
100
|
+
setRtl(isRTL: boolean): void;
|
|
94
101
|
/**
|
|
95
102
|
* Gets current text string.
|
|
96
103
|
* @public
|
package/lib/js/entity/Label.js
CHANGED
|
@@ -63,6 +63,17 @@ class Label extends BaseBillboard {
|
|
|
63
63
|
this._handler.setText(this._handlerIndex, text, this._fontIndex, this._align, this._isRTL);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Change text direction.
|
|
68
|
+
* @public
|
|
69
|
+
* @param {boolean} isRTL - Text string.
|
|
70
|
+
*/
|
|
71
|
+
setRtl(isRTL) {
|
|
72
|
+
this._isRTL = isRTL;
|
|
73
|
+
if (this._isReady && this._handler) {
|
|
74
|
+
this._handler.setText(this._handlerIndex, this._text, this._fontIndex, this._align, this._isRTL);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
66
77
|
/**
|
|
67
78
|
* Gets current text string.
|
|
68
79
|
* @public
|
|
@@ -9,12 +9,13 @@ import { RenderNode } from "../scene/RenderNode";
|
|
|
9
9
|
import { WebGLBufferExt } from "../webgl/Handler";
|
|
10
10
|
import { TypedArray } from "../utils/shared";
|
|
11
11
|
import { Ellipsoid } from "../ellipsoid/Ellipsoid";
|
|
12
|
-
type Geodetic = LonLat | NumberArray2 | NumberArray3;
|
|
13
|
-
type Cartesian = Vec3 | NumberArray3;
|
|
14
|
-
type SegmentPath3vExt = Cartesian[];
|
|
15
|
-
type SegmentPathLonLatExt = Geodetic[];
|
|
16
|
-
type SegmentPathColor = NumberArray4[];
|
|
17
|
-
type
|
|
12
|
+
export type Geodetic = LonLat | NumberArray2 | NumberArray3;
|
|
13
|
+
export type Cartesian = Vec3 | NumberArray3;
|
|
14
|
+
export type SegmentPath3vExt = Cartesian[];
|
|
15
|
+
export type SegmentPathLonLatExt = Geodetic[];
|
|
16
|
+
export type SegmentPathColor = NumberArray4[];
|
|
17
|
+
export type SegmentPath3v = Vec3[];
|
|
18
|
+
export type SegmentPathLonLat = LonLat[];
|
|
18
19
|
export interface IPolylineParams {
|
|
19
20
|
altitude?: number;
|
|
20
21
|
thickness?: number;
|
|
@@ -138,6 +139,7 @@ declare class Polyline {
|
|
|
138
139
|
* @static
|
|
139
140
|
*/
|
|
140
141
|
static appendPoint3v(path3v: SegmentPath3vExt[], point3v: Vec3, pathColors: SegmentPathColor[], color: NumberArray4, isClosed: boolean, outVerticesHigh: number[], outVerticesLow: number[], outColors: number[], outOrders: number[], outIndexes: number[], ellipsoid: Ellipsoid | null, outTransformedPathLonLat: SegmentPathLonLatExt[], outTransformedPathMerc: LonLat[][], outExtent: Extent): void;
|
|
142
|
+
static setPathColors(pathLonLat: SegmentPathLonLatExt[], pathColors: SegmentPathColor[], defaultColor: NumberArray4, outColors: number[]): void;
|
|
141
143
|
/**
|
|
142
144
|
* Appends to the line array new geodetic coordinates line data.
|
|
143
145
|
* @static
|
|
@@ -224,6 +226,12 @@ declare class Polyline {
|
|
|
224
226
|
* @param {number} opacity - Opacity.
|
|
225
227
|
*/
|
|
226
228
|
setOpacity(opacity: number): void;
|
|
229
|
+
/**
|
|
230
|
+
* Sets Polyline thickness in screen pixels.
|
|
231
|
+
* @public
|
|
232
|
+
* @param {number} thickness - Thickness.
|
|
233
|
+
*/
|
|
234
|
+
setAltitude(altitude: number): void;
|
|
227
235
|
/**
|
|
228
236
|
* Sets Polyline thickness in screen pixels.
|
|
229
237
|
* @public
|
|
@@ -284,7 +292,7 @@ declare class Polyline {
|
|
|
284
292
|
* @todo
|
|
285
293
|
* @param {NumberArray4[][]} pathColors
|
|
286
294
|
*/
|
|
287
|
-
setPathColors(pathColors:
|
|
295
|
+
setPathColors(pathColors: SegmentPathColor[]): void;
|
|
288
296
|
/**
|
|
289
297
|
* Sets polyline color
|
|
290
298
|
* @param {string} htmlColor- HTML color
|
|
@@ -376,6 +376,44 @@ class Polyline {
|
|
|
376
376
|
outColors.push(r, g, b, a, r, g, b, a, r, g, b, a, r, g, b, a);
|
|
377
377
|
outOrders.push(1, -1, 2, -2);
|
|
378
378
|
}
|
|
379
|
+
static setPathColors(pathLonLat, pathColors, defaultColor, outColors) {
|
|
380
|
+
for (let j = 0, len = pathLonLat.length; j < len; j++) {
|
|
381
|
+
var path = pathLonLat[j], pathColors_j = pathColors[j];
|
|
382
|
+
if (path.length === 0) {
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
let color = defaultColor;
|
|
386
|
+
if (pathColors_j && pathColors_j[0]) {
|
|
387
|
+
color = pathColors_j[0];
|
|
388
|
+
}
|
|
389
|
+
let r = color[R], g = color[G], b = color[B], a = color[A] != undefined ? color[A] : 1.0;
|
|
390
|
+
if (j > 0) {
|
|
391
|
+
outColors.push(r, g, b, a, r, g, b, a, r, g, b, a, r, g, b, a);
|
|
392
|
+
}
|
|
393
|
+
for (let i = 0, len = path.length; i < len; i++) {
|
|
394
|
+
var cur = path[i];
|
|
395
|
+
if (cur instanceof Array) {
|
|
396
|
+
cur = new LonLat(cur[0], cur[1], cur[2]);
|
|
397
|
+
}
|
|
398
|
+
if (pathColors_j && pathColors_j[i]) {
|
|
399
|
+
color = pathColors_j[i];
|
|
400
|
+
}
|
|
401
|
+
r = color[R];
|
|
402
|
+
g = color[G];
|
|
403
|
+
b = color[B];
|
|
404
|
+
a = color[A] != undefined ? color[A] : 1.0;
|
|
405
|
+
outColors.push(r, g, b, a, r, g, b, a, r, g, b, a, r, g, b, a);
|
|
406
|
+
}
|
|
407
|
+
if (pathColors_j && pathColors_j[path.length - 1]) {
|
|
408
|
+
color = pathColors_j[path.length - 1];
|
|
409
|
+
}
|
|
410
|
+
r = color[R];
|
|
411
|
+
g = color[G];
|
|
412
|
+
b = color[B];
|
|
413
|
+
a = color[A] != undefined ? color[A] : 1.0;
|
|
414
|
+
outColors.push(r, g, b, a, r, g, b, a, r, g, b, a, r, g, b, a);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
379
417
|
/**
|
|
380
418
|
* Appends to the line array new geodetic coordinates line data.
|
|
381
419
|
* @static
|
|
@@ -389,10 +427,10 @@ class Polyline {
|
|
|
389
427
|
}
|
|
390
428
|
if (outIndexes.length > 0) {
|
|
391
429
|
index = outIndexes[outIndexes.length - 5] + 9;
|
|
392
|
-
outIndexes.push(index
|
|
430
|
+
outIndexes.push(index);
|
|
393
431
|
}
|
|
394
432
|
else {
|
|
395
|
-
outIndexes.push(0
|
|
433
|
+
outIndexes.push(0);
|
|
396
434
|
}
|
|
397
435
|
for (let j = 0, len = pathLonLat.length; j < len; j++) {
|
|
398
436
|
var path = pathLonLat[j], pathColors_j = pathColors[j];
|
|
@@ -1150,6 +1188,14 @@ class Polyline {
|
|
|
1150
1188
|
setOpacity(opacity) {
|
|
1151
1189
|
this._opacity = opacity;
|
|
1152
1190
|
}
|
|
1191
|
+
/**
|
|
1192
|
+
* Sets Polyline thickness in screen pixels.
|
|
1193
|
+
* @public
|
|
1194
|
+
* @param {number} thickness - Thickness.
|
|
1195
|
+
*/
|
|
1196
|
+
setAltitude(altitude) {
|
|
1197
|
+
this.altitude = altitude;
|
|
1198
|
+
}
|
|
1153
1199
|
/**
|
|
1154
1200
|
* Sets Polyline thickness in screen pixels.
|
|
1155
1201
|
* @public
|
|
@@ -1296,10 +1342,12 @@ class Polyline {
|
|
|
1296
1342
|
* @param {NumberArray4[][]} pathColors
|
|
1297
1343
|
*/
|
|
1298
1344
|
setPathColors(pathColors) {
|
|
1299
|
-
if (
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1345
|
+
if (pathColors) {
|
|
1346
|
+
this._colors = [];
|
|
1347
|
+
this._pathColors = [].concat(pathColors);
|
|
1348
|
+
Polyline.setPathColors(this._pathLonLat, pathColors, this._defaultColor, this._colors);
|
|
1349
|
+
// Mark the colors buffer as changed
|
|
1350
|
+
this._changedBuffers[COLORS_BUFFER] = true;
|
|
1303
1351
|
}
|
|
1304
1352
|
}
|
|
1305
1353
|
/**
|
package/lib/js/entity/Strip.d.ts
CHANGED
|
@@ -80,6 +80,18 @@ declare class Strip {
|
|
|
80
80
|
* @public
|
|
81
81
|
*/
|
|
82
82
|
clear(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Sets RGBA color. Each channel from 0.0 to 1.0.
|
|
85
|
+
* @public
|
|
86
|
+
* @param {Vec4} color - RGBA vector.
|
|
87
|
+
*/
|
|
88
|
+
setColor4v(color: Vec4): void;
|
|
89
|
+
/**
|
|
90
|
+
* Sets strip color.
|
|
91
|
+
* @public
|
|
92
|
+
* @param {string} color - HTML style color.
|
|
93
|
+
*/
|
|
94
|
+
setColorHTML(color: string): void;
|
|
83
95
|
setColor(r: number, g: number, b: number, a?: number): void;
|
|
84
96
|
/**
|
|
85
97
|
* Set strip opacity.
|
package/lib/js/entity/Strip.js
CHANGED
|
@@ -88,6 +88,22 @@ class Strip {
|
|
|
88
88
|
this._indexes = [];
|
|
89
89
|
this._deleteBuffers();
|
|
90
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Sets RGBA color. Each channel from 0.0 to 1.0.
|
|
93
|
+
* @public
|
|
94
|
+
* @param {Vec4} color - RGBA vector.
|
|
95
|
+
*/
|
|
96
|
+
setColor4v(color) {
|
|
97
|
+
this.setColor(color.x, color.y, color.z, color.w);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Sets strip color.
|
|
101
|
+
* @public
|
|
102
|
+
* @param {string} color - HTML style color.
|
|
103
|
+
*/
|
|
104
|
+
setColorHTML(color) {
|
|
105
|
+
this.setColor4v(utils.htmlColorToRgba(color));
|
|
106
|
+
}
|
|
91
107
|
setColor(r, g, b, a) {
|
|
92
108
|
a = a || this.color[3];
|
|
93
109
|
this.color[0] = r;
|
|
@@ -37,7 +37,7 @@ class StripHandler {
|
|
|
37
37
|
mat4 viewMatrixRTE = viewMatrix;
|
|
38
38
|
viewMatrixRTE[3] = vec4(0.0, 0.0, 0.0, 1.0);
|
|
39
39
|
|
|
40
|
-
gl_Position = projectionMatrix * viewMatrixRTE * vec4(highDiff + lowDiff, 1.0);
|
|
40
|
+
gl_Position = projectionMatrix * viewMatrixRTE * vec4(highDiff * step(1.0, length(highDiff)) + lowDiff, 1.0);
|
|
41
41
|
}`,
|
|
42
42
|
fragmentShader: `precision highp float;
|
|
43
43
|
uniform vec4 uColor;
|
package/lib/js/entity/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export { Billboard, Entity, EntityCollection, Geometry, GeoObject, Label, PointCloud, Polyline, Ray, Strip };
|
|
1
|
+
export * from "./Billboard";
|
|
2
|
+
export * from "./Entity";
|
|
3
|
+
export * from "./EntityCollection";
|
|
4
|
+
export * from "./Geometry";
|
|
5
|
+
export * from "./GeoObject";
|
|
6
|
+
export * from "./Label";
|
|
7
|
+
export * from "./PointCloud";
|
|
8
|
+
export * from "./Polyline";
|
|
9
|
+
export * from "./Ray";
|
|
10
|
+
export * from "./Strip";
|
package/lib/js/entity/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export { Billboard, Entity, EntityCollection, Geometry, GeoObject, Label, PointCloud, Polyline, Ray, Strip };
|
|
1
|
+
export * from "./Billboard";
|
|
2
|
+
export * from "./Entity";
|
|
3
|
+
export * from "./EntityCollection";
|
|
4
|
+
export * from "./Geometry";
|
|
5
|
+
export * from "./GeoObject";
|
|
6
|
+
export * from "./Label";
|
|
7
|
+
export * from "./PointCloud";
|
|
8
|
+
export * from "./Polyline";
|
|
9
|
+
export * from "./Ray";
|
|
10
|
+
export * from "./Strip";
|
package/lib/js/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import * as scene from './scene/index';
|
|
|
8
8
|
import * as terrain from './terrain/index';
|
|
9
9
|
import * as layer from './layer/index';
|
|
10
10
|
import * as webgl from './webgl/index';
|
|
11
|
-
|
|
11
|
+
export * from './Globe';
|
|
12
12
|
import { Geoid } from './terrain/Geoid';
|
|
13
13
|
import { input } from './input/input';
|
|
14
14
|
import { Ellipsoid, wgs84 } from './ellipsoid/index';
|
|
@@ -27,7 +27,7 @@ import { EarthQuadTreeStrategy, MarsQuadTreeStrategy, QuadTreeStrategy, quadTree
|
|
|
27
27
|
import { Object3d } from './Object3d';
|
|
28
28
|
import { Handler, Program, Framebuffer, Multisample } from './webgl/index';
|
|
29
29
|
import { Control } from './control/Control';
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
import { EmptyTerrain, GlobusTerrain,
|
|
33
|
-
export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, terrain, layer, webgl, Framebuffer,
|
|
30
|
+
export * from './entity/index';
|
|
31
|
+
export * from './layer/index';
|
|
32
|
+
import { EmptyTerrain, GlobusTerrain, RgbTerrain, BilTerrain, GlobusRgbTerrain } from './terrain/index';
|
|
33
|
+
export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, terrain, layer, webgl, Framebuffer, EmptyTerrain, GlobusTerrain, RgbTerrain, GlobusRgbTerrain, BilTerrain, Control, Camera, Ellipsoid, Planet, PlanetCamera, LightSource, Program, Handler, Multisample, Renderer, Clock, Events, Extent, LonLat, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, Geoid, Popup, QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, Object3d };
|
package/lib/js/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import * as scene from './scene/index';
|
|
|
8
8
|
import * as terrain from './terrain/index';
|
|
9
9
|
import * as layer from './layer/index';
|
|
10
10
|
import * as webgl from './webgl/index';
|
|
11
|
-
|
|
11
|
+
export * from './Globe';
|
|
12
12
|
import { Geoid } from './terrain/Geoid';
|
|
13
13
|
import { input } from './input/input';
|
|
14
14
|
import { Ellipsoid, wgs84 } from './ellipsoid/index';
|
|
@@ -27,7 +27,7 @@ import { EarthQuadTreeStrategy, MarsQuadTreeStrategy, QuadTreeStrategy, quadTree
|
|
|
27
27
|
import { Object3d } from './Object3d';
|
|
28
28
|
import { Handler, Program, Framebuffer, Multisample } from './webgl/index';
|
|
29
29
|
import { Control } from './control/Control';
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
import { EmptyTerrain, GlobusTerrain,
|
|
33
|
-
export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, terrain, layer, webgl, Framebuffer,
|
|
30
|
+
export * from './entity/index';
|
|
31
|
+
export * from './layer/index';
|
|
32
|
+
import { EmptyTerrain, GlobusTerrain, RgbTerrain, BilTerrain, GlobusRgbTerrain } from './terrain/index';
|
|
33
|
+
export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, terrain, layer, webgl, Framebuffer, EmptyTerrain, GlobusTerrain, RgbTerrain, GlobusRgbTerrain, BilTerrain, Control, Camera, Ellipsoid, Planet, PlanetCamera, LightSource, Program, Handler, Multisample, Renderer, Clock, Events, Extent, LonLat, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, Geoid, Popup, QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, Object3d };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { XYZ } from "./XYZ";
|
|
2
|
+
import { stringTemplate } from "../utils/shared";
|
|
3
|
+
function toQuadKey(x, y, z) {
|
|
4
|
+
var index = '';
|
|
5
|
+
for (let i = z; i > 0; i--) {
|
|
6
|
+
var b = 0;
|
|
7
|
+
var mask = 1 << (i - 1);
|
|
8
|
+
if ((x & mask) !== 0)
|
|
9
|
+
b++;
|
|
10
|
+
if ((y & mask) !== 0)
|
|
11
|
+
b += 2;
|
|
12
|
+
index += b.toString();
|
|
13
|
+
}
|
|
14
|
+
return index;
|
|
15
|
+
}
|
|
16
|
+
export class Bing extends XYZ {
|
|
17
|
+
constructor(name, options = {}) {
|
|
18
|
+
super(name || "Bing", {
|
|
19
|
+
iconSrc: "https://ecn.t0.tiles.virtualearth.net/tiles/a120.jpeg?n=z&g=7146",
|
|
20
|
+
subdomains: ['t0', 't1', 't2', 't3'],
|
|
21
|
+
url: "https://ecn.{s}.tiles.virtualearth.net/tiles/a{quad}.jpeg?n=z&g=7146",
|
|
22
|
+
isBaseLayer: true,
|
|
23
|
+
maxNativeZoom: 17,
|
|
24
|
+
defaultTextures: [{ color: "#001522" }, { color: "#E4E6F3" }],
|
|
25
|
+
attribution: `<div style="transform: scale(0.8); margin-top:-2px;"><a href="https://www.bing.com" target="_blank"><img style="position: relative; top: 2px;" title="Bing Imagery" src="https://sandcastle.cesium.com/CesiumUnminified/Assets/Images/bing_maps_credit.png"></a> © 2021 Microsoft Corporation</div>`,
|
|
26
|
+
urlRewrite: (s, u) => {
|
|
27
|
+
return stringTemplate(u, {
|
|
28
|
+
's': this._getSubdomain(),
|
|
29
|
+
'quad': toQuadKey(s.tileX, s.tileY, s.tileZoom)
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
specular: [0.00063, 0.00055, 0.00032],
|
|
33
|
+
ambient: "rgb(90,90,90)",
|
|
34
|
+
diffuse: "rgb(350,350,350)",
|
|
35
|
+
shininess: 20,
|
|
36
|
+
nightTextureCoefficient: 2.7,
|
|
37
|
+
...options
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseGeoImage, IBaseGeoImageParams } from "./BaseGeoImage";
|
|
2
2
|
import { Material } from "./Material";
|
|
3
|
-
interface IGeoImageParams extends IBaseGeoImageParams {
|
|
3
|
+
export interface IGeoImageParams extends IBaseGeoImageParams {
|
|
4
4
|
image?: HTMLImageElement | HTMLCanvasElement | ImageBitmap;
|
|
5
5
|
src?: string;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseGeoImage, IBaseGeoImageParams } from "./BaseGeoImage";
|
|
2
2
|
import { Material } from "./Material";
|
|
3
|
-
interface IGeoVideoParams extends IBaseGeoImageParams {
|
|
3
|
+
export interface IGeoVideoParams extends IBaseGeoImageParams {
|
|
4
4
|
videoElement?: HTMLVideoElement;
|
|
5
5
|
src?: string;
|
|
6
6
|
}
|
package/lib/js/layer/Layer.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ declare class Layer {
|
|
|
202
202
|
y: number;
|
|
203
203
|
z: number;
|
|
204
204
|
};
|
|
205
|
-
static getTileIndex(
|
|
205
|
+
static getTileIndex(x: number, y: number, z: number, tileGroup: number): string;
|
|
206
206
|
get instanceName(): string;
|
|
207
207
|
get rendererEvents(): EventsHandler<LayerEventsList>;
|
|
208
208
|
set opacity(opacity: number);
|
package/lib/js/layer/Layer.js
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { XYZ } from "./XYZ";
|
|
2
|
+
export class OpenStreetMap extends XYZ {
|
|
3
|
+
constructor(name, options = {}) {
|
|
4
|
+
super(name || "OpenStreetMap", {
|
|
5
|
+
iconSrc: "https://tile.openstreetmap.org/8/138/95.png",
|
|
6
|
+
url: "http://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
7
|
+
attribution: 'Data @ OpenStreetMap contributors, ODbL',
|
|
8
|
+
isBaseLayer: true,
|
|
9
|
+
maxNativeZoom: 19,
|
|
10
|
+
defaultTextures: [{ color: "#AAD3DF" }, { color: "#F2EFE9" }],
|
|
11
|
+
isSRGB: false,
|
|
12
|
+
shininess: 18,
|
|
13
|
+
specular: [0.00063, 0.00055, 0.00032],
|
|
14
|
+
ambient: [0.2, 0.2, 0.3],
|
|
15
|
+
diffuse: [0.9, 0.9, 0.7],
|
|
16
|
+
...options
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
package/lib/js/layer/Vector.d.ts
CHANGED
|
@@ -101,6 +101,9 @@ declare class Vector extends Layer {
|
|
|
101
101
|
* @public
|
|
102
102
|
*/
|
|
103
103
|
_nodeCapacity: number;
|
|
104
|
+
/**
|
|
105
|
+
* @todo: remove, or replace with node strategy
|
|
106
|
+
*/
|
|
104
107
|
protected _entityCollectionsTree: EntityCollectionNode | null;
|
|
105
108
|
protected _entityCollectionsTreeNorth: EntityCollectionNodeWGS84 | null;
|
|
106
109
|
protected _entityCollectionsTreeSouth: EntityCollectionNodeWGS84 | null;
|
package/lib/js/layer/Vector.js
CHANGED
|
@@ -449,9 +449,9 @@ class Vector extends Layer {
|
|
|
449
449
|
*/
|
|
450
450
|
_createEntityCollectionsTree(entitiesForTree) {
|
|
451
451
|
if (this._planet) {
|
|
452
|
-
this._entityCollectionsTree = new EntityCollectionNode(this, quadTree.NW, null,
|
|
453
|
-
this._entityCollectionsTreeNorth = new EntityCollectionNodeWGS84(this, quadTree.NW, null,
|
|
454
|
-
this._entityCollectionsTreeSouth = new EntityCollectionNodeWGS84(this, quadTree.NW, null,
|
|
452
|
+
this._entityCollectionsTree = new EntityCollectionNode(this, quadTree.NW, null, Extent.createFromArray([-20037508.34, -20037508.34, 20037508.34, 20037508.34]), this._planet, 0);
|
|
453
|
+
this._entityCollectionsTreeNorth = new EntityCollectionNodeWGS84(this, quadTree.NW, null, Extent.createFromArray([-180, mercator.MAX_LAT, 180, 90]), this._planet, 0);
|
|
454
|
+
this._entityCollectionsTreeSouth = new EntityCollectionNodeWGS84(this, quadTree.NW, null, Extent.createFromArray([-180, -90, 180, mercator.MIN_LAT]), this._planet, 0);
|
|
455
455
|
for (let i = 0, len = entitiesForTree.length; i < len; i++) {
|
|
456
456
|
let entity = entitiesForTree[i];
|
|
457
457
|
// north tree
|
package/lib/js/layer/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
1
|
+
export * from './CanvasTiles';
|
|
2
|
+
export * from './GeoImage';
|
|
3
|
+
export * from './GeoTexture2d';
|
|
4
|
+
export * from './GeoVideo';
|
|
5
|
+
export * from './KML';
|
|
6
|
+
export * from './Layer';
|
|
7
|
+
export * from './Vector';
|
|
8
|
+
export * from './WMS';
|
|
9
|
+
export * from './XYZ';
|
|
10
|
+
export * from './Material';
|
|
11
|
+
export * from './OpenStreetMap';
|
|
12
|
+
export * from './Bing';
|
package/lib/js/layer/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
1
|
+
export * from './CanvasTiles';
|
|
2
|
+
export * from './GeoImage';
|
|
3
|
+
export * from './GeoTexture2d';
|
|
4
|
+
export * from './GeoVideo';
|
|
5
|
+
export * from './KML';
|
|
6
|
+
export * from './Layer';
|
|
7
|
+
export * from './Vector';
|
|
8
|
+
export * from './WMS';
|
|
9
|
+
export * from './XYZ';
|
|
10
|
+
export * from './Material';
|
|
11
|
+
export * from './OpenStreetMap';
|
|
12
|
+
export * from './Bing';
|