@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.
Files changed (242) hide show
  1. package/LICENSE.md +218 -4
  2. package/README.md +33 -18
  3. package/lib/Deferred.d.ts +2 -2
  4. package/lib/Events.d.ts +1 -1
  5. package/lib/Globe.d.ts +22 -11
  6. package/lib/Object3d.d.ts +18 -15
  7. package/lib/Popup.d.ts +2 -2
  8. package/lib/assets/LabelWorker.worker-C24YLEkW.js.map +1 -0
  9. package/lib/assets/PlainSegmentWorker.worker-DJHXd0bF.js.map +1 -0
  10. package/lib/assets/TerrainWorker.worker-B4Gp0jCy.js.map +1 -0
  11. package/lib/bv/index.d.ts +2 -2
  12. package/lib/camera/Camera.d.ts +320 -33
  13. package/lib/camera/Frustum.d.ts +136 -15
  14. package/lib/camera/PlanetCamera.d.ts +114 -11
  15. package/lib/camera/index.d.ts +2 -2
  16. package/lib/control/CompassButton.d.ts +2 -2
  17. package/lib/control/EarthCoordinates.d.ts +5 -2
  18. package/lib/control/FramebufferPreview.d.ts +20 -4
  19. package/lib/control/GeoImageDragControl.d.ts +1 -1
  20. package/lib/control/LayerAnimation.d.ts +2 -2
  21. package/lib/control/LayerSwitcher.d.ts +3 -0
  22. package/lib/control/Lighting.d.ts +7 -2
  23. package/lib/control/Navigation.d.ts +27 -12
  24. package/lib/control/OrthoSwitcher.d.ts +18 -0
  25. package/lib/control/SimpleTouchNavigation.d.ts +44 -0
  26. package/lib/control/Sun.d.ts +4 -2
  27. package/lib/control/TouchNavigation.d.ts +4 -8
  28. package/lib/control/atmosphere/Atmosphere.d.ts +2 -0
  29. package/lib/control/atmosphere/AtmosphereConfig.d.ts +2 -6
  30. package/lib/control/depthCamera/DepthCamera.d.ts +118 -0
  31. package/lib/control/depthCamera/DepthCameraHandler.d.ts +25 -0
  32. package/lib/control/depthCamera/depth_camera.d.ts +2 -0
  33. package/lib/control/drawing/LineStringDrawingScene.d.ts +1 -0
  34. package/lib/control/drawing/PolygonDrawingScene.d.ts +14 -14
  35. package/lib/control/elevationProfile/ElevationProfile.d.ts +1 -1
  36. package/lib/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
  37. package/lib/control/elevationProfile/ElevationProfileScene.d.ts +9 -12
  38. package/lib/control/elevationProfile/ElevationProfileView.d.ts +16 -5
  39. package/lib/control/entityEditor/CameraEditorView.d.ts +62 -0
  40. package/lib/control/entityEditor/EntityEditor.d.ts +20 -0
  41. package/lib/control/entityEditor/EntityEditorDialog.d.ts +38 -0
  42. package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +28 -12
  43. package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorView.d.ts} +22 -23
  44. package/lib/control/entityEditor/ProjectorEditorView.d.ts +31 -0
  45. package/lib/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +5 -1
  46. package/lib/control/{geoObjectEditor → entityEditor}/colors.d.ts +2 -2
  47. package/lib/control/entityTree/EntityTree.d.ts +46 -0
  48. package/lib/control/entityTree/EntityTreeView.d.ts +24 -0
  49. package/lib/control/heightRuler/HeightRulerScene.d.ts +3 -2
  50. package/lib/control/index.d.ts +7 -6
  51. package/lib/control/ruler/RulerScene.d.ts +8 -8
  52. package/lib/control/selection/SelectionScene.d.ts +6 -6
  53. package/lib/control/timeline/TimelineControl.d.ts +19 -2
  54. package/lib/control/timeline/TimelineModel.d.ts +1 -1
  55. package/lib/control/timeline/TimelineView.d.ts +52 -13
  56. package/lib/control/visibleExtent/segment.d.ts +7 -0
  57. package/lib/ellipsoid/index.d.ts +4 -4
  58. package/lib/entity/Entity.d.ts +114 -100
  59. package/lib/entity/EntityCollection.d.ts +140 -72
  60. package/lib/entity/{BaseBillboard.d.ts → billboard/BaseBillboard.d.ts} +16 -17
  61. package/lib/entity/{BaseBillboardHandler.d.ts → billboard/BaseBillboardHandler.d.ts} +24 -9
  62. package/lib/entity/{Billboard.d.ts → billboard/Billboard.d.ts} +11 -7
  63. package/lib/entity/{BillboardHandler.d.ts → billboard/BillboardHandler.d.ts} +1 -1
  64. package/lib/entity/{GeoObject.d.ts → geoObject/GeoObject.d.ts} +7 -6
  65. package/lib/entity/{GeoObjectHandler.d.ts → geoObject/GeoObjectHandler.d.ts} +32 -11
  66. package/lib/entity/{InstanceData.d.ts → geoObject/InstanceData.d.ts} +18 -13
  67. package/lib/entity/{Geometry.d.ts → geometry/Geometry.d.ts} +10 -10
  68. package/lib/entity/{GeometryHandler.d.ts → geometry/GeometryHandler.d.ts} +7 -7
  69. package/lib/entity/index.d.ts +8 -8
  70. package/lib/entity/{Label.d.ts → label/Label.d.ts} +12 -13
  71. package/lib/entity/{LabelHandler.d.ts → label/LabelHandler.d.ts} +31 -7
  72. package/lib/entity/{LabelWorker.d.ts → label/LabelWorker.d.ts} +3 -3
  73. package/lib/entity/{PointCloud.d.ts → pointCloud/PointCloud.d.ts} +18 -12
  74. package/lib/entity/{PointCloudHandler.d.ts → pointCloud/PointCloudHandler.d.ts} +4 -4
  75. package/lib/entity/polyline/Polyline.d.ts +242 -0
  76. package/lib/entity/polyline/PolylineBatchRenderer.d.ts +443 -0
  77. package/lib/entity/{PolylineHandler.d.ts → polyline/PolylineHandler.d.ts} +19 -7
  78. package/lib/entity/{Ray.d.ts → ray/Ray.d.ts} +29 -9
  79. package/lib/entity/{RayHandler.d.ts → ray/RayHandler.d.ts} +18 -8
  80. package/lib/entity/{Strip.d.ts → strip/Strip.d.ts} +21 -17
  81. package/lib/entity/{StripHandler.d.ts → strip/StripHandler.d.ts} +11 -6
  82. package/lib/index.d.ts +59 -42
  83. package/lib/layer/BaseGeoImage.d.ts +20 -17
  84. package/lib/layer/BaseTileMaterialLayer.d.ts +36 -0
  85. package/lib/layer/CanvasTiles.d.ts +20 -22
  86. package/lib/layer/GeoImage.d.ts +1 -1
  87. package/lib/layer/GeoTexture2d.d.ts +2 -2
  88. package/lib/layer/KML.d.ts +19 -18
  89. package/lib/layer/Layer.d.ts +72 -53
  90. package/lib/layer/Vector.d.ts +106 -37
  91. package/lib/layer/WMS.d.ts +1 -1
  92. package/lib/layer/XYZ.d.ts +14 -31
  93. package/lib/layer/index.d.ts +12 -12
  94. package/lib/math/Line2.d.ts +10 -1
  95. package/lib/math/Line3.d.ts +1 -1
  96. package/lib/math/Mat3.d.ts +3 -13
  97. package/lib/math/Mat4.d.ts +16 -10
  98. package/lib/math/Plane.d.ts +1 -1
  99. package/lib/math/Quat.d.ts +14 -12
  100. package/lib/math/Ray.d.ts +4 -3
  101. package/lib/math/Vec2.d.ts +25 -17
  102. package/lib/math/Vec3.d.ts +33 -31
  103. package/lib/math/Vec4.d.ts +1 -1
  104. package/lib/math/coder.d.ts +1 -1
  105. package/lib/math/index.d.ts +13 -14
  106. package/lib/mercator.d.ts +4 -4
  107. package/lib/og.css +2 -1
  108. package/lib/og.es.js +1 -1
  109. package/lib/og.es.js.map +1 -1
  110. package/lib/quadTree/EntityCollectionNode.d.ts +10 -10
  111. package/lib/quadTree/EntityCollectionsTreeStrategy.d.ts +8 -5
  112. package/lib/quadTree/QuadTreeStrategy.d.ts +6 -5
  113. package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
  114. package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +7 -4
  115. package/lib/quadTree/equi/EquiEntityCollectionsTreeStrategy.d.ts +3 -0
  116. package/lib/renderer/AtmosphereDeferredShading.d.ts +12 -0
  117. package/lib/renderer/IDeferredShadingPass.d.ts +8 -0
  118. package/lib/renderer/ITransparencyPass.d.ts +8 -0
  119. package/lib/renderer/PhongDeferredShading.d.ts +18 -0
  120. package/lib/renderer/Renderer.d.ts +195 -100
  121. package/lib/renderer/RendererEvents.d.ts +16 -5
  122. package/lib/renderer/WOITPass.d.ts +14 -0
  123. package/lib/renderer/cascadeShadows/CascadeShadowManager.d.ts +34 -0
  124. package/lib/renderer/cascadeShadows/CascadeShadowMap.d.ts +112 -0
  125. package/lib/renderer/cascadeShadows/cascade_shadow_depth.d.ts +2 -0
  126. package/lib/renderer/projectors/Projector.d.ts +66 -0
  127. package/lib/renderer/projectors/ProjectorManager.d.ts +85 -0
  128. package/lib/renderer/projectors/ProjectorsPass.d.ts +37 -0
  129. package/lib/renderer/shadows/ShadowManager.d.ts +40 -0
  130. package/lib/renderer/shadows/ShadowMap.d.ts +21 -0
  131. package/lib/renderer/textureUnits.d.ts +6 -0
  132. package/lib/res/fonts/Ephesis-Regular.json +1 -0
  133. package/lib/res/fonts/Ephesis-Regular.png +0 -0
  134. package/lib/res/fonts/Karla-Bold.json +1 -0
  135. package/lib/res/fonts/Karla-Bold.png +0 -0
  136. package/lib/res/fonts/Karla-Italic.json +1 -0
  137. package/lib/res/fonts/Karla-Italic.png +0 -0
  138. package/lib/res/fonts/Karla-Light.json +1 -0
  139. package/lib/res/fonts/Karla-Light.png +0 -0
  140. package/lib/res/fonts/Karla-Medium.json +1 -0
  141. package/lib/res/fonts/Karla-Medium.png +0 -0
  142. package/lib/res/fonts/Roboto-Regular.json +1 -37147
  143. package/lib/res/fonts/Roboto-Regular.png +0 -0
  144. package/lib/res/fonts/arial.json +1 -4321
  145. package/lib/res/fonts/arial.png +0 -0
  146. package/lib/res/night-4326.png +0 -0
  147. package/lib/res/night.png +0 -0
  148. package/lib/scene/AltitudeNearPlaneStrategy.d.ts +17 -0
  149. package/lib/scene/Axes.d.ts +4 -3
  150. package/lib/scene/Planet.d.ts +268 -72
  151. package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +47 -51
  152. package/lib/scene/SkyBox.d.ts +7 -4
  153. package/lib/scene/index.d.ts +2 -2
  154. package/lib/segment/Segment.d.ts +38 -15
  155. package/lib/segment/SegmentLonLat.d.ts +0 -1
  156. package/lib/shadeModeConstants.d.ts +7 -0
  157. package/lib/shaders/applyDeferredDepth.d.ts +2 -0
  158. package/lib/shaders/atmos/atmos.d.ts +3 -3
  159. package/lib/shaders/billboard/billboard.d.ts +4 -3
  160. package/lib/shaders/common/uniforms.d.ts +27 -0
  161. package/lib/shaders/deferredShading/deferredShading.d.ts +2 -0
  162. package/lib/shaders/deferredShading/deferredShadingAtmos.d.ts +3 -0
  163. package/lib/shaders/depth.d.ts +2 -2
  164. package/lib/shaders/geo_object/geo_object.d.ts +9 -4
  165. package/lib/shaders/label/label.d.ts +4 -4
  166. package/lib/shaders/pointCloud.d.ts +2 -2
  167. package/lib/shaders/polyline/polyline.d.ts +7 -3
  168. package/lib/shaders/projectorsPass/projectorsPass.d.ts +2 -0
  169. package/lib/shaders/ray/ray.d.ts +3 -2
  170. package/lib/shaders/screenFrame.d.ts +2 -2
  171. package/lib/shaders/segment/segment.d.ts +7 -0
  172. package/lib/shaders/skybox.d.ts +2 -2
  173. package/lib/shaders/strip/strip.d.ts +3 -0
  174. package/lib/shaders/tone_mapping/toneMapping.d.ts +2 -2
  175. package/lib/shaders/varianceBlur.d.ts +2 -0
  176. package/lib/shaders/weightedOITResolve.d.ts +2 -0
  177. package/lib/terrain/BilTerrain.d.ts +1 -1
  178. package/lib/terrain/EmptyTerrain.d.ts +6 -7
  179. package/lib/terrain/GlobusTerrain.d.ts +18 -23
  180. package/lib/terrain/MapterhornTerrain.d.ts +10 -0
  181. package/lib/terrain/RgbTerrain.d.ts +19 -8
  182. package/lib/terrain/index.d.ts +10 -6
  183. package/lib/tsconfig.tsbuildinfo +1 -1
  184. package/lib/ui/Button.d.ts +7 -5
  185. package/lib/ui/ButtonGroup.d.ts +1 -1
  186. package/lib/ui/Checkbox.d.ts +2 -2
  187. package/lib/ui/Color.d.ts +7 -4
  188. package/lib/ui/Dialog.d.ts +30 -3
  189. package/lib/ui/Input.d.ts +19 -3
  190. package/lib/ui/Slider.d.ts +5 -2
  191. package/lib/ui/TitleBarView.d.ts +21 -0
  192. package/lib/ui/ToggleButton.d.ts +2 -2
  193. package/lib/ui/View.d.ts +1 -1
  194. package/lib/ui/icons.d.ts +1 -1
  195. package/lib/ui/index.d.ts +10 -9
  196. package/lib/utils/FontAtlas.d.ts +61 -10
  197. package/lib/utils/GeoImageCreator.d.ts +2 -2
  198. package/lib/utils/ImagesCacheManager.d.ts +3 -3
  199. package/lib/utils/Loader.d.ts +2 -2
  200. package/lib/utils/PlainSegmentWorker.d.ts +2 -2
  201. package/lib/utils/TerrainWorker.d.ts +2 -2
  202. package/lib/utils/TextureAtlas.d.ts +7 -2
  203. package/lib/utils/TextureResourceManager.d.ts +162 -0
  204. package/lib/utils/VectorTileCreator.d.ts +1 -1
  205. package/lib/utils/colorSpace.d.ts +9 -0
  206. package/lib/utils/gltf/gltfParser.d.ts +9 -2
  207. package/lib/utils/gltf/types.d.ts +24 -5
  208. package/lib/utils/shared.d.ts +12 -5
  209. package/lib/utils/textureResourceMeta.d.ts +9 -0
  210. package/lib/webgl/BaseFramebuffer.d.ts +35 -0
  211. package/lib/webgl/Framebuffer.d.ts +14 -13
  212. package/lib/webgl/Handler.d.ts +94 -99
  213. package/lib/webgl/ShaderProgram.d.ts +190 -0
  214. package/lib/webgl/index.d.ts +2 -2
  215. package/lib/webgl/variableHandlers.d.ts +2 -1
  216. package/package.json +79 -76
  217. package/lib/assets/LabelWorker.worker-BT1uJgYn.js.map +0 -1
  218. package/lib/assets/PlainSegmentWorker.worker-CT1cj8jj.js.map +0 -1
  219. package/lib/assets/TerrainWorker.worker-DmikdfB2.js.map +0 -1
  220. package/lib/control/CameraFrameComposer.d.ts +0 -19
  221. package/lib/control/CameraFrameHandler.d.ts +0 -26
  222. package/lib/control/OldMouseNavigation.d.ts +0 -65
  223. package/lib/control/ZoomControl.d.ts +0 -28
  224. package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +0 -28
  225. package/lib/control/cameraDepthHandler/camera_depth.d.ts +0 -2
  226. package/lib/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
  227. package/lib/control/visibleExtent/drawnode.d.ts +0 -7
  228. package/lib/entity/Polyline.d.ts +0 -417
  229. package/lib/light/LightSource.d.ts +0 -36
  230. package/lib/res/fonts/Roboto-Regular.ttf.cfg +0 -1340
  231. package/lib/res/fonts/Roboto-Regular.ttf.png +0 -0
  232. package/lib/res/fonts/arial.ttf.cfg +0 -1570
  233. package/lib/res/fonts/arial.ttf.png +0 -0
  234. package/lib/scene/BaseNode.d.ts +0 -61
  235. package/lib/shaders/drawnode/drawnode.d.ts +0 -8
  236. package/lib/webgl/Program.d.ts +0 -161
  237. package/lib/webgl/ProgramController.d.ts +0 -87
  238. /package/lib/control/{geoObjectEditor → entityEditor}/ArrowEntity.d.ts +0 -0
  239. /package/lib/control/{geoObjectEditor → entityEditor}/AxisTrackEntity.d.ts +0 -0
  240. /package/lib/control/{geoObjectEditor → entityEditor}/MoveAxisEntity.d.ts +0 -0
  241. /package/lib/control/{geoObjectEditor → entityEditor}/MovePlaneEntity.d.ts +0 -0
  242. /package/lib/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
@@ -9,6 +9,10 @@ interface IFrustumParams {
9
9
  aspect?: number;
10
10
  near?: number;
11
11
  far?: number;
12
+ isOrthographic?: boolean;
13
+ focusDistance?: number;
14
+ reverseDepth?: boolean;
15
+ depthZeroToOne?: boolean;
12
16
  }
13
17
  /**
14
18
  * Frustum object, part of the camera object.
@@ -17,6 +21,17 @@ interface IFrustumParams {
17
21
  */
18
22
  declare class Frustum {
19
23
  protected _f: [NumberArray4, NumberArray4, NumberArray4, NumberArray4, NumberArray4, NumberArray4];
24
+ protected _isOrthographic: boolean;
25
+ protected _aspect: number;
26
+ protected _tanViewAngle_hrad: number;
27
+ protected _reverseDepth: boolean;
28
+ protected _depthZeroToOne: boolean;
29
+ /**
30
+ * Reference distance used to compute orthographic frustum size.
31
+ * For orthographic frustums this value is synchronized with vertical bounds.
32
+ * @public
33
+ */
34
+ focusDistance: number;
20
35
  /**
21
36
  * Camera projection matrix.
22
37
  * @protected
@@ -67,6 +82,12 @@ declare class Frustum {
67
82
  * @public
68
83
  */
69
84
  near: number;
85
+ /**
86
+ * Near-plane safety value used by depth offset logic in shaders.
87
+ * Updated together with `near`.
88
+ * @public
89
+ */
90
+ depthOffsetNear: number;
70
91
  /**
71
92
  * Projection frustum far value.
72
93
  * @public
@@ -75,26 +96,120 @@ declare class Frustum {
75
96
  cameraFrustumIndex: number;
76
97
  _pickingColorU: Float32Array;
77
98
  constructor(options?: IFrustumParams);
99
+ /**
100
+ * Returns right clipping plane.
101
+ * @public
102
+ * @returns {NumberArray4} Right clipping plane coefficients.
103
+ */
78
104
  getRightPlane(): NumberArray4;
105
+ /**
106
+ * Returns left clipping plane.
107
+ * @public
108
+ * @returns {NumberArray4} Left clipping plane coefficients.
109
+ */
79
110
  getLeftPlane(): NumberArray4;
111
+ /**
112
+ * Returns bottom clipping plane.
113
+ * @public
114
+ * @returns {NumberArray4} Bottom clipping plane coefficients.
115
+ */
80
116
  getBottomPlane(): NumberArray4;
117
+ /**
118
+ * Returns top clipping plane.
119
+ * @public
120
+ * @returns {NumberArray4} Top clipping plane coefficients.
121
+ */
81
122
  getTopPlane(): NumberArray4;
123
+ /**
124
+ * Returns backward clipping plane.
125
+ * @public
126
+ * @returns {NumberArray4} Backward clipping plane coefficients.
127
+ */
82
128
  getBackwardPlane(): NumberArray4;
129
+ /**
130
+ * Returns forward clipping plane.
131
+ * @public
132
+ * @returns {NumberArray4} Forward clipping plane coefficients.
133
+ */
83
134
  getForwardPlane(): NumberArray4;
135
+ /**
136
+ * Returns projection-view matrix.
137
+ * @public
138
+ * @returns {NumberArray16} Projection-view matrix values.
139
+ */
84
140
  getProjectionViewMatrix(): NumberArray16;
141
+ /**
142
+ * Returns projection-view RTE matrix.
143
+ * @public
144
+ * @returns {NumberArray16} Projection-view RTE matrix values.
145
+ */
85
146
  getProjectionViewRTEMatrix(): NumberArray16;
147
+ /**
148
+ * Returns projection matrix.
149
+ * @public
150
+ * @returns {NumberArray16} Projection matrix values.
151
+ */
86
152
  getProjectionMatrix(): NumberArray16;
153
+ /**
154
+ * Returns inverse projection matrix.
155
+ * @public
156
+ * @returns {NumberArray16} Inverse projection matrix values.
157
+ */
87
158
  getInverseProjectionMatrix(): NumberArray16;
88
159
  /**
89
160
  * Sets up camera projection matrix.
90
161
  * @public
91
- * @param {number} viewAngle - Camera's vertical fov view angle.
92
- * @param {number} aspect - Screen aspect ratio.
93
- * @param {number} near - Near camera distance.
94
- * @param {number} far - Far camera distance.
162
+ * @param {number} viewAngle - Camera vertical field of view angle in degrees.
163
+ * @param {number} aspect - Viewport aspect ratio (`width / height`).
164
+ * @param {number} near - Near clipping plane distance.
165
+ * @param {number} far - Far clipping plane distance.
166
+ * @param {boolean} [isOrthographic=false] - Enables orthographic projection mode.
167
+ * @param {number} [focusDistance=this.focusDistance] - Reference distance used to compute orthographic frustum size.
168
+ * @param {boolean} [reverseDepth=false] - Enables reverse-Z infinite perspective projection.
169
+ * @param {boolean} [depthZeroToOne=false] - Uses `[0, 1]` NDC depth range for reverse-Z projection.
170
+ */
171
+ setProjectionMatrix(viewAngle: number, aspect: number, near: number, far: number, isOrthographic?: boolean, focusDistance?: number, reverseDepth?: boolean, depthZeroToOne?: boolean): void;
172
+ /**
173
+ * Sets reference distance used to compute orthographic bounds and rebuilds projection matrices.
174
+ * Keeps current near and far clipping planes unchanged.
175
+ * @public
176
+ * @param {number} focusDistance - Reference distance.
177
+ */
178
+ setFocusDistance(focusDistance: number): void;
179
+ /**
180
+ * Updates orthographic projection bounds and rebuilds projection matrices.
181
+ * Keeps the current near and far clipping planes unchanged.
182
+ * @public
183
+ * @param {number} left - Left orthographic bound.
184
+ * @param {number} right - Right orthographic bound.
185
+ * @param {number} bottom - Bottom orthographic bound.
186
+ * @param {number} top - Top orthographic bound.
95
187
  */
96
- setProjectionMatrix(viewAngle: number, aspect: number, near: number, far: number, isOrthographic?: boolean, focusDistance?: number): void;
188
+ setOrthoBounds(left: number, right: number, bottom: number, top: number): void;
189
+ /**
190
+ * Updates orthographic projection bounds and clipping planes in one projection rebuild.
191
+ * @public
192
+ * @param {number} left - Left orthographic bound.
193
+ * @param {number} right - Right orthographic bound.
194
+ * @param {number} bottom - Bottom orthographic bound.
195
+ * @param {number} top - Top orthographic bound.
196
+ * @param {number} near - Near clipping plane distance.
197
+ * @param {number} far - Far clipping plane distance.
198
+ */
199
+ setOrthoProjection(left: number, right: number, bottom: number, top: number, near: number, far: number): void;
200
+ /**
201
+ * Updates near and far clipping planes.
202
+ * @public
203
+ * @param {number} near - Near clipping plane distance.
204
+ * @param {number} [far=this.far] - Far clipping plane distance.
205
+ */
206
+ setNearFar(near: number, far?: number): void;
97
207
  protected _setFrustumParams(top: number, right: number, near: number, far: number): void;
208
+ /**
209
+ * Updates projection-view RTE matrix.
210
+ * @public
211
+ * @param {Mat4} viewRTEMatrix - View matrix in RTE coordinates.
212
+ */
98
213
  setProjectionViewRTEMatrix(viewRTEMatrix: Mat4): void;
99
214
  /**
100
215
  * Camera's projection matrix values.
@@ -103,40 +218,46 @@ declare class Frustum {
103
218
  */
104
219
  setViewMatrix(viewMatrix: Mat4): void;
105
220
  /**
106
- * Returns true if a point in the frustum.
221
+ * Returns true if the point is inside the frustum.
107
222
  * @public
108
223
  * @param {Vec3} point - Cartesian point.
109
- * @returns {boolean} -
224
+ * @returns {boolean} `true` when the point is inside.
110
225
  */
111
226
  containsPoint(point: Vec3): boolean;
112
227
  /**
113
- * Returns true if the frustum contains a bonding sphere, but bottom plane exclude.
228
+ * Returns true if the sphere is inside the frustum, ignoring the bottom plane.
114
229
  * @public
115
230
  * @param {Sphere} sphere - Bounding sphere.
116
- * @returns {boolean} -
231
+ * @returns {boolean} `true` when the sphere passes all checked planes.
117
232
  */
118
233
  containsSphereBottomExc(sphere: Sphere): boolean;
234
+ /**
235
+ * Checks sphere intersection with the bottom frustum plane only.
236
+ * @public
237
+ * @param {Sphere} sphere - Bounding sphere.
238
+ * @returns {boolean} `true` when the sphere is not clipped by the bottom plane.
239
+ */
119
240
  containsSphereButtom(sphere: Sphere): boolean;
120
241
  /**
121
- * Returns true if the frustum contains a bonding sphere.
242
+ * Returns true if the sphere is inside the frustum.
122
243
  * @public
123
244
  * @param {Sphere} sphere - Bounding sphere.
124
- * @returns {boolean} -
245
+ * @returns {boolean} `true` when the sphere is inside.
125
246
  */
126
247
  containsSphere(sphere: Sphere): boolean;
127
248
  /**
128
- * Returns true if the frustum contains a bonding sphere.
249
+ * Returns true if the sphere is inside the frustum.
129
250
  * @public
130
251
  * @param {Vec3} center - Sphere center.
131
252
  * @param {number} radius - Sphere radius.
132
- * @returns {boolean} -
253
+ * @returns {boolean} `true` when the sphere is inside.
133
254
  */
134
255
  containsSphere2(center: Vec3, radius: number): boolean;
135
256
  /**
136
- * Returns true if the frustum contains a bounding box.
257
+ * Returns true if the box intersects or is inside the frustum.
137
258
  * @public
138
259
  * @param {Box} box - Bounding box.
139
- * @returns {boolean} -
260
+ * @returns {boolean} `true` when the box is not fully outside.
140
261
  */
141
262
  containsBox(box: Box): boolean;
142
263
  }
@@ -12,9 +12,7 @@ export interface IPlanetCameraParams extends ICameraParams {
12
12
  export interface IPlanetFlyCartesianParams extends IFlyCartesianParams {
13
13
  amplitude?: number;
14
14
  preventLock?: boolean;
15
- }
16
- export interface IPlanetFlyDistanceParams extends IPlanetFlyCartesianParams {
17
- distance?: number;
15
+ linearPath?: boolean;
18
16
  }
19
17
  /**
20
18
  * Planet camera.
@@ -28,14 +26,15 @@ export interface IPlanetFlyDistanceParams extends IPlanetFlyCartesianParams {
28
26
  * @param {number} [options.far] - Camera far plane distance. Default is og.math.MAX
29
27
  * @param {number} [options.minAltitude] - Minimal altitude for the camera. Default is 5
30
28
  * @param {number} [options.maxAltitude] - Maximal altitude for the camera. Default is 20000000
29
+ * @param {boolean} [options.reverseDepth=true] - Enables reverse-Z depth in perspective mode.
31
30
  * @param {Vec3} [options.eye] - Camera eye position. Default (0,0,0)
32
31
  * @param {Vec3} [options.look] - Camera look position. Default (0,0,0)
33
32
  * @param {Vec3} [options.up] - Camera eye position. Default (0,1,0)
34
- * @fires og.Camera#viewchange
35
- * @fires og.Camera#moveend
36
- * @fires og.Camera#flystart
37
- * @fires og.Camera#flyend
38
- * @fires og.Camera#flystop
33
+ * @fires viewchange
34
+ * @fires moveend
35
+ * @fires flystart
36
+ * @fires flyend
37
+ * @fires flystop
39
38
  */
40
39
  declare class PlanetCamera extends Camera {
41
40
  /**
@@ -86,11 +85,16 @@ declare class PlanetCamera extends Camera {
86
85
  * @type {Segment}
87
86
  */
88
87
  _insideSegment: Segment | null;
89
- slope: number;
90
88
  protected _keyLock: Key;
91
89
  protected _checkTerrainCollision: boolean;
92
90
  eyeNorm: Vec3;
91
+ protected _extentFitRequestId: number;
93
92
  constructor(planet: Planet, options?: IPlanetCameraParams);
93
+ /**
94
+ * Enables or disables terrain collision checks.
95
+ * @public
96
+ * @param {boolean} isActive - Terrain collision flag.
97
+ */
94
98
  setTerrainCollisionActivity(isActive: boolean): void;
95
99
  /**
96
100
  * Updates camera view space.
@@ -98,6 +102,15 @@ declare class PlanetCamera extends Camera {
98
102
  * @virtual
99
103
  */
100
104
  update(): void;
105
+ /**
106
+ * Updates camera slope against the planet surface normal.
107
+ * @public
108
+ */
109
+ updateCameraSlope(): void;
110
+ /**
111
+ * Updates camera geographic coordinates from current cartesian position.
112
+ * @public
113
+ */
101
114
  updateGeodeticPosition(): void;
102
115
  /**
103
116
  * Sets altitude over the terrain.
@@ -138,6 +151,11 @@ declare class PlanetCamera extends Camera {
138
151
  * @returns {Vec3}
139
152
  */
140
153
  getExtentPosition(extent: Extent, height?: number | null): Vec3;
154
+ protected _getExtentCenterHeightInfo(extent: Extent): {
155
+ height: number;
156
+ segmentZoom: number;
157
+ };
158
+ protected _isSegmentHeightAccurate(extentHeight: number, segmentZoom: number): boolean;
141
159
  /**
142
160
  * View current extent.
143
161
  * @public
@@ -153,6 +171,12 @@ declare class PlanetCamera extends Camera {
153
171
  * @param {IPlanetFlyCartesianParams} [params] - Flight parameters
154
172
  */
155
173
  flyExtent(extent: Extent, height?: number | null, params?: IPlanetFlyCartesianParams): void;
174
+ /**
175
+ * Places camera at a fixed distance from a target point and looks at it.
176
+ * @public
177
+ * @param {Vec3} cartesian - Target cartesian point.
178
+ * @param {number} [distance=10000.0] - Distance from the target.
179
+ */
156
180
  viewDistance(cartesian: Vec3, distance?: number): void;
157
181
  /**
158
182
  * Flies to the geo coordinates.
@@ -161,6 +185,13 @@ declare class PlanetCamera extends Camera {
161
185
  * @param {IPlanetFlyCartesianParams} [params] - Flight parameters
162
186
  */
163
187
  flyLonLat(lonlat: LonLat, params?: IPlanetFlyCartesianParams): void;
188
+ /**
189
+ * Flies camera to a position at a fixed distance from the target point.
190
+ * @public
191
+ * @param {Vec3} cartesian - Target cartesian point.
192
+ * @param {number} [distance=10000.0] - Distance from the target.
193
+ * @param {IPlanetFlyCartesianParams} [params] - Flight parameters.
194
+ */
164
195
  flyDistance(cartesian: Vec3, distance?: number, params?: IPlanetFlyCartesianParams): void;
165
196
  flyCartesian(cartesian: Vec3, params?: IPlanetFlyCartesianParams): void;
166
197
  stopFlying(): void;
@@ -190,23 +221,95 @@ declare class PlanetCamera extends Camera {
190
221
  * @param {number} angle - Rotation angle.
191
222
  */
192
223
  rotateDown(angle: number): void;
224
+ /**
225
+ * Rotates camera vertically around the given center.
226
+ * @public
227
+ * @param {number} angle - Rotation angle in radians.
228
+ * @param {Vec3} center - Rotation center.
229
+ * @param {number} [minSlope=0] - Minimum allowed slope limit.
230
+ */
193
231
  rotateVertical(angle: number, center: Vec3, minSlope?: number): void;
232
+ /**
233
+ * Updates terrain altitude and keeps camera above minimum altitude.
234
+ * @public
235
+ * @returns {Vec3 | undefined} Terrain point under camera when available.
236
+ */
194
237
  checkTerrainCollision(): Vec3 | undefined;
238
+ protected _getInsideCollisionSegment(): Segment | null;
239
+ /**
240
+ * Returns visible surface arc distance from current altitude.
241
+ * @public
242
+ * @param {number} d - Additional height offset.
243
+ * @returns {number} Visible surface distance.
244
+ */
195
245
  getSurfaceVisibleDistance(d: number): number;
196
246
  /**
197
- * should be yje same as getYaw
247
+ * Returns the ellipsoid intersection point for a screen-space ray.
248
+ * If the ray doesn't hit ellipsoid, it returns 'undefined'.
249
+ * @public
250
+ * @param {number} x - Screen X coordinate in pixels.
251
+ * @param {number} y - Screen Y coordinate in pixels.
252
+ * @returns {Vec3 | undefined} Cartesian intersection point.
253
+ */
254
+ getRayIntersectionEllipsoid(x: number, y: number): Vec3 | undefined;
255
+ /**
256
+ * Returns heading angle in degrees.
257
+ * Should match `getYaw()` in most cases.
258
+ * @public
259
+ * @returns {number} Heading in `[0, 360)` degrees.
198
260
  */
199
261
  getHeading(): number;
262
+ /**
263
+ * Checks whether a cartesian point is visible above the horizon.
264
+ * @public
265
+ * @param {Vec3} poi - Point in cartesian coordinates.
266
+ * @returns {boolean} `true` when the point is visible.
267
+ */
200
268
  isVisible(poi: Vec3): boolean;
269
+ /**
270
+ * Returns pitch angle in local planet frame.
271
+ * @public
272
+ * @returns {number} Pitch angle in radians.
273
+ */
201
274
  getPitch(): number;
202
275
  /**
203
- * should be the same as getHeading
276
+ * Returns yaw angle in local planet frame.
277
+ * Should match `getHeading()` in most cases.
278
+ * @public
279
+ * @returns {number} Yaw angle in radians.
204
280
  */
205
281
  getYaw(): number;
282
+ /**
283
+ * Returns roll angle in local planet frame.
284
+ * @public
285
+ * @returns {number} Roll angle in radians.
286
+ */
206
287
  getRoll(): number;
288
+ /**
289
+ * Sets pitch angle in local planet frame.
290
+ * @public
291
+ * @param {number} a - Pitch angle in radians.
292
+ */
207
293
  setPitch(a: number): void;
294
+ /**
295
+ * Sets yaw angle in local planet frame.
296
+ * @public
297
+ * @param {number} a - Yaw angle in radians.
298
+ */
208
299
  setYaw(a: number): void;
300
+ /**
301
+ * Sets roll angle in local planet frame.
302
+ * @public
303
+ * @param {number} a - Roll angle in radians.
304
+ */
209
305
  setRoll(a: number): void;
306
+ /**
307
+ * Sets orientation from pitch, yaw and roll in local planet frame.
308
+ * @public
309
+ * @param {number} pitch - Pitch angle in radians.
310
+ * @param {number} yaw - Yaw angle in radians.
311
+ * @param {number} roll - Roll angle in radians.
312
+ */
210
313
  setPitchYawRoll(pitch: number, yaw: number, roll: number): void;
211
314
  }
212
315
  export { PlanetCamera };
@@ -1,3 +1,3 @@
1
- import { Camera } from './Camera';
2
- import { PlanetCamera } from './PlanetCamera';
1
+ import { Camera } from "./Camera";
2
+ import { PlanetCamera } from "./PlanetCamera";
3
3
  export { Camera, PlanetCamera };
@@ -6,11 +6,11 @@ interface ICompasButtonParams extends IControlParams {
6
6
  */
7
7
  export declare class CompassButton extends Control {
8
8
  protected _heading: number;
9
- protected _svg: HTMLElement | null;
9
+ protected _icon: HTMLElement | null;
10
10
  constructor(options?: ICompasButtonParams);
11
11
  oninit(): void;
12
12
  protected _onClick(): void;
13
- protected _draw(): void;
13
+ protected _draw: () => void;
14
14
  setHeading(heading: number): void;
15
15
  }
16
16
  export {};
@@ -1,5 +1,5 @@
1
- import { Control, type IControlParams } from './Control';
2
- import { LonLat } from '../LonLat';
1
+ import { Control, type IControlParams } from "./Control";
2
+ import { LonLat } from "../LonLat";
3
3
  import type { IMouseState } from "../renderer/RendererEvents";
4
4
  interface IEarthCoordinatesParams extends IControlParams {
5
5
  heightMode?: string;
@@ -34,6 +34,9 @@ export declare class EarthCoordinates extends Control {
34
34
  protected _createCenterEl(): HTMLElement;
35
35
  protected _updateUnits(): void;
36
36
  protected _refreshCoordinates(): void;
37
+ protected _getClipboardCoordinates(): string;
38
+ protected _copyCoordinates(): Promise<void>;
39
+ protected _onPanelClick: (event: MouseEvent) => void;
37
40
  oninit(): void;
38
41
  protected _grabCoordinates(e: IMouseState): void;
39
42
  protected _showHeight(): Promise<void>;
@@ -1,25 +1,41 @@
1
1
  import { Dialog } from "../ui/Dialog";
2
2
  import { Framebuffer } from "../webgl/Framebuffer";
3
3
  import { Control, IControlParams } from "./Control";
4
- import { Program } from "../webgl/Program";
4
+ import { ShaderProgram } from "../webgl/ShaderProgram";
5
5
  export interface IFramebufferDialogParams extends IControlParams {
6
6
  framebuffer?: Framebuffer;
7
+ arrayTexture?: WebGLTexture;
8
+ arrayLayer?: number;
9
+ width?: number;
10
+ height?: number;
11
+ left?: number;
12
+ top?: number;
7
13
  title?: string;
8
14
  common?: string;
9
15
  image?: string;
10
- flippedUV?: boolean;
16
+ flippedY?: boolean;
11
17
  }
12
18
  export declare class FramebufferPreview extends Control {
13
19
  protected _dialog: Dialog<null>;
14
- $canvas: HTMLCanvasElement;
15
20
  protected _framebuffer: Framebuffer | null;
21
+ protected _arrayTexture: WebGLTexture | null;
22
+ protected _arrayLayer: number;
23
+ protected _width: number;
24
+ protected _height: number;
25
+ protected _isArrayMode: boolean;
16
26
  protected _screenFramebuffer: Framebuffer | null;
27
+ protected _program: ShaderProgram;
28
+ $canvas: HTMLCanvasElement;
17
29
  framebufferCurrentTexture: number;
18
- protected _program: Program;
19
30
  constructor(params: IFramebufferDialogParams);
20
31
  bindFramebuffer(framebuffer: Framebuffer): void;
32
+ bindArrayTexture(texture: WebGLTexture, layer: number): void;
21
33
  oninit(): void;
22
34
  activate(): void;
23
35
  deactivate(): void;
36
+ protected _isDrawSubscribed: boolean;
37
+ protected _subscribeDraw(): void;
38
+ protected _unsubscribeDraw(): void;
39
+ protected _onDialogVisibilityChange: (isVisible: boolean) => void;
24
40
  protected _onDraw: () => void;
25
41
  }
@@ -1,4 +1,4 @@
1
- import { Control, type IControlParams } from './Control';
1
+ import { Control, type IControlParams } from "./Control";
2
2
  import { Layer } from "../layer/Layer";
3
3
  import { ToggleButton } from "../ui/ToggleButton";
4
4
  import type { IMouseState } from "../renderer/RendererEvents";
@@ -1,5 +1,5 @@
1
- import { type EventsHandler } from '../Events';
2
- import { Layer } from '../layer/Layer';
1
+ import { type EventsHandler } from "../Events";
2
+ import { Layer } from "../layer/Layer";
3
3
  import { Control, type IControlParams } from "./Control";
4
4
  type LayerAnimationEventsList = ["change", "idle", "play", "pause", "stop"];
5
5
  interface ILayerAnimationParams extends IControlParams {
@@ -30,6 +30,9 @@ export declare class LayerSwitcher extends Control {
30
30
  oninit(): void;
31
31
  protected _initLayers(): void;
32
32
  protected _createLayerButton(layer: Layer): LayerButtonView;
33
+ protected _findLayerView(layer: Layer): LayerButtonView | null;
34
+ protected _placeLayerView(layerView: LayerButtonView): void;
35
+ protected _onLayerBaseLayerChange: (layer: Layer) => void;
33
36
  addLayer: (layer: Layer) => void;
34
37
  removeLayer: (layer: Layer) => void;
35
38
  onactivate(): void;
@@ -1,10 +1,10 @@
1
1
  import { Control } from "./Control";
2
2
  import type { IControlParams } from "./Control";
3
- import { Dialog } from '../ui/Dialog';
3
+ import { Dialog } from "../ui/Dialog";
4
4
  import { Layer } from "../layer/Layer";
5
5
  import { Slider } from "../ui/Slider";
6
6
  import { ToggleButton } from "../ui/ToggleButton";
7
- import { View } from '../ui/View';
7
+ import { View } from "../ui/View";
8
8
  import { Color } from "../ui/Color";
9
9
  interface ILightingParams extends IControlParams {
10
10
  }
@@ -18,10 +18,12 @@ export declare class Lighting extends Control {
18
18
  protected _panel: View<null>;
19
19
  protected _atmosphereMaxOpacity: Slider;
20
20
  protected _atmosphereMinOpacity: Slider;
21
+ protected _atmosphereOpacityCurveShift: Slider;
21
22
  protected _simpleSkyBackgroundColorOne: Color;
22
23
  protected _simpleSkyBackgroundColorTwo: Color;
23
24
  protected _gamma: Slider;
24
25
  protected _exposure: Slider;
26
+ protected _whitepoint: Slider;
25
27
  protected _night: Slider;
26
28
  protected _opacity: Slider;
27
29
  protected _diffuse_r: Slider;
@@ -36,6 +38,7 @@ export declare class Lighting extends Control {
36
38
  protected _shininess: Slider;
37
39
  $gamma: HTMLElement | null;
38
40
  $exposure: HTMLElement | null;
41
+ $whitepoint: HTMLElement | null;
39
42
  $night: HTMLElement | null;
40
43
  $opacity: HTMLElement | null;
41
44
  $diffuse: HTMLElement | null;
@@ -47,6 +50,8 @@ export declare class Lighting extends Control {
47
50
  bindLayer(layer: Layer): void;
48
51
  oninit(): void;
49
52
  protected _update(): void;
53
+ protected _setSliderValue(slider: Slider, value: number): void;
54
+ protected _syncSelectedBaseLayerLighting(): void;
50
55
  protected _fetchLayers(): void;
51
56
  protected _onLayerAdd(e: Layer): void;
52
57
  protected _onLayerRemove(e: Layer): void;