@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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Control, IControlParams } from "./Control";
|
|
2
|
+
import { Dialog } from "../ui/Dialog";
|
|
3
|
+
import { Layer } from "../layer/Layer";
|
|
4
|
+
import { ToggleButton } from "../ui/ToggleButton";
|
|
5
|
+
import { IViewParams, View } from "../ui/View";
|
|
6
|
+
interface ILayerSwitcherParams extends IControlParams {
|
|
7
|
+
}
|
|
8
|
+
declare class LayerButtonView extends View<Layer> {
|
|
9
|
+
constructor(params: IViewParams);
|
|
10
|
+
render(params?: any): this;
|
|
11
|
+
protected _onVisibilityChange: (layer: Layer) => void;
|
|
12
|
+
protected _onClick: () => void;
|
|
13
|
+
protected _onDblClick: () => void;
|
|
14
|
+
remove(): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Advanced :) layer switcher, includes base layers, overlays, geo images etc. groups.
|
|
18
|
+
* Double click for zoom, drag-and-drop to change zIndex
|
|
19
|
+
*/
|
|
20
|
+
export declare class LayerSwitcher extends Control {
|
|
21
|
+
protected _dialog: Dialog<null>;
|
|
22
|
+
protected _toggleBtn: ToggleButton;
|
|
23
|
+
protected _panel: View<null>;
|
|
24
|
+
$baseLayers: HTMLElement | null;
|
|
25
|
+
$overlays: HTMLElement | null;
|
|
26
|
+
_layerViews: LayerButtonView[];
|
|
27
|
+
constructor(options?: ILayerSwitcherParams);
|
|
28
|
+
oninit(): void;
|
|
29
|
+
protected _initLayers(): void;
|
|
30
|
+
protected _createLayerButton(layer: Layer): LayerButtonView;
|
|
31
|
+
addLayer: (layer: Layer) => void;
|
|
32
|
+
removeLayer: (layer: Layer) => void;
|
|
33
|
+
onactivate(): void;
|
|
34
|
+
ondeactivate(): void;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Control, IControlParams } from "./Control";
|
|
2
|
+
import { Dialog } from '../ui/Dialog';
|
|
3
|
+
import { Layer } from "../layer/Layer";
|
|
4
|
+
import { Slider } from "../ui/Slider";
|
|
5
|
+
import { ToggleButton } from "../ui/ToggleButton";
|
|
6
|
+
import { View } from '../ui/View';
|
|
7
|
+
import { Color } from "../ui/Color";
|
|
8
|
+
interface ILightingParams extends IControlParams {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Helps to set up lighting.
|
|
12
|
+
*/
|
|
13
|
+
export declare class Lighting extends Control {
|
|
14
|
+
protected _selectedLayer: Layer | null;
|
|
15
|
+
protected _toggleBtn: ToggleButton;
|
|
16
|
+
protected _dialog: Dialog<null>;
|
|
17
|
+
protected _panel: View<null>;
|
|
18
|
+
protected _atmosphereMaxOpacity: Slider;
|
|
19
|
+
protected _atmosphereMinOpacity: Slider;
|
|
20
|
+
protected _simpleSkyBackgroundColorOne: Color;
|
|
21
|
+
protected _simpleSkyBackgroundColorTwo: Color;
|
|
22
|
+
protected _gamma: Slider;
|
|
23
|
+
protected _exposure: Slider;
|
|
24
|
+
protected _night: Slider;
|
|
25
|
+
protected _opacity: Slider;
|
|
26
|
+
protected _diffuse_r: Slider;
|
|
27
|
+
protected _diffuse_g: Slider;
|
|
28
|
+
protected _diffuse_b: Slider;
|
|
29
|
+
protected _ambient_r: Slider;
|
|
30
|
+
protected _ambient_g: Slider;
|
|
31
|
+
protected _ambient_b: Slider;
|
|
32
|
+
protected _specular_r: Slider;
|
|
33
|
+
protected _specular_g: Slider;
|
|
34
|
+
protected _specular_b: Slider;
|
|
35
|
+
protected _shininess: Slider;
|
|
36
|
+
$gamma: HTMLElement | null;
|
|
37
|
+
$exposure: HTMLElement | null;
|
|
38
|
+
$night: HTMLElement | null;
|
|
39
|
+
$opacity: HTMLElement | null;
|
|
40
|
+
$diffuse: HTMLElement | null;
|
|
41
|
+
$ambient: HTMLElement | null;
|
|
42
|
+
$specular: HTMLElement | null;
|
|
43
|
+
$atmosphereOpacity: HTMLElement | null;
|
|
44
|
+
$simpleSkyBackground: HTMLElement | null;
|
|
45
|
+
constructor(options?: ILightingParams);
|
|
46
|
+
bindLayer(layer: Layer): void;
|
|
47
|
+
oninit(): void;
|
|
48
|
+
protected _update(): void;
|
|
49
|
+
protected _fetchLayers(): void;
|
|
50
|
+
protected _onLayerAdd(e: Layer): void;
|
|
51
|
+
protected _onLayerRemove(e: Layer): void;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Control, IControlParams } from "./Control";
|
|
2
|
+
import { Key } from "../Lock";
|
|
3
|
+
import { Quat } from "../math/Quat";
|
|
4
|
+
import { Sphere } from "../bv/Sphere";
|
|
5
|
+
import { Vec3 } from "../math/Vec3";
|
|
6
|
+
import { Vec2 } from "../math/Vec2";
|
|
7
|
+
import { Planet } from "../scene/Planet";
|
|
8
|
+
import { PlanetCamera } from "../camera/PlanetCamera";
|
|
9
|
+
import { IMouseState } from "../renderer/RendererEvents";
|
|
10
|
+
export interface IStepForward {
|
|
11
|
+
eye: Vec3;
|
|
12
|
+
v: Vec3;
|
|
13
|
+
u: Vec3;
|
|
14
|
+
n: Vec3;
|
|
15
|
+
}
|
|
16
|
+
interface IMouseNavigationParams extends IControlParams {
|
|
17
|
+
minSlope?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Mouse planet camera dragging control.
|
|
21
|
+
*/
|
|
22
|
+
export declare class MouseNavigation extends Control {
|
|
23
|
+
protected grabbedPoint: Vec3;
|
|
24
|
+
protected _eye0: Vec3;
|
|
25
|
+
protected pointOnEarth: Vec3;
|
|
26
|
+
protected earthUp: Vec3;
|
|
27
|
+
inertia: number;
|
|
28
|
+
protected grabbedSpheroid: Sphere;
|
|
29
|
+
protected qRot: Quat;
|
|
30
|
+
protected scaleRot: number;
|
|
31
|
+
protected distDiff: number;
|
|
32
|
+
protected stepsCount: number;
|
|
33
|
+
protected stepsForward: IStepForward[] | null;
|
|
34
|
+
protected stepIndex: number;
|
|
35
|
+
protected _lmbDoubleClickActive: boolean;
|
|
36
|
+
minSlope: number;
|
|
37
|
+
protected _wheelDirection: number;
|
|
38
|
+
protected _keyLock: Key;
|
|
39
|
+
protected _deactivate: boolean;
|
|
40
|
+
protected _shiftBusy: boolean;
|
|
41
|
+
constructor(options?: IMouseNavigationParams);
|
|
42
|
+
static getMovePointsFromPixelTerrain(cam: PlanetCamera, planet: Planet, stepsCount: number, delta: number, point: Vec2, forward: boolean, dir?: Vec3 | null): IStepForward[] | undefined;
|
|
43
|
+
onactivate(): void;
|
|
44
|
+
ondeactivate(): void;
|
|
45
|
+
activateDoubleClickZoom(): void;
|
|
46
|
+
deactivateDoubleClickZoom(): void;
|
|
47
|
+
protected onMouseEnter(e: IMouseState): void;
|
|
48
|
+
protected onMouseLeave(): void;
|
|
49
|
+
protected onMouseWheel(e: IMouseState): void;
|
|
50
|
+
oninit(): void;
|
|
51
|
+
protected onMouseLeftButtonDoubleClick(e: IMouseState): void;
|
|
52
|
+
protected onMouseLeftButtonClick(): void;
|
|
53
|
+
stopRotation(): void;
|
|
54
|
+
protected onMouseLeftButtonUp(e: IMouseState): void;
|
|
55
|
+
protected onMouseLeftButtonDown(e: IMouseState): void;
|
|
56
|
+
protected onMouseRightButtonClick(e: IMouseState): void;
|
|
57
|
+
protected onMouseRightButtonDown(e: IMouseState): void;
|
|
58
|
+
onShiftFree(): void;
|
|
59
|
+
protected onMouseMove(e: IMouseState): void;
|
|
60
|
+
protected onDraw(): void;
|
|
61
|
+
lockPlanet(skipTerrain?: boolean): void;
|
|
62
|
+
freePlanet(): void;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Sphere } from "../bv/Sphere";
|
|
2
|
+
import { Key } from "../Lock";
|
|
3
|
+
import { Quat } from "../math/Quat";
|
|
4
|
+
import { Vec3 } from "../math/Vec3";
|
|
5
|
+
import { Control, IControlParams } from "./Control";
|
|
6
|
+
import { IStepForward } from "./MouseNavigation";
|
|
7
|
+
interface IMouseWheelZoomControl extends IControlParams {
|
|
8
|
+
minSlope?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class MouseWheelZoomControl extends Control {
|
|
11
|
+
protected grabbedPoint: Vec3;
|
|
12
|
+
protected _eye0: Vec3;
|
|
13
|
+
protected pointOnEarth: Vec3;
|
|
14
|
+
protected earthUp: Vec3;
|
|
15
|
+
inertia: number;
|
|
16
|
+
protected grabbedSpheroid: Sphere;
|
|
17
|
+
protected qRot: Quat;
|
|
18
|
+
protected scaleRot: number;
|
|
19
|
+
protected distDiff: number;
|
|
20
|
+
protected stepsCount: number;
|
|
21
|
+
protected stepsForward: IStepForward[] | null;
|
|
22
|
+
protected stepIndex: number;
|
|
23
|
+
protected _lmbDoubleClickActive: boolean;
|
|
24
|
+
protected minSlope: number;
|
|
25
|
+
protected _keyLock: Key;
|
|
26
|
+
protected _deactivate: boolean;
|
|
27
|
+
protected _move: number;
|
|
28
|
+
constructor(options?: IMouseWheelZoomControl);
|
|
29
|
+
oninit(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Planet zoom in.
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
zoomIn(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Planet zoom out.
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
zoomOut(): void;
|
|
40
|
+
stopRotation(): void;
|
|
41
|
+
stopZoom(): void;
|
|
42
|
+
protected _draw(): void;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Control, IControlParams } from "./Control";
|
|
2
|
+
import { HeightRuler } from "./heightRuler/HeightRuler";
|
|
3
|
+
interface IRulerSwitcherParams extends IControlParams {
|
|
4
|
+
ignoreTerrain?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Activate ruler
|
|
8
|
+
*/
|
|
9
|
+
export declare class RulerSwitcher extends Control {
|
|
10
|
+
ruler: HeightRuler;
|
|
11
|
+
constructor(options?: IRulerSwitcherParams);
|
|
12
|
+
oninit(): void;
|
|
13
|
+
onactivate(): void;
|
|
14
|
+
ondeactivate(): void;
|
|
15
|
+
protected _createMenuBtn(): void;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Control, IControlParams } from "./Control";
|
|
2
|
+
import { Vec2 } from "../math/Vec2";
|
|
3
|
+
interface IScaleControlParams extends IControlParams {
|
|
4
|
+
isCenter?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Planet zoom buttons control.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ScaleControl extends Control {
|
|
10
|
+
el: HTMLElement | null;
|
|
11
|
+
protected _template: string;
|
|
12
|
+
protected _minWidth: number;
|
|
13
|
+
protected _maxWidth: number;
|
|
14
|
+
protected _isCenter: boolean;
|
|
15
|
+
protected _scaleLabelEl: HTMLElement | null;
|
|
16
|
+
protected _mPx: number;
|
|
17
|
+
protected currWidth: number;
|
|
18
|
+
protected _metersInMinSize: number;
|
|
19
|
+
constructor(options?: IScaleControlParams);
|
|
20
|
+
protected _renderTemplate(): HTMLElement;
|
|
21
|
+
oninit(): void;
|
|
22
|
+
protected _drawScreen(px: Vec2): void;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EntityCollection } from "../entity/EntityCollection";
|
|
2
|
+
import { Control, IControlParams } from "./Control";
|
|
3
|
+
/**
|
|
4
|
+
* Frame per second(FPS) display control.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SegmentBoundVisualization extends Control {
|
|
7
|
+
protected _boundingSphereCollection: EntityCollection;
|
|
8
|
+
constructor(options: IControlParams);
|
|
9
|
+
oninit(): void;
|
|
10
|
+
protected _predraw(): void;
|
|
11
|
+
protected _draw(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Control, IControlParams } from "./Control";
|
|
2
|
+
interface ISimpleNavigationParams extends IControlParams {
|
|
3
|
+
speed?: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Simple keyboard camera navigation with W,S,A,D and shift keys to fly around the scene.
|
|
7
|
+
*/
|
|
8
|
+
export declare class SimpleNavigation extends Control {
|
|
9
|
+
speed: number;
|
|
10
|
+
constructor(options?: ISimpleNavigationParams);
|
|
11
|
+
oninit(): void;
|
|
12
|
+
onactivate(): void;
|
|
13
|
+
ondeactivate(): void;
|
|
14
|
+
protected onCameraMoveForward(): void;
|
|
15
|
+
protected onCameraMoveBackward(): void;
|
|
16
|
+
protected onCameraStrifeLeft(): void;
|
|
17
|
+
protected onCameraStrifeRight(): void;
|
|
18
|
+
protected onCameraLookUp(): void;
|
|
19
|
+
protected onCameraLookDown(): void;
|
|
20
|
+
protected onCameraTurnLeft(): void;
|
|
21
|
+
protected onCameraTurnRight(): void;
|
|
22
|
+
protected onCameraRollLeft(): void;
|
|
23
|
+
protected onCameraRollRight(): void;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Control, IControlParams } from "./Control";
|
|
2
|
+
interface ISimpleSkyBackgroundParams extends IControlParams {
|
|
3
|
+
}
|
|
4
|
+
export declare class SimpleSkyBackground extends Control {
|
|
5
|
+
protected _colorOne: Float32Array;
|
|
6
|
+
protected _colorTwo: Float32Array;
|
|
7
|
+
constructor(options?: ISimpleSkyBackgroundParams);
|
|
8
|
+
get colorOne(): string;
|
|
9
|
+
get colorTwo(): string;
|
|
10
|
+
set colorOne(htmlColor: string);
|
|
11
|
+
set colorTwo(htmlColor: string);
|
|
12
|
+
oninit(): void;
|
|
13
|
+
onactivate(): void;
|
|
14
|
+
ondeactivate(): void;
|
|
15
|
+
protected _drawBackground(): void;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Control, IControlParams } from "./Control";
|
|
2
|
+
import { Clock } from "../Clock";
|
|
3
|
+
import { LightSource } from "../light/LightSource";
|
|
4
|
+
interface ISunParams extends IControlParams {
|
|
5
|
+
activationHeight?: number;
|
|
6
|
+
offsetVertical?: number;
|
|
7
|
+
offsetHorizontal?: number;
|
|
8
|
+
stopped?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Real Sun geocentric position control that place the Sun on the right place by the Earth.
|
|
12
|
+
*/
|
|
13
|
+
export declare class Sun extends Control {
|
|
14
|
+
activationHeight: number;
|
|
15
|
+
offsetVertical: number;
|
|
16
|
+
offsetHorizontal: number;
|
|
17
|
+
sunlight: LightSource;
|
|
18
|
+
protected _currDate: number;
|
|
19
|
+
protected _prevDate: number;
|
|
20
|
+
protected _clockPtr: Clock | null;
|
|
21
|
+
protected _lightOn: boolean;
|
|
22
|
+
protected _stopped: boolean;
|
|
23
|
+
protected _f: number;
|
|
24
|
+
protected _k: number;
|
|
25
|
+
constructor(options?: ISunParams);
|
|
26
|
+
oninit(): void;
|
|
27
|
+
stop(): void;
|
|
28
|
+
start(): void;
|
|
29
|
+
onactivate(): void;
|
|
30
|
+
bindClock(clock: Clock): void;
|
|
31
|
+
protected _draw(): void;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Control, IControlParams } from "./Control";
|
|
2
|
+
interface IToggleWireframe extends IControlParams {
|
|
3
|
+
isActive?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Planet GL draw mode(TRIANGLE_STRIP/LINE_STRING) changer.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ToggleWireframe extends Control {
|
|
9
|
+
protected _isActive: boolean;
|
|
10
|
+
constructor(options?: IToggleWireframe);
|
|
11
|
+
oninit(): void;
|
|
12
|
+
toogleWireframe: () => void;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Control, IControlParams } from "./Control";
|
|
2
|
+
import { Key } from "../Lock";
|
|
3
|
+
import { Quat } from "../math/Quat";
|
|
4
|
+
import { Sphere } from "../bv/Sphere";
|
|
5
|
+
import { Vec2 } from "../math/Vec2";
|
|
6
|
+
import { Vec3 } from "../math/Vec3";
|
|
7
|
+
import { ITouchState } from "../renderer/RendererEvents";
|
|
8
|
+
interface ITouchNavigationParams extends IControlParams {
|
|
9
|
+
}
|
|
10
|
+
declare class TouchExt {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
prev_x: number;
|
|
14
|
+
prev_y: number;
|
|
15
|
+
grabbedPoint: Vec3 | null;
|
|
16
|
+
grabbedSpheroid: Sphere;
|
|
17
|
+
protected _vec: Vec2;
|
|
18
|
+
protected _vecPrev: Vec2;
|
|
19
|
+
constructor();
|
|
20
|
+
get dY(): number;
|
|
21
|
+
get dX(): number;
|
|
22
|
+
get vec(): Vec2;
|
|
23
|
+
get vecPrev(): Vec2;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Touch pad planet camera dragging control.
|
|
27
|
+
*/
|
|
28
|
+
export declare class TouchNavigation extends Control {
|
|
29
|
+
grabbedPoint: Vec3;
|
|
30
|
+
inertia: number;
|
|
31
|
+
protected grabbedSpheroid: Sphere;
|
|
32
|
+
protected qRot: Quat;
|
|
33
|
+
protected scaleRot: number;
|
|
34
|
+
protected rot: number;
|
|
35
|
+
protected _eye0: Vec3;
|
|
36
|
+
protected pointOnEarth: Vec3 | null;
|
|
37
|
+
protected earthUp: Vec3 | null;
|
|
38
|
+
protected touches: TouchExt[];
|
|
39
|
+
protected _keyLock: Key;
|
|
40
|
+
protected _touching: boolean;
|
|
41
|
+
constructor(options?: ITouchNavigationParams);
|
|
42
|
+
oninit(): void;
|
|
43
|
+
protected onTouchStart(e: ITouchState): void;
|
|
44
|
+
protected _startTouchOne(e: ITouchState): void;
|
|
45
|
+
stopRotation(): void;
|
|
46
|
+
protected onDoubleTouch(e: ITouchState): void;
|
|
47
|
+
protected onTouchEnd(e: ITouchState): void;
|
|
48
|
+
protected onTouchCancel(e: ITouchState): void;
|
|
49
|
+
protected onTouchMove(e: ITouchState): void;
|
|
50
|
+
protected onDraw(): void;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Key } from "../Lock";
|
|
2
|
+
import { Control, IControlParams } from "./Control";
|
|
3
|
+
import { Renderer } from "../renderer/Renderer";
|
|
4
|
+
import { Vec2 } from "../math/Vec2";
|
|
5
|
+
/**
|
|
6
|
+
* Planet zoom buttons control.
|
|
7
|
+
*/
|
|
8
|
+
declare class ZoomControl extends Control {
|
|
9
|
+
protected _keyLock: Key;
|
|
10
|
+
protected _move: number;
|
|
11
|
+
protected _targetPoint: Vec2 | null;
|
|
12
|
+
constructor(options?: IControlParams);
|
|
13
|
+
oninit(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Planet zoom in.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
zoomIn(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Planet zoom out.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
zoomOut(): void;
|
|
24
|
+
stopZoom(): void;
|
|
25
|
+
protected _draw(e: Renderer): void;
|
|
26
|
+
}
|
|
27
|
+
export { ZoomControl };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Control, IControlParams } from "../Control";
|
|
2
|
+
import { PolygonDrawingScene } from "./PolygonDrawingScene";
|
|
3
|
+
declare class DrawingControl extends Control {
|
|
4
|
+
protected _drawingScene: PolygonDrawingScene;
|
|
5
|
+
constructor(options?: IControlParams);
|
|
6
|
+
activatePolygonDrawing(): void;
|
|
7
|
+
activateLineStringDrawing(): void;
|
|
8
|
+
oninit(): void;
|
|
9
|
+
onactivate(): void;
|
|
10
|
+
ondeactivate(): void;
|
|
11
|
+
}
|
|
12
|
+
export { DrawingControl };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Vec2 } from "../../math/Vec2";
|
|
2
|
+
import { Vec3 } from "../../math/Vec3";
|
|
3
|
+
import { PolygonDrawingScene, IPolygonDrawingSceneParams } from "./PolygonDrawingScene";
|
|
4
|
+
declare class LineStringDrawingScene extends PolygonDrawingScene {
|
|
5
|
+
constructor(props: IPolygonDrawingSceneParams);
|
|
6
|
+
get geometryType(): string;
|
|
7
|
+
protected _addNew(cart: Vec3): void;
|
|
8
|
+
protected _appendCart(cart: Vec3): void;
|
|
9
|
+
protected _clearGhostPointer(): void;
|
|
10
|
+
protected _moveCorner(indexCurrent: number, indexPrev: number, indexCenter: number): void;
|
|
11
|
+
protected _moveCornerPoint(e: Vec2): void;
|
|
12
|
+
_updateGhostOutlinePointer(groundPos: Vec3): void;
|
|
13
|
+
protected _initGhostLayerPointer(): void;
|
|
14
|
+
}
|
|
15
|
+
export { LineStringDrawingScene };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { EventsHandler } from '../../Events';
|
|
2
|
+
import { CoordinatesType } from "../../entity/Geometry";
|
|
3
|
+
import { Entity } from '../../entity/Entity';
|
|
4
|
+
import { IMouseState } from "../../renderer/RendererEvents";
|
|
5
|
+
import { Object3d } from '../../Object3d';
|
|
6
|
+
import { Planet } from '../../scene/Planet';
|
|
7
|
+
import { RenderNode } from '../../scene/RenderNode';
|
|
8
|
+
import { Vec2 } from '../../math/Vec2';
|
|
9
|
+
import { Vec3 } from '../../math/Vec3';
|
|
10
|
+
import { Vector } from '../../layer/Vector';
|
|
11
|
+
type PolygonDrawingSceneEventsList = ["change", "startpoint"];
|
|
12
|
+
export interface IPolygonDrawingSceneParams {
|
|
13
|
+
coordinates?: CoordinatesType[];
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const NUM_SEGMENTS = 200;
|
|
17
|
+
export declare const OUTLINE_ALT = 0.3;
|
|
18
|
+
export declare const COORDINATES_COLOR = "rgb(350, 350, 0)";
|
|
19
|
+
export declare const CENTER_COLOR = "rgb(0, 350, 50)";
|
|
20
|
+
export declare const OUTLINE_COLOR = "rgb(0, 350, 50)";
|
|
21
|
+
export declare const OUTLINE_THICKNESS = 3.5;
|
|
22
|
+
export declare const CORNER_OPTIONS: {
|
|
23
|
+
scale: number;
|
|
24
|
+
instanced: boolean;
|
|
25
|
+
tag: string;
|
|
26
|
+
color: string;
|
|
27
|
+
object3d: Object3d;
|
|
28
|
+
};
|
|
29
|
+
export declare const CENTER_OPTIONS: {
|
|
30
|
+
scale: number;
|
|
31
|
+
instanced: boolean;
|
|
32
|
+
tag: string;
|
|
33
|
+
color: string;
|
|
34
|
+
object3d: Object3d;
|
|
35
|
+
};
|
|
36
|
+
export declare const OUTLINE_OPTIONS: {
|
|
37
|
+
thickness: number;
|
|
38
|
+
color: string;
|
|
39
|
+
};
|
|
40
|
+
declare class PolygonDrawingScene extends RenderNode {
|
|
41
|
+
events: EventsHandler<PolygonDrawingSceneEventsList>;
|
|
42
|
+
_planet: Planet | null;
|
|
43
|
+
protected _initCoordinates: CoordinatesType[];
|
|
44
|
+
protected _pickedCorner: Entity | null;
|
|
45
|
+
protected _pickedCenter: Entity | null;
|
|
46
|
+
protected _startPos: Vec2 | null;
|
|
47
|
+
protected _startClick: Vec2;
|
|
48
|
+
protected _geometryLayer: Vector;
|
|
49
|
+
protected _cornerLayer: Vector;
|
|
50
|
+
protected _centerLayer: Vector;
|
|
51
|
+
protected _outlineLayer: Vector;
|
|
52
|
+
protected _ghostCorner: Entity;
|
|
53
|
+
protected _ghostOutlineLayer: Vector;
|
|
54
|
+
protected _showGhostPointer: boolean;
|
|
55
|
+
protected _isStartPoint: boolean;
|
|
56
|
+
protected _insertCornerIndex: number;
|
|
57
|
+
protected _cornerDblClick: boolean;
|
|
58
|
+
constructor(options: IPolygonDrawingSceneParams);
|
|
59
|
+
get geometryType(): string;
|
|
60
|
+
getCoordinates(): CoordinatesType[];
|
|
61
|
+
bindPlanet(planet: Planet): void;
|
|
62
|
+
init(): void;
|
|
63
|
+
protected _onChange: (e: PolygonDrawingScene) => void;
|
|
64
|
+
onremove(): void;
|
|
65
|
+
clear(): void;
|
|
66
|
+
setCoordinates(coords: CoordinatesType[]): void;
|
|
67
|
+
stopNewPoint(): void;
|
|
68
|
+
startNewPoint(): void;
|
|
69
|
+
showGhostPointer(): void;
|
|
70
|
+
hideGhostPointer(): void;
|
|
71
|
+
setGhostPointerPosition(groundPos: Vec3): void;
|
|
72
|
+
protected _onCornerMouseEnter: (e: IMouseState) => void;
|
|
73
|
+
_onCornerMouseLeave: (e: IMouseState) => void;
|
|
74
|
+
_onCenterMouseEnter: (e: IMouseState) => void;
|
|
75
|
+
_onCenterMouseLeave: (e: IMouseState) => void;
|
|
76
|
+
protected _onLup: (e: IMouseState) => void;
|
|
77
|
+
protected _getLdown(e: IMouseState): Entity | null;
|
|
78
|
+
protected _onCornerLdown: (e: IMouseState) => void;
|
|
79
|
+
protected _onCenterLdown: (e: IMouseState) => void;
|
|
80
|
+
protected _onMouseMove: (e: IMouseState) => void;
|
|
81
|
+
protected _onCornerLdblclick: (e: IMouseState) => void;
|
|
82
|
+
protected _onMouseDblClick: (e: IMouseState) => void;
|
|
83
|
+
protected _initEvents(): void;
|
|
84
|
+
protected _clearEvents(): void;
|
|
85
|
+
protected _drawCorners(): void;
|
|
86
|
+
protected _drawCenters(): void;
|
|
87
|
+
protected _drawGhostCorner(): void;
|
|
88
|
+
frame(): void;
|
|
89
|
+
protected _checkTerrainCollision(entity: Entity): void;
|
|
90
|
+
protected _moveCenterPoint(): void;
|
|
91
|
+
protected _addNew(cart: Vec3): void;
|
|
92
|
+
protected _appendCart(cart: Vec3): void;
|
|
93
|
+
protected _clearGhostPointer(): void;
|
|
94
|
+
protected _moveCornerPoint(e: Vec2): void;
|
|
95
|
+
protected _updateGhostOutlinePointer(groundPos: Vec3): void;
|
|
96
|
+
protected _initGhostLayerPointer(): void;
|
|
97
|
+
}
|
|
98
|
+
export { PolygonDrawingScene };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { EventsHandler } from '../../Events';
|
|
2
|
+
import { Vec3 } from "../../math/Vec3";
|
|
3
|
+
import { Planet } from "../../scene/Planet";
|
|
4
|
+
import { LonLat } from "../../LonLat";
|
|
5
|
+
export interface ElevationProfileParams {
|
|
6
|
+
planet?: Planet;
|
|
7
|
+
}
|
|
8
|
+
export interface IProfileData {
|
|
9
|
+
dist: number;
|
|
10
|
+
minY: number;
|
|
11
|
+
maxY: number;
|
|
12
|
+
trackCoords: TrackItem[];
|
|
13
|
+
groundCoords: GroundItem[];
|
|
14
|
+
}
|
|
15
|
+
export type ElevationProfileDrawData = [TrackItem[], GroundItem[]];
|
|
16
|
+
type ElevationProfileEventsList = ["startcollecting", "profilecollected", "clear"];
|
|
17
|
+
/**
|
|
18
|
+
* Point types
|
|
19
|
+
*/
|
|
20
|
+
export declare const SAFE = 0;
|
|
21
|
+
export declare const WARNING = 1;
|
|
22
|
+
export declare const COLLISION = 2;
|
|
23
|
+
type WarningLevel = typeof SAFE | typeof WARNING | typeof COLLISION;
|
|
24
|
+
/**
|
|
25
|
+
* 0 - distance, 1 - elevation, 2 - related ground point index
|
|
26
|
+
*/
|
|
27
|
+
export type TrackItem = [number, number, number];
|
|
28
|
+
/**
|
|
29
|
+
* 0 - distance, 1 - elevation, 2 - warning level, 3 - ..., 4 - related track point index
|
|
30
|
+
*/
|
|
31
|
+
export type GroundItem = [number, number, WarningLevel, number, number];
|
|
32
|
+
export declare class ElevationProfile {
|
|
33
|
+
events: EventsHandler<ElevationProfileEventsList>;
|
|
34
|
+
planet: Planet | null;
|
|
35
|
+
protected _warningHeightLevel: number;
|
|
36
|
+
protected _pointsReady: boolean;
|
|
37
|
+
protected _isWarning: boolean;
|
|
38
|
+
protected _planeDistance: number;
|
|
39
|
+
protected _minX: number;
|
|
40
|
+
protected _maxX: number;
|
|
41
|
+
protected _minY: number;
|
|
42
|
+
protected _maxY: number;
|
|
43
|
+
protected _drawData: ElevationProfileDrawData;
|
|
44
|
+
protected _promiseArr: Promise<void | number>[];
|
|
45
|
+
protected _promiseCounter: number;
|
|
46
|
+
protected _pMaxY: number;
|
|
47
|
+
protected _pMinY: number;
|
|
48
|
+
protected _pDist: number;
|
|
49
|
+
protected _pTrackCoords: TrackItem[];
|
|
50
|
+
protected _pGroundCoords: GroundItem[];
|
|
51
|
+
protected _pIndex: number;
|
|
52
|
+
constructor(options?: ElevationProfileParams);
|
|
53
|
+
bindPlanet(planet: Planet): void;
|
|
54
|
+
setWarningHeightLevel(warningHeight?: number): void;
|
|
55
|
+
setRange(minX: number, maxX: number, minY?: number, maxY?: number): void;
|
|
56
|
+
protected _getHeightAsync(ll: LonLat, pIndex: number, promiseCounter: number): Promise<number>;
|
|
57
|
+
protected _collectCoordsBetweenTwoTrackPoints(index: number, internalPoints: number, scaleFactor: number, p0: Vec3, trackDir: Vec3, promiseCounter: number): void;
|
|
58
|
+
protected _collectAllPoints(pointsLonLat: LonLat[], promiseCounter: number): void;
|
|
59
|
+
protected _getGroundElevation(lonLat: LonLat, index: number, promiseCounter: number): void;
|
|
60
|
+
protected _calcPointsAsync(pointsLonLat: LonLat[], promiseCounter: number): Promise<IProfileData>;
|
|
61
|
+
get minX(): number;
|
|
62
|
+
get planeDistance(): number;
|
|
63
|
+
get maxX(): number;
|
|
64
|
+
get minY(): number;
|
|
65
|
+
get maxY(): number;
|
|
66
|
+
get pointsReady(): boolean;
|
|
67
|
+
get isWarningOrCollision(): boolean;
|
|
68
|
+
get drawData(): ElevationProfileDrawData;
|
|
69
|
+
collectProfile(pointsLonLat: LonLat[]): Promise<ElevationProfileDrawData>;
|
|
70
|
+
protected _updatePointType(pIndex: number): void;
|
|
71
|
+
/**
|
|
72
|
+
* @deprecated
|
|
73
|
+
*/
|
|
74
|
+
protected _setPointsType(): void;
|
|
75
|
+
clear(): void;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { View, IViewParams, ViewEventsList } from "../../ui/View";
|
|
2
|
+
import { ToggleButton } from "../../ui/ToggleButton";
|
|
3
|
+
import { EventsHandler } from "../../Events";
|
|
4
|
+
import { ElevationProfile } from "./ElevationProfile";
|
|
5
|
+
interface IElevationProfileButtonsViewParams extends IViewParams {
|
|
6
|
+
}
|
|
7
|
+
type ElevationProfileButtonsViewEventsList = ["reset", "list", "location"];
|
|
8
|
+
export declare class ElevationProfileButtonsView extends View<ElevationProfile> {
|
|
9
|
+
events: EventsHandler<ElevationProfileButtonsViewEventsList> & EventsHandler<ViewEventsList>;
|
|
10
|
+
pointListBtn: ToggleButton;
|
|
11
|
+
constructor(params?: IElevationProfileButtonsViewParams);
|
|
12
|
+
render(params: any): this;
|
|
13
|
+
}
|
|
14
|
+
export {};
|