@openglobus/og 0.23.0 → 0.24.1
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/lib/@openglobus/js/Clock.d.ts +2 -2
- package/lib/@openglobus/js/Globe.d.ts +10 -6
- package/lib/@openglobus/js/LonLat.d.ts +2 -2
- package/lib/@openglobus/js/Object3d.d.ts +3 -2
- package/lib/@openglobus/js/Popup.d.ts +7 -4
- package/lib/@openglobus/js/astro/astro.d.ts +1 -1
- package/lib/@openglobus/js/astro/earth.d.ts +1 -1
- package/lib/@openglobus/js/bv/Box.d.ts +1 -1
- package/lib/@openglobus/js/camera/Camera.d.ts +55 -19
- package/lib/@openglobus/js/camera/Frustum.d.ts +2 -2
- package/lib/@openglobus/js/camera/PlanetCamera.d.ts +14 -1
- package/lib/@openglobus/js/control/Atmosphere.d.ts +3 -3
- package/lib/@openglobus/js/control/AtmosphereConfig.d.ts +2 -2
- package/lib/@openglobus/js/control/CameraLock.d.ts +3 -3
- package/lib/@openglobus/js/control/CompassButton.d.ts +1 -1
- package/lib/@openglobus/js/control/DebugInfo.d.ts +1 -1
- package/lib/@openglobus/js/control/EarthCoordinates.d.ts +2 -2
- package/lib/@openglobus/js/control/GeoImageDragControl.d.ts +2 -2
- package/lib/@openglobus/js/control/KeyboardNavigation.d.ts +1 -1
- package/lib/@openglobus/js/control/LayerAnimation.d.ts +2 -2
- package/lib/@openglobus/js/control/LayerSwitcher.d.ts +4 -2
- package/lib/@openglobus/js/control/Lighting.d.ts +2 -1
- package/lib/@openglobus/js/control/MouseNavigation.d.ts +64 -52
- package/lib/@openglobus/js/control/OldMouseNavigation.d.ts +65 -0
- package/lib/@openglobus/js/control/RulerSwitcher.d.ts +2 -1
- package/lib/@openglobus/js/control/ScaleControl.d.ts +2 -1
- package/lib/@openglobus/js/control/SegmentBoundVisualization.d.ts +2 -1
- package/lib/@openglobus/js/control/ShowFps.d.ts +2 -1
- package/lib/@openglobus/js/control/SimpleNavigation.d.ts +3 -2
- package/lib/@openglobus/js/control/SimpleSkyBackground.d.ts +2 -1
- package/lib/@openglobus/js/control/Sun.d.ts +2 -1
- package/lib/@openglobus/js/control/ToggleWireframe.d.ts +2 -1
- package/lib/@openglobus/js/control/TouchNavigation.d.ts +3 -2
- package/lib/@openglobus/js/control/ZoomControl.d.ts +2 -1
- package/lib/@openglobus/js/control/drawing/DrawingControl.d.ts +1 -1
- package/lib/@openglobus/js/control/drawing/LineStringDrawingScene.d.ts +1 -1
- package/lib/@openglobus/js/control/drawing/PolygonDrawingScene.d.ts +3 -3
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfile.d.ts +1 -1
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileButtonsView.d.ts +3 -2
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileControl.d.ts +2 -2
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileScene.d.ts +2 -2
- package/lib/@openglobus/js/control/elevationProfile/ElevationProfileView.d.ts +6 -4
- package/lib/@openglobus/js/control/elevationProfile/PointListDialog.d.ts +1 -1
- package/lib/@openglobus/js/control/geoObjectEditor/ArrowEntity.d.ts +1 -1
- package/lib/@openglobus/js/control/geoObjectEditor/AxisTrackEntity.d.ts +1 -1
- package/lib/@openglobus/js/control/geoObjectEditor/GeoObjectEditor.d.ts +1 -1
- package/lib/@openglobus/js/control/geoObjectEditor/GeoObjectEditorDialog.d.ts +1 -1
- package/lib/@openglobus/js/control/geoObjectEditor/GeoObjectEditorScene.d.ts +2 -2
- package/lib/@openglobus/js/control/geoObjectEditor/MoveAxisEntity.d.ts +1 -1
- package/lib/@openglobus/js/control/geoObjectEditor/MovePlaneEntity.d.ts +1 -1
- package/lib/@openglobus/js/control/geoObjectEditor/RotateEntity.d.ts +1 -1
- package/lib/@openglobus/js/control/heightRuler/HeightRuler.d.ts +1 -1
- package/lib/@openglobus/js/control/heightRuler/HeightRulerScene.d.ts +1 -1
- package/lib/@openglobus/js/control/index.d.ts +1 -2
- package/lib/@openglobus/js/control/ruler/Ruler.d.ts +2 -1
- package/lib/@openglobus/js/control/ruler/RulerScene.d.ts +2 -2
- package/lib/@openglobus/js/control/selection/Selection.d.ts +2 -1
- package/lib/@openglobus/js/control/timeline/TimelineControl.d.ts +1 -1
- package/lib/@openglobus/js/control/timeline/TimelineModel.d.ts +1 -1
- package/lib/@openglobus/js/control/timeline/TimelineView.d.ts +4 -3
- package/lib/@openglobus/js/ellipsoid/Ellipsoid.d.ts +1 -1
- package/lib/@openglobus/js/entity/BaseBillboard.d.ts +6 -3
- package/lib/@openglobus/js/entity/BaseBillboardHandler.d.ts +2 -2
- package/lib/@openglobus/js/entity/Billboard.d.ts +3 -2
- package/lib/@openglobus/js/entity/Entity.d.ts +47 -32
- package/lib/@openglobus/js/entity/EntityCollection.d.ts +4 -3
- package/lib/@openglobus/js/entity/GeoObject.d.ts +2 -11
- package/lib/@openglobus/js/entity/Geometry.d.ts +4 -3
- package/lib/@openglobus/js/entity/GeometryHandler.d.ts +3 -2
- package/lib/@openglobus/js/entity/InstanceData.d.ts +2 -2
- package/lib/@openglobus/js/entity/Label.d.ts +4 -2
- package/lib/@openglobus/js/entity/LabelHandler.d.ts +1 -1
- package/lib/@openglobus/js/entity/PointCloud.d.ts +1 -1
- package/lib/@openglobus/js/entity/Polyline.d.ts +9 -7
- package/lib/@openglobus/js/entity/Ray.d.ts +4 -2
- package/lib/@openglobus/js/entity/RayHandler.d.ts +2 -2
- package/lib/@openglobus/js/entity/Strip.d.ts +5 -3
- package/lib/@openglobus/js/input/KeyboardHandler.d.ts +1 -1
- package/lib/@openglobus/js/input/MouseHandler.d.ts +1 -0
- package/lib/@openglobus/js/layer/BaseGeoImage.d.ts +6 -5
- package/lib/@openglobus/js/layer/Bing.d.ts +2 -1
- package/lib/@openglobus/js/layer/CanvasTiles.d.ts +4 -3
- package/lib/@openglobus/js/layer/GeoImage.d.ts +2 -1
- package/lib/@openglobus/js/layer/GeoTexture2d.d.ts +3 -2
- package/lib/@openglobus/js/layer/GeoVideo.d.ts +2 -1
- package/lib/@openglobus/js/layer/KML.d.ts +5 -3
- package/lib/@openglobus/js/layer/Layer.d.ts +5 -4
- package/lib/@openglobus/js/layer/Material.d.ts +2 -2
- package/lib/@openglobus/js/layer/OpenStreetMap.d.ts +2 -1
- package/lib/@openglobus/js/layer/Vector.d.ts +9 -7
- package/lib/@openglobus/js/layer/WMS.d.ts +2 -1
- package/lib/@openglobus/js/layer/XYZ.d.ts +4 -3
- package/lib/@openglobus/js/math/Mat3.d.ts +1 -1
- package/lib/@openglobus/js/math/Mat4.d.ts +10 -1
- package/lib/@openglobus/js/math/Plane.d.ts +3 -1
- package/lib/@openglobus/js/math/Quat.d.ts +7 -1
- package/lib/@openglobus/js/math/Ray.d.ts +6 -16
- package/lib/@openglobus/js/math/Vec2.d.ts +22 -0
- package/lib/@openglobus/js/math/Vec3.d.ts +3 -2
- package/lib/@openglobus/js/math/coder.d.ts +5 -3
- package/lib/@openglobus/js/math/index.d.ts +6 -3
- package/lib/@openglobus/js/math.d.ts +2 -2
- package/lib/@openglobus/js/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +2 -1
- package/lib/@openglobus/js/quadTree/earth/EarthQuadTreeStrategy.d.ts +0 -2
- package/lib/@openglobus/js/quadTree/equi/EquiEntityCollectionNodeLonLat.d.ts +2 -1
- package/lib/@openglobus/js/renderer/Renderer.d.ts +5 -3
- package/lib/@openglobus/js/renderer/RendererEvents.d.ts +7 -3
- package/lib/@openglobus/js/scene/Axes.d.ts +1 -1
- package/lib/@openglobus/js/scene/Planet.d.ts +12 -6
- package/lib/@openglobus/js/scene/SkyBox.d.ts +1 -1
- package/lib/@openglobus/js/segment/Segment.d.ts +7 -5
- package/lib/@openglobus/js/segment/SegmentLonLat.d.ts +1 -1
- package/lib/@openglobus/js/segment/SegmentLonLatEqui.d.ts +1 -1
- package/lib/@openglobus/js/shaders/atmos.d.ts +1 -1
- package/lib/@openglobus/js/shaders/drawnode.d.ts +1 -1
- package/lib/@openglobus/js/terrain/BilTerrain.d.ts +3 -2
- package/lib/@openglobus/js/terrain/EmptyTerrain.d.ts +1 -1
- package/lib/@openglobus/js/terrain/GlobusRgbTerrain.d.ts +2 -1
- package/lib/@openglobus/js/terrain/GlobusTerrain.d.ts +5 -4
- package/lib/@openglobus/js/terrain/RgbTerrain.d.ts +3 -2
- package/lib/@openglobus/js/ui/Button.d.ts +3 -2
- package/lib/@openglobus/js/ui/ButtonGroup.d.ts +1 -1
- package/lib/@openglobus/js/ui/Checkbox.d.ts +3 -2
- package/lib/@openglobus/js/ui/Color.d.ts +3 -2
- package/lib/@openglobus/js/ui/Dialog.d.ts +3 -2
- package/lib/@openglobus/js/ui/Input.d.ts +3 -2
- package/lib/@openglobus/js/ui/Slider.d.ts +3 -2
- package/lib/@openglobus/js/ui/ToggleButton.d.ts +4 -3
- package/lib/@openglobus/js/ui/View.d.ts +1 -1
- package/lib/@openglobus/js/utils/FontAtlas.d.ts +1 -1
- package/lib/@openglobus/js/utils/GeoImageCreator.d.ts +1 -1
- package/lib/@openglobus/js/utils/Loader.d.ts +1 -1
- package/lib/@openglobus/js/utils/NormalMapCreator.d.ts +2 -1
- package/lib/@openglobus/js/utils/TerrainWorker.d.ts +1 -1
- package/lib/@openglobus/js/utils/TextureAtlas.d.ts +4 -2
- package/lib/@openglobus/js/utils/objParser.d.ts +1 -1
- package/lib/@openglobus/js/utils/shared.d.ts +5 -3
- package/lib/@openglobus/js/webgl/Framebuffer.d.ts +3 -2
- package/lib/@openglobus/js/webgl/Handler.d.ts +32 -19
- package/lib/@openglobus/js/webgl/Multisample.d.ts +2 -1
- package/lib/@openglobus/js/webgl/Program.d.ts +2 -2
- package/lib/@openglobus/js/webgl/ProgramController.d.ts +2 -1
- package/lib/@openglobus/js/webgl/variableHandlers.d.ts +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/Clock.d.ts +2 -2
- package/lib/js/Globe.d.ts +10 -6
- package/lib/js/Globe.js +10 -4
- package/lib/js/LonLat.d.ts +2 -2
- package/lib/js/Object3d.d.ts +3 -2
- package/lib/js/Popup.d.ts +7 -4
- package/lib/js/Popup.js +1 -1
- package/lib/js/astro/astro.d.ts +1 -1
- package/lib/js/astro/earth.d.ts +1 -1
- package/lib/js/bv/Box.d.ts +1 -1
- package/lib/js/camera/Camera.d.ts +55 -19
- package/lib/js/camera/Camera.js +82 -28
- package/lib/js/camera/Frustum.d.ts +2 -2
- package/lib/js/camera/PlanetCamera.d.ts +14 -1
- package/lib/js/camera/PlanetCamera.js +52 -5
- package/lib/js/control/Atmosphere.d.ts +3 -3
- package/lib/js/control/AtmosphereConfig.d.ts +2 -2
- package/lib/js/control/CameraLock.d.ts +3 -3
- package/lib/js/control/CameraLock.js +1 -1
- package/lib/js/control/CompassButton.d.ts +1 -1
- package/lib/js/control/DebugInfo.d.ts +1 -1
- package/lib/js/control/DebugInfo.js +30 -10
- package/lib/js/control/EarthCoordinates.d.ts +2 -2
- package/lib/js/control/GeoImageDragControl.d.ts +2 -2
- package/lib/js/control/KeyboardNavigation.d.ts +1 -1
- package/lib/js/control/KeyboardNavigation.js +8 -8
- package/lib/js/control/LayerAnimation.d.ts +2 -2
- package/lib/js/control/LayerSwitcher.d.ts +4 -2
- package/lib/js/control/Lighting.d.ts +2 -1
- package/lib/js/control/MouseNavigation.d.ts +64 -52
- package/lib/js/control/MouseNavigation.js +361 -305
- package/lib/js/control/MouseWheelZoomControl.d.ts +0 -44
- package/lib/js/control/MouseWheelZoomControl.js +270 -181
- package/lib/js/control/OldMouseNavigation.d.ts +65 -0
- package/lib/js/control/OldMouseNavigation.js +368 -0
- package/lib/js/control/RulerSwitcher.d.ts +2 -1
- package/lib/js/control/ScaleControl.d.ts +2 -1
- package/lib/js/control/ScaleControl.js +2 -2
- package/lib/js/control/SegmentBoundVisualization.d.ts +2 -1
- package/lib/js/control/ShowFps.d.ts +2 -1
- package/lib/js/control/SimpleNavigation.d.ts +3 -2
- package/lib/js/control/SimpleNavigation.js +8 -7
- package/lib/js/control/SimpleSkyBackground.d.ts +2 -1
- package/lib/js/control/Sun.d.ts +2 -1
- package/lib/js/control/Sun.js +5 -5
- package/lib/js/control/ToggleWireframe.d.ts +2 -1
- package/lib/js/control/TouchNavigation.d.ts +3 -2
- package/lib/js/control/TouchNavigation.js +11 -8
- package/lib/js/control/ZoomControl.d.ts +2 -1
- package/lib/js/control/drawing/DrawingControl.d.ts +1 -1
- package/lib/js/control/drawing/LineStringDrawingScene.d.ts +1 -1
- package/lib/js/control/drawing/PolygonDrawingScene.d.ts +3 -3
- package/lib/js/control/elevationProfile/ElevationProfile.d.ts +1 -1
- package/lib/js/control/elevationProfile/ElevationProfileButtonsView.d.ts +3 -2
- package/lib/js/control/elevationProfile/ElevationProfileControl.d.ts +2 -2
- package/lib/js/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
- package/lib/js/control/elevationProfile/ElevationProfileScene.d.ts +2 -2
- package/lib/js/control/elevationProfile/ElevationProfileScene.js +2 -1
- package/lib/js/control/elevationProfile/ElevationProfileView.d.ts +6 -4
- package/lib/js/control/elevationProfile/ElevationProfileView.js +1 -1
- package/lib/js/control/elevationProfile/PointListDialog.d.ts +1 -1
- package/lib/js/control/geoObjectEditor/ArrowEntity.d.ts +1 -1
- package/lib/js/control/geoObjectEditor/AxisTrackEntity.d.ts +1 -1
- package/lib/js/control/geoObjectEditor/GeoObjectEditor.d.ts +1 -1
- package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.d.ts +1 -1
- package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.js +19 -33
- package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.d.ts +2 -2
- package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.js +18 -18
- package/lib/js/control/geoObjectEditor/MoveAxisEntity.d.ts +1 -1
- package/lib/js/control/geoObjectEditor/MoveAxisEntity.js +3 -2
- package/lib/js/control/geoObjectEditor/MovePlaneEntity.d.ts +1 -1
- package/lib/js/control/geoObjectEditor/MovePlaneEntity.js +1 -4
- package/lib/js/control/geoObjectEditor/RotateEntity.d.ts +1 -1
- package/lib/js/control/geoObjectEditor/RotateEntity.js +1 -1
- package/lib/js/control/heightRuler/HeightRuler.d.ts +1 -1
- package/lib/js/control/heightRuler/HeightRulerScene.d.ts +1 -1
- package/lib/js/control/index.d.ts +1 -2
- package/lib/js/control/index.js +1 -2
- package/lib/js/control/ruler/Ruler.d.ts +2 -1
- package/lib/js/control/ruler/RulerScene.d.ts +2 -2
- package/lib/js/control/selection/Selection.d.ts +2 -1
- package/lib/js/control/timeline/TimelineControl.d.ts +1 -1
- package/lib/js/control/timeline/TimelineModel.d.ts +1 -1
- package/lib/js/control/timeline/TimelineView.d.ts +4 -3
- package/lib/js/control/visibleExtent/Segment.js +4 -4
- package/lib/js/ellipsoid/Ellipsoid.d.ts +1 -1
- package/lib/js/ellipsoid/Ellipsoid.js +1 -1
- package/lib/js/entity/BaseBillboard.d.ts +6 -3
- package/lib/js/entity/BaseBillboardHandler.d.ts +2 -2
- package/lib/js/entity/Billboard.d.ts +3 -2
- package/lib/js/entity/Entity.d.ts +47 -32
- package/lib/js/entity/Entity.js +62 -47
- package/lib/js/entity/EntityCollection.d.ts +4 -3
- package/lib/js/entity/GeoObject.d.ts +2 -11
- package/lib/js/entity/GeoObject.js +0 -3
- package/lib/js/entity/Geometry.d.ts +4 -3
- package/lib/js/entity/GeometryHandler.d.ts +3 -2
- package/lib/js/entity/InstanceData.d.ts +2 -2
- package/lib/js/entity/InstanceData.js +6 -3
- package/lib/js/entity/Label.d.ts +4 -2
- package/lib/js/entity/LabelHandler.d.ts +1 -1
- package/lib/js/entity/PointCloud.d.ts +1 -1
- package/lib/js/entity/Polyline.d.ts +9 -7
- package/lib/js/entity/Polyline.js +2 -1
- package/lib/js/entity/Ray.d.ts +4 -2
- package/lib/js/entity/RayHandler.d.ts +2 -2
- package/lib/js/entity/Strip.d.ts +5 -3
- package/lib/js/input/KeyboardHandler.d.ts +1 -1
- package/lib/js/input/MouseHandler.d.ts +1 -0
- package/lib/js/input/MouseHandler.js +12 -1
- package/lib/js/layer/BaseGeoImage.d.ts +6 -5
- package/lib/js/layer/Bing.d.ts +2 -1
- package/lib/js/layer/CanvasTiles.d.ts +4 -3
- package/lib/js/layer/GeoImage.d.ts +2 -1
- package/lib/js/layer/GeoTexture2d.d.ts +3 -2
- package/lib/js/layer/GeoVideo.d.ts +2 -1
- package/lib/js/layer/KML.d.ts +5 -3
- package/lib/js/layer/KML.js +1 -1
- package/lib/js/layer/Layer.d.ts +5 -4
- package/lib/js/layer/Material.d.ts +2 -2
- package/lib/js/layer/OpenStreetMap.d.ts +2 -1
- package/lib/js/layer/Vector.d.ts +9 -7
- package/lib/js/layer/Vector.js +1 -1
- package/lib/js/layer/WMS.d.ts +2 -1
- package/lib/js/layer/XYZ.d.ts +4 -3
- package/lib/js/math/Mat3.d.ts +1 -1
- package/lib/js/math/Mat3.js +1 -1
- package/lib/js/math/Mat4.d.ts +10 -1
- package/lib/js/math/Mat4.js +17 -1
- package/lib/js/math/Plane.d.ts +3 -1
- package/lib/js/math/Plane.js +11 -1
- package/lib/js/math/Quat.d.ts +7 -1
- package/lib/js/math/Quat.js +7 -1
- package/lib/js/math/Ray.d.ts +6 -16
- package/lib/js/math/Ray.js +53 -46
- package/lib/js/math/Vec2.d.ts +22 -0
- package/lib/js/math/Vec2.js +32 -0
- package/lib/js/math/Vec3.d.ts +3 -2
- package/lib/js/math/coder.d.ts +5 -3
- package/lib/js/math/index.d.ts +6 -3
- package/lib/js/math.d.ts +2 -2
- package/lib/js/math.js +2 -2
- package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +2 -1
- package/lib/js/quadTree/earth/EarthQuadTreeStrategy.d.ts +0 -2
- package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.d.ts +2 -1
- package/lib/js/renderer/Renderer.d.ts +5 -3
- package/lib/js/renderer/Renderer.js +10 -6
- package/lib/js/renderer/RendererEvents.d.ts +7 -3
- package/lib/js/renderer/RendererEvents.js +5 -3
- package/lib/js/scene/Axes.d.ts +1 -1
- package/lib/js/scene/Planet.d.ts +12 -6
- package/lib/js/scene/Planet.js +24 -3
- package/lib/js/scene/SkyBox.d.ts +1 -1
- package/lib/js/segment/Segment.d.ts +7 -5
- package/lib/js/segment/Segment.js +4 -4
- package/lib/js/segment/SegmentLonLat.d.ts +1 -1
- package/lib/js/segment/SegmentLonLatEqui.d.ts +1 -1
- package/lib/js/shaders/atmos.d.ts +1 -1
- package/lib/js/shaders/drawnode.d.ts +1 -1
- package/lib/js/terrain/BilTerrain.d.ts +3 -2
- package/lib/js/terrain/EmptyTerrain.d.ts +1 -1
- package/lib/js/terrain/GlobusRgbTerrain.d.ts +2 -1
- package/lib/js/terrain/GlobusTerrain.d.ts +5 -4
- package/lib/js/terrain/GlobusTerrain.js +2 -2
- package/lib/js/terrain/RgbTerrain.d.ts +3 -2
- package/lib/js/ui/Button.d.ts +3 -2
- package/lib/js/ui/ButtonGroup.d.ts +1 -1
- package/lib/js/ui/Checkbox.d.ts +3 -2
- package/lib/js/ui/Color.d.ts +3 -2
- package/lib/js/ui/Dialog.d.ts +3 -2
- package/lib/js/ui/Input.d.ts +3 -2
- package/lib/js/ui/Slider.d.ts +3 -2
- package/lib/js/ui/ToggleButton.d.ts +4 -3
- package/lib/js/ui/View.d.ts +1 -1
- package/lib/js/utils/FontAtlas.d.ts +1 -1
- package/lib/js/utils/GeoImageCreator.d.ts +1 -1
- package/lib/js/utils/Loader.d.ts +1 -1
- package/lib/js/utils/NormalMapCreator.d.ts +2 -1
- package/lib/js/utils/TerrainWorker.d.ts +1 -1
- package/lib/js/utils/TextureAtlas.d.ts +4 -2
- package/lib/js/utils/objParser.d.ts +1 -1
- package/lib/js/utils/shared.d.ts +5 -3
- package/lib/js/webgl/Framebuffer.d.ts +3 -2
- package/lib/js/webgl/Handler.d.ts +32 -19
- package/lib/js/webgl/Handler.js +48 -36
- package/lib/js/webgl/Multisample.d.ts +2 -1
- package/lib/js/webgl/Program.d.ts +2 -2
- package/lib/js/webgl/ProgramController.d.ts +2 -1
- package/lib/js/webgl/variableHandlers.d.ts +1 -1
- package/package.json +2 -2
- package/lib/@openglobus/js/control/EarthNavigation.d.ts +0 -50
- package/lib/@openglobus/js/control/MouseWheelZoomControl.d.ts +0 -44
- package/lib/js/control/EarthNavigation.d.ts +0 -50
- package/lib/js/control/EarthNavigation.js +0 -202
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Control, IControlParams } from "../Control";
|
|
1
|
+
import { Control, type IControlParams } from "../Control";
|
|
2
2
|
import { Dialog } from "../../ui/Dialog";
|
|
3
3
|
import { View } from "../../ui/View";
|
|
4
4
|
import { ToggleButton } from "../../ui/ToggleButton";
|
|
@@ -6,7 +6,7 @@ import { ElevationProfileView } from "./ElevationProfileView";
|
|
|
6
6
|
import { ElevationProfileScene } from "./ElevationProfileScene";
|
|
7
7
|
import { ElevationProfileButtonsView } from "./ElevationProfileButtonsView";
|
|
8
8
|
import { PointListDialog } from "./PointListDialog";
|
|
9
|
-
import { GroundItem, TrackItem } from "./ElevationProfile";
|
|
9
|
+
import type { GroundItem, TrackItem } from "./ElevationProfile";
|
|
10
10
|
import { ElevationProfileLegend } from "./ElevationProfileLegend";
|
|
11
11
|
interface IElevationProfileGraphParams extends IControlParams {
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Entity } from '../../entity/Entity';
|
|
2
|
-
import { EventsHandler } from '../../Events';
|
|
2
|
+
import { type EventsHandler } from '../../Events';
|
|
3
3
|
import { LonLat } from "../../LonLat";
|
|
4
4
|
import { Planet } from "../../scene/Planet";
|
|
5
5
|
import { RenderNode } from '../../scene/RenderNode';
|
|
6
6
|
import { Vector } from '../../layer/Vector';
|
|
7
7
|
import { Vec2 } from '../../math/Vec2';
|
|
8
8
|
import { Vec3 } from '../../math/Vec3';
|
|
9
|
-
import { IMouseState } from "../../renderer/RendererEvents";
|
|
9
|
+
import type { IMouseState } from "../../renderer/RendererEvents";
|
|
10
10
|
import { Ellipsoid } from "../../ellipsoid/Ellipsoid";
|
|
11
11
|
export interface IElevationProfileSceneParams {
|
|
12
12
|
name?: string;
|
|
@@ -8,6 +8,7 @@ import { Vector } from '../../layer/Vector';
|
|
|
8
8
|
import { Vec2 } from '../../math/Vec2';
|
|
9
9
|
import { Vec3 } from '../../math/Vec3';
|
|
10
10
|
import { Ray } from "../../math/Ray";
|
|
11
|
+
import { Plane } from "../../math/Plane";
|
|
11
12
|
let groundObj3d = Object3d.createCylinder(0.33, 0, 1.0, 20, 1, true, false, 0, 0, 0);
|
|
12
13
|
let headObj3d = Object3d.createCylinder(0.33, 0.33, 1.1, 20, 1, true, true, 0, -0.55, 0);
|
|
13
14
|
const POINTER_RAY_OPTIONS = {
|
|
@@ -79,7 +80,7 @@ class ElevationProfileScene extends RenderNode {
|
|
|
79
80
|
let p1 = p0.add(groundNormal);
|
|
80
81
|
let p2 = p0.add(cam.getRight());
|
|
81
82
|
let px = new Vec3();
|
|
82
|
-
if (new Ray(cam.eye, e.direction).
|
|
83
|
+
if (new Ray(cam.eye, e.direction).hitPlaneRes(Plane.fromPoints(p0, p1, p2), px) === Ray.INSIDE) {
|
|
83
84
|
let h = Vec3.proj_b_to_a(px, p0);
|
|
84
85
|
let s = h.sub(p0).dot(p0);
|
|
85
86
|
let headPos = p0.add(groundNormal.scale(Math.sign(s) * h.distance(p0)));
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { EventsHandler } from "../../Events";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { EventsHandler } from "../../Events";
|
|
2
|
+
import { View } from '../../ui/View';
|
|
3
|
+
import type { IViewParams, ViewEventsList } from '../../ui/View';
|
|
4
|
+
import { ElevationProfile } from './ElevationProfile';
|
|
5
|
+
import type { GroundItem, TrackItem } from './ElevationProfile';
|
|
6
|
+
import type { MouseEventExt } from "../../input/MouseHandler";
|
|
5
7
|
interface IElevationProfileViewParams extends IViewParams {
|
|
6
8
|
fillStyle?: string;
|
|
7
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { View } from '../../ui/View';
|
|
2
|
-
import { SAFE, WARNING, COLLISION, ElevationProfile } from './ElevationProfile';
|
|
2
|
+
import { SAFE, WARNING, COLLISION, ElevationProfile, } from './ElevationProfile';
|
|
3
3
|
import { distanceFormatExt, binarySearch } from "../../utils/shared";
|
|
4
4
|
const FILL_COLOR = "rgb(63, 63, 63)";
|
|
5
5
|
const TRACK_COLOR = "rgb(0, 255, 50)";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDialogParams, Dialog } from "../../ui/Dialog";
|
|
1
|
+
import { type IDialogParams, Dialog } from "../../ui/Dialog";
|
|
2
2
|
import { ElevationProfileScene } from "./ElevationProfileScene";
|
|
3
3
|
interface IPointListDialog extends IDialogParams {
|
|
4
4
|
model: ElevationProfileScene;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Control, IControlParams } from "../Control";
|
|
1
|
+
import { Control, type IControlParams } from "../Control";
|
|
2
2
|
import { GeoObjectEditorScene } from "./GeoObjectEditorScene";
|
|
3
3
|
import { GeoObjectPropertiesDialog } from "./GeoObjectEditorDialog";
|
|
4
4
|
export interface IGeoObjectEditorParams extends IControlParams {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dialog, IDialogParams } from "../../ui/Dialog";
|
|
1
|
+
import { Dialog, type IDialogParams } from "../../ui/Dialog";
|
|
2
2
|
import { GeoObjectEditorScene } from "./GeoObjectEditorScene";
|
|
3
3
|
import { Entity } from "../../entity/Entity";
|
|
4
4
|
import { Input } from "../../ui/Input";
|
|
@@ -4,6 +4,7 @@ import { Checkbox } from "../../ui/Checkbox";
|
|
|
4
4
|
import { Button } from "../../ui/Button";
|
|
5
5
|
import { Vec3 } from "../../math/Vec3";
|
|
6
6
|
import { ToggleButton } from "../../ui/ToggleButton";
|
|
7
|
+
import { DEGREES, RADIANS } from "../../math";
|
|
7
8
|
const ICON_LOCK_BUTTON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" id="filter-center-focus">
|
|
8
9
|
<path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>
|
|
9
10
|
</svg>`;
|
|
@@ -41,39 +42,24 @@ export class GeoObjectPropertiesDialog extends Dialog {
|
|
|
41
42
|
};
|
|
42
43
|
this._onPosition = (pos, entity) => {
|
|
43
44
|
this._refresh(entity);
|
|
44
|
-
// let ll = entity.getLonLat();
|
|
45
|
-
// this._lonView.stopPropagation();
|
|
46
|
-
// this._latView.stopPropagation();
|
|
47
|
-
// this._heightView.stopPropagation();
|
|
48
|
-
// this._lonView.value = ll.lon;
|
|
49
|
-
// this._latView.value = ll.lat;
|
|
50
|
-
// this._heightView.value = ll.height;
|
|
51
|
-
//
|
|
52
|
-
// let cart = entity.getCartesian();
|
|
53
|
-
// this._xView.stopPropagation();
|
|
54
|
-
// this._yView.stopPropagation();
|
|
55
|
-
// this._zView.stopPropagation();
|
|
56
|
-
// this._xView.value = cart.x;
|
|
57
|
-
// this._yView.value = cart.y;
|
|
58
|
-
// this._zView.value = cart.z;
|
|
59
45
|
};
|
|
60
46
|
this._onPitch = (a, entity) => {
|
|
61
47
|
this._pitchView.stopPropagation();
|
|
62
|
-
this._pitchView.value = entity.getPitch();
|
|
48
|
+
this._pitchView.value = entity.getPitch() * DEGREES;
|
|
63
49
|
this._absolutePitchView.stopPropagation();
|
|
64
|
-
this._absolutePitchView.value = entity.getAbsolutePitch();
|
|
50
|
+
this._absolutePitchView.value = entity.getAbsolutePitch() * DEGREES;
|
|
65
51
|
};
|
|
66
52
|
this._onYaw = (a, entity) => {
|
|
67
53
|
this._yawView.stopPropagation();
|
|
68
|
-
this._yawView.value = entity.getYaw();
|
|
54
|
+
this._yawView.value = entity.getYaw() * DEGREES;
|
|
69
55
|
this._absoluteYawView.stopPropagation();
|
|
70
|
-
this._absoluteYawView.value = entity.getAbsoluteYaw();
|
|
56
|
+
this._absoluteYawView.value = entity.getAbsoluteYaw() * DEGREES;
|
|
71
57
|
};
|
|
72
58
|
this._onRoll = (a, entity) => {
|
|
73
59
|
this._rollView.stopPropagation();
|
|
74
|
-
this._rollView.value = entity.getRoll();
|
|
60
|
+
this._rollView.value = entity.getRoll() * DEGREES;
|
|
75
61
|
this._absoluteRollView.stopPropagation();
|
|
76
|
-
this._absoluteRollView.value = entity.getAbsoluteRoll();
|
|
62
|
+
this._absoluteRollView.value = entity.getAbsoluteRoll() * DEGREES;
|
|
77
63
|
};
|
|
78
64
|
this._onChangeLon = (val) => {
|
|
79
65
|
let entity = this.model.getSelectedEntity();
|
|
@@ -150,42 +136,42 @@ export class GeoObjectPropertiesDialog extends Dialog {
|
|
|
150
136
|
this._onChangePitch = (val) => {
|
|
151
137
|
let entity = this.model.getSelectedEntity();
|
|
152
138
|
if (entity) {
|
|
153
|
-
entity.setPitch(parseFloat(val));
|
|
139
|
+
entity.setPitch(parseFloat(val) * RADIANS);
|
|
154
140
|
this._refresh(entity);
|
|
155
141
|
}
|
|
156
142
|
};
|
|
157
143
|
this._onChangeYaw = (val) => {
|
|
158
144
|
let entity = this.model.getSelectedEntity();
|
|
159
145
|
if (entity) {
|
|
160
|
-
entity.setYaw(parseFloat(val));
|
|
146
|
+
entity.setYaw(parseFloat(val) * RADIANS);
|
|
161
147
|
this._refresh(entity);
|
|
162
148
|
}
|
|
163
149
|
};
|
|
164
150
|
this._onChangeRoll = (val) => {
|
|
165
151
|
let entity = this.model.getSelectedEntity();
|
|
166
152
|
if (entity) {
|
|
167
|
-
entity.setRoll(parseFloat(val));
|
|
153
|
+
entity.setRoll(parseFloat(val) * RADIANS);
|
|
168
154
|
this._refresh(entity);
|
|
169
155
|
}
|
|
170
156
|
};
|
|
171
157
|
this._onChangeAbsolutePitch = (val) => {
|
|
172
158
|
let entity = this.model.getSelectedEntity();
|
|
173
159
|
if (entity) {
|
|
174
|
-
entity.setAbsolutePitch(parseFloat(val));
|
|
160
|
+
entity.setAbsolutePitch(parseFloat(val) * RADIANS);
|
|
175
161
|
this._refresh(entity);
|
|
176
162
|
}
|
|
177
163
|
};
|
|
178
164
|
this._onChangeAbsoluteYaw = (val) => {
|
|
179
165
|
let entity = this.model.getSelectedEntity();
|
|
180
166
|
if (entity) {
|
|
181
|
-
entity.setAbsoluteYaw(parseFloat(val));
|
|
167
|
+
entity.setAbsoluteYaw(parseFloat(val) * RADIANS);
|
|
182
168
|
this._refresh(entity);
|
|
183
169
|
}
|
|
184
170
|
};
|
|
185
171
|
this._onChangeAbsoluteRoll = (val) => {
|
|
186
172
|
let entity = this.model.getSelectedEntity();
|
|
187
173
|
if (entity) {
|
|
188
|
-
entity.setAbsoluteRoll(parseFloat(val));
|
|
174
|
+
entity.setAbsoluteRoll(parseFloat(val) * RADIANS);
|
|
189
175
|
this._refresh(entity);
|
|
190
176
|
}
|
|
191
177
|
};
|
|
@@ -470,15 +456,15 @@ export class GeoObjectPropertiesDialog extends Dialog {
|
|
|
470
456
|
this._pitchView.stopPropagation();
|
|
471
457
|
this._yawView.stopPropagation();
|
|
472
458
|
this._rollView.stopPropagation();
|
|
473
|
-
this._pitchView.value = entity.getPitch();
|
|
474
|
-
this._yawView.value = entity.getYaw();
|
|
475
|
-
this._rollView.value = entity.getRoll();
|
|
459
|
+
this._pitchView.value = entity.getPitch() * DEGREES;
|
|
460
|
+
this._yawView.value = entity.getYaw() * DEGREES;
|
|
461
|
+
this._rollView.value = entity.getRoll() * DEGREES;
|
|
476
462
|
this._absolutePitchView.stopPropagation();
|
|
477
463
|
this._absoluteYawView.stopPropagation();
|
|
478
464
|
this._absoluteRollView.stopPropagation();
|
|
479
|
-
this._absolutePitchView.value = entity.getAbsolutePitch();
|
|
480
|
-
this._absoluteYawView.value = entity.getAbsoluteYaw();
|
|
481
|
-
this._absoluteRollView.value = entity.getAbsoluteRoll();
|
|
465
|
+
this._absolutePitchView.value = entity.getAbsolutePitch() * DEGREES;
|
|
466
|
+
this._absoluteYawView.value = entity.getAbsoluteYaw() * DEGREES;
|
|
467
|
+
this._absoluteRollView.value = entity.getAbsoluteRoll() * DEGREES;
|
|
482
468
|
this._scaleView.stopPropagation();
|
|
483
469
|
let scl = entity.getScale();
|
|
484
470
|
if ((scl.x === scl.y) && (scl.y === scl.z)) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { EventsHandler } from '../../Events';
|
|
1
|
+
import { type EventsHandler } from '../../Events';
|
|
2
2
|
import { Planet } from "../../scene/Planet";
|
|
3
3
|
import { RenderNode } from '../../scene/RenderNode';
|
|
4
4
|
import { Vec2 } from '../../math/Vec2';
|
|
5
5
|
import { Vec3 } from '../../math/Vec3';
|
|
6
6
|
import { Quat } from '../../math/Quat';
|
|
7
|
-
import { IMouseState } from "../../renderer/RendererEvents";
|
|
7
|
+
import type { IMouseState } from "../../renderer/RendererEvents";
|
|
8
8
|
import { Ellipsoid } from "../../ellipsoid/Ellipsoid";
|
|
9
9
|
import { Entity } from "../../entity/Entity";
|
|
10
10
|
import { MoveAxisEntity } from "./MoveAxisEntity";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createEvents } from '../../Events';
|
|
2
|
-
import {
|
|
2
|
+
import { MAX32 } from "../../math";
|
|
3
3
|
import { Plane } from "../../math/Plane";
|
|
4
4
|
import { RenderNode } from '../../scene/RenderNode';
|
|
5
5
|
import { Vec2 } from '../../math/Vec2';
|
|
@@ -17,9 +17,9 @@ import { EntityCollection } from "../../entity/EntityCollection";
|
|
|
17
17
|
function dragSimpleRes(unit, eye, clickDir, direction, p0, res) {
|
|
18
18
|
let p1 = p0.add(Vec3.UP), p2 = p0.add(unit);
|
|
19
19
|
let px = new Vec3();
|
|
20
|
-
if (new Ray(eye, clickDir).
|
|
20
|
+
if (new Ray(eye, clickDir).hitPlaneRes(Plane.fromPoints(p0, p1, p2), px) === Ray.INSIDE) {
|
|
21
21
|
let clickCart = Vec3.proj_b_to_a(px, unit);
|
|
22
|
-
if (new Ray(eye, direction).
|
|
22
|
+
if (new Ray(eye, direction).hitPlaneRes(Plane.fromPoints(p0, p1, p2), px) === Ray.INSIDE) {
|
|
23
23
|
let dragCart = Vec3.proj_b_to_a(px, unit);
|
|
24
24
|
let dragVec = dragCart.sub(clickCart);
|
|
25
25
|
res.copy(p0.add(dragVec));
|
|
@@ -148,9 +148,9 @@ class GeoObjectEditorScene extends RenderNode {
|
|
|
148
148
|
let p2 = p0.add(cam.getRight());
|
|
149
149
|
let px = new Vec3();
|
|
150
150
|
let clickDir = cam.unproject(this._clickPos.x, this._clickPos.y);
|
|
151
|
-
if (new Ray(cam.eye, clickDir).
|
|
151
|
+
if (new Ray(cam.eye, clickDir).hitPlaneRes(Plane.fromPoints(p0, p1, p2), px) === Ray.INSIDE) {
|
|
152
152
|
let clickCart = Vec3.proj_b_to_a(px, groundNormal);
|
|
153
|
-
if (new Ray(cam.eye, e.direction).
|
|
153
|
+
if (new Ray(cam.eye, e.direction).hitPlaneRes(Plane.fromPoints(p0, p1, p2), px) === Ray.INSIDE) {
|
|
154
154
|
let dragCart = Vec3.proj_b_to_a(px, groundNormal);
|
|
155
155
|
let dragVec = dragCart.sub(clickCart);
|
|
156
156
|
let pos = this._selectedEntityCart.add(dragVec);
|
|
@@ -210,8 +210,8 @@ class GeoObjectEditorScene extends RenderNode {
|
|
|
210
210
|
else {
|
|
211
211
|
let p1 = p0.add(Vec3.UNIT_X), p2 = p0.add(Vec3.UNIT_Z);
|
|
212
212
|
let clickCart = new Vec3(), dragCart = new Vec3();
|
|
213
|
-
if (new Ray(cam.eye, clickDir).
|
|
214
|
-
if (new Ray(cam.eye, e.direction).
|
|
213
|
+
if (new Ray(cam.eye, clickDir).hitPlaneRes(Plane.fromPoints(p0, p1, p2), clickCart) === Ray.INSIDE) {
|
|
214
|
+
if (new Ray(cam.eye, e.direction).hitPlaneRes(Plane.fromPoints(p0, p1, p2), dragCart) === Ray.INSIDE) {
|
|
215
215
|
let dragVec = dragCart.sub(clickCart);
|
|
216
216
|
px = p0.add(dragVec);
|
|
217
217
|
}
|
|
@@ -233,7 +233,7 @@ class GeoObjectEditorScene extends RenderNode {
|
|
|
233
233
|
let cam = this.renderer.activeCamera;
|
|
234
234
|
let p0 = this._selectedEntityCart;
|
|
235
235
|
let qp = Quat.xRotation(0);
|
|
236
|
-
let qy = Quat.yRotation(this._selectedEntity.getYaw()
|
|
236
|
+
let qy = Quat.yRotation(this._selectedEntity.getYaw());
|
|
237
237
|
let qr = Quat.zRotation(0);
|
|
238
238
|
let qRot = qr.mul(qp).mul(qy).mul(this.getFrameRotation(p0)).conjugate();
|
|
239
239
|
//let norm = qNorthFrame.mulVec3(new Vec3(1, 0, 0)).normalize();
|
|
@@ -241,11 +241,11 @@ class GeoObjectEditorScene extends RenderNode {
|
|
|
241
241
|
let clickDir = cam.unproject(this._clickPos.x, this._clickPos.y);
|
|
242
242
|
let pl = new Plane(p0, norm);
|
|
243
243
|
let clickCart = new Vec3(), dragCart = new Vec3();
|
|
244
|
-
if (new Ray(cam.eye, clickDir).
|
|
245
|
-
if (new Ray(cam.eye, e.direction).
|
|
244
|
+
if (new Ray(cam.eye, clickDir).hitPlaneRes(pl, clickCart) === Ray.INSIDE) {
|
|
245
|
+
if (new Ray(cam.eye, e.direction).hitPlaneRes(pl, dragCart) === Ray.INSIDE) {
|
|
246
246
|
let c0 = clickCart.sub(p0).normalize(), c1 = dragCart.sub(p0).normalize();
|
|
247
247
|
let sig = Math.sign(c0.cross(c1).dot(norm));
|
|
248
|
-
let angle = Math.acos(c0.dot(c1))
|
|
248
|
+
let angle = Math.acos(c0.dot(c1));
|
|
249
249
|
let deg = this._selectedEntityPitch + sig * angle;
|
|
250
250
|
this._selectedEntity.setAbsolutePitch(deg);
|
|
251
251
|
this.events.dispatch(this.events.pitch, deg, this._selectedEntity);
|
|
@@ -263,11 +263,11 @@ class GeoObjectEditorScene extends RenderNode {
|
|
|
263
263
|
let clickDir = cam.unproject(this._clickPos.x, this._clickPos.y);
|
|
264
264
|
let pl = new Plane(p0, norm);
|
|
265
265
|
let clickCart = new Vec3(), dragCart = new Vec3();
|
|
266
|
-
if (new Ray(cam.eye, clickDir).
|
|
267
|
-
if (new Ray(cam.eye, e.direction).
|
|
266
|
+
if (new Ray(cam.eye, clickDir).hitPlaneRes(pl, clickCart) === Ray.INSIDE) {
|
|
267
|
+
if (new Ray(cam.eye, e.direction).hitPlaneRes(pl, dragCart) === Ray.INSIDE) {
|
|
268
268
|
let c0 = clickCart.sub(p0).normalize(), c1 = dragCart.sub(p0).normalize();
|
|
269
269
|
let sig = Math.sign(c1.cross(c0).dot(norm));
|
|
270
|
-
let angle = Math.acos(c0.dot(c1))
|
|
270
|
+
let angle = Math.acos(c0.dot(c1));
|
|
271
271
|
let deg = this._selectedEntityYaw + sig * angle;
|
|
272
272
|
this._selectedEntity.setAbsoluteYaw(deg);
|
|
273
273
|
this.events.dispatch(this.events.yaw, deg, this._selectedEntity);
|
|
@@ -282,7 +282,7 @@ class GeoObjectEditorScene extends RenderNode {
|
|
|
282
282
|
let p0 = this._selectedEntityCart;
|
|
283
283
|
let qNorthFrame = this.getFrameRotation(p0).conjugate();
|
|
284
284
|
let qp = Quat.xRotation(0);
|
|
285
|
-
let qy = Quat.yRotation(this._selectedEntity.getYaw()
|
|
285
|
+
let qy = Quat.yRotation(this._selectedEntity.getYaw());
|
|
286
286
|
let qr = Quat.zRotation(0);
|
|
287
287
|
let qRot = qr.mul(qp).mul(qy).mul(this.getFrameRotation(p0)).conjugate();
|
|
288
288
|
//let norm = qNorthFrame.mulVec3(new Vec3(0, 0, 1)).normalize();
|
|
@@ -290,11 +290,11 @@ class GeoObjectEditorScene extends RenderNode {
|
|
|
290
290
|
let clickDir = cam.unproject(this._clickPos.x, this._clickPos.y);
|
|
291
291
|
let pl = new Plane(p0, norm);
|
|
292
292
|
let clickCart = new Vec3(), dragCart = new Vec3();
|
|
293
|
-
if (new Ray(cam.eye, clickDir).
|
|
294
|
-
if (new Ray(cam.eye, e.direction).
|
|
293
|
+
if (new Ray(cam.eye, clickDir).hitPlaneRes(pl, clickCart) === Ray.INSIDE) {
|
|
294
|
+
if (new Ray(cam.eye, e.direction).hitPlaneRes(pl, dragCart) === Ray.INSIDE) {
|
|
295
295
|
let c0 = clickCart.sub(p0).normalize(), c1 = dragCart.sub(p0).normalize();
|
|
296
296
|
let sig = Math.sign(c0.cross(c1).dot(norm));
|
|
297
|
-
let angle = Math.acos(c0.dot(c1))
|
|
297
|
+
let angle = Math.acos(c0.dot(c1));
|
|
298
298
|
let deg = this._selectedEntityRoll + sig * angle;
|
|
299
299
|
this._selectedEntity.setAbsoluteRoll(deg);
|
|
300
300
|
this.events.dispatch(this.events.roll, deg, this._selectedEntity);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Entity, IEntityParams } from "../../entity/Entity";
|
|
1
|
+
import { Entity, type IEntityParams } from "../../entity/Entity";
|
|
2
2
|
import { Vec3 } from "../../math/Vec3";
|
|
3
3
|
import { ArrowEntity } from "./ArrowEntity";
|
|
4
4
|
export interface IAxisEntityParams extends IEntityParams {
|
|
@@ -2,6 +2,7 @@ import { Entity } from "../../entity/Entity";
|
|
|
2
2
|
import { Vec3 } from "../../math/Vec3";
|
|
3
3
|
import { SEL_X_COLOR, SEL_Y_COLOR, SEL_Z_COLOR, X_COLOR, Y_COLOR, Z_COLOR } from "./colors";
|
|
4
4
|
import { ArrowEntity } from "./ArrowEntity";
|
|
5
|
+
import { RADIANS } from "../../math";
|
|
5
6
|
export class MoveAxisEntity extends Entity {
|
|
6
7
|
constructor(params = {}) {
|
|
7
8
|
super(params);
|
|
@@ -14,7 +15,7 @@ export class MoveAxisEntity extends Entity {
|
|
|
14
15
|
color: X_COLOR,
|
|
15
16
|
yaw: 0,
|
|
16
17
|
pitch: 0,
|
|
17
|
-
roll: 90,
|
|
18
|
+
roll: 90 * RADIANS,
|
|
18
19
|
properties: {
|
|
19
20
|
opName: "move_x",
|
|
20
21
|
noEdit: true,
|
|
@@ -41,7 +42,7 @@ export class MoveAxisEntity extends Entity {
|
|
|
41
42
|
let arrowZ = new ArrowEntity({
|
|
42
43
|
color: Z_COLOR,
|
|
43
44
|
yaw: 0,
|
|
44
|
-
pitch: 90,
|
|
45
|
+
pitch: 90 * RADIANS,
|
|
45
46
|
roll: 0,
|
|
46
47
|
properties: {
|
|
47
48
|
opName: "move_z",
|
|
@@ -78,7 +78,7 @@ export class RotateEntity extends Entity {
|
|
|
78
78
|
let qNorthFrame = rn.getFrameRotation(cart).conjugate();
|
|
79
79
|
let r = cam.eye.distance(cart) * 0.15;
|
|
80
80
|
let qp = Quat.xRotation(0);
|
|
81
|
-
let qy = Quat.yRotation(yaw
|
|
81
|
+
let qy = Quat.yRotation(yaw);
|
|
82
82
|
let qr = Quat.zRotation(0);
|
|
83
83
|
let qRot = qr.mul(qp).mul(qy).mul(rn.getFrameRotation(cart)).conjugate();
|
|
84
84
|
for (let i = 0, j = 0, step = 360 / SEG_SIZE; i < SEG_SIZE; i += step, j++) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Entity } from '../../entity/Entity';
|
|
2
2
|
import { LonLat } from "../../LonLat";
|
|
3
|
-
import { RulerScene, IRulerSceneParams } from "../ruler/RulerScene";
|
|
3
|
+
import { RulerScene, type IRulerSceneParams } from "../ruler/RulerScene";
|
|
4
4
|
import { Vector } from "../../layer/Vector";
|
|
5
5
|
import { Vec3 } from "../../math/Vec3";
|
|
6
6
|
interface IHeightRulerSceneParams extends IRulerSceneParams {
|
|
@@ -3,14 +3,13 @@ export * from "./Control";
|
|
|
3
3
|
export * from "./DebugInfo";
|
|
4
4
|
export * from "./DrawingSwitcher";
|
|
5
5
|
export * from "./EarthCoordinates";
|
|
6
|
-
export * from "./EarthNavigation";
|
|
7
6
|
export * from "./GeoImageDragControl";
|
|
8
7
|
export * from "./KeyboardNavigation";
|
|
9
8
|
export * from "./LayerAnimation";
|
|
10
9
|
export * from "./LayerSwitcher";
|
|
11
10
|
export * from "./Lighting";
|
|
11
|
+
export * from "./OldMouseNavigation";
|
|
12
12
|
export * from "./MouseNavigation";
|
|
13
|
-
export * from "./MouseWheelZoomControl";
|
|
14
13
|
export * from "./RulerSwitcher";
|
|
15
14
|
export * from "./ScaleControl";
|
|
16
15
|
export * from "./ShowFps";
|
package/lib/js/control/index.js
CHANGED
|
@@ -3,14 +3,13 @@ export * from "./Control";
|
|
|
3
3
|
export * from "./DebugInfo";
|
|
4
4
|
export * from "./DrawingSwitcher";
|
|
5
5
|
export * from "./EarthCoordinates";
|
|
6
|
-
export * from "./EarthNavigation";
|
|
7
6
|
export * from "./GeoImageDragControl";
|
|
8
7
|
export * from "./KeyboardNavigation";
|
|
9
8
|
export * from "./LayerAnimation";
|
|
10
9
|
export * from "./LayerSwitcher";
|
|
11
10
|
export * from "./Lighting";
|
|
11
|
+
export * from "./OldMouseNavigation";
|
|
12
12
|
export * from "./MouseNavigation";
|
|
13
|
-
export * from "./MouseWheelZoomControl";
|
|
14
13
|
export * from "./RulerSwitcher";
|
|
15
14
|
export * from "./ScaleControl";
|
|
16
15
|
export * from "./ShowFps";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Control
|
|
1
|
+
import { Control } from "../Control";
|
|
2
|
+
import type { IControlParams } from "../Control";
|
|
2
3
|
import { RulerScene } from "./RulerScene";
|
|
3
4
|
export interface IRulerParams extends IControlParams {
|
|
4
5
|
ignoreTerrain?: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Entity } from '../../entity/Entity';
|
|
2
|
-
import { EventsHandler } from '../../Events';
|
|
2
|
+
import type { EventsHandler } from '../../Events';
|
|
3
3
|
import { LonLat } from "../../LonLat";
|
|
4
4
|
import { Planet } from "../../scene/Planet";
|
|
5
5
|
import { RenderNode } from '../../scene/RenderNode';
|
|
6
6
|
import { Vector } from '../../layer/Vector';
|
|
7
7
|
import { Vec2 } from '../../math/Vec2';
|
|
8
8
|
import { Vec3 } from '../../math/Vec3';
|
|
9
|
-
import { IMouseState } from "../../renderer/RendererEvents";
|
|
9
|
+
import type { IMouseState } from "../../renderer/RendererEvents";
|
|
10
10
|
import { Ellipsoid } from "../../ellipsoid/Ellipsoid";
|
|
11
11
|
export interface IRulerSceneParams {
|
|
12
12
|
name?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Control
|
|
1
|
+
import { Control } from "../Control";
|
|
2
|
+
import type { IControlParams } from "../Control";
|
|
2
3
|
import { SelectionScene } from "./SelectionScene";
|
|
3
4
|
import { ToggleButton } from "../../ui/ToggleButton";
|
|
4
5
|
interface ISelectionParams extends IControlParams {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dialog } from "../../ui/Dialog";
|
|
2
2
|
import { ToggleButton } from "../../ui/ToggleButton";
|
|
3
|
-
import { Control, IControlParams } from '../Control';
|
|
3
|
+
import { Control, type IControlParams } from '../Control';
|
|
4
4
|
import { TimelineView } from './TimelineView';
|
|
5
5
|
interface ITimelineControlParams extends IControlParams {
|
|
6
6
|
name?: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { EventsHandler } from "../../Events";
|
|
1
|
+
import type { EventsHandler } from "../../Events";
|
|
2
2
|
import { ButtonGroup } from "../../ui/ButtonGroup";
|
|
3
|
-
import {
|
|
3
|
+
import { View } from '../../ui/View';
|
|
4
|
+
import type { IViewParams, ViewEventsList } from '../../ui/View';
|
|
4
5
|
import { ToggleButton } from "../../ui/ToggleButton";
|
|
5
6
|
import { TimelineModel } from './TimelineModel';
|
|
6
|
-
import { MouseEventExt } from "../../input/MouseHandler";
|
|
7
|
+
import type { MouseEventExt } from "../../input/MouseHandler";
|
|
7
8
|
interface ITimelineViewParams extends IViewParams {
|
|
8
9
|
currentDate?: Date;
|
|
9
10
|
rangeStart?: Date;
|
|
@@ -240,25 +240,25 @@ class Segment {
|
|
|
240
240
|
_v0.set(verts[ind_v0], verts[ind_v0 + 1], verts[ind_v0 + 2]);
|
|
241
241
|
_v1.set(verts[ind_v0 + 3], verts[ind_v0 + 4], verts[ind_v0 + 5]);
|
|
242
242
|
_v2.set(verts[ind_v2], verts[ind_v2 + 1], verts[ind_v2 + 2]);
|
|
243
|
-
let d = _ray.
|
|
243
|
+
let d = _ray.hitTriangleRes(_v0, _v1, _v2, res);
|
|
244
244
|
if (d === Ray.INSIDE) {
|
|
245
245
|
return xyz.distance(res);
|
|
246
246
|
}
|
|
247
247
|
else if (d === Ray.AWAY) {
|
|
248
248
|
_rayEx.set(xyz, norm);
|
|
249
|
-
let d = _rayEx.
|
|
249
|
+
let d = _rayEx.hitTriangleRes(_v0, _v1, _v2, res);
|
|
250
250
|
if (d === Ray.INSIDE) {
|
|
251
251
|
return -xyz.distance(res);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
_v3.set(verts[ind_v2 + 3], verts[ind_v2 + 4], verts[ind_v2 + 5]);
|
|
255
|
-
d = _ray.
|
|
255
|
+
d = _ray.hitTriangleRes(_v1, _v3, _v2, res);
|
|
256
256
|
if (d === Ray.INSIDE) {
|
|
257
257
|
return xyz.distance(res);
|
|
258
258
|
}
|
|
259
259
|
else if (d === Ray.AWAY) {
|
|
260
260
|
_rayEx.set(xyz, norm);
|
|
261
|
-
let d = _rayEx.
|
|
261
|
+
let d = _rayEx.hitTriangleRes(_v1, _v3, _v2, res);
|
|
262
262
|
if (d === Ray.INSIDE) {
|
|
263
263
|
return -xyz.distance(res);
|
|
264
264
|
}
|
|
@@ -159,7 +159,7 @@ declare class Ellipsoid {
|
|
|
159
159
|
* @param {LonLat} lonLat - Origin coordinates
|
|
160
160
|
* @param {number} azimuth - View azimuth in degrees
|
|
161
161
|
* @param {number} dist - Distance to the destination point coordinates in meters
|
|
162
|
-
* @returns {{
|
|
162
|
+
* @returns {{destination: LonLat, finalAzimuth: number}} - Destination point coordinates
|
|
163
163
|
*/
|
|
164
164
|
direct(lonLat: LonLat, azimuth: number, dist: number): IDirectResult;
|
|
165
165
|
/**
|
|
@@ -288,7 +288,7 @@ class Ellipsoid {
|
|
|
288
288
|
* @param {LonLat} lonLat - Origin coordinates
|
|
289
289
|
* @param {number} azimuth - View azimuth in degrees
|
|
290
290
|
* @param {number} dist - Distance to the destination point coordinates in meters
|
|
291
|
-
* @returns {{
|
|
291
|
+
* @returns {{destination: LonLat, finalAzimuth: number}} - Destination point coordinates
|
|
292
292
|
*/
|
|
293
293
|
direct(lonLat, azimuth, dist) {
|
|
294
294
|
let lon1 = lonLat.lon, lat1 = lonLat.lat;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Entity } from "./Entity";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Vec2 } from "../math/Vec2";
|
|
3
|
+
import { Vec3 } from "../math/Vec3";
|
|
4
|
+
import { Vec4 } from "../math/Vec4";
|
|
5
|
+
import type { NumberArray2 } from "../math/Vec2";
|
|
6
|
+
import type { NumberArray3 } from "../math/Vec3";
|
|
7
|
+
import type { NumberArray4 } from "../math/Vec4";
|
|
5
8
|
import { BaseBillboardHandler } from "./BaseBillboardHandler";
|
|
6
9
|
export interface IBaseBillboardParams {
|
|
7
10
|
position?: NumberArray3 | Vec3;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TypedArray } from "../utils/shared";
|
|
1
|
+
import type { TypedArray } from "../utils/shared";
|
|
2
2
|
import { EntityCollection } from "./EntityCollection";
|
|
3
3
|
import { Renderer } from "../renderer/Renderer";
|
|
4
4
|
import { Vec3 } from "../math/Vec3";
|
|
5
5
|
import { Vec4 } from "../math/Vec4";
|
|
6
|
-
import { WebGLBufferExt } from "../webgl/Handler";
|
|
6
|
+
import type { WebGLBufferExt } from "../webgl/Handler";
|
|
7
7
|
import { BaseBillboard } from "./BaseBillboard";
|
|
8
8
|
/**
|
|
9
9
|
* @class BaseBillboardHandler
|