@openglobus/og 1.0.0-rc2 → 1.0.0-rc21

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.
Files changed (119) hide show
  1. package/README.md +2 -0
  2. package/lib/Globe.d.ts +21 -8
  3. package/lib/Object3d.d.ts +1 -1
  4. package/lib/assets/LabelWorker.worker-C24YLEkW.js.map +1 -0
  5. package/lib/assets/PlainSegmentWorker.worker-DJHXd0bF.js.map +1 -0
  6. package/lib/assets/TerrainWorker.worker-BwueoQpg.js.map +1 -0
  7. package/lib/camera/Camera.d.ts +57 -8
  8. package/lib/camera/Frustum.d.ts +37 -1
  9. package/lib/camera/PlanetCamera.d.ts +29 -4
  10. package/lib/control/DebugInfo.d.ts +1 -0
  11. package/lib/control/FramebufferPreview.d.ts +18 -2
  12. package/lib/control/FreeNavigation.d.ts +253 -0
  13. package/lib/control/LayerSwitcher.d.ts +18 -0
  14. package/lib/control/Lighting.d.ts +3 -0
  15. package/lib/control/Navigation.d.ts +18 -1
  16. package/lib/control/ShowFps.d.ts +15 -3
  17. package/lib/control/Sun.d.ts +59 -0
  18. package/lib/control/depthCamera/DepthCamera.d.ts +132 -0
  19. package/lib/control/depthCamera/DepthCameraHandler.d.ts +25 -0
  20. package/lib/control/depthCamera/depth_camera.d.ts +2 -0
  21. package/lib/control/entityEditor/CameraEditorView.d.ts +60 -0
  22. package/lib/control/entityEditor/EntityEditor.d.ts +2 -1
  23. package/lib/control/entityEditor/EntityEditorDialog.d.ts +15 -47
  24. package/lib/control/entityEditor/EntityEditorScene.d.ts +16 -0
  25. package/lib/control/entityEditor/EntityEditorView.d.ts +68 -0
  26. package/lib/control/entityEditor/ProjectorEditorView.d.ts +31 -0
  27. package/lib/control/entityEditor/RotateEntity.d.ts +5 -1
  28. package/lib/control/index.d.ts +3 -3
  29. package/lib/control/timeline/TimelineControl.d.ts +86 -0
  30. package/lib/control/timeline/TimelineModel.d.ts +46 -1
  31. package/lib/control/timeline/TimelineView.d.ts +55 -2
  32. package/lib/entity/Entity.d.ts +18 -0
  33. package/lib/entity/EntityCollection.d.ts +71 -13
  34. package/lib/entity/billboard/BaseBillboardHandler.d.ts +16 -0
  35. package/lib/entity/geoObject/GeoObjectHandler.d.ts +3 -0
  36. package/lib/entity/geoObject/InstanceData.d.ts +6 -0
  37. package/lib/entity/geometry/Geometry.d.ts +18 -0
  38. package/lib/entity/geometry/GeometryHandler.d.ts +1 -0
  39. package/lib/entity/label/Label.d.ts +8 -6
  40. package/lib/entity/pointCloud/PointCloud.d.ts +1 -0
  41. package/lib/entity/pointCloud/PointCloudHandler.d.ts +5 -0
  42. package/lib/entity/polyline/Polyline.d.ts +15 -0
  43. package/lib/entity/polyline/PolylineBatchRenderer.d.ts +1 -0
  44. package/lib/entity/polyline/PolylineHandler.d.ts +5 -0
  45. package/lib/entity/ray/Ray.d.ts +2 -0
  46. package/lib/entity/ray/RayHandler.d.ts +1 -0
  47. package/lib/index.d.ts +20 -3
  48. package/lib/input/KeyboardHandler.d.ts +5 -1
  49. package/lib/layer/BaseTileMaterialLayer.d.ts +36 -0
  50. package/lib/layer/CanvasTiles.d.ts +8 -12
  51. package/lib/layer/Layer.d.ts +8 -1
  52. package/lib/layer/Vector.d.ts +74 -18
  53. package/lib/layer/XYZ.d.ts +5 -21
  54. package/lib/math/Line2.d.ts +9 -0
  55. package/lib/math.d.ts +8 -0
  56. package/lib/og.css +2 -1
  57. package/lib/og.es.js +1 -1
  58. package/lib/og.es.js.map +1 -1
  59. package/lib/quadTree/EntityCollectionsTreeStrategy.d.ts +3 -0
  60. package/lib/quadTree/QuadTreeStrategy.d.ts +18 -1
  61. package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +3 -0
  62. package/lib/quadTree/equi/EquiEntityCollectionsTreeStrategy.d.ts +3 -0
  63. package/lib/renderer/PhongDeferredShading.d.ts +2 -0
  64. package/lib/renderer/Renderer.d.ts +89 -6
  65. package/lib/renderer/RendererEvents.d.ts +2 -0
  66. package/lib/renderer/cascadeShadows/CascadeShadowManager.d.ts +34 -0
  67. package/lib/renderer/cascadeShadows/CascadeShadowMap.d.ts +110 -0
  68. package/lib/renderer/cascadeShadows/cascade_shadow_depth.d.ts +2 -0
  69. package/lib/renderer/projectors/Projector.d.ts +67 -0
  70. package/lib/renderer/projectors/ProjectorManager.d.ts +86 -0
  71. package/lib/renderer/projectors/ProjectorsPass.d.ts +37 -0
  72. package/lib/renderer/shadows/ShadowManager.d.ts +41 -0
  73. package/lib/renderer/shadows/ShadowMap.d.ts +21 -0
  74. package/lib/renderer/textureUnits.d.ts +6 -0
  75. package/lib/scene/Planet.d.ts +80 -8
  76. package/lib/scene/Scene.d.ts +1 -8
  77. package/lib/scene/SkyBox.d.ts +2 -1
  78. package/lib/segment/Segment.d.ts +18 -1
  79. package/lib/shaders/common/uniforms.d.ts +29 -0
  80. package/lib/shaders/geo_object/geo_object.d.ts +1 -0
  81. package/lib/shaders/projectorsPass/projectorsPass.d.ts +2 -0
  82. package/lib/shaders/tone_mapping/toneMapping.d.ts +1 -1
  83. package/lib/shaders/varianceBlur.d.ts +2 -0
  84. package/lib/terrain/EmptyTerrain.d.ts +43 -2
  85. package/lib/terrain/GlobusRgbTerrain.d.ts +1 -0
  86. package/lib/terrain/MapterhornTerrain.d.ts +11 -0
  87. package/lib/terrain/RgbTerrain.d.ts +11 -0
  88. package/lib/terrain/index.d.ts +6 -2
  89. package/lib/ui/Button.d.ts +1 -0
  90. package/lib/ui/Checkbox.d.ts +1 -0
  91. package/lib/ui/Color.d.ts +6 -2
  92. package/lib/ui/Dialog.d.ts +46 -1
  93. package/lib/ui/Dock.d.ts +151 -0
  94. package/lib/ui/Input.d.ts +14 -1
  95. package/lib/ui/Slider.d.ts +1 -0
  96. package/lib/ui/TitleBarView.d.ts +21 -0
  97. package/lib/ui/index.d.ts +2 -0
  98. package/lib/utils/FontAtlas.d.ts +5 -3
  99. package/lib/utils/GeoImageCreator.d.ts +7 -0
  100. package/lib/utils/Loader.d.ts +6 -0
  101. package/lib/utils/NormalMapCreator.d.ts +6 -0
  102. package/lib/utils/TerrainWorker.d.ts +1 -0
  103. package/lib/utils/VectorTileCreator.d.ts +6 -0
  104. package/lib/utils/cameraFootprint.d.ts +72 -0
  105. package/lib/utils/gltf/types.d.ts +5 -4
  106. package/lib/utils/shadowCameraFit.d.ts +175 -0
  107. package/lib/utils/shared.d.ts +11 -0
  108. package/lib/webgl/BaseFramebuffer.d.ts +28 -0
  109. package/lib/webgl/Framebuffer.d.ts +5 -7
  110. package/lib/webgl/Handler.d.ts +28 -0
  111. package/package.json +11 -9
  112. package/lib/assets/LabelWorker.worker-DYd7xn3M.js.map +0 -1
  113. package/lib/assets/PlainSegmentWorker.worker-JsKldq-e.js.map +0 -1
  114. package/lib/assets/TerrainWorker.worker-CqUJvMOv.js.map +0 -1
  115. package/lib/control/CameraFrameComposer.d.ts +0 -19
  116. package/lib/control/CameraFrameHandler.d.ts +0 -26
  117. package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +0 -42
  118. package/lib/control/cameraDepthHandler/camera_depth.d.ts +0 -2
  119. package/lib/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,60 @@
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 _titleBarView: TitleBarView;
30
+ protected _bodyEl: HTMLElement | null;
31
+ protected _depthCamera: DepthCamera | null;
32
+ constructor(params: ICameraEditorViewParams);
33
+ bindEntity(entity: Entity): void;
34
+ render(params?: unknown): this;
35
+ refresh(): void;
36
+ protected _getCamera(): Camera | null;
37
+ remove(): void;
38
+ protected _onTitleBarChange: (isCollapsed: boolean) => void;
39
+ protected _setNearFar(near: number, far: number): void;
40
+ protected _setBounds(left: number, right: number, bottom: number, top: number): void;
41
+ protected _syncFrustumEntityScale(): void;
42
+ protected _onChangeNear: (value: string) => void;
43
+ protected _onChangeFar: (value: string) => void;
44
+ protected _onChangeLeft: (value: string) => void;
45
+ protected _onChangeRight: (value: string) => void;
46
+ protected _onChangeBottom: (value: string) => void;
47
+ protected _onChangeTop: (value: string) => void;
48
+ protected _onChangeVerticalFov: (value: string) => void;
49
+ protected _onChangeHorizontalFov: (value: string) => void;
50
+ protected _setViewportSize(width: number, height: number): void;
51
+ protected _onChangeViewportWidth: (value: string) => void;
52
+ protected _onChangeViewportHeight: (value: string) => void;
53
+ protected _onChangeOrthographic: (isOrthographic: boolean) => void;
54
+ protected _onChangeFocusDistance: (value: string) => void;
55
+ protected _onChangeShowFrustum: (showFrustum: boolean) => void;
56
+ protected _onChangeShowFootprint: (showFootprint: boolean) => void;
57
+ protected _onChangeBias: (value: string) => void;
58
+ protected _onChangeNormalBias: (value: string) => void;
59
+ }
60
+ export {};
@@ -1,9 +1,10 @@
1
1
  import { Control, type IControlParams } from "../Control";
2
- import { EntityEditorScene } from "./EntityEditorScene";
2
+ import { EntityEditorScene, type EditModeName } from "./EntityEditorScene";
3
3
  import { EntityEditorDialog } from "./EntityEditorDialog";
4
4
  import { Entity } from "../../entity/Entity";
5
5
  import { Dialog } from "../../ui";
6
6
  export interface IEntityEditorParams extends IControlParams {
7
+ editMode?: EditModeName;
7
8
  }
8
9
  export declare class EntityEditor extends Control {
9
10
  protected _entityEditorScene: EntityEditorScene;
@@ -1,35 +1,17 @@
1
1
  import { Dialog, type IDialogParams } from "../../ui/Dialog";
2
2
  import { EntityEditorScene } from "./EntityEditorScene";
3
3
  import { Entity } from "../../entity/Entity";
4
- import { Input } from "../../ui/Input";
5
- import { Checkbox } from "../../ui/Checkbox";
6
4
  import { Vec3 } from "../../math/Vec3";
7
- import { Slider } from "../../ui/Slider";
5
+ import { CameraEditorView } from "./CameraEditorView";
6
+ import { EntityEditorView } from "./EntityEditorView";
7
+ import { ProjectorEditorView } from "./ProjectorEditorView";
8
8
  interface IEntityEditorDialog extends IDialogParams {
9
9
  model: EntityEditorScene;
10
10
  }
11
11
  export declare class EntityEditorDialog extends Dialog<EntityEditorScene> {
12
- protected _relativePositionView: Checkbox;
13
- protected _lonView: Input;
14
- protected _latView: Input;
15
- protected _heightView: Input;
16
- protected _xView: Input;
17
- protected _yView: Input;
18
- protected _zView: Input;
19
- protected _absXView: Input;
20
- protected _absYView: Input;
21
- protected _absZView: Input;
22
- protected _pitchView: Input;
23
- protected _yawView: Input;
24
- protected _rollView: Input;
25
- protected _absolutePitchView: Input;
26
- protected _absoluteYawView: Input;
27
- protected _absoluteRollView: Input;
28
- protected _scaleView: Input;
29
- protected _scaleXView: Input;
30
- protected _scaleYView: Input;
31
- protected _scaleZView: Input;
32
- protected _opacityView: Slider;
12
+ protected _entityView: EntityEditorView | null;
13
+ protected _cameraView: CameraEditorView | null;
14
+ protected _projectorView: ProjectorEditorView | null;
33
15
  constructor(params: IEntityEditorDialog);
34
16
  render(params: any): this;
35
17
  protected _onVisibility: (vis: boolean) => void;
@@ -37,34 +19,20 @@ export declare class EntityEditorDialog extends Dialog<EntityEditorScene> {
37
19
  protected _initSceneEvents(): void;
38
20
  protected _clearSceneEvents(): void;
39
21
  protected _onSelect: (entity: Entity) => void;
40
- protected _refresh(entity: Entity): void;
22
+ protected _refreshViews(entity: Entity): void;
23
+ protected _refreshEntityView(entity: Entity): void;
24
+ protected _removeEntityView(): void;
25
+ protected _refreshCameraView(entity: Entity): void;
26
+ protected _removeCameraView(): void;
27
+ protected _refreshProjectorView(entity: Entity): void;
28
+ protected _removeProjectorView(): void;
29
+ protected _removeViews(): void;
41
30
  protected _setDialogTitle(entity: Entity): void;
42
31
  hide(): void;
43
- protected _onUnselect: (entity: Entity) => void;
44
- protected _onChangeRelativePosition: (checked: boolean) => void;
32
+ protected _onUnselect: () => void;
45
33
  protected _onPosition: (pos: Vec3, entity: Entity) => void;
46
34
  protected _onPitch: (a: number, entity: Entity) => void;
47
35
  protected _onYaw: (a: number, entity: Entity) => void;
48
36
  protected _onRoll: (a: number, entity: Entity) => void;
49
- protected _onChangeLon: (val: string) => void;
50
- protected _onChangeLat: (val: string) => void;
51
- protected _onChangeHeight: (val: string) => void;
52
- protected _onChangeX: (val: string) => void;
53
- protected _onChangeY: (val: string) => void;
54
- protected _onChangeZ: (val: string) => void;
55
- protected _onChangeAbsoluteX: (val: string) => void;
56
- protected _onChangeAbsoluteY: (val: string) => void;
57
- protected _onChangeAbsoluteZ: (val: string) => void;
58
- protected _onChangePitch: (val: string) => void;
59
- protected _onChangeYaw: (val: string) => void;
60
- protected _onChangeRoll: (val: string) => void;
61
- protected _onChangeAbsolutePitch: (val: string) => void;
62
- protected _onChangeAbsoluteYaw: (val: string) => void;
63
- protected _onChangeAbsoluteRoll: (val: string) => void;
64
- protected _onChangeScale: (val: string) => void;
65
- protected _onChangeScaleX: (val: string) => void;
66
- protected _onChangeScaleY: (val: string) => void;
67
- protected _onChangeScaleZ: (val: string) => void;
68
- protected _onChangeOpacity: (val: number) => void;
69
37
  }
70
38
  export {};
@@ -15,7 +15,12 @@ import { EntityCollection } from "../../entity/EntityCollection";
15
15
  export interface IEntityEditorSceneParams {
16
16
  planet?: Planet;
17
17
  name?: string;
18
+ editMode?: EditModeName;
18
19
  }
20
+ export declare const NATIVE_MODE = 0;
21
+ export declare const YAW_MODE = 1;
22
+ export type EditMode = typeof NATIVE_MODE | typeof YAW_MODE;
23
+ export type EditModeName = "native" | "yaw";
19
24
  type EntityEditorSceneEventsList = [
20
25
  "mousemove",
21
26
  "mouseenter",
@@ -62,6 +67,7 @@ declare class EntityEditorScene extends Scene {
62
67
  protected _axisTrackLayer: EntityCollection;
63
68
  protected _selectedEntity: Entity | null;
64
69
  protected _selectedEntityCart: Vec3;
70
+ protected _selectedEntityRotation: Quat;
65
71
  protected _selectedEntityPitch: number;
66
72
  protected _selectedEntityYaw: number;
67
73
  protected _selectedEntityRoll: number;
@@ -73,10 +79,14 @@ declare class EntityEditorScene extends Scene {
73
79
  protected _selectedMove: string | null;
74
80
  protected _ops: Record<string, (mouseState: IMouseState) => void>;
75
81
  protected _axisTrackVisibility: boolean;
82
+ protected _editMode: EditMode;
76
83
  constructor(options?: IEntityEditorSceneParams);
77
84
  get ellipsoid(): Ellipsoid | undefined;
78
85
  get planet(): Planet | null;
86
+ get editMode(): EditMode;
87
+ set editMode(mode: EditMode);
79
88
  bindPlanet(planet: Planet): void;
89
+ protected _parseEditMode(mode: EditModeName | undefined): EditMode;
80
90
  init(): void;
81
91
  onremove(): void;
82
92
  protected _addAxisLayers(): void;
@@ -113,6 +123,12 @@ declare class EntityEditorScene extends Scene {
113
123
  protected _moveXY: (e: IMouseState) => void;
114
124
  protected _moveZY: (e: IMouseState) => void;
115
125
  getFrameRotation(cartesian: Vec3): Quat;
126
+ protected _isPlanetEntity(entity: Entity): boolean;
127
+ protected _isYawMode(): boolean;
128
+ protected _getYawModeFrameRotation(entity: Entity, cart: Vec3): Quat;
129
+ protected _getEntityRotation(entity: Entity, cart: Vec3): Quat;
130
+ protected _setRotateEntityCartesian3v(entity: Entity, cart: Vec3): void;
131
+ protected _setEntityRotation(entity: Entity, rotation: Quat, cart: Vec3): void;
116
132
  protected _rotatePitch: (e: IMouseState) => void;
117
133
  protected _rotateYaw: (e: IMouseState) => void;
118
134
  protected _rotateRoll: (e: IMouseState) => void;
@@ -0,0 +1,68 @@
1
+ import { Entity } from "../../entity/Entity";
2
+ import { Checkbox } from "../../ui/Checkbox";
3
+ import { Input } from "../../ui/Input";
4
+ import { Slider } from "../../ui/Slider";
5
+ import { TitleBarView } from "../../ui/TitleBarView";
6
+ import { View, type IViewParams } from "../../ui/View";
7
+ import { EntityEditorScene } from "./EntityEditorScene";
8
+ interface IEntityEditorViewParams extends IViewParams {
9
+ model: EntityEditorScene;
10
+ entity?: Entity;
11
+ }
12
+ export declare class EntityEditorView extends View<EntityEditorScene> {
13
+ protected _entity: Entity | null;
14
+ protected _titleBarView: TitleBarView;
15
+ protected _bodyEl: HTMLElement | null;
16
+ protected _relativePositionView: Checkbox;
17
+ protected _yawModeView: Checkbox;
18
+ protected _lonView: Input;
19
+ protected _latView: Input;
20
+ protected _heightView: Input;
21
+ protected _xView: Input;
22
+ protected _yView: Input;
23
+ protected _zView: Input;
24
+ protected _absXView: Input;
25
+ protected _absYView: Input;
26
+ protected _absZView: Input;
27
+ protected _pitchView: Input;
28
+ protected _yawView: Input;
29
+ protected _rollView: Input;
30
+ protected _absolutePitchView: Input;
31
+ protected _absoluteYawView: Input;
32
+ protected _absoluteRollView: Input;
33
+ protected _scaleView: Input;
34
+ protected _scaleXView: Input;
35
+ protected _scaleYView: Input;
36
+ protected _scaleZView: Input;
37
+ protected _opacityView: Slider;
38
+ constructor(params: IEntityEditorViewParams);
39
+ bindEntity(entity: Entity): void;
40
+ render(params?: unknown): this;
41
+ refresh(entity?: Entity | null): void;
42
+ refreshRotation(entity?: Entity | null): void;
43
+ remove(): void;
44
+ protected _onTitleBarChange: (isCollapsed: boolean) => void;
45
+ protected _onChangeRelativePosition: (checked: boolean) => void;
46
+ protected _onChangeYawMode: (checked: boolean) => void;
47
+ protected _onChangeLon: (val: string) => void;
48
+ protected _onChangeLat: (val: string) => void;
49
+ protected _onChangeHeight: (val: string) => void;
50
+ protected _onChangeX: (val: string) => void;
51
+ protected _onChangeY: (val: string) => void;
52
+ protected _onChangeZ: (val: string) => void;
53
+ protected _onChangeAbsoluteX: (val: string) => void;
54
+ protected _onChangeAbsoluteY: (val: string) => void;
55
+ protected _onChangeAbsoluteZ: (val: string) => void;
56
+ protected _onChangePitch: (val: string) => void;
57
+ protected _onChangeYaw: (val: string) => void;
58
+ protected _onChangeRoll: (val: string) => void;
59
+ protected _onChangeAbsolutePitch: (val: string) => void;
60
+ protected _onChangeAbsoluteYaw: (val: string) => void;
61
+ protected _onChangeAbsoluteRoll: (val: string) => void;
62
+ protected _onChangeScale: (val: string) => void;
63
+ protected _onChangeScaleX: (val: string) => void;
64
+ protected _onChangeScaleY: (val: string) => void;
65
+ protected _onChangeScaleZ: (val: string) => void;
66
+ protected _onChangeOpacity: (val: number) => void;
67
+ }
68
+ export {};
@@ -0,0 +1,31 @@
1
+ import { Checkbox } from "../../ui/Checkbox";
2
+ import { Color } from "../../ui/Color";
3
+ import { Input } from "../../ui/Input";
4
+ import { TitleBarView } from "../../ui/TitleBarView";
5
+ import { View, type IViewParams } from "../../ui/View";
6
+ import { type Projector } from "../../renderer/projectors/Projector";
7
+ interface IProjectorEditorViewParams extends IViewParams {
8
+ projector: Projector;
9
+ }
10
+ export declare class ProjectorEditorView extends View<Projector> {
11
+ protected _enabledView: Checkbox;
12
+ protected _colorView: Color;
13
+ protected _opacityView: Input;
14
+ protected _priorityView: Input;
15
+ protected _modeEl: HTMLSelectElement | null;
16
+ protected _modeRowEl: HTMLElement | null;
17
+ protected _titleBarView: TitleBarView;
18
+ protected _bodyEl: HTMLElement | null;
19
+ constructor(params: IProjectorEditorViewParams);
20
+ bindProjector(projector: Projector): void;
21
+ render(params?: unknown): this;
22
+ refresh(): void;
23
+ remove(): void;
24
+ protected _onTitleBarChange: (isCollapsed: boolean) => void;
25
+ protected _onChangeEnabled: (enabled: boolean) => void;
26
+ protected _onChangeColor: (color: string) => void;
27
+ protected _onChangeOpacity: (value: string) => void;
28
+ protected _onChangePriority: (value: string) => void;
29
+ protected _onChangeMode: () => void;
30
+ }
31
+ export {};
@@ -1,9 +1,13 @@
1
1
  import { Entity, type IEntityParams } from "../../entity/Entity";
2
2
  import { Vec3 } from "../../math/Vec3";
3
+ import { Quat } from "../../math/Quat";
3
4
  export interface IRotationEntityParams extends IEntityParams {
4
5
  }
5
6
  export declare class RotateEntity extends Entity {
6
7
  constructor(params?: IRotationEntityParams);
7
8
  private _init;
8
- setCartesian3v(cart: Vec3, yaw?: number): void;
9
+ setCartesian3v(cart: Vec3): void;
10
+ setCartesian3v(cart: Vec3, rotation: Quat): void;
11
+ setYawCartesian3v(cart: Vec3, yaw: number): void;
12
+ protected _updateGizmo(cart: Vec3, qRot: Quat, qYaw: Quat): void;
9
13
  }
@@ -3,6 +3,7 @@ export * from "./Control";
3
3
  export * from "./DebugInfo";
4
4
  export * from "./DrawingSwitcher";
5
5
  export * from "./EarthCoordinates";
6
+ export * from "./FreeNavigation";
6
7
  export * from "./GeoImageDragControl";
7
8
  export * from "./KeyboardNavigation";
8
9
  export * from "./LayerAnimation";
@@ -28,9 +29,8 @@ export * from "./atmosphere/AtmosphereConfig";
28
29
  export * from "./entityEditor/EntityEditor";
29
30
  export * from "./CameraLock";
30
31
  export * from "./object3dManager/Object3dManager";
31
- export * from "./CameraFrameComposer";
32
- export * from "./CameraFrameHandler";
33
- export * from "./cameraDepthHandler/CameraDepthHandler";
32
+ export * from "./depthCamera/DepthCamera";
33
+ export * from "./depthCamera/DepthCameraHandler";
34
34
  export * from "./FramebufferPreview";
35
35
  export * from "./SimpleTouchNavigation";
36
36
  export * from "./entityTree/EntityTree";
@@ -2,6 +2,25 @@ import { Dialog } from "../../ui/Dialog";
2
2
  import { ToggleButton } from "../../ui/ToggleButton";
3
3
  import { Control, type IControlParams } from "../Control";
4
4
  import { TimelineView } from "./TimelineView";
5
+ import type { ITimelineSpan, ITimelineSpanParams, TimelineModel } from "./TimelineModel";
6
+ import { type EventsHandler } from "../../Events";
7
+ type TimelineControlEventsList = [
8
+ "visibility",
9
+ "change",
10
+ "setcurrent",
11
+ "current",
12
+ "play",
13
+ "playback",
14
+ "pause",
15
+ "reset",
16
+ "startdrag",
17
+ "stopdrag",
18
+ "startdragcurrent",
19
+ "stopdragcurrent",
20
+ "localtime",
21
+ "suntime",
22
+ "sundate"
23
+ ];
5
24
  interface ITimelineControlParams extends IControlParams {
6
25
  name?: string;
7
26
  current?: Date;
@@ -12,7 +31,74 @@ declare class TimelineControl extends Control {
12
31
  protected _timelineView: TimelineView;
13
32
  protected _toggleBtn: ToggleButton;
14
33
  protected _dialog: Dialog<null>;
34
+ protected _defaultClockWasRunningBeforeDrag: boolean;
35
+ events: EventsHandler<TimelineControlEventsList>;
15
36
  constructor(options?: ITimelineControlParams);
37
+ /**
38
+ * Returns timeline data model.
39
+ * @public
40
+ */
41
+ get model(): TimelineModel;
42
+ /** Date the Sun marker stands on. Setting it moves the marker without dispatching. */
43
+ get sunDate(): Date;
44
+ set sunDate(date: Date);
45
+ /**
46
+ * Adds a colored time interval drawn on the scale, e.g. one per telemetry track.
47
+ * Spans that overlap in time are placed on separate rows automatically, and the
48
+ * rows share the scale height between them.
49
+ * @public
50
+ * @param {ITimelineSpanParams} params - Span start, end and color. An omitted id is generated.
51
+ * @returns {ITimelineSpan} - Stored span, with its id and assigned row.
52
+ */
53
+ addSpan(params: ITimelineSpanParams): ITimelineSpan;
54
+ /**
55
+ * Adds several spans at once, keeping the ones already on the scale.
56
+ * @public
57
+ * @param {ITimelineSpanParams[]} params - Spans to add.
58
+ * @returns {ITimelineSpan[]} - Stored spans, in the order they were given.
59
+ */
60
+ addSpans(params: ITimelineSpanParams[]): ITimelineSpan[];
61
+ /**
62
+ * Replaces every span on the scale, e.g. to redraw the whole set after a source
63
+ * was added or removed.
64
+ * @public
65
+ * @param {ITimelineSpanParams[]} params - Spans the scale is left with.
66
+ * @returns {ITimelineSpan[]} - Stored spans, in the order they were given.
67
+ */
68
+ setSpans(params: ITimelineSpanParams[]): ITimelineSpan[];
69
+ /**
70
+ * Replaces the time range, color and payload of a span, and reassigns the rows when
71
+ * its time range moved.
72
+ * @public
73
+ * @param {string} id - Span id.
74
+ * @param {ITimelineSpanParams} params - New span fields. Every field is replaced, the id is kept.
75
+ * @returns {ITimelineSpan | undefined} - Updated span, or undefined when the id is unknown.
76
+ */
77
+ updateSpan(id: string, params: ITimelineSpanParams): ITimelineSpan | undefined;
78
+ /**
79
+ * Removes a single span from the scale. An unknown id is ignored.
80
+ * @public
81
+ * @param {string} id - Span id.
82
+ */
83
+ removeSpan(id: string): void;
84
+ /**
85
+ * Removes every span from the scale.
86
+ * @public
87
+ */
88
+ clearSpans(): void;
89
+ /**
90
+ * Returns the spans currently on the scale.
91
+ * @public
92
+ * @returns {ITimelineSpan[]} - Stored spans, each carrying its assigned row.
93
+ */
94
+ getSpans(): ITimelineSpan[];
95
+ /**
96
+ * Returns a single span by its id.
97
+ * @public
98
+ * @param {string} id - Span id.
99
+ * @returns {ITimelineSpan | undefined} - Stored span, or undefined when the id is unknown.
100
+ */
101
+ getSpan(id: string): ITimelineSpan | undefined;
16
102
  oninit(): void;
17
103
  }
18
104
  export { TimelineControl };
@@ -1,5 +1,22 @@
1
1
  import { type EventsHandler } from "../../Events";
2
- type TimelineEventsList = ["change", "current"];
2
+ type TimelineEventsList = ["change", "current", "play", "stop", "spanschange"];
3
+ /** A colored time interval shown on the timeline scale. */
4
+ export interface ITimelineSpanParams {
5
+ id?: string;
6
+ start: Date;
7
+ end: Date;
8
+ color?: string;
9
+ data?: unknown;
10
+ }
11
+ export interface ITimelineSpan {
12
+ id: string;
13
+ start: Date;
14
+ end: Date;
15
+ color: string;
16
+ data?: unknown;
17
+ /** Row the span is drawn in, assigned so that overlapping spans never share one. */
18
+ lane: number;
19
+ }
3
20
  interface ITimelineParams {
4
21
  current?: Date;
5
22
  rangeStart?: Date;
@@ -9,6 +26,7 @@ interface ITimelineParams {
9
26
  multiplier?: number;
10
27
  }
11
28
  declare class TimelineModel {
29
+ static __spanCounter__: number;
12
30
  events: EventsHandler<TimelineEventsList>;
13
31
  protected _current: Date;
14
32
  protected _rangeStart: Date;
@@ -18,9 +36,36 @@ declare class TimelineModel {
18
36
  protected _maxDate: Date | null;
19
37
  protected _requestAnimationFrameId: number;
20
38
  protected _prevNow: number;
39
+ protected _spans: ITimelineSpan[];
40
+ protected _laneCount: number;
21
41
  multiplier: number;
22
42
  dt: number;
43
+ /**
44
+ * While set, playing does not advance
45
+ * the time: something else sets `current` instead.
46
+ */
47
+ driven: boolean;
48
+ /**
49
+ * While set, playing takes the current time
50
+ * from this source instead of the frame delta.
51
+ */
52
+ clock: (() => number) | null;
23
53
  constructor(options?: ITimelineParams);
54
+ addSpan(params: ITimelineSpanParams): ITimelineSpan;
55
+ addSpans(params: ITimelineSpanParams[]): ITimelineSpan[];
56
+ setSpans(params: ITimelineSpanParams[]): ITimelineSpan[];
57
+ updateSpan(id: string, params: ITimelineSpanParams): ITimelineSpan | undefined;
58
+ removeSpan(id: string): void;
59
+ clearSpans(): void;
60
+ getSpans(): ITimelineSpan[];
61
+ getSpan(id: string): ITimelineSpan | undefined;
62
+ /**
63
+ * Number of rows the current spans need, at least one when
64
+ * there are any.
65
+ */
66
+ get laneCount(): number;
67
+ protected _onSpansChange(): void;
68
+ protected _assignLanes(): void;
24
69
  play(): void;
25
70
  stop(): void;
26
71
  stopped(): boolean;
@@ -17,6 +17,7 @@ declare const TOUCH_MODE_NONE = 0;
17
17
  declare const TOUCH_MODE_CURRENT = 1;
18
18
  declare const TOUCH_MODE_PINCH = 2;
19
19
  declare const TOUCH_MODE_SCALE = 3;
20
+ declare const TOUCH_MODE_SUN = 4;
20
21
  type TimelineViewEventsList = [
21
22
  "startdrag",
22
23
  "stopdrag",
@@ -27,9 +28,12 @@ type TimelineViewEventsList = [
27
28
  "play",
28
29
  "playback",
29
30
  "pause",
30
- "visibility"
31
+ "visibility",
32
+ "localtime",
33
+ "suntime",
34
+ "sundate"
31
35
  ];
32
- type TimelineTouchMode = typeof TOUCH_MODE_NONE | typeof TOUCH_MODE_CURRENT | typeof TOUCH_MODE_PINCH | typeof TOUCH_MODE_SCALE;
36
+ type TimelineTouchMode = typeof TOUCH_MODE_NONE | typeof TOUCH_MODE_CURRENT | typeof TOUCH_MODE_PINCH | typeof TOUCH_MODE_SCALE | typeof TOUCH_MODE_SUN;
33
37
  interface ITimelineTouchPointer {
34
38
  pointerId: number;
35
39
  clientX: number;
@@ -41,12 +45,20 @@ declare class TimelineView extends View<TimelineModel> {
41
45
  $controls: HTMLElement | null;
42
46
  protected _frameEl: HTMLElement | null;
43
47
  protected _currentEl: HTMLElement | null;
48
+ protected _sunEl: HTMLElement | null;
44
49
  protected _canvasEl: HTMLCanvasElement;
45
50
  protected _ctx: CanvasRenderingContext2D;
51
+ protected _spansCanvasEl: HTMLCanvasElement;
52
+ protected _spansCtx: CanvasRenderingContext2D;
53
+ protected _appliedFillStyle: string;
46
54
  protected _isMouseOver: boolean;
47
55
  protected _isDragging: boolean;
48
56
  protected _isCurrentDragging: boolean;
49
57
  protected _isCurrentMouseOver: boolean;
58
+ protected _isSunDragging: boolean;
59
+ protected _isSunMouseOver: boolean;
60
+ protected _sunDate: Date;
61
+ protected _sunTime: boolean;
50
62
  protected _minWidth: number;
51
63
  protected _canvasScale: number;
52
64
  protected _millisecondsInPixel: number;
@@ -54,6 +66,7 @@ declare class TimelineView extends View<TimelineModel> {
54
66
  protected _clickRangeStart: Date;
55
67
  protected _clickRangeEnd: Date;
56
68
  protected _clickCurrentDate: Date;
69
+ protected _clickSunDate: Date;
57
70
  protected _clickTime: number;
58
71
  protected _clickDelay: number;
59
72
  protected _clickMoveTolerance: number;
@@ -62,11 +75,16 @@ declare class TimelineView extends View<TimelineModel> {
62
75
  protected _touchPointers: Map<number, ITimelineTouchPointer>;
63
76
  protected _touchScalePointerId: number | null;
64
77
  protected _touchCurrentPointerId: number | null;
78
+ protected _touchSunPointerId: number | null;
65
79
  protected _onResizeObserver_: () => void;
66
80
  protected _resizeObserver: ResizeObserver;
67
81
  protected _pauseBtn: ToggleButton;
68
82
  protected _playBtn: ToggleButton;
83
+ protected _playBackBtn: ToggleButton;
84
+ protected _multiplierEl: HTMLSelectElement | null;
69
85
  protected _buttons: ButtonGroup;
86
+ protected _localTimeBtn: ToggleButton;
87
+ protected _sunTimeBtn: ToggleButton;
70
88
  protected _visibility: boolean;
71
89
  constructor(options?: ITimelineViewParams);
72
90
  protected _onResizeObserver(): void;
@@ -75,7 +93,31 @@ declare class TimelineView extends View<TimelineModel> {
75
93
  resize(): void;
76
94
  afterRender(parentNode: HTMLElement): void;
77
95
  render(): this;
96
+ /**
97
+ * True when the timeline scale is read as the local date and time at the viewed location.
98
+ * @public
99
+ * @type {boolean}
100
+ */
101
+ get localTime(): boolean;
102
+ set localTime(localTime: boolean);
103
+ /**
104
+ * True while the Sun is set from its own marker instead of the timeline.
105
+ * @public
106
+ * @type {boolean}
107
+ */
108
+ get sunTime(): boolean;
109
+ set sunTime(sunTime: boolean);
110
+ /**
111
+ * Date the Sun marker stands on.
112
+ * @public
113
+ * @type {Date}
114
+ */
115
+ get sunDate(): Date;
116
+ set sunDate(date: Date);
78
117
  setVisibility(visibility: boolean): void;
118
+ protected _createMultiplier(): HTMLSelectElement;
119
+ protected _syncMultiplier(): void;
120
+ protected _syncPlayButtons: () => void;
79
121
  reset(): void;
80
122
  play(): void;
81
123
  pause(): void;
@@ -90,7 +132,12 @@ declare class TimelineView extends View<TimelineModel> {
90
132
  protected _startCurrentDrag(clientX: number, sourceEvent: Event, pointerId?: number | null): void;
91
133
  protected _moveCurrentDrag(clientX: number): void;
92
134
  protected _stopCurrentDrag(): void;
135
+ protected _startSunDrag(clientX: number, pointerId?: number | null): void;
136
+ /** The Sun marker carries its own date: the model, and everything reading it, stay put. */
137
+ protected _moveSunDrag(clientX: number): void;
138
+ protected _stopSunDrag(): void;
93
139
  protected _isClickGesture(clientX: number): boolean;
140
+ protected _setSunByClientX(clientX: number): Date;
94
141
  protected _setCurrentByClientX(clientX: number): Date;
95
142
  protected _captureTouchPointer(e: PointerEvent): void;
96
143
  protected _updateTouchPointer(e: PointerEvent): void;
@@ -107,8 +154,11 @@ declare class TimelineView extends View<TimelineModel> {
107
154
  protected _onMouseOut: () => void;
108
155
  protected _onCurrentMouseEnter: () => void;
109
156
  protected _onCurrentMouseOut: () => void;
157
+ protected _onSunMouseEnter: () => void;
158
+ protected _onSunMouseOut: () => void;
110
159
  protected _onScalePointerDown: (e: PointerEvent) => void;
111
160
  protected _onCurrentPointerDown: (e: PointerEvent) => void;
161
+ protected _onSunPointerDown: (e: PointerEvent) => void;
112
162
  protected _onPointerMove: (e: PointerEvent) => void;
113
163
  protected _onPointerUp: (e: PointerEvent) => void;
114
164
  protected _onMouseMove: (e: MouseEvent) => void;
@@ -119,7 +169,10 @@ declare class TimelineView extends View<TimelineModel> {
119
169
  protected _clearEvents(): void;
120
170
  remove(): void;
121
171
  protected _clearCanvas(): void;
172
+ protected _applyScaleBackground(): void;
173
+ protected _drawSpans: () => void;
122
174
  protected _drawCurrent(): void;
175
+ protected _drawSun(): void;
123
176
  draw(): void;
124
177
  }
125
178
  export { TimelineView };