@openglobus/og 0.19.3 → 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} +6 -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 +16 -1
- package/lib/js/Object3d.js +66 -1
- package/lib/js/astro/jd.js +26 -26
- 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/timeline/timelineUtils.js +32 -32
- package/lib/js/control/visibleExtent/drawnode.js +1 -1
- package/lib/js/entity/GeoObject.d.ts +20 -6
- package/lib/js/entity/GeoObject.js +44 -4
- package/lib/js/entity/GeoObjectHandler.d.ts +6 -1
- package/lib/js/entity/GeoObjectHandler.js +58 -6
- 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/Axes.js +4 -4
- 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 +10 -11
- 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/objParser.js +3 -3
- package/lib/js/utils/shared.d.ts +3 -9
- package/lib/js/utils/shared.js +24 -9
- package/package.json +26 -18
- package/lib/js/terrain/MapboxTerrain.js +0 -298
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';
|
package/lib/js/math/Mat4.js
CHANGED
|
@@ -384,23 +384,24 @@ export class Mat4 {
|
|
|
384
384
|
* @returns {Mat4} -
|
|
385
385
|
*/
|
|
386
386
|
setPerspective(left, right, bottom, top, near, far) {
|
|
387
|
-
let h = right - left, i = top - bottom, j =
|
|
388
|
-
this._m
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
387
|
+
let h = right - left, i = top - bottom, j = near - far, n2 = 2 * near;
|
|
388
|
+
let mm = this._m;
|
|
389
|
+
mm[0] = n2 / h;
|
|
390
|
+
mm[1] = 0;
|
|
391
|
+
mm[2] = 0;
|
|
392
|
+
mm[3] = 0;
|
|
393
|
+
mm[4] = 0;
|
|
394
|
+
mm[5] = n2 / i;
|
|
395
|
+
mm[6] = 0;
|
|
396
|
+
mm[7] = 0;
|
|
397
|
+
mm[8] = (right + left) / h;
|
|
398
|
+
mm[9] = (top + bottom) / i;
|
|
399
|
+
mm[10] = (far + near) / j;
|
|
400
|
+
mm[11] = -1;
|
|
401
|
+
mm[12] = 0;
|
|
402
|
+
mm[13] = 0;
|
|
403
|
+
mm[14] = (n2 * far) / j;
|
|
404
|
+
mm[15] = 0;
|
|
404
405
|
return this;
|
|
405
406
|
}
|
|
406
407
|
/**
|
package/lib/js/mercator.js
CHANGED
|
@@ -102,7 +102,8 @@ export function forwardArray(lonlatArr) {
|
|
|
102
102
|
return res;
|
|
103
103
|
}
|
|
104
104
|
export function getTileExtent(x, y, z) {
|
|
105
|
-
let size = POLE2 / Math.pow(2, z),
|
|
105
|
+
let size = POLE2 / (1 << z), //Math.pow(2, z),
|
|
106
|
+
sw = new LonLat(-POLE + x * size, POLE - y * size - size);
|
|
106
107
|
return new Extent(sw, new LonLat(sw.lon + size, sw.lat + size));
|
|
107
108
|
}
|
|
108
109
|
/**
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as quadTree from "../quadTree/quadTree";
|
|
2
1
|
import { Extent } from "../Extent";
|
|
3
2
|
import { EPSG4326 } from "../proj/EPSG4326";
|
|
4
3
|
import { Node } from "../quadTree/Node";
|
|
@@ -9,9 +8,9 @@ export class EPSG4326QuadTreeStrategy extends QuadTreeStrategy {
|
|
|
9
8
|
super(planet, "EPSG4326", EPSG4326);
|
|
10
9
|
}
|
|
11
10
|
init() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
this._quadTreeList = [
|
|
12
|
+
new Node(SegmentLonLatWgs84, this.planet, 0, null, 0, Extent.createFromArray([-180, -90, 0, 90])),
|
|
13
|
+
new Node(SegmentLonLatWgs84, this.planet, 0, null, 0, Extent.createFromArray([0, -90, 180, 90]))
|
|
14
|
+
];
|
|
16
15
|
}
|
|
17
16
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Planet } from "../scene/Planet";
|
|
2
2
|
import { QuadTreeStrategy } from "./QuadTreeStrategy";
|
|
3
|
+
import { LonLat } from "../LonLat";
|
|
3
4
|
export declare class EarthQuadTreeStrategy extends QuadTreeStrategy {
|
|
4
5
|
constructor(planet: Planet);
|
|
5
6
|
init(): void;
|
|
7
|
+
getTileXY(lonLat: LonLat, zoom: number): [number, number, number, number];
|
|
8
|
+
getLonLatTileOffset(lonLat: LonLat, x: number, y: number, z: number, gridSize: number): [number, number];
|
|
6
9
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as mercator from "../mercator";
|
|
2
|
-
import * as quadTree from "../quadTree/quadTree";
|
|
3
2
|
import { Extent } from "../Extent";
|
|
4
3
|
import { Node } from "../quadTree/Node";
|
|
5
4
|
import { QuadTreeStrategy } from "./QuadTreeStrategy";
|
|
6
|
-
import { Segment } from "../segment/Segment";
|
|
5
|
+
import { Segment, TILEGROUP_NORTH, TILEGROUP_SOUTH, getTileGroupByLat, getTileCellExtent, getTileCellIndex } from "../segment/Segment";
|
|
7
6
|
import { SegmentLonLat } from "../segment/SegmentLonLat";
|
|
8
7
|
export class EarthQuadTreeStrategy extends QuadTreeStrategy {
|
|
9
8
|
constructor(planet) {
|
|
@@ -11,9 +10,45 @@ export class EarthQuadTreeStrategy extends QuadTreeStrategy {
|
|
|
11
10
|
}
|
|
12
11
|
init() {
|
|
13
12
|
this._quadTreeList = [
|
|
14
|
-
new Node(Segment, this.planet,
|
|
15
|
-
new Node(SegmentLonLat, this.planet,
|
|
16
|
-
new Node(SegmentLonLat, this.planet,
|
|
13
|
+
new Node(Segment, this.planet, 0, null, 0, Extent.createFromArray([-20037508.34, -20037508.34, 20037508.34, 20037508.34])),
|
|
14
|
+
new Node(SegmentLonLat, this.planet, 0, null, 0, Extent.createFromArray([-180, mercator.MAX_LAT, 180, 90])),
|
|
15
|
+
new Node(SegmentLonLat, this.planet, 0, null, 0, Extent.createFromArray([-180, -90, 180, mercator.MIN_LAT]))
|
|
17
16
|
];
|
|
18
17
|
}
|
|
18
|
+
getTileXY(lonLat, zoom) {
|
|
19
|
+
let tileGroup = getTileGroupByLat(lonLat.lat, mercator.MAX_LAT), z = zoom, x = -1, y = -1, pz = (1 << z) /*Math.pow(2, z)*/;
|
|
20
|
+
if (tileGroup === TILEGROUP_NORTH) {
|
|
21
|
+
x = getTileCellIndex(lonLat.lon, 360 / pz, -180);
|
|
22
|
+
y = getTileCellIndex(lonLat.lat, (90 - mercator.MAX_LAT) / pz, 90);
|
|
23
|
+
}
|
|
24
|
+
else if (tileGroup === TILEGROUP_SOUTH) {
|
|
25
|
+
x = getTileCellIndex(lonLat.lon, 360 / pz, -180);
|
|
26
|
+
y = getTileCellIndex(lonLat.lat, (90 - mercator.MAX_LAT) / pz, mercator.MIN_LAT);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
let merc = mercator.forward(lonLat);
|
|
30
|
+
x = getTileCellIndex(merc.lon, mercator.POLE2 / pz, -mercator.POLE);
|
|
31
|
+
y = getTileCellIndex(merc.lat, mercator.POLE2 / pz, mercator.POLE);
|
|
32
|
+
}
|
|
33
|
+
return [x, y, z, tileGroup];
|
|
34
|
+
}
|
|
35
|
+
getLonLatTileOffset(lonLat, x, y, z, gridSize) {
|
|
36
|
+
let coords = lonLat;
|
|
37
|
+
let extent = new Extent();
|
|
38
|
+
if (lonLat.lat > mercator.MAX_LAT) {
|
|
39
|
+
let worldExtent = Extent.createFromArray([-180, mercator.MAX_LAT, 180, 90]);
|
|
40
|
+
extent = getTileCellExtent(x, y, z, worldExtent);
|
|
41
|
+
}
|
|
42
|
+
else if (lonLat.lat < mercator.MIN_LAT) {
|
|
43
|
+
let worldExtent = Extent.createFromArray([-180, -90, 180, mercator.MIN_LAT]);
|
|
44
|
+
extent = getTileCellExtent(x, y, z, worldExtent);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
coords = mercator.forward(lonLat);
|
|
48
|
+
extent = mercator.getTileExtent(x, y, z);
|
|
49
|
+
}
|
|
50
|
+
let sizeImgW = extent.getWidth() / (gridSize - 1), sizeImgH = extent.getHeight() / (gridSize - 1);
|
|
51
|
+
let i = gridSize - Math.ceil((coords.lat - extent.southWest.lat) / sizeImgH) - 1, j = Math.floor((coords.lon - extent.southWest.lon) / sizeImgW);
|
|
52
|
+
return [i, j];
|
|
53
|
+
}
|
|
19
54
|
}
|
|
@@ -25,7 +25,7 @@ declare class EntityCollectionNode {
|
|
|
25
25
|
zoom: number;
|
|
26
26
|
bsphere: Sphere;
|
|
27
27
|
_inTheQueue: boolean;
|
|
28
|
-
constructor(layer: Vector, partId: number, parent: EntityCollectionNode | null,
|
|
28
|
+
constructor(layer: Vector, partId: number, parent: EntityCollectionNode | null, extent: Extent, planet: Planet, zoom: number);
|
|
29
29
|
insertEntity(entity: Entity, rightNow?: boolean): void;
|
|
30
30
|
protected _addEntitiesToCollection(entities: Entity[], rightNow?: boolean): void;
|
|
31
31
|
protected _setExtentBounds(): void;
|
|
@@ -43,7 +43,7 @@ declare class EntityCollectionNode {
|
|
|
43
43
|
}
|
|
44
44
|
declare class EntityCollectionNodeWGS84 extends EntityCollectionNode {
|
|
45
45
|
isNorth: boolean;
|
|
46
|
-
constructor(layer: Vector, partId: number, parent: EntityCollectionNodeWGS84 | null,
|
|
46
|
+
constructor(layer: Vector, partId: number, parent: EntityCollectionNodeWGS84 | null, extent: Extent, planet: Planet, zoom: number);
|
|
47
47
|
createChildrenNodes(): void;
|
|
48
48
|
protected _setExtentBounds(): void;
|
|
49
49
|
__setLonLat__(entity: Entity): LonLat;
|
|
@@ -9,12 +9,13 @@ import { Vec3 } from '../math/Vec3';
|
|
|
9
9
|
* @todo: remove planet parameter. It's already available in the layer.
|
|
10
10
|
*/
|
|
11
11
|
class EntityCollectionNode {
|
|
12
|
-
constructor(layer, partId, parent,
|
|
12
|
+
constructor(layer, partId, parent, extent, planet, zoom) {
|
|
13
13
|
this.layer = layer;
|
|
14
14
|
this.parentNode = parent;
|
|
15
15
|
this.childrenNodes = [];
|
|
16
16
|
this.partId = partId;
|
|
17
|
-
this.nodeId = partId + id;
|
|
17
|
+
//this.nodeId = partId + id;
|
|
18
|
+
this.nodeId = partId + (parent ? parent.nodeId * 4 + 1 : 0);
|
|
18
19
|
this.state = null;
|
|
19
20
|
this.extent = extent;
|
|
20
21
|
this.count = 0;
|
|
@@ -125,15 +126,14 @@ class EntityCollectionNode {
|
|
|
125
126
|
const size_y = ext.getHeight() * 0.5;
|
|
126
127
|
const ne = ext.northEast;
|
|
127
128
|
const sw = ext.southWest;
|
|
128
|
-
const id = this.nodeId * 4 + 1;
|
|
129
129
|
const c = new LonLat(sw.lon + size_x, sw.lat + size_y);
|
|
130
130
|
const nd = this.childrenNodes;
|
|
131
131
|
const p = this.layer._planet;
|
|
132
132
|
const z = this.zoom + 1;
|
|
133
|
-
nd[NW] = new EntityCollectionNode(l, NW, this,
|
|
134
|
-
nd[NE] = new EntityCollectionNode(l, NE, this,
|
|
135
|
-
nd[SW] = new EntityCollectionNode(l, SW, this,
|
|
136
|
-
nd[SE] = new EntityCollectionNode(l, SE, this,
|
|
133
|
+
nd[NW] = new EntityCollectionNode(l, NW, this, new Extent(new LonLat(sw.lon, sw.lat + size_y), new LonLat(sw.lon + size_x, ne.lat)), p, z);
|
|
134
|
+
nd[NE] = new EntityCollectionNode(l, NE, this, new Extent(c, new LonLat(ne.lon, ne.lat)), p, z);
|
|
135
|
+
nd[SW] = new EntityCollectionNode(l, SW, this, new Extent(new LonLat(sw.lon, sw.lat), c), p, z);
|
|
136
|
+
nd[SE] = new EntityCollectionNode(l, SE, this, new Extent(new LonLat(sw.lon + size_x, sw.lat), new LonLat(ne.lon, sw.lat + size_y)), p, z);
|
|
137
137
|
}
|
|
138
138
|
collectRenderCollectionsPASS1(visibleNodes, outArr) {
|
|
139
139
|
const n = visibleNodes[this.nodeId];
|
|
@@ -258,8 +258,8 @@ class EntityCollectionNode {
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
class EntityCollectionNodeWGS84 extends EntityCollectionNode {
|
|
261
|
-
constructor(layer, partId, parent,
|
|
262
|
-
super(layer, partId, parent,
|
|
261
|
+
constructor(layer, partId, parent, extent, planet, zoom) {
|
|
262
|
+
super(layer, partId, parent, extent, planet, zoom);
|
|
263
263
|
this.isNorth = false;
|
|
264
264
|
}
|
|
265
265
|
createChildrenNodes() {
|
|
@@ -269,15 +269,14 @@ class EntityCollectionNodeWGS84 extends EntityCollectionNode {
|
|
|
269
269
|
const size_y = ext.getHeight() * 0.5;
|
|
270
270
|
const ne = ext.northEast;
|
|
271
271
|
const sw = ext.southWest;
|
|
272
|
-
const id = this.nodeId * 4 + 1;
|
|
273
272
|
const c = new LonLat(sw.lon + size_x, sw.lat + size_y);
|
|
274
273
|
const nd = this.childrenNodes;
|
|
275
274
|
const p = this.layer._planet;
|
|
276
275
|
const z = this.zoom + 1;
|
|
277
|
-
nd[NW] = new EntityCollectionNodeWGS84(l, NW, this,
|
|
278
|
-
nd[NE] = new EntityCollectionNodeWGS84(l, NE, this,
|
|
279
|
-
nd[SW] = new EntityCollectionNodeWGS84(l, SW, this,
|
|
280
|
-
nd[SE] = new EntityCollectionNodeWGS84(l, SE, this,
|
|
276
|
+
nd[NW] = new EntityCollectionNodeWGS84(l, NW, this, new Extent(new LonLat(sw.lon, sw.lat + size_y), new LonLat(sw.lon + size_x, ne.lat)), p, z);
|
|
277
|
+
nd[NE] = new EntityCollectionNodeWGS84(l, NE, this, new Extent(c, new LonLat(ne.lon, ne.lat)), p, z);
|
|
278
|
+
nd[SW] = new EntityCollectionNodeWGS84(l, SW, this, new Extent(new LonLat(sw.lon, sw.lat), c), p, z);
|
|
279
|
+
nd[SE] = new EntityCollectionNodeWGS84(l, SE, this, new Extent(new LonLat(sw.lon + size_x, sw.lat), new LonLat(ne.lon, sw.lat + size_y)), p, z);
|
|
281
280
|
}
|
|
282
281
|
_setExtentBounds() {
|
|
283
282
|
if (this.extent.northEast.lat > 0) {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Planet } from "../scene/Planet";
|
|
2
2
|
import { QuadTreeStrategy } from "./QuadTreeStrategy";
|
|
3
|
+
import { LonLat } from "../LonLat";
|
|
3
4
|
export declare class MarsQuadTreeStrategy extends QuadTreeStrategy {
|
|
5
|
+
private _westExtent;
|
|
6
|
+
private _eastExtent;
|
|
4
7
|
constructor(planet: Planet);
|
|
5
8
|
init(): void;
|
|
9
|
+
getTileXY(lonLat: LonLat, zoom: number): [number, number, number, number];
|
|
10
|
+
getLonLatTileOffset(lonLat: LonLat, x: number, y: number, z: number, gridSize: number): [number, number];
|
|
6
11
|
}
|
|
@@ -1,17 +1,43 @@
|
|
|
1
|
-
import * as quadTree from "../quadTree/quadTree";
|
|
2
1
|
import { Extent } from "../Extent";
|
|
3
2
|
import { EPSG4326 } from "../proj/EPSG4326";
|
|
4
3
|
import { Node } from "../quadTree/Node";
|
|
5
4
|
import { SegmentLonLatWgs84 } from "../segment/SegmentLonLatWgs84";
|
|
6
5
|
import { QuadTreeStrategy } from "./QuadTreeStrategy";
|
|
6
|
+
import { getTileCellExtent, getTileCellIndex, TILEGROUP_COMMON } from "../segment/Segment";
|
|
7
7
|
export class MarsQuadTreeStrategy extends QuadTreeStrategy {
|
|
8
8
|
constructor(planet) {
|
|
9
9
|
super(planet, "Mars", EPSG4326);
|
|
10
|
+
this._westExtent = Extent.createFromArray([-180, -90, 0, 90]);
|
|
11
|
+
this._eastExtent = Extent.createFromArray([0, -90, 180, 90]);
|
|
10
12
|
}
|
|
11
13
|
init() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
this._quadTreeList = [
|
|
15
|
+
new Node(SegmentLonLatWgs84, this.planet, 0, null, 0, this._westExtent),
|
|
16
|
+
new Node(SegmentLonLatWgs84, this.planet, 0, null, 0, this._eastExtent)
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
getTileXY(lonLat, zoom) {
|
|
20
|
+
let z = zoom, x = -1, y = -1, pz = (1 << z);
|
|
21
|
+
if (lonLat.lon > 0) {
|
|
22
|
+
x = getTileCellIndex(lonLat.lon, 180 / pz, 0) + pz;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
x = getTileCellIndex(lonLat.lon, 180 / pz, -180);
|
|
26
|
+
}
|
|
27
|
+
y = getTileCellIndex(lonLat.lat, 180 / pz, 90);
|
|
28
|
+
return [x, y, z, TILEGROUP_COMMON];
|
|
29
|
+
}
|
|
30
|
+
getLonLatTileOffset(lonLat, x, y, z, gridSize) {
|
|
31
|
+
let coords = lonLat;
|
|
32
|
+
let extent = new Extent();
|
|
33
|
+
if (lonLat.lon > 0) {
|
|
34
|
+
extent = getTileCellExtent(x - (1 << z), y, z, this._westExtent);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
extent = getTileCellExtent(x, y, z, this._eastExtent);
|
|
38
|
+
}
|
|
39
|
+
let sizeImgW = extent.getWidth() / (gridSize - 1), sizeImgH = extent.getHeight() / (gridSize - 1);
|
|
40
|
+
let i = gridSize - Math.ceil((coords.lat - extent.southWest.lat) / sizeImgH) - 1, j = Math.floor((coords.lon - extent.southWest.lon) / sizeImgW);
|
|
41
|
+
return [i, j];
|
|
16
42
|
}
|
|
17
43
|
}
|
|
@@ -14,6 +14,7 @@ import { PlanetCamera } from "../camera/PlanetCamera";
|
|
|
14
14
|
* @param {Extent} extent - Planet segment extent.
|
|
15
15
|
*/
|
|
16
16
|
declare class Node {
|
|
17
|
+
__id: number;
|
|
17
18
|
SegmentPrototype: typeof Segment;
|
|
18
19
|
planet: Planet;
|
|
19
20
|
parentNode: Node | null;
|
|
@@ -31,7 +32,7 @@ declare class Node {
|
|
|
31
32
|
_cameraInside: boolean;
|
|
32
33
|
inFrustum: number;
|
|
33
34
|
_fadingNodes: Node[];
|
|
34
|
-
constructor(SegmentPrototype: typeof Segment, planet: Planet, partId: number, parent: Node | null,
|
|
35
|
+
constructor(SegmentPrototype: typeof Segment, planet: Planet, partId: number, parent: Node | null, tileZoom: number, extent: Extent);
|
|
35
36
|
createChildrenNodes(): void;
|
|
36
37
|
createBounds(): void;
|
|
37
38
|
getState(): number | null;
|