@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,133 @@
|
|
|
1
|
+
import { NumberArray3, Vec3 } from "../math/Vec3";
|
|
2
|
+
import { NumberArray4, Vec4 } from "../math/Vec4";
|
|
3
|
+
import { Entity } from "./Entity";
|
|
4
|
+
import { RayHandler } from "./RayHandler";
|
|
5
|
+
export interface IRayParams {
|
|
6
|
+
thickness?: number;
|
|
7
|
+
startPosition?: Vec3 | NumberArray3;
|
|
8
|
+
endPosition?: Vec3 | NumberArray3;
|
|
9
|
+
startColor?: string | NumberArray4;
|
|
10
|
+
endColor?: string | NumberArray4;
|
|
11
|
+
visibility?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Ray class.
|
|
15
|
+
* @class
|
|
16
|
+
* @param {Object} [options] - Options:
|
|
17
|
+
* @param {Vec3|Array.<number>} [options.startPosition] - Ray start point position.
|
|
18
|
+
* @param {Vec3|Array.<number>} [options.endPosition] - Ray end point position.
|
|
19
|
+
* @param {Vec3|Array.<number>} [options.startColor] - Ray start point color.
|
|
20
|
+
* @param {Vec3|Array.<number>} [options.endColor] - Ray end point color.
|
|
21
|
+
* @param {boolean} [options.visibility] - Visibility.
|
|
22
|
+
*/
|
|
23
|
+
declare class Ray {
|
|
24
|
+
static __counter__: number;
|
|
25
|
+
/**
|
|
26
|
+
* Object uniq identifier.
|
|
27
|
+
* @protected
|
|
28
|
+
* @type {number}
|
|
29
|
+
*/
|
|
30
|
+
protected __id: number;
|
|
31
|
+
_thickness: number;
|
|
32
|
+
protected _startPosition: Vec3;
|
|
33
|
+
_startPositionHigh: Vec3;
|
|
34
|
+
_startPositionLow: Vec3;
|
|
35
|
+
protected _endPosition: Vec3;
|
|
36
|
+
_endPositionHigh: Vec3;
|
|
37
|
+
_endPositionLow: Vec3;
|
|
38
|
+
_startColor: Vec4;
|
|
39
|
+
_endColor: Vec4;
|
|
40
|
+
/**
|
|
41
|
+
* Ray visibility.
|
|
42
|
+
* @protected
|
|
43
|
+
* @type {boolean}
|
|
44
|
+
*/
|
|
45
|
+
protected _visibility: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Entity instance that holds this billboard.
|
|
48
|
+
* @public
|
|
49
|
+
* @type {Entity}
|
|
50
|
+
*/
|
|
51
|
+
_entity: Entity | null;
|
|
52
|
+
/**
|
|
53
|
+
* Handler that stores and renders this billboard object.
|
|
54
|
+
* @public
|
|
55
|
+
* @type {BillboardHandler}
|
|
56
|
+
*/
|
|
57
|
+
_handler: RayHandler | null;
|
|
58
|
+
/**
|
|
59
|
+
* Billboard handler array index.
|
|
60
|
+
* @public
|
|
61
|
+
* @type {number}
|
|
62
|
+
*/
|
|
63
|
+
_handlerIndex: number;
|
|
64
|
+
constructor(options?: IRayParams);
|
|
65
|
+
/**
|
|
66
|
+
* Sets ray start position.
|
|
67
|
+
* @public
|
|
68
|
+
* @param {number} x - X coordinate.
|
|
69
|
+
* @param {number} y - Y coordinate.
|
|
70
|
+
* @param {number} z - Z coordinate.
|
|
71
|
+
*/
|
|
72
|
+
setStartPosition(x: number, y: number, z: number): void;
|
|
73
|
+
getLength(): number;
|
|
74
|
+
/**
|
|
75
|
+
* Sets ray start position.
|
|
76
|
+
* @public
|
|
77
|
+
* @param {Vec3} position - Cartesian coordinates.
|
|
78
|
+
*/
|
|
79
|
+
setStartPosition3v(position: Vec3): void;
|
|
80
|
+
/**
|
|
81
|
+
* Sets ray end position.
|
|
82
|
+
* @public
|
|
83
|
+
* @param {number} x - X coordinate.
|
|
84
|
+
* @param {number} y - Y coordinate.
|
|
85
|
+
* @param {number} z - Z coordinate.
|
|
86
|
+
*/
|
|
87
|
+
setEndPosition(x: number, y: number, z: number): void;
|
|
88
|
+
/**
|
|
89
|
+
* Sets ray end position.
|
|
90
|
+
* @public
|
|
91
|
+
* @param {Vec3} position - Cartesian coordinates.
|
|
92
|
+
*/
|
|
93
|
+
setEndPosition3v(position: Vec3): void;
|
|
94
|
+
setThickness(thickness: number): void;
|
|
95
|
+
setColors4v(startColor?: Vec4, endColor?: Vec4): void;
|
|
96
|
+
setColorsHTML(startColor?: string, endColor?: string): void;
|
|
97
|
+
/**
|
|
98
|
+
* Returns ray start position.
|
|
99
|
+
* @public
|
|
100
|
+
* @returns {Vec3}
|
|
101
|
+
*/
|
|
102
|
+
getStartPosition(): Vec3;
|
|
103
|
+
/**
|
|
104
|
+
* Returns ray end position.
|
|
105
|
+
* @public
|
|
106
|
+
* @returns {Vec3}
|
|
107
|
+
*/
|
|
108
|
+
getEndPosition(): Vec3;
|
|
109
|
+
/**
|
|
110
|
+
* Sets visibility.
|
|
111
|
+
* @public
|
|
112
|
+
* @param {boolean} visibility - Visibility flag.
|
|
113
|
+
*/
|
|
114
|
+
setVisibility(visibility: boolean): void;
|
|
115
|
+
/**
|
|
116
|
+
* Returns visibility.
|
|
117
|
+
* @public
|
|
118
|
+
* @returns {boolean}
|
|
119
|
+
*/
|
|
120
|
+
getVisibility(): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Remove from handler.
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
remove(): void;
|
|
126
|
+
/**
|
|
127
|
+
* Set picking color.
|
|
128
|
+
* @public
|
|
129
|
+
* @param {Vec3} color - Picking color.
|
|
130
|
+
*/
|
|
131
|
+
setPickingColor3v(color: Vec3): void;
|
|
132
|
+
}
|
|
133
|
+
export { Ray };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { TypedArray } from "../utils/shared";
|
|
2
|
+
import { EntityCollection } from "./EntityCollection";
|
|
3
|
+
import { Ray } from "./Ray";
|
|
4
|
+
import { Renderer } from "../renderer/Renderer";
|
|
5
|
+
import { Vec3 } from "../math/Vec3";
|
|
6
|
+
import { Vec4 } from "../math/Vec4";
|
|
7
|
+
import { WebGLBufferExt } from "../webgl/Handler";
|
|
8
|
+
declare class RayHandler {
|
|
9
|
+
static __counter__: number;
|
|
10
|
+
protected __id: number;
|
|
11
|
+
/**
|
|
12
|
+
* Picking rendering option.
|
|
13
|
+
* @public
|
|
14
|
+
* @type {boolean}
|
|
15
|
+
*/
|
|
16
|
+
pickingEnabled: boolean;
|
|
17
|
+
protected _entityCollection: EntityCollection;
|
|
18
|
+
protected _renderer: Renderer | null;
|
|
19
|
+
protected _rays: Ray[];
|
|
20
|
+
protected _vertexBuffer: WebGLBufferExt | null;
|
|
21
|
+
protected _startPositionHighBuffer: WebGLBufferExt | null;
|
|
22
|
+
protected _startPositionLowBuffer: WebGLBufferExt | null;
|
|
23
|
+
protected _endPositionHighBuffer: WebGLBufferExt | null;
|
|
24
|
+
protected _endPositionLowBuffer: WebGLBufferExt | null;
|
|
25
|
+
protected _thicknessBuffer: WebGLBufferExt | null;
|
|
26
|
+
protected _rgbaBuffer: WebGLBufferExt | null;
|
|
27
|
+
protected _pickingColorBuffer: WebGLBufferExt | null;
|
|
28
|
+
protected _vertexArr: TypedArray | number[];
|
|
29
|
+
protected _startPositionHighArr: TypedArray | number[];
|
|
30
|
+
protected _startPositionLowArr: TypedArray | number[];
|
|
31
|
+
protected _endPositionHighArr: TypedArray | number[];
|
|
32
|
+
protected _endPositionLowArr: TypedArray | number[];
|
|
33
|
+
protected _thicknessArr: TypedArray | number[];
|
|
34
|
+
protected _rgbaArr: TypedArray | number[];
|
|
35
|
+
protected _pickingColorArr: TypedArray | number[];
|
|
36
|
+
protected _buffersUpdateCallbacks: Function[];
|
|
37
|
+
protected _changedBuffers: boolean[];
|
|
38
|
+
constructor(entityCollection: EntityCollection);
|
|
39
|
+
static concArr(dest: number[], curr: number[]): void;
|
|
40
|
+
initProgram(): void;
|
|
41
|
+
setRenderer(renderer: Renderer): void;
|
|
42
|
+
refresh(): void;
|
|
43
|
+
protected _removeRays(): void;
|
|
44
|
+
clear(): void;
|
|
45
|
+
protected _deleteBuffers(): void;
|
|
46
|
+
update(): void;
|
|
47
|
+
add(ray: Ray): void;
|
|
48
|
+
protected _addRayToArrays(ray: Ray): void;
|
|
49
|
+
protected _displayPASS(): void;
|
|
50
|
+
protected _pickingPASS(): void;
|
|
51
|
+
draw(): void;
|
|
52
|
+
drawPicking(): void;
|
|
53
|
+
reindexRaysArray(startIndex: number): void;
|
|
54
|
+
protected _removeRay(ray: Ray): void;
|
|
55
|
+
remove(ray: Ray): void;
|
|
56
|
+
setStartPositionArr(index: number, positionHigh: Vec3, positionLow: Vec3): void;
|
|
57
|
+
setEndPositionArr(index: number, positionHigh: Vec3, positionLow: Vec3): void;
|
|
58
|
+
setPickingColorArr(index: number, color: Vec3): void;
|
|
59
|
+
setRgbaArr(index: number, startColor: Vec4, endColor: Vec4): void;
|
|
60
|
+
setThicknessArr(index: number, thickness: number): void;
|
|
61
|
+
setVisibility(index: number, visibility: boolean): void;
|
|
62
|
+
setVertexArr(index: number, vertexArr: number[]): void;
|
|
63
|
+
createStartPositionBuffer(): void;
|
|
64
|
+
createEndPositionBuffer(): void;
|
|
65
|
+
createRgbaBuffer(): void;
|
|
66
|
+
createThicknessBuffer(): void;
|
|
67
|
+
createVertexBuffer(): void;
|
|
68
|
+
createPickingColorBuffer(): void;
|
|
69
|
+
}
|
|
70
|
+
export { RayHandler };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Entity } from "./Entity";
|
|
2
|
+
import { RenderNode } from "../scene/RenderNode";
|
|
3
|
+
import { NumberArray3, Vec3 } from "../math/Vec3";
|
|
4
|
+
import { NumberArray4, Vec4 } from "../math/Vec4";
|
|
5
|
+
import { StripHandler } from "./StripHandler";
|
|
6
|
+
import { WebGLBufferExt } from "../webgl/Handler";
|
|
7
|
+
type TPoiExt = Vec3 | NumberArray3;
|
|
8
|
+
type TStripExt = [TPoiExt, TPoiExt];
|
|
9
|
+
type TPoi = Vec3;
|
|
10
|
+
type TStrip = [TPoi, TPoi];
|
|
11
|
+
export interface IStripParams {
|
|
12
|
+
visibility?: boolean;
|
|
13
|
+
color?: string | NumberArray4 | Vec4;
|
|
14
|
+
opacity?: number;
|
|
15
|
+
path?: TStrip[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Strip object.
|
|
19
|
+
* @class
|
|
20
|
+
* @param {*} [options] - Strip options:
|
|
21
|
+
* @param {boolean} [options.visibility] - Strip visibility.
|
|
22
|
+
* @example <caption>Stripe example</caption>
|
|
23
|
+
* new og.Entity({
|
|
24
|
+
* strip: {
|
|
25
|
+
* gridSize: 10,
|
|
26
|
+
* path: [
|
|
27
|
+
* [[],[]],
|
|
28
|
+
* [[],[]]
|
|
29
|
+
* ]
|
|
30
|
+
* }
|
|
31
|
+
* });
|
|
32
|
+
*/
|
|
33
|
+
declare class Strip {
|
|
34
|
+
static __counter__: number;
|
|
35
|
+
protected __id: number;
|
|
36
|
+
/**
|
|
37
|
+
* Strip visibility.
|
|
38
|
+
* @public
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
*/
|
|
41
|
+
visibility: boolean;
|
|
42
|
+
color: Float32Array;
|
|
43
|
+
/**
|
|
44
|
+
* Parent collection render node.
|
|
45
|
+
* @protected
|
|
46
|
+
* @type {RenderNode}
|
|
47
|
+
*/
|
|
48
|
+
protected _renderNode: RenderNode | null;
|
|
49
|
+
/**
|
|
50
|
+
* Entity instance that holds this strip.
|
|
51
|
+
* @public
|
|
52
|
+
* @type {Entity}
|
|
53
|
+
*/
|
|
54
|
+
_entity: Entity | null;
|
|
55
|
+
protected _verticesHighBuffer: WebGLBufferExt | null;
|
|
56
|
+
protected _verticesLowBuffer: WebGLBufferExt | null;
|
|
57
|
+
protected _indexBuffer: WebGLBufferExt | null;
|
|
58
|
+
protected _verticesHigh: number[];
|
|
59
|
+
protected _verticesLow: number[];
|
|
60
|
+
protected _indexes: number[];
|
|
61
|
+
protected _path: TStrip[];
|
|
62
|
+
protected _pickingColor: Float32Array;
|
|
63
|
+
protected _gridSize: number;
|
|
64
|
+
/**
|
|
65
|
+
* Handler that stores and renders this object.
|
|
66
|
+
* @public
|
|
67
|
+
* @type {StripHandler | null}
|
|
68
|
+
*/
|
|
69
|
+
_handler: StripHandler | null;
|
|
70
|
+
_handlerIndex: number;
|
|
71
|
+
constructor(options?: IStripParams);
|
|
72
|
+
/**
|
|
73
|
+
* Assign picking color.
|
|
74
|
+
* @public
|
|
75
|
+
* @param {Vec3} color - Picking RGB color.
|
|
76
|
+
*/
|
|
77
|
+
setPickingColor3v(color: Vec3): void;
|
|
78
|
+
/**
|
|
79
|
+
* Clears object
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
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;
|
|
95
|
+
setColor(r: number, g: number, b: number, a?: number): void;
|
|
96
|
+
/**
|
|
97
|
+
* Set strip opacity.
|
|
98
|
+
* @public
|
|
99
|
+
* @param {number} opacity - opacity.
|
|
100
|
+
*/
|
|
101
|
+
setOpacity(opacity: number): void;
|
|
102
|
+
/**
|
|
103
|
+
* Sets cloud visibility.
|
|
104
|
+
* @public
|
|
105
|
+
* @param {boolean} visibility - Visibility flag.
|
|
106
|
+
*/
|
|
107
|
+
setVisibility(visibility: boolean): void;
|
|
108
|
+
/**
|
|
109
|
+
* @return {boolean} Strip visibility.
|
|
110
|
+
*/
|
|
111
|
+
getVisibility(): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Assign rendering scene node.
|
|
114
|
+
* @public
|
|
115
|
+
* @param {RenderNode} renderNode - Assigned render node.
|
|
116
|
+
*/
|
|
117
|
+
setRenderNode(renderNode: RenderNode): void;
|
|
118
|
+
/**
|
|
119
|
+
* Removes from entity.
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
remove(): void;
|
|
123
|
+
draw(): void;
|
|
124
|
+
drawPicking(): void;
|
|
125
|
+
/**
|
|
126
|
+
* Delete buffers
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
_deleteBuffers(): void;
|
|
130
|
+
protected _createBuffers(): void;
|
|
131
|
+
addEdge3v(p2: Vec3, p3: Vec3): void;
|
|
132
|
+
setEdge3v(p2: Vec3, p3: Vec3, index: number): void;
|
|
133
|
+
removeEdge(index: number): void;
|
|
134
|
+
setGridSize(gridSize: number): void;
|
|
135
|
+
getPath(): TStrip[];
|
|
136
|
+
setPath(path: TStripExt[] | TStrip[]): void;
|
|
137
|
+
insertEdge3v(p0: Vec3, p1: Vec3, index: number): void;
|
|
138
|
+
}
|
|
139
|
+
export { Strip };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EntityCollection } from "./EntityCollection";
|
|
2
|
+
import { Renderer } from "../renderer/Renderer";
|
|
3
|
+
import { RenderNode } from "../scene/RenderNode";
|
|
4
|
+
import { Strip } from "./Strip";
|
|
5
|
+
declare class StripHandler {
|
|
6
|
+
static __counter__: number;
|
|
7
|
+
protected __id: number;
|
|
8
|
+
/**
|
|
9
|
+
* Picking rendering option.
|
|
10
|
+
* @public
|
|
11
|
+
* @type {boolean}
|
|
12
|
+
*/
|
|
13
|
+
pickingEnabled: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Parent collection
|
|
16
|
+
* @protected
|
|
17
|
+
* @type {EntityCollection}
|
|
18
|
+
*/
|
|
19
|
+
protected _entityCollection: EntityCollection;
|
|
20
|
+
/**
|
|
21
|
+
* Renderer
|
|
22
|
+
* @protected
|
|
23
|
+
* @type {Renderer | null}
|
|
24
|
+
*/
|
|
25
|
+
protected _renderer: Renderer | null;
|
|
26
|
+
/**
|
|
27
|
+
* Strip objects array
|
|
28
|
+
* @protected
|
|
29
|
+
* @type {Array.<Strip>}
|
|
30
|
+
*/
|
|
31
|
+
protected _strips: Strip[];
|
|
32
|
+
constructor(entityCollection: EntityCollection);
|
|
33
|
+
protected _initProgram(): void;
|
|
34
|
+
setRenderNode(renderNode: RenderNode): void;
|
|
35
|
+
add(strip: Strip): void;
|
|
36
|
+
remove(strip: Strip): void;
|
|
37
|
+
reindexStripArray(startIndex: number): void;
|
|
38
|
+
draw(): void;
|
|
39
|
+
drawPicking(): void;
|
|
40
|
+
clear(): void;
|
|
41
|
+
}
|
|
42
|
+
export { StripHandler };
|
|
@@ -0,0 +1,10 @@
|
|
|
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";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as jd from './astro/jd';
|
|
2
|
+
import * as math from './math';
|
|
3
|
+
import * as mercator from './mercator';
|
|
4
|
+
import * as utils from './utils/shared';
|
|
5
|
+
import * as bv from './bv/index';
|
|
6
|
+
import * as control from './control/index';
|
|
7
|
+
import * as scene from './scene/index';
|
|
8
|
+
import * as terrain from './terrain/index';
|
|
9
|
+
import * as layer from './layer/index';
|
|
10
|
+
import * as webgl from './webgl/index';
|
|
11
|
+
export * from './Globe';
|
|
12
|
+
import { Geoid } from './terrain/Geoid';
|
|
13
|
+
import { input } from './input/input';
|
|
14
|
+
import { Ellipsoid, wgs84 } from './ellipsoid/index';
|
|
15
|
+
import { Camera, PlanetCamera } from './camera/index';
|
|
16
|
+
import { Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4 } from './math/index';
|
|
17
|
+
import { Renderer } from './renderer/Renderer';
|
|
18
|
+
import { LightSource } from './light/LightSource';
|
|
19
|
+
import { Clock } from './Clock';
|
|
20
|
+
import { Events } from './Events';
|
|
21
|
+
import { Extent } from './Extent';
|
|
22
|
+
import { LonLat } from './LonLat';
|
|
23
|
+
import { RenderNode } from './scene/RenderNode';
|
|
24
|
+
import { Planet } from './scene/Planet';
|
|
25
|
+
import { Popup } from './Popup';
|
|
26
|
+
import { EarthQuadTreeStrategy, MarsQuadTreeStrategy, QuadTreeStrategy, quadTreeStrategyType, Wgs84QuadTreeStrategy } from './quadTree/index';
|
|
27
|
+
import { Object3d } from './Object3d';
|
|
28
|
+
import { Handler, Program, Framebuffer, Multisample } from './webgl/index';
|
|
29
|
+
import { Control } from './control/Control';
|
|
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,33 @@
|
|
|
1
|
+
import { EventCallback, EventCallbackStamp } from "../Events";
|
|
2
|
+
interface ICallbackHandler {
|
|
3
|
+
callback: EventCallbackStamp;
|
|
4
|
+
sender: any;
|
|
5
|
+
priority: number;
|
|
6
|
+
}
|
|
7
|
+
declare class KeyboardHandler {
|
|
8
|
+
protected _currentlyPressedKeys: Record<number, boolean>;
|
|
9
|
+
protected _pressedKeysCallbacks: Record<number, ICallbackHandler[]>;
|
|
10
|
+
protected _unpressedKeysCallbacks: Record<number, ICallbackHandler[]>;
|
|
11
|
+
protected _charkeysCallbacks: Record<number, ICallbackHandler[]>;
|
|
12
|
+
protected _anykeyCallback: any;
|
|
13
|
+
protected _event: KeyboardEvent | null;
|
|
14
|
+
protected _active: boolean;
|
|
15
|
+
protected _stampCache: Record<string, number>;
|
|
16
|
+
constructor();
|
|
17
|
+
getcurrentlyPressedKeys(): Record<number, boolean>;
|
|
18
|
+
getPressedKeysCallbacks(): Record<number, ICallbackHandler[]>;
|
|
19
|
+
getUnpressedKeysCallbacks(): Record<number, ICallbackHandler[]>;
|
|
20
|
+
getCharkeysCallbacks(): Record<number, ICallbackHandler[]>;
|
|
21
|
+
removeEvent(event: string, keyCode: number, callback: EventCallback): void;
|
|
22
|
+
protected _removeCallback(handlers: ICallbackHandler[], callback: EventCallbackStamp): void;
|
|
23
|
+
protected _getStamp(name: string, keyCode: number, ogid: number): string;
|
|
24
|
+
protected _stamp(name: string, keyCode: number, obj: any): boolean;
|
|
25
|
+
setActivity(activity: boolean): void;
|
|
26
|
+
releaseKeys(): void;
|
|
27
|
+
addEvent(event: string, keyCode: number, callback: EventCallback, sender?: any, priority?: number): void;
|
|
28
|
+
isKeyPressed(keyCode: number): boolean;
|
|
29
|
+
handleKeyDown(): void;
|
|
30
|
+
handleKeyUp(): void;
|
|
31
|
+
handleEvents(): void;
|
|
32
|
+
}
|
|
33
|
+
export { KeyboardHandler };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type MouseEventExt = MouseEvent & {
|
|
2
|
+
wheelDelta?: number;
|
|
3
|
+
deltaY?: number;
|
|
4
|
+
};
|
|
5
|
+
export interface MouseHandlerEvent {
|
|
6
|
+
button?: number;
|
|
7
|
+
clientX: number;
|
|
8
|
+
clientY: number;
|
|
9
|
+
}
|
|
10
|
+
type MouseHandlerEventCallback = (sys: MouseEvent, event?: MouseHandlerEvent) => void;
|
|
11
|
+
declare class MouseHandler {
|
|
12
|
+
protected _htmlObject: HTMLElement;
|
|
13
|
+
constructor(htmlObject: HTMLElement);
|
|
14
|
+
setEvent(event: string, sender: any, callback: MouseHandlerEventCallback): void;
|
|
15
|
+
}
|
|
16
|
+
export { MouseHandler };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type TouchEventExt = TouchEvent & {
|
|
2
|
+
offsetLeft: number;
|
|
3
|
+
offsetTop: number;
|
|
4
|
+
};
|
|
5
|
+
type TouchHandlerEventCallback = (sys: TouchEventExt) => void;
|
|
6
|
+
declare class TouchHandler {
|
|
7
|
+
protected _htmlObject: HTMLElement;
|
|
8
|
+
constructor(htmlObject: HTMLElement);
|
|
9
|
+
setEvent(event: string, sender: any, callback: TouchHandlerEventCallback): void;
|
|
10
|
+
}
|
|
11
|
+
export { TouchHandler };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { Extent } from "../Extent";
|
|
2
|
+
import { EventCallback, EventsHandler } from "../Events";
|
|
3
|
+
import { Layer, LayerEventsList, ILayerParams } from "./Layer";
|
|
4
|
+
import { LonLat } from "../LonLat";
|
|
5
|
+
import { Material } from "./Material";
|
|
6
|
+
import { NumberArray2 } from "../math/Vec2";
|
|
7
|
+
import { NumberArray4 } from "../math/Vec4";
|
|
8
|
+
import { Planet } from "../scene/Planet";
|
|
9
|
+
import { WebGLBufferExt, WebGLTextureExt } from "../webgl/Handler";
|
|
10
|
+
export interface IBaseGeoImageParams extends ILayerParams {
|
|
11
|
+
fullExtent?: boolean;
|
|
12
|
+
corners?: NumberArray2[];
|
|
13
|
+
}
|
|
14
|
+
type BaseGeoImageEventsList = [
|
|
15
|
+
"loadend"
|
|
16
|
+
];
|
|
17
|
+
export type BaseGeoImageEventsType = EventsHandler<BaseGeoImageEventsList> & EventsHandler<LayerEventsList>;
|
|
18
|
+
/**
|
|
19
|
+
* BaseGeoImage layer represents square imagery layer that
|
|
20
|
+
* could be a static image, or animated video or webgl buffer
|
|
21
|
+
* object displayed on the globe.
|
|
22
|
+
* @class
|
|
23
|
+
* @extends {Layer}
|
|
24
|
+
*/
|
|
25
|
+
declare class BaseGeoImage extends Layer {
|
|
26
|
+
events: BaseGeoImageEventsType;
|
|
27
|
+
protected _projType: number;
|
|
28
|
+
protected _frameWidth: number;
|
|
29
|
+
protected _frameHeight: number;
|
|
30
|
+
protected _sourceReady: boolean;
|
|
31
|
+
protected _sourceTexture: WebGLTextureExt | null;
|
|
32
|
+
protected _materialTexture: WebGLTextureExt | null;
|
|
33
|
+
protected _gridBufferLow: WebGLBufferExt | null;
|
|
34
|
+
protected _gridBufferHigh: WebGLBufferExt | null;
|
|
35
|
+
protected _extentWgs84ParamsHigh: Float32Array;
|
|
36
|
+
protected _extentWgs84ParamsLow: Float32Array;
|
|
37
|
+
protected _extentMercParamsHigh: Float32Array;
|
|
38
|
+
protected _extentMercParamsLow: Float32Array;
|
|
39
|
+
protected _refreshFrame: boolean;
|
|
40
|
+
protected _frameCreated: boolean;
|
|
41
|
+
protected _sourceCreated: boolean;
|
|
42
|
+
_animate: boolean;
|
|
43
|
+
protected _ready: boolean;
|
|
44
|
+
_creationProceeding: boolean;
|
|
45
|
+
_isRendering: boolean;
|
|
46
|
+
protected _extentWgs84: Extent;
|
|
47
|
+
protected _cornersWgs84: LonLat[];
|
|
48
|
+
protected _cornersMerc: LonLat[];
|
|
49
|
+
protected _isFullExtent: number;
|
|
50
|
+
/**
|
|
51
|
+
* rendering function pointer
|
|
52
|
+
* @type {Function}
|
|
53
|
+
*/
|
|
54
|
+
rendering: Function;
|
|
55
|
+
protected _onLoadend_: EventCallback | null;
|
|
56
|
+
constructor(name: string | null, options?: IBaseGeoImageParams);
|
|
57
|
+
get isIdle(): boolean;
|
|
58
|
+
addTo(planet: Planet): void;
|
|
59
|
+
protected _onLoadend(): void;
|
|
60
|
+
remove(): this;
|
|
61
|
+
get instanceName(): string;
|
|
62
|
+
/**
|
|
63
|
+
* Gets corners coordinates.
|
|
64
|
+
* @public
|
|
65
|
+
* @return {Array.<LonLat>} - (exactly 4 entries)
|
|
66
|
+
*/
|
|
67
|
+
getCornersLonLat(): LonLat[];
|
|
68
|
+
/**
|
|
69
|
+
* Gets corners coordinates.
|
|
70
|
+
* @public
|
|
71
|
+
* @return {Array.<Array<number>>} - (exactly 3 entries)
|
|
72
|
+
*/
|
|
73
|
+
getCorners(): NumberArray2[];
|
|
74
|
+
/**
|
|
75
|
+
* Sets geoImage geographical corners coordinates.
|
|
76
|
+
* @public
|
|
77
|
+
* @param {Array.<Array.<number>>} corners - GeoImage corners coordinates. Where first coordinate (exactly 3 entries)
|
|
78
|
+
* coincedents to the left top image corner, secont to the right top image corner, third to the right bottom
|
|
79
|
+
* and fourth - left bottom image corner.
|
|
80
|
+
*/
|
|
81
|
+
setCorners(corners: NumberArray2[]): void;
|
|
82
|
+
/**
|
|
83
|
+
* Sets geoImage geographical corners coordinates.
|
|
84
|
+
* @public
|
|
85
|
+
* @param {Array.<LonLat>} corners - GeoImage corners coordinates. Where first coordinate
|
|
86
|
+
* coincedents to the left top image corner, secont to the right top image corner, third to the right bottom
|
|
87
|
+
* and fourth - left bottom image corner. (exactly 4 entries)
|
|
88
|
+
*/
|
|
89
|
+
setCornersLonLat(corners: LonLat[]): void;
|
|
90
|
+
/**
|
|
91
|
+
* Creates geoImage frame.
|
|
92
|
+
* @protected
|
|
93
|
+
*/
|
|
94
|
+
protected _createFrame(): void;
|
|
95
|
+
/**
|
|
96
|
+
* @public
|
|
97
|
+
* @override
|
|
98
|
+
* @param {Material} material - GeoImage material.
|
|
99
|
+
*/
|
|
100
|
+
abortMaterialLoading(material: Material): void;
|
|
101
|
+
/**
|
|
102
|
+
* Clear layer material.
|
|
103
|
+
* @public
|
|
104
|
+
* @override
|
|
105
|
+
*/
|
|
106
|
+
clear(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Sets layer visibility.
|
|
109
|
+
* @public
|
|
110
|
+
* @override
|
|
111
|
+
* @param {boolean} visibility - GeoImage visibility.
|
|
112
|
+
*/
|
|
113
|
+
setVisibility(visibility: boolean): void;
|
|
114
|
+
/**
|
|
115
|
+
* @public
|
|
116
|
+
* @param {Material} material - GeoImage material.
|
|
117
|
+
*/
|
|
118
|
+
clearMaterial(material: Material): void;
|
|
119
|
+
/**
|
|
120
|
+
* @public
|
|
121
|
+
* @override
|
|
122
|
+
* @returns {Array<number>} -
|
|
123
|
+
*/
|
|
124
|
+
applyMaterial(material: Material): NumberArray4;
|
|
125
|
+
/**
|
|
126
|
+
* Gets frame width size in pixels.
|
|
127
|
+
* @public
|
|
128
|
+
* @returns {Number} Frame width.
|
|
129
|
+
*/
|
|
130
|
+
get getFrameWidth(): number;
|
|
131
|
+
/**
|
|
132
|
+
* Gets frame height size in pixels.
|
|
133
|
+
* @public
|
|
134
|
+
* @returns {Number} Frame height.
|
|
135
|
+
*/
|
|
136
|
+
get getFrameHeight(): number;
|
|
137
|
+
/**
|
|
138
|
+
* Method depends on GeoImage instance
|
|
139
|
+
* @protected
|
|
140
|
+
*/
|
|
141
|
+
protected _createSourceTexture(): void;
|
|
142
|
+
_renderingProjType1(): void;
|
|
143
|
+
protected _renderingProjType0(): void;
|
|
144
|
+
}
|
|
145
|
+
export { BaseGeoImage };
|