@openglobus/og 0.28.7 → 1.0.0-rc10
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/LICENSE.md +218 -4
- package/README.md +33 -18
- package/lib/Deferred.d.ts +2 -2
- package/lib/Events.d.ts +1 -1
- package/lib/Globe.d.ts +22 -11
- package/lib/Object3d.d.ts +18 -15
- package/lib/Popup.d.ts +2 -2
- package/lib/assets/LabelWorker.worker-C24YLEkW.js.map +1 -0
- package/lib/assets/PlainSegmentWorker.worker-DJHXd0bF.js.map +1 -0
- package/lib/assets/TerrainWorker.worker-B4Gp0jCy.js.map +1 -0
- package/lib/bv/index.d.ts +2 -2
- package/lib/camera/Camera.d.ts +320 -33
- package/lib/camera/Frustum.d.ts +136 -15
- package/lib/camera/PlanetCamera.d.ts +114 -11
- package/lib/camera/index.d.ts +2 -2
- package/lib/control/CompassButton.d.ts +2 -2
- package/lib/control/EarthCoordinates.d.ts +5 -2
- package/lib/control/FramebufferPreview.d.ts +20 -4
- package/lib/control/GeoImageDragControl.d.ts +1 -1
- package/lib/control/LayerAnimation.d.ts +2 -2
- package/lib/control/LayerSwitcher.d.ts +3 -0
- package/lib/control/Lighting.d.ts +7 -2
- package/lib/control/Navigation.d.ts +27 -12
- package/lib/control/OrthoSwitcher.d.ts +18 -0
- package/lib/control/SimpleTouchNavigation.d.ts +44 -0
- package/lib/control/Sun.d.ts +4 -2
- package/lib/control/TouchNavigation.d.ts +4 -8
- package/lib/control/atmosphere/Atmosphere.d.ts +2 -0
- package/lib/control/atmosphere/AtmosphereConfig.d.ts +2 -6
- package/lib/control/depthCamera/DepthCamera.d.ts +118 -0
- package/lib/control/depthCamera/DepthCameraHandler.d.ts +25 -0
- package/lib/control/depthCamera/depth_camera.d.ts +2 -0
- package/lib/control/drawing/LineStringDrawingScene.d.ts +1 -0
- package/lib/control/drawing/PolygonDrawingScene.d.ts +14 -14
- package/lib/control/elevationProfile/ElevationProfile.d.ts +1 -1
- package/lib/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
- package/lib/control/elevationProfile/ElevationProfileScene.d.ts +9 -12
- package/lib/control/elevationProfile/ElevationProfileView.d.ts +16 -5
- package/lib/control/entityEditor/CameraEditorView.d.ts +62 -0
- package/lib/control/entityEditor/EntityEditor.d.ts +20 -0
- package/lib/control/entityEditor/EntityEditorDialog.d.ts +38 -0
- package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +28 -12
- package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorView.d.ts} +22 -23
- package/lib/control/entityEditor/ProjectorEditorView.d.ts +31 -0
- package/lib/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +5 -1
- package/lib/control/{geoObjectEditor → entityEditor}/colors.d.ts +2 -2
- package/lib/control/entityTree/EntityTree.d.ts +46 -0
- package/lib/control/entityTree/EntityTreeView.d.ts +24 -0
- package/lib/control/heightRuler/HeightRulerScene.d.ts +3 -2
- package/lib/control/index.d.ts +7 -6
- package/lib/control/ruler/RulerScene.d.ts +8 -8
- package/lib/control/selection/SelectionScene.d.ts +6 -6
- package/lib/control/timeline/TimelineControl.d.ts +19 -2
- package/lib/control/timeline/TimelineModel.d.ts +1 -1
- package/lib/control/timeline/TimelineView.d.ts +52 -13
- package/lib/control/visibleExtent/segment.d.ts +7 -0
- package/lib/ellipsoid/index.d.ts +4 -4
- package/lib/entity/Entity.d.ts +114 -100
- package/lib/entity/EntityCollection.d.ts +140 -72
- package/lib/entity/{BaseBillboard.d.ts → billboard/BaseBillboard.d.ts} +16 -17
- package/lib/entity/{BaseBillboardHandler.d.ts → billboard/BaseBillboardHandler.d.ts} +24 -9
- package/lib/entity/{Billboard.d.ts → billboard/Billboard.d.ts} +11 -7
- package/lib/entity/{BillboardHandler.d.ts → billboard/BillboardHandler.d.ts} +1 -1
- package/lib/entity/{GeoObject.d.ts → geoObject/GeoObject.d.ts} +7 -6
- package/lib/entity/{GeoObjectHandler.d.ts → geoObject/GeoObjectHandler.d.ts} +32 -11
- package/lib/entity/{InstanceData.d.ts → geoObject/InstanceData.d.ts} +18 -13
- package/lib/entity/{Geometry.d.ts → geometry/Geometry.d.ts} +10 -10
- package/lib/entity/{GeometryHandler.d.ts → geometry/GeometryHandler.d.ts} +7 -7
- package/lib/entity/index.d.ts +8 -8
- package/lib/entity/{Label.d.ts → label/Label.d.ts} +12 -13
- package/lib/entity/{LabelHandler.d.ts → label/LabelHandler.d.ts} +31 -7
- package/lib/entity/{LabelWorker.d.ts → label/LabelWorker.d.ts} +3 -3
- package/lib/entity/{PointCloud.d.ts → pointCloud/PointCloud.d.ts} +18 -12
- package/lib/entity/{PointCloudHandler.d.ts → pointCloud/PointCloudHandler.d.ts} +4 -4
- package/lib/entity/polyline/Polyline.d.ts +242 -0
- package/lib/entity/polyline/PolylineBatchRenderer.d.ts +443 -0
- package/lib/entity/{PolylineHandler.d.ts → polyline/PolylineHandler.d.ts} +19 -7
- package/lib/entity/{Ray.d.ts → ray/Ray.d.ts} +29 -9
- package/lib/entity/{RayHandler.d.ts → ray/RayHandler.d.ts} +18 -8
- package/lib/entity/{Strip.d.ts → strip/Strip.d.ts} +21 -17
- package/lib/entity/{StripHandler.d.ts → strip/StripHandler.d.ts} +11 -6
- package/lib/index.d.ts +59 -42
- package/lib/layer/BaseGeoImage.d.ts +20 -17
- package/lib/layer/BaseTileMaterialLayer.d.ts +36 -0
- package/lib/layer/CanvasTiles.d.ts +20 -22
- package/lib/layer/GeoImage.d.ts +1 -1
- package/lib/layer/GeoTexture2d.d.ts +2 -2
- package/lib/layer/KML.d.ts +19 -18
- package/lib/layer/Layer.d.ts +72 -53
- package/lib/layer/Vector.d.ts +106 -37
- package/lib/layer/WMS.d.ts +1 -1
- package/lib/layer/XYZ.d.ts +14 -31
- package/lib/layer/index.d.ts +12 -12
- package/lib/math/Line2.d.ts +10 -1
- package/lib/math/Line3.d.ts +1 -1
- package/lib/math/Mat3.d.ts +3 -13
- package/lib/math/Mat4.d.ts +16 -10
- package/lib/math/Plane.d.ts +1 -1
- package/lib/math/Quat.d.ts +14 -12
- package/lib/math/Ray.d.ts +4 -3
- package/lib/math/Vec2.d.ts +25 -17
- package/lib/math/Vec3.d.ts +33 -31
- package/lib/math/Vec4.d.ts +1 -1
- package/lib/math/coder.d.ts +1 -1
- package/lib/math/index.d.ts +13 -14
- package/lib/mercator.d.ts +4 -4
- package/lib/og.css +2 -1
- package/lib/og.es.js +1 -1
- package/lib/og.es.js.map +1 -1
- package/lib/quadTree/EntityCollectionNode.d.ts +10 -10
- package/lib/quadTree/EntityCollectionsTreeStrategy.d.ts +8 -5
- package/lib/quadTree/QuadTreeStrategy.d.ts +6 -5
- package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
- package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +7 -4
- package/lib/quadTree/equi/EquiEntityCollectionsTreeStrategy.d.ts +3 -0
- package/lib/renderer/AtmosphereDeferredShading.d.ts +12 -0
- package/lib/renderer/IDeferredShadingPass.d.ts +8 -0
- package/lib/renderer/ITransparencyPass.d.ts +8 -0
- package/lib/renderer/PhongDeferredShading.d.ts +18 -0
- package/lib/renderer/Renderer.d.ts +195 -100
- package/lib/renderer/RendererEvents.d.ts +16 -5
- package/lib/renderer/WOITPass.d.ts +14 -0
- package/lib/renderer/cascadeShadows/CascadeShadowManager.d.ts +34 -0
- package/lib/renderer/cascadeShadows/CascadeShadowMap.d.ts +112 -0
- package/lib/renderer/cascadeShadows/cascade_shadow_depth.d.ts +2 -0
- package/lib/renderer/projectors/Projector.d.ts +66 -0
- package/lib/renderer/projectors/ProjectorManager.d.ts +85 -0
- package/lib/renderer/projectors/ProjectorsPass.d.ts +37 -0
- package/lib/renderer/shadows/ShadowManager.d.ts +40 -0
- package/lib/renderer/shadows/ShadowMap.d.ts +21 -0
- package/lib/renderer/textureUnits.d.ts +6 -0
- package/lib/res/fonts/Ephesis-Regular.json +1 -0
- package/lib/res/fonts/Ephesis-Regular.png +0 -0
- package/lib/res/fonts/Karla-Bold.json +1 -0
- package/lib/res/fonts/Karla-Bold.png +0 -0
- package/lib/res/fonts/Karla-Italic.json +1 -0
- package/lib/res/fonts/Karla-Italic.png +0 -0
- package/lib/res/fonts/Karla-Light.json +1 -0
- package/lib/res/fonts/Karla-Light.png +0 -0
- package/lib/res/fonts/Karla-Medium.json +1 -0
- package/lib/res/fonts/Karla-Medium.png +0 -0
- package/lib/res/fonts/Roboto-Regular.json +1 -37147
- package/lib/res/fonts/Roboto-Regular.png +0 -0
- package/lib/res/fonts/arial.json +1 -4321
- package/lib/res/fonts/arial.png +0 -0
- package/lib/res/night-4326.png +0 -0
- package/lib/res/night.png +0 -0
- package/lib/scene/AltitudeNearPlaneStrategy.d.ts +17 -0
- package/lib/scene/Axes.d.ts +4 -3
- package/lib/scene/Planet.d.ts +268 -72
- package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +47 -51
- package/lib/scene/SkyBox.d.ts +7 -4
- package/lib/scene/index.d.ts +2 -2
- package/lib/segment/Segment.d.ts +38 -15
- package/lib/segment/SegmentLonLat.d.ts +0 -1
- package/lib/shadeModeConstants.d.ts +7 -0
- package/lib/shaders/applyDeferredDepth.d.ts +2 -0
- package/lib/shaders/atmos/atmos.d.ts +3 -3
- package/lib/shaders/billboard/billboard.d.ts +4 -3
- package/lib/shaders/common/uniforms.d.ts +27 -0
- package/lib/shaders/deferredShading/deferredShading.d.ts +2 -0
- package/lib/shaders/deferredShading/deferredShadingAtmos.d.ts +3 -0
- package/lib/shaders/depth.d.ts +2 -2
- package/lib/shaders/geo_object/geo_object.d.ts +9 -4
- package/lib/shaders/label/label.d.ts +4 -4
- package/lib/shaders/pointCloud.d.ts +2 -2
- package/lib/shaders/polyline/polyline.d.ts +7 -3
- package/lib/shaders/projectorsPass/projectorsPass.d.ts +2 -0
- package/lib/shaders/ray/ray.d.ts +3 -2
- package/lib/shaders/screenFrame.d.ts +2 -2
- package/lib/shaders/segment/segment.d.ts +7 -0
- package/lib/shaders/skybox.d.ts +2 -2
- package/lib/shaders/strip/strip.d.ts +3 -0
- package/lib/shaders/tone_mapping/toneMapping.d.ts +2 -2
- package/lib/shaders/varianceBlur.d.ts +2 -0
- package/lib/shaders/weightedOITResolve.d.ts +2 -0
- package/lib/terrain/BilTerrain.d.ts +1 -1
- package/lib/terrain/EmptyTerrain.d.ts +6 -7
- package/lib/terrain/GlobusTerrain.d.ts +18 -23
- package/lib/terrain/MapterhornTerrain.d.ts +10 -0
- package/lib/terrain/RgbTerrain.d.ts +19 -8
- package/lib/terrain/index.d.ts +10 -6
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/ui/Button.d.ts +7 -5
- package/lib/ui/ButtonGroup.d.ts +1 -1
- package/lib/ui/Checkbox.d.ts +2 -2
- package/lib/ui/Color.d.ts +7 -4
- package/lib/ui/Dialog.d.ts +30 -3
- package/lib/ui/Input.d.ts +19 -3
- package/lib/ui/Slider.d.ts +5 -2
- package/lib/ui/TitleBarView.d.ts +21 -0
- package/lib/ui/ToggleButton.d.ts +2 -2
- package/lib/ui/View.d.ts +1 -1
- package/lib/ui/icons.d.ts +1 -1
- package/lib/ui/index.d.ts +10 -9
- package/lib/utils/FontAtlas.d.ts +61 -10
- package/lib/utils/GeoImageCreator.d.ts +2 -2
- package/lib/utils/ImagesCacheManager.d.ts +3 -3
- package/lib/utils/Loader.d.ts +2 -2
- package/lib/utils/PlainSegmentWorker.d.ts +2 -2
- package/lib/utils/TerrainWorker.d.ts +2 -2
- package/lib/utils/TextureAtlas.d.ts +7 -2
- package/lib/utils/TextureResourceManager.d.ts +162 -0
- package/lib/utils/VectorTileCreator.d.ts +1 -1
- package/lib/utils/colorSpace.d.ts +9 -0
- package/lib/utils/gltf/gltfParser.d.ts +9 -2
- package/lib/utils/gltf/types.d.ts +24 -5
- package/lib/utils/shared.d.ts +12 -5
- package/lib/utils/textureResourceMeta.d.ts +9 -0
- package/lib/webgl/BaseFramebuffer.d.ts +35 -0
- package/lib/webgl/Framebuffer.d.ts +14 -13
- package/lib/webgl/Handler.d.ts +94 -99
- package/lib/webgl/ShaderProgram.d.ts +190 -0
- package/lib/webgl/index.d.ts +2 -2
- package/lib/webgl/variableHandlers.d.ts +2 -1
- package/package.json +79 -76
- package/lib/assets/LabelWorker.worker-BT1uJgYn.js.map +0 -1
- package/lib/assets/PlainSegmentWorker.worker-CT1cj8jj.js.map +0 -1
- package/lib/assets/TerrainWorker.worker-DmikdfB2.js.map +0 -1
- package/lib/control/CameraFrameComposer.d.ts +0 -19
- package/lib/control/CameraFrameHandler.d.ts +0 -26
- package/lib/control/OldMouseNavigation.d.ts +0 -65
- package/lib/control/ZoomControl.d.ts +0 -28
- package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +0 -28
- package/lib/control/cameraDepthHandler/camera_depth.d.ts +0 -2
- package/lib/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
- package/lib/control/visibleExtent/drawnode.d.ts +0 -7
- package/lib/entity/Polyline.d.ts +0 -417
- package/lib/light/LightSource.d.ts +0 -36
- package/lib/res/fonts/Roboto-Regular.ttf.cfg +0 -1340
- package/lib/res/fonts/Roboto-Regular.ttf.png +0 -0
- package/lib/res/fonts/arial.ttf.cfg +0 -1570
- package/lib/res/fonts/arial.ttf.png +0 -0
- package/lib/scene/BaseNode.d.ts +0 -61
- package/lib/shaders/drawnode/drawnode.d.ts +0 -8
- package/lib/webgl/Program.d.ts +0 -161
- package/lib/webgl/ProgramController.d.ts +0 -87
- /package/lib/control/{geoObjectEditor → entityEditor}/ArrowEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/AxisTrackEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/MoveAxisEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/MovePlaneEntity.d.ts +0 -0
- /package/lib/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { Control } from "./Control";
|
|
2
1
|
import type { IControlParams } from "./Control";
|
|
2
|
+
import { Control } from "./Control";
|
|
3
3
|
import type { IMouseState } from "../renderer/RendererEvents";
|
|
4
4
|
import { Quat } from "../math/Quat";
|
|
5
5
|
import { Sphere } from "../bv/Sphere";
|
|
6
6
|
import { Vec2 } from "../math/Vec2";
|
|
7
7
|
import { Vec3 } from "../math/Vec3";
|
|
8
8
|
import { type EventsHandler } from "../Events";
|
|
9
|
-
export type NavigationMode = "
|
|
9
|
+
export type NavigationMode = "north" | "adaptive" | "free";
|
|
10
10
|
export interface INavigationParams extends IControlParams {
|
|
11
11
|
inertia?: number;
|
|
12
|
+
minInertia?: number;
|
|
13
|
+
maxInertia?: number;
|
|
14
|
+
minInertiaAltitude?: number;
|
|
15
|
+
velInertia?: number;
|
|
12
16
|
dragInertia?: number;
|
|
13
17
|
minSlope?: number;
|
|
14
18
|
mass?: number;
|
|
@@ -18,27 +22,27 @@ export interface INavigationParams extends IControlParams {
|
|
|
18
22
|
disableRotation?: boolean;
|
|
19
23
|
disableTilt?: boolean;
|
|
20
24
|
}
|
|
21
|
-
export type NavigationEventsList = [
|
|
22
|
-
"drag",
|
|
23
|
-
"zoom",
|
|
24
|
-
"rotate"
|
|
25
|
-
];
|
|
25
|
+
export type NavigationEventsList = ["drag", "zoom", "rotate"];
|
|
26
26
|
/**
|
|
27
27
|
* Navigation.
|
|
28
28
|
* @class
|
|
29
29
|
* @extends {Control}
|
|
30
30
|
* @param {INavigationParams} [options] - Navigation options:
|
|
31
|
-
* @param {NavigationMode} [options.mode] - Navigation mode: "
|
|
31
|
+
* @param {NavigationMode} [options.mode] - Navigation mode: "north" (keeps north fixed), "adaptive" (default, auto-detects arc mode), "free" (arc rotation mode)
|
|
32
32
|
* @param {number} [options.inertia] - inertia factor
|
|
33
|
+
* @param {number} [options.minInertia] - inertia factor at minInertiaAltitude. Default is 1
|
|
34
|
+
* @param {number} [options.maxInertia] - inertia factor at maximal camera altitude. Default is 1.1
|
|
35
|
+
* @param {number} [options.minInertiaAltitude] - minimal altitude where inertia interpolation starts. Default is 3000000
|
|
36
|
+
* @param {number} [options.velInertia] - base velocity inertia factor. Default is 0.89
|
|
33
37
|
* @param {number} [options.dragInertia] - drag inertia
|
|
34
38
|
* @param {number} [options.mass] - camera mass, affects velocity. Default is 1
|
|
35
39
|
* @param {number} [options.minSlope] - minimal slope for vertical camera movement. Default is 0.35
|
|
36
40
|
* @param {number} [options.poleThreshold] - Vertical rotation is reduced when camera is close to poles
|
|
37
41
|
* @param {boolean} [options.disableRotation] - Disables horizontal rotation controls (right mouse button and touchpad). Default is false
|
|
38
42
|
* @param {boolean} [options.disableTilt] - Disables vertical tilt controls (right mouse button and touchpad). Default is false
|
|
39
|
-
* @fires
|
|
40
|
-
* @fires
|
|
41
|
-
* @fires
|
|
43
|
+
* @fires drag
|
|
44
|
+
* @fires zoom
|
|
45
|
+
* @fires rotate
|
|
42
46
|
*/
|
|
43
47
|
export declare class Navigation extends Control {
|
|
44
48
|
force: Vec3;
|
|
@@ -50,6 +54,9 @@ export declare class Navigation extends Control {
|
|
|
50
54
|
mass: number;
|
|
51
55
|
minSlope: number;
|
|
52
56
|
inertia: number;
|
|
57
|
+
minInertia: number;
|
|
58
|
+
maxInertia: number;
|
|
59
|
+
minInertiaAltitude: number;
|
|
53
60
|
dragInertia: number;
|
|
54
61
|
zoomSpeed: number;
|
|
55
62
|
poleThreshold: number;
|
|
@@ -69,6 +76,7 @@ export declare class Navigation extends Control {
|
|
|
69
76
|
protected _grabbedSphere: Sphere;
|
|
70
77
|
protected _wheelDirection: number;
|
|
71
78
|
protected _currScreenPos: Vec2;
|
|
79
|
+
protected _grabbedScreenPoint: Vec2;
|
|
72
80
|
protected _tUp: Vec3;
|
|
73
81
|
protected _tRad: number;
|
|
74
82
|
protected _shiftBusy: boolean;
|
|
@@ -80,6 +88,7 @@ export declare class Navigation extends Control {
|
|
|
80
88
|
protected _grabbedCameraHeight: number;
|
|
81
89
|
protected _newEye: Vec3;
|
|
82
90
|
protected _isTouchPad: boolean;
|
|
91
|
+
protected _defaultVelInertia: number;
|
|
83
92
|
protected _velInertia: number;
|
|
84
93
|
protected _hold: boolean;
|
|
85
94
|
protected _rotHDir: number;
|
|
@@ -90,7 +99,7 @@ export declare class Navigation extends Control {
|
|
|
90
99
|
onremove(): void;
|
|
91
100
|
onactivate(): void;
|
|
92
101
|
ondeactivate(): void;
|
|
93
|
-
protected
|
|
102
|
+
protected onPreDraw(): void;
|
|
94
103
|
_onShiftFree: () => void;
|
|
95
104
|
private _onCameraFly;
|
|
96
105
|
protected _onMouseMove: (e: IMouseState) => void;
|
|
@@ -107,6 +116,11 @@ export declare class Navigation extends Control {
|
|
|
107
116
|
get freeMode(): boolean;
|
|
108
117
|
setMode(mode: NavigationMode): void;
|
|
109
118
|
protected _modeToNumber(mode: NavigationMode): number;
|
|
119
|
+
protected _getSurfaceDragAxes(eyeNorm: Vec3, fallbackAxis: Vec3): {
|
|
120
|
+
north: Vec3;
|
|
121
|
+
east: Vec3;
|
|
122
|
+
} | null;
|
|
123
|
+
protected _transportDragInertiaVelocity(velocity: Vec3, fromEyeNorm: Vec3, toEyeNorm: Vec3, fallbackAxis: Vec3): Vec3 | null;
|
|
110
124
|
protected _handleDrag(): void;
|
|
111
125
|
protected _corrRoll(): void;
|
|
112
126
|
protected _handleZoom(): void;
|
|
@@ -116,5 +130,6 @@ export declare class Navigation extends Control {
|
|
|
116
130
|
protected _updateVel_roll(): void;
|
|
117
131
|
protected get dt(): number;
|
|
118
132
|
protected get velocityInertia(): number;
|
|
133
|
+
protected _calcInertia(): number;
|
|
119
134
|
stop(): void;
|
|
120
135
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Camera } from "../camera/Camera";
|
|
2
|
+
import { ToggleButton } from "../ui/ToggleButton";
|
|
3
|
+
import { Control, type IControlParams } from "./Control";
|
|
4
|
+
interface IOrthoSwitcherParams extends IControlParams {
|
|
5
|
+
name?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Orthographic projection switch button.
|
|
9
|
+
*/
|
|
10
|
+
export declare class OrthoSwitcher extends Control {
|
|
11
|
+
protected _toggleBtn: ToggleButton;
|
|
12
|
+
constructor(options?: IOrthoSwitcherParams);
|
|
13
|
+
oninit(): void;
|
|
14
|
+
onremove(): void;
|
|
15
|
+
protected _onToggle: (isActive: boolean) => void;
|
|
16
|
+
protected _onProjectionChanged: (camera: Camera) => void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Control, type IControlParams } from "../control/Control";
|
|
2
|
+
import type { ITouchState } from "../renderer/RendererEvents";
|
|
3
|
+
import { Vec2 } from "../math/Vec2";
|
|
4
|
+
import { Vec3 } from "../math/Vec3";
|
|
5
|
+
import { Plane } from "../math/Plane";
|
|
6
|
+
export declare class SimpleTouchNavigation extends Control {
|
|
7
|
+
protected _grabbedPoint: Vec3 | undefined;
|
|
8
|
+
protected _grabbedScreenPoint: Vec2;
|
|
9
|
+
protected _eye0: Vec3;
|
|
10
|
+
protected _prev_t0: Vec2;
|
|
11
|
+
protected _prev_t1: Vec2;
|
|
12
|
+
protected _dead: number;
|
|
13
|
+
protected _orthoMinFocusDistance: number;
|
|
14
|
+
protected _twoFingerTiltMinMove: number;
|
|
15
|
+
protected _twoFingerTiltAlignDot: number;
|
|
16
|
+
protected _twoFingerTiltVerticalRatio: number;
|
|
17
|
+
protected _twoFingerTiltHorizontalLineRatio: number;
|
|
18
|
+
protected _twoFingerTiltStrength: number;
|
|
19
|
+
protected _twoFingerTiltActive: boolean;
|
|
20
|
+
constructor(options?: IControlParams);
|
|
21
|
+
oninit(): void;
|
|
22
|
+
onactivate(): void;
|
|
23
|
+
ondeactivate(): void;
|
|
24
|
+
protected onTouchEnd: (e: ITouchState) => void;
|
|
25
|
+
protected _pointerToScreenPoint(pointer: PointerEvent, sys: NonNullable<ITouchState["sys"]>): Vec2;
|
|
26
|
+
protected _getGrabbedPoint(screenPoint: Vec2): Vec3;
|
|
27
|
+
protected _updateGrabbedScreenPoint(screenPoint: Vec2): void;
|
|
28
|
+
protected _startSingleFingerGesture(pointer: PointerEvent, sys: NonNullable<ITouchState["sys"]>): void;
|
|
29
|
+
protected _startTwoFingerGesture(pointer0: PointerEvent, pointer1: PointerEvent, sys: NonNullable<ITouchState["sys"]>, skipPointGrabbing: boolean): void;
|
|
30
|
+
protected _getPerspectiveDragPlane(anchor: Vec3): Plane;
|
|
31
|
+
protected _applyOrthographicDrag(screenPoint: Vec2): void;
|
|
32
|
+
protected _applyPerspectiveDrag(screenPoint: Vec2, anchor: Vec3): void;
|
|
33
|
+
protected _applyDragGesture(screenPoint: Vec2): void;
|
|
34
|
+
protected _moveSingleFingerGesture(pointer: PointerEvent, sys: NonNullable<ITouchState["sys"]>): void;
|
|
35
|
+
protected _applyTwoFingerZoom(vPrev: Vec2, vCurr: Vec2, middle: Vec2): void;
|
|
36
|
+
protected _applyTwoFingerRotation(vPrev: Vec2, vCurr: Vec2): void;
|
|
37
|
+
protected _isTwoFingerTiltGesture(d0: Vec2, d1: Vec2, touchLine: Vec2): boolean;
|
|
38
|
+
protected _applyTwoFingerTilt(d0: Vec2, d1: Vec2, touchLine: Vec2): boolean;
|
|
39
|
+
protected _isTwoFingerTiltHoldGesture(d0: Vec2, d1: Vec2, touchLine: Vec2): boolean;
|
|
40
|
+
protected _moveTwoFingerGesture(e: ITouchState, pointer0: PointerEvent, pointer1: PointerEvent, sys: NonNullable<ITouchState["sys"]>): void;
|
|
41
|
+
protected onTouchStart: (e: ITouchState, skipPointGrabbing?: boolean) => void;
|
|
42
|
+
protected onTouchMove: (e: ITouchState) => void;
|
|
43
|
+
protected onDraw(): void;
|
|
44
|
+
}
|
package/lib/control/Sun.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Control } from "./Control";
|
|
2
2
|
import type { IControlParams } from "./Control";
|
|
3
3
|
import { Clock } from "../Clock";
|
|
4
|
-
import {
|
|
4
|
+
import { Vec3 } from "../math/Vec3";
|
|
5
5
|
interface ISunParams extends IControlParams {
|
|
6
6
|
activationHeight?: number;
|
|
7
7
|
offsetVertical?: number;
|
|
@@ -15,7 +15,6 @@ export declare class Sun extends Control {
|
|
|
15
15
|
activationHeight: number;
|
|
16
16
|
offsetVertical: number;
|
|
17
17
|
offsetHorizontal: number;
|
|
18
|
-
sunlight: LightSource;
|
|
19
18
|
protected _currDate: number;
|
|
20
19
|
protected _prevDate: number;
|
|
21
20
|
protected _clockPtr: Clock | null;
|
|
@@ -23,12 +22,15 @@ export declare class Sun extends Control {
|
|
|
23
22
|
protected _stopped: boolean;
|
|
24
23
|
protected _f: number;
|
|
25
24
|
protected _k: number;
|
|
25
|
+
protected _sunlightPosition: Vec3;
|
|
26
26
|
constructor(options?: ISunParams);
|
|
27
27
|
oninit(): void;
|
|
28
28
|
stop(): void;
|
|
29
29
|
start(): void;
|
|
30
30
|
onactivate(): void;
|
|
31
31
|
bindClock(clock: Clock): void;
|
|
32
|
+
getPosition(): Vec3;
|
|
33
|
+
protected _setSunPosition3v(position: Vec3): void;
|
|
32
34
|
protected _draw(): void;
|
|
33
35
|
}
|
|
34
36
|
export {};
|
|
@@ -24,11 +24,7 @@ interface ITouchNavigationParams extends IControlParams {
|
|
|
24
24
|
*/
|
|
25
25
|
jerkLimit?: number;
|
|
26
26
|
}
|
|
27
|
-
export type TouchNavigationEventsList = [
|
|
28
|
-
"inertiamove",
|
|
29
|
-
"drag",
|
|
30
|
-
"doubletapzoom"
|
|
31
|
-
];
|
|
27
|
+
export type TouchNavigationEventsList = ["inertiamove", "drag", "doubletapzoom"];
|
|
32
28
|
declare class TouchExt {
|
|
33
29
|
x: number;
|
|
34
30
|
y: number;
|
|
@@ -52,9 +48,9 @@ declare class TouchExt {
|
|
|
52
48
|
* @param {number} [options.inertia] - inertia factor. Default is 0.007
|
|
53
49
|
* @param {number} [options.minSlope] - minimal slope for vertical camera movement. Default is 0.1
|
|
54
50
|
* @param {number} [options.jerkLimit] - limit for touch jerk speed to prevent unexpected camera movement. Default is 0.08
|
|
55
|
-
* @fires
|
|
56
|
-
* @fires
|
|
57
|
-
* @fires
|
|
51
|
+
* @fires inertiamove
|
|
52
|
+
* @fires drag
|
|
53
|
+
* @fires doubletapzoom
|
|
58
54
|
*/
|
|
59
55
|
export declare class TouchNavigation extends Control {
|
|
60
56
|
grabbedPoint: Vec3;
|
|
@@ -27,8 +27,10 @@ export declare class Atmosphere extends Control {
|
|
|
27
27
|
_scatteringBuffer: Framebuffer | null;
|
|
28
28
|
opacity: number;
|
|
29
29
|
protected _parameters: AtmosphereParameters;
|
|
30
|
+
protected _isReady: boolean;
|
|
30
31
|
constructor(options?: IAtmosphereParams);
|
|
31
32
|
setParameters(parameters: AtmosphereParameters): void;
|
|
33
|
+
get isReady(): boolean;
|
|
32
34
|
get parameters(): AtmosphereParameters;
|
|
33
35
|
initPlanetAtmosphereShader(): void;
|
|
34
36
|
oninit(): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Control, type IControlParams } from "../Control";
|
|
2
|
-
import { Dialog } from
|
|
2
|
+
import { Dialog } from "../../ui/Dialog";
|
|
3
3
|
import { Slider } from "../../ui/Slider";
|
|
4
4
|
import { ToggleButton } from "../../ui/ToggleButton";
|
|
5
|
-
import { View } from
|
|
5
|
+
import { View } from "../../ui/View";
|
|
6
6
|
import type { AtmosphereParameters } from "../../shaders/atmos/atmos";
|
|
7
7
|
interface IAtmosphereConfigParams extends IControlParams {
|
|
8
8
|
}
|
|
@@ -13,8 +13,6 @@ export declare class AtmosphereConfig extends Control {
|
|
|
13
13
|
protected _toggleBtn: ToggleButton;
|
|
14
14
|
protected _dialog: Dialog<null>;
|
|
15
15
|
protected _panel: View<null>;
|
|
16
|
-
$maxOpacity: HTMLElement | null;
|
|
17
|
-
$minOpacity: HTMLElement | null;
|
|
18
16
|
$rayleight: HTMLElement | null;
|
|
19
17
|
$mie: HTMLElement | null;
|
|
20
18
|
$height: HTMLElement | null;
|
|
@@ -32,8 +30,6 @@ export declare class AtmosphereConfig extends Control {
|
|
|
32
30
|
$groundAlbedo: HTMLElement | null;
|
|
33
31
|
$ozoneDensityHeight: HTMLElement | null;
|
|
34
32
|
$ozoneDensityWide: HTMLElement | null;
|
|
35
|
-
protected _maxOpacity: Slider;
|
|
36
|
-
protected _minOpacity: Slider;
|
|
37
33
|
protected _rayleight: Slider;
|
|
38
34
|
protected _mie: Slider;
|
|
39
35
|
protected _height: Slider;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Camera } from "../../camera/Camera";
|
|
2
|
+
import { PlanetCamera } from "../../camera/PlanetCamera";
|
|
3
|
+
import { Entity } from "../../entity/Entity";
|
|
4
|
+
import { LonLat } from "../../LonLat";
|
|
5
|
+
import { Vec3 } from "../../math/Vec3";
|
|
6
|
+
import { QuadTreeStrategy } from "../../quadTree";
|
|
7
|
+
import type { Renderer } from "../../renderer/Renderer";
|
|
8
|
+
import type { Planet } from "../../scene/Planet";
|
|
9
|
+
import { Framebuffer } from "../../webgl";
|
|
10
|
+
import { Vector } from "../../layer/Vector";
|
|
11
|
+
import type { ShadowMap } from "../../renderer/shadows/ShadowMap";
|
|
12
|
+
import type { DepthCameraHandler } from "./DepthCameraHandler";
|
|
13
|
+
interface IPerimeterSegmentsData {
|
|
14
|
+
segments: LonLat[][];
|
|
15
|
+
isClosed: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface IDepthCameraParams {
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
width?: number;
|
|
20
|
+
height?: number;
|
|
21
|
+
near?: number;
|
|
22
|
+
far?: number;
|
|
23
|
+
verticalViewAngle?: number;
|
|
24
|
+
horizontalViewAngle?: number;
|
|
25
|
+
showFrustum?: boolean;
|
|
26
|
+
showFootprint?: boolean;
|
|
27
|
+
isOrthographic?: boolean;
|
|
28
|
+
focusDistance?: number;
|
|
29
|
+
enableSegmentSkirts?: boolean;
|
|
30
|
+
enableSegmentFaceCulling?: boolean;
|
|
31
|
+
excludeLayers?: Vector[];
|
|
32
|
+
bias?: number;
|
|
33
|
+
normalBias?: number;
|
|
34
|
+
depthEpsilon?: number;
|
|
35
|
+
}
|
|
36
|
+
export declare class DepthCamera {
|
|
37
|
+
protected static __counter__: number;
|
|
38
|
+
readonly id: number;
|
|
39
|
+
readonly width: number;
|
|
40
|
+
readonly height: number;
|
|
41
|
+
readonly near: number;
|
|
42
|
+
readonly far: number;
|
|
43
|
+
readonly verticalViewAngle: number;
|
|
44
|
+
readonly horizontalViewAngle?: number;
|
|
45
|
+
readonly excludeLayers: Vector[];
|
|
46
|
+
bias: number;
|
|
47
|
+
normalBias: number;
|
|
48
|
+
depthEpsilon: number;
|
|
49
|
+
enabled: boolean;
|
|
50
|
+
enableSegmentSkirts: boolean;
|
|
51
|
+
enableSegmentFaceCulling: boolean;
|
|
52
|
+
camera: Camera;
|
|
53
|
+
framebuffer: Framebuffer;
|
|
54
|
+
quadTreeStrategy: QuadTreeStrategy;
|
|
55
|
+
shadowMap: ShadowMap | null;
|
|
56
|
+
_handler: DepthCameraHandler | null;
|
|
57
|
+
_handlerIndex: number;
|
|
58
|
+
protected _planet: Planet | null;
|
|
59
|
+
protected _renderer: Renderer | null;
|
|
60
|
+
protected _initialized: boolean;
|
|
61
|
+
protected _forceOwnQuadTreeStrategyPass: boolean;
|
|
62
|
+
protected _showFrustum: boolean;
|
|
63
|
+
protected _showFootprint: boolean;
|
|
64
|
+
protected _isOrthographic: boolean;
|
|
65
|
+
protected _focusDistance: number;
|
|
66
|
+
protected _lastPlanetHeightFactor: number;
|
|
67
|
+
protected _cameraFrustumEntity: Entity | null;
|
|
68
|
+
protected _cameraFootprintEntity: Entity | null;
|
|
69
|
+
protected _cameraFootprintSegmentPointCounts: number[];
|
|
70
|
+
protected _cameraFootprintClosedState: boolean;
|
|
71
|
+
protected _prevCameraPos: Vec3;
|
|
72
|
+
protected _prevCameraPitch: number;
|
|
73
|
+
protected _prevCameraYaw: number;
|
|
74
|
+
protected _prevCameraRoll: number;
|
|
75
|
+
protected _prevCameraFrustumEntityPos: Vec3;
|
|
76
|
+
protected _prevCameraFrustumEntityPitch: number;
|
|
77
|
+
protected _prevCameraFrustumEntityYaw: number;
|
|
78
|
+
protected _prevCameraFrustumEntityRoll: number;
|
|
79
|
+
constructor(params?: IDepthCameraParams);
|
|
80
|
+
get initialized(): boolean;
|
|
81
|
+
get showFrustum(): boolean;
|
|
82
|
+
set showFrustum(showFrustum: boolean);
|
|
83
|
+
get showFootprint(): boolean;
|
|
84
|
+
set showFootprint(showFootprint: boolean);
|
|
85
|
+
get isOrthographic(): boolean;
|
|
86
|
+
set isOrthographic(isOrthographic: boolean);
|
|
87
|
+
get focusDistance(): number;
|
|
88
|
+
set focusDistance(focusDistance: number);
|
|
89
|
+
get cameraFootprintEntity(): Entity | null;
|
|
90
|
+
get cameraFrustumEntity(): Entity | null;
|
|
91
|
+
get frustumScale(): Vec3;
|
|
92
|
+
init(planet: Planet, renderer: Renderer): void;
|
|
93
|
+
destroy(): void;
|
|
94
|
+
frame(): void;
|
|
95
|
+
prepareFrame(): void;
|
|
96
|
+
protected _prepareCameraEntitySync(): void;
|
|
97
|
+
protected _finishCameraEntitySync(): void;
|
|
98
|
+
finishFrame(): void;
|
|
99
|
+
renderFootprint(): void;
|
|
100
|
+
getCamera(): Camera;
|
|
101
|
+
getFramebuffer(): Framebuffer;
|
|
102
|
+
getDepthTexture(): WebGLTexture;
|
|
103
|
+
protected _syncPlanetHeightFactor(): void;
|
|
104
|
+
protected _prepareOrthographicProjection(): void;
|
|
105
|
+
protected _snapOrthographicProjectionToTexelGrid(): boolean;
|
|
106
|
+
getCartesianFromPixelTerrain(x: number, y: number): Vec3 | undefined;
|
|
107
|
+
getLonLatFromPixelTerrain(x: number, y: number): LonLat | undefined;
|
|
108
|
+
protected _createCameraFootprintEntity(): Entity;
|
|
109
|
+
protected _createCameraFrustumEntity(): Entity;
|
|
110
|
+
protected _createCamera(planet: Planet): Camera;
|
|
111
|
+
protected _createFramebuffer(renderer: Renderer): Framebuffer;
|
|
112
|
+
protected _createQuadTreeStrategy(planet: Planet, camera: PlanetCamera): QuadTreeStrategy;
|
|
113
|
+
protected _getQuadTreeStrategy(depthCamera: PlanetCamera): QuadTreeStrategy;
|
|
114
|
+
protected _segmentsPass(camera: PlanetCamera, quadTreeStrategy: QuadTreeStrategy): void;
|
|
115
|
+
protected _geoObjectsPass(camera: PlanetCamera): void;
|
|
116
|
+
protected _collectPerimeterLonLats(width: number, height: number): IPerimeterSegmentsData;
|
|
117
|
+
}
|
|
118
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Control, IControlParams } from "../Control";
|
|
2
|
+
import { DepthCamera } from "./DepthCamera";
|
|
3
|
+
import { Vector } from "../../layer";
|
|
4
|
+
export interface IDepthCameraHandlerParams extends IControlParams {
|
|
5
|
+
depthCameras?: DepthCamera[];
|
|
6
|
+
}
|
|
7
|
+
export declare class DepthCameraHandler extends Control {
|
|
8
|
+
protected _depthCameras: DepthCamera[];
|
|
9
|
+
readonly cameraFootprintLayer: Vector;
|
|
10
|
+
readonly cameraFrustumLayer: Vector;
|
|
11
|
+
constructor(params?: IDepthCameraHandlerParams);
|
|
12
|
+
get depthCameras(): DepthCamera[];
|
|
13
|
+
add(depthCamera: DepthCamera): DepthCamera;
|
|
14
|
+
remove(): void;
|
|
15
|
+
remove(depthCamera: DepthCamera): boolean;
|
|
16
|
+
clear(): void;
|
|
17
|
+
oninit(): void;
|
|
18
|
+
onactivate(): void;
|
|
19
|
+
ondeactivate(): void;
|
|
20
|
+
onremove(): void;
|
|
21
|
+
protected _initDepthCamera(depthCamera: DepthCamera): void;
|
|
22
|
+
protected _addDepthCameraEntities(depthCamera: DepthCamera): void;
|
|
23
|
+
protected _removeDepthCameraEntities(depthCamera: DepthCamera): void;
|
|
24
|
+
protected _onDraw: () => void;
|
|
25
|
+
}
|
|
@@ -9,6 +9,7 @@ declare class LineStringDrawingScene extends PolygonDrawingScene {
|
|
|
9
9
|
protected _clearGhostPointer(): void;
|
|
10
10
|
protected _moveCorner(indexCurrent: number, indexPrev: number, indexCenter: number): void;
|
|
11
11
|
protected _moveCornerPoint(e: Vec2): void;
|
|
12
|
+
clear(): void;
|
|
12
13
|
_updateGhostOutlinePointer(groundPos: Vec3): void;
|
|
13
14
|
protected _initGhostLayerPointer(): void;
|
|
14
15
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { type EventsHandler } from
|
|
2
|
-
import type { CoordinatesType, IGeometryStyle } from "../../entity/Geometry";
|
|
3
|
-
import type { IGeoObjectParams } from "../../entity/GeoObject";
|
|
4
|
-
import type { IPolylineParams } from "../../entity/Polyline";
|
|
5
|
-
import { Entity } from
|
|
1
|
+
import { type EventsHandler } from "../../Events";
|
|
2
|
+
import type { CoordinatesType, IGeometryStyle } from "../../entity/geometry/Geometry";
|
|
3
|
+
import type { IGeoObjectParams } from "../../entity/geoObject/GeoObject";
|
|
4
|
+
import type { IPolylineParams } from "../../entity/polyline/Polyline";
|
|
5
|
+
import { Entity } from "../../entity/Entity";
|
|
6
6
|
import type { IMouseState } from "../../renderer/RendererEvents";
|
|
7
|
-
import { Planet } from
|
|
8
|
-
import {
|
|
9
|
-
import { Vec2 } from
|
|
10
|
-
import { Vec3 } from
|
|
11
|
-
import { Vector } from
|
|
7
|
+
import { Planet } from "../../scene/Planet";
|
|
8
|
+
import { Scene } from "../../scene/Scene";
|
|
9
|
+
import { Vec2 } from "../../math/Vec2";
|
|
10
|
+
import { Vec3 } from "../../math/Vec3";
|
|
11
|
+
import { Vector } from "../../layer/Vector";
|
|
12
12
|
type PolygonDrawingSceneEventsList = ["change", "startpoint"];
|
|
13
13
|
export interface IPolygonDrawingSceneParams {
|
|
14
14
|
coordinates?: CoordinatesType[];
|
|
@@ -18,9 +18,9 @@ export interface IPolygonDrawingSceneParams {
|
|
|
18
18
|
fillStyle?: IGeometryStyle;
|
|
19
19
|
name: string;
|
|
20
20
|
}
|
|
21
|
-
export declare const NUM_SEGMENTS =
|
|
22
|
-
export declare const OUTLINE_ALT = 0
|
|
23
|
-
declare class PolygonDrawingScene extends
|
|
21
|
+
export declare const NUM_SEGMENTS = 300;
|
|
22
|
+
export declare const OUTLINE_ALT = 0;
|
|
23
|
+
declare class PolygonDrawingScene extends Scene {
|
|
24
24
|
events: EventsHandler<PolygonDrawingSceneEventsList>;
|
|
25
25
|
_planet: Planet | null;
|
|
26
26
|
_cornerStyle: IGeoObjectParams;
|
|
@@ -72,7 +72,7 @@ declare class PolygonDrawingScene extends RenderNode {
|
|
|
72
72
|
protected _drawCorners(): void;
|
|
73
73
|
protected _drawCenters(): void;
|
|
74
74
|
protected _drawGhostCorner(): void;
|
|
75
|
-
|
|
75
|
+
protected _onForwardpass: () => void;
|
|
76
76
|
protected _checkTerrainCollision(entity: Entity): void;
|
|
77
77
|
protected _moveCenterPoint(): void;
|
|
78
78
|
protected _addNew(cart: Vec3): void;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Entity } from
|
|
2
|
-
import { type EventsHandler } from
|
|
1
|
+
import { Entity } from "../../entity/Entity";
|
|
2
|
+
import { type EventsHandler } from "../../Events";
|
|
3
3
|
import { LonLat } from "../../LonLat";
|
|
4
4
|
import { Planet } from "../../scene/Planet";
|
|
5
|
-
import {
|
|
6
|
-
import { Vector } from
|
|
7
|
-
import { Vec2 } from
|
|
8
|
-
import { Vec3 } from
|
|
5
|
+
import { Scene } from "../../scene/Scene";
|
|
6
|
+
import { Vector } from "../../layer/Vector";
|
|
7
|
+
import { Vec2 } from "../../math/Vec2";
|
|
8
|
+
import { Vec3 } from "../../math/Vec3";
|
|
9
9
|
import type { IMouseState } from "../../renderer/RendererEvents";
|
|
10
10
|
import { Ellipsoid } from "../../ellipsoid/Ellipsoid";
|
|
11
11
|
export interface IElevationProfileSceneParams {
|
|
12
12
|
name?: string;
|
|
13
13
|
planet?: Planet;
|
|
14
14
|
}
|
|
15
|
-
declare class ElevationProfileScene extends
|
|
15
|
+
declare class ElevationProfileScene extends Scene {
|
|
16
16
|
events: EventsHandler<ElevationProfileSceneEventsList>;
|
|
17
17
|
protected _planet: Planet | null;
|
|
18
18
|
protected _trackLayer: Vector;
|
|
@@ -70,11 +70,8 @@ declare class ElevationProfileScene extends RenderNode {
|
|
|
70
70
|
setPointerVisibility(visibility: boolean): void;
|
|
71
71
|
setVisibility(visibility: boolean): void;
|
|
72
72
|
clear(): void;
|
|
73
|
-
|
|
73
|
+
protected _onForwardpass: () => void;
|
|
74
74
|
get ellipsoid(): Ellipsoid | null;
|
|
75
75
|
}
|
|
76
|
-
type ElevationProfileSceneEventsList = [
|
|
77
|
-
"change",
|
|
78
|
-
"addpoint"
|
|
79
|
-
];
|
|
76
|
+
type ElevationProfileSceneEventsList = ["change", "addpoint"];
|
|
80
77
|
export { ElevationProfileScene };
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import type { EventsHandler } from "../../Events";
|
|
2
|
-
import { View } from
|
|
3
|
-
import type { IViewParams, ViewEventsList } from
|
|
4
|
-
import { ElevationProfile } from
|
|
5
|
-
import type { GroundItem, TrackItem } from
|
|
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
6
|
import type { MouseEventExt } from "../../input/MouseHandler";
|
|
7
7
|
interface IElevationProfileViewParams extends IViewParams {
|
|
8
8
|
fillStyle?: string;
|
|
9
9
|
}
|
|
10
|
-
type ElevationProfileViewEventsList = [
|
|
10
|
+
type ElevationProfileViewEventsList = [
|
|
11
|
+
"startdrag",
|
|
12
|
+
"stopdrag",
|
|
13
|
+
"pointer",
|
|
14
|
+
"mouseenter",
|
|
15
|
+
"mouseleave",
|
|
16
|
+
"dblclick",
|
|
17
|
+
"tracklength",
|
|
18
|
+
"groundlength",
|
|
19
|
+
"warninglength",
|
|
20
|
+
"collisionlength"
|
|
21
|
+
];
|
|
11
22
|
declare class ElevationProfileView extends View<ElevationProfile> {
|
|
12
23
|
events: EventsHandler<ElevationProfileViewEventsList> & EventsHandler<ViewEventsList>;
|
|
13
24
|
fillStyle: string;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Camera } from "../../camera/Camera";
|
|
2
|
+
import type { DepthCamera } from "../depthCamera/DepthCamera";
|
|
3
|
+
import { Entity } from "../../entity/Entity";
|
|
4
|
+
import { Checkbox } from "../../ui/Checkbox";
|
|
5
|
+
import { Input } from "../../ui/Input";
|
|
6
|
+
import { TitleBarView } from "../../ui/TitleBarView";
|
|
7
|
+
import { View, type IViewParams } from "../../ui/View";
|
|
8
|
+
interface ICameraEditorViewParams extends IViewParams {
|
|
9
|
+
entity: Entity;
|
|
10
|
+
}
|
|
11
|
+
export declare function hasEntityEditorDepthCamera(entity: Entity): boolean;
|
|
12
|
+
export declare class CameraEditorView extends View<Entity> {
|
|
13
|
+
protected _nearView: Input;
|
|
14
|
+
protected _farView: Input;
|
|
15
|
+
protected _leftView: Input;
|
|
16
|
+
protected _rightView: Input;
|
|
17
|
+
protected _bottomView: Input;
|
|
18
|
+
protected _topView: Input;
|
|
19
|
+
protected _verticalFovView: Input;
|
|
20
|
+
protected _horizontalFovView: Input;
|
|
21
|
+
protected _viewportWidthView: Input;
|
|
22
|
+
protected _viewportHeightView: Input;
|
|
23
|
+
protected _orthographicView: Checkbox;
|
|
24
|
+
protected _focusDistanceView: Input;
|
|
25
|
+
protected _showFrustumView: Checkbox;
|
|
26
|
+
protected _showFootprintView: Checkbox;
|
|
27
|
+
protected _biasView: Input;
|
|
28
|
+
protected _normalBiasView: Input;
|
|
29
|
+
protected _depthEpsilonView: Input;
|
|
30
|
+
protected _titleBarView: TitleBarView;
|
|
31
|
+
protected _bodyEl: HTMLElement | null;
|
|
32
|
+
protected _depthCamera: DepthCamera | null;
|
|
33
|
+
constructor(params: ICameraEditorViewParams);
|
|
34
|
+
bindEntity(entity: Entity): void;
|
|
35
|
+
render(params?: unknown): this;
|
|
36
|
+
refresh(): void;
|
|
37
|
+
protected _getCamera(): Camera | null;
|
|
38
|
+
remove(): void;
|
|
39
|
+
protected _onTitleBarChange: (isCollapsed: boolean) => void;
|
|
40
|
+
protected _setNearFar(near: number, far: number): void;
|
|
41
|
+
protected _setBounds(left: number, right: number, bottom: number, top: number): void;
|
|
42
|
+
protected _syncFrustumEntityScale(): void;
|
|
43
|
+
protected _onChangeNear: (value: string) => void;
|
|
44
|
+
protected _onChangeFar: (value: string) => void;
|
|
45
|
+
protected _onChangeLeft: (value: string) => void;
|
|
46
|
+
protected _onChangeRight: (value: string) => void;
|
|
47
|
+
protected _onChangeBottom: (value: string) => void;
|
|
48
|
+
protected _onChangeTop: (value: string) => void;
|
|
49
|
+
protected _onChangeVerticalFov: (value: string) => void;
|
|
50
|
+
protected _onChangeHorizontalFov: (value: string) => void;
|
|
51
|
+
protected _setViewportSize(width: number, height: number): void;
|
|
52
|
+
protected _onChangeViewportWidth: (value: string) => void;
|
|
53
|
+
protected _onChangeViewportHeight: (value: string) => void;
|
|
54
|
+
protected _onChangeOrthographic: (isOrthographic: boolean) => void;
|
|
55
|
+
protected _onChangeFocusDistance: (value: string) => void;
|
|
56
|
+
protected _onChangeShowFrustum: (showFrustum: boolean) => void;
|
|
57
|
+
protected _onChangeShowFootprint: (showFootprint: boolean) => void;
|
|
58
|
+
protected _onChangeBias: (value: string) => void;
|
|
59
|
+
protected _onChangeNormalBias: (value: string) => void;
|
|
60
|
+
protected _onChangeDepthEpsilon: (value: string) => void;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Control, type IControlParams } from "../Control";
|
|
2
|
+
import { EntityEditorScene, type EditModeName } from "./EntityEditorScene";
|
|
3
|
+
import { EntityEditorDialog } from "./EntityEditorDialog";
|
|
4
|
+
import { Entity } from "../../entity/Entity";
|
|
5
|
+
import { Dialog } from "../../ui";
|
|
6
|
+
export interface IEntityEditorParams extends IControlParams {
|
|
7
|
+
editMode?: EditModeName;
|
|
8
|
+
}
|
|
9
|
+
export declare class EntityEditor extends Control {
|
|
10
|
+
protected _entityEditorScene: EntityEditorScene;
|
|
11
|
+
protected _dialog: EntityEditorDialog;
|
|
12
|
+
constructor(options?: IEntityEditorParams);
|
|
13
|
+
oninit(): void;
|
|
14
|
+
onactivate(): void;
|
|
15
|
+
ondeactivate(): void;
|
|
16
|
+
selectEntity(entity: Entity): void;
|
|
17
|
+
positionDialogLeftOf(anchor: Dialog<unknown>): void;
|
|
18
|
+
unselectEntity(): void;
|
|
19
|
+
getSelectedEntity(): Entity | null;
|
|
20
|
+
}
|