@openglobus/og 0.28.7 → 1.0.0-rc2

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 (220) hide show
  1. package/LICENSE.md +218 -4
  2. package/README.md +31 -18
  3. package/lib/Deferred.d.ts +2 -2
  4. package/lib/Events.d.ts +1 -1
  5. package/lib/Globe.d.ts +8 -5
  6. package/lib/Object3d.d.ts +17 -14
  7. package/lib/Popup.d.ts +2 -2
  8. package/lib/assets/LabelWorker.worker-DYd7xn3M.js.map +1 -0
  9. package/lib/assets/PlainSegmentWorker.worker-JsKldq-e.js.map +1 -0
  10. package/lib/assets/TerrainWorker.worker-CqUJvMOv.js.map +1 -0
  11. package/lib/bv/index.d.ts +2 -2
  12. package/lib/camera/Camera.d.ts +280 -27
  13. package/lib/camera/Frustum.d.ts +100 -15
  14. package/lib/camera/PlanetCamera.d.ts +93 -8
  15. package/lib/camera/index.d.ts +2 -2
  16. package/lib/control/CameraFrameComposer.d.ts +2 -2
  17. package/lib/control/CameraFrameHandler.d.ts +1 -1
  18. package/lib/control/CompassButton.d.ts +2 -2
  19. package/lib/control/EarthCoordinates.d.ts +5 -2
  20. package/lib/control/FramebufferPreview.d.ts +3 -3
  21. package/lib/control/GeoImageDragControl.d.ts +1 -1
  22. package/lib/control/LayerAnimation.d.ts +2 -2
  23. package/lib/control/LayerSwitcher.d.ts +3 -0
  24. package/lib/control/Lighting.d.ts +4 -2
  25. package/lib/control/Navigation.d.ts +15 -11
  26. package/lib/control/OrthoSwitcher.d.ts +18 -0
  27. package/lib/control/SimpleTouchNavigation.d.ts +44 -0
  28. package/lib/control/Sun.d.ts +4 -2
  29. package/lib/control/TouchNavigation.d.ts +4 -8
  30. package/lib/control/atmosphere/Atmosphere.d.ts +2 -0
  31. package/lib/control/atmosphere/AtmosphereConfig.d.ts +2 -6
  32. package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +17 -3
  33. package/lib/control/cameraDepthHandler/camera_depth.d.ts +2 -2
  34. package/lib/control/drawing/LineStringDrawingScene.d.ts +1 -0
  35. package/lib/control/drawing/PolygonDrawingScene.d.ts +14 -14
  36. package/lib/control/elevationProfile/ElevationProfile.d.ts +1 -1
  37. package/lib/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
  38. package/lib/control/elevationProfile/ElevationProfileScene.d.ts +9 -12
  39. package/lib/control/elevationProfile/ElevationProfileView.d.ts +16 -5
  40. package/lib/control/entityEditor/EntityEditor.d.ts +19 -0
  41. package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorDialog.d.ts} +9 -8
  42. package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +12 -12
  43. package/lib/control/{geoObjectEditor → entityEditor}/colors.d.ts +2 -2
  44. package/lib/control/entityTree/EntityTree.d.ts +46 -0
  45. package/lib/control/entityTree/EntityTreeView.d.ts +24 -0
  46. package/lib/control/heightRuler/HeightRulerScene.d.ts +3 -2
  47. package/lib/control/index.d.ts +5 -3
  48. package/lib/control/ruler/RulerScene.d.ts +8 -8
  49. package/lib/control/selection/SelectionScene.d.ts +6 -6
  50. package/lib/control/timeline/TimelineControl.d.ts +2 -2
  51. package/lib/control/timeline/TimelineModel.d.ts +1 -1
  52. package/lib/control/timeline/TimelineView.d.ts +52 -13
  53. package/lib/control/visibleExtent/segment.d.ts +7 -0
  54. package/lib/ellipsoid/index.d.ts +4 -4
  55. package/lib/entity/Entity.d.ts +114 -100
  56. package/lib/entity/EntityCollection.d.ts +95 -70
  57. package/lib/entity/{BaseBillboard.d.ts → billboard/BaseBillboard.d.ts} +16 -17
  58. package/lib/entity/{BaseBillboardHandler.d.ts → billboard/BaseBillboardHandler.d.ts} +24 -9
  59. package/lib/entity/{Billboard.d.ts → billboard/Billboard.d.ts} +11 -7
  60. package/lib/entity/{BillboardHandler.d.ts → billboard/BillboardHandler.d.ts} +1 -1
  61. package/lib/entity/{GeoObject.d.ts → geoObject/GeoObject.d.ts} +7 -6
  62. package/lib/entity/{GeoObjectHandler.d.ts → geoObject/GeoObjectHandler.d.ts} +29 -11
  63. package/lib/entity/{InstanceData.d.ts → geoObject/InstanceData.d.ts} +18 -13
  64. package/lib/entity/{Geometry.d.ts → geometry/Geometry.d.ts} +10 -10
  65. package/lib/entity/{GeometryHandler.d.ts → geometry/GeometryHandler.d.ts} +7 -7
  66. package/lib/entity/index.d.ts +8 -8
  67. package/lib/entity/{Label.d.ts → label/Label.d.ts} +12 -13
  68. package/lib/entity/{LabelHandler.d.ts → label/LabelHandler.d.ts} +31 -7
  69. package/lib/entity/{LabelWorker.d.ts → label/LabelWorker.d.ts} +3 -3
  70. package/lib/entity/{PointCloud.d.ts → pointCloud/PointCloud.d.ts} +18 -12
  71. package/lib/entity/{PointCloudHandler.d.ts → pointCloud/PointCloudHandler.d.ts} +4 -4
  72. package/lib/entity/polyline/Polyline.d.ts +242 -0
  73. package/lib/entity/polyline/PolylineBatchRenderer.d.ts +443 -0
  74. package/lib/entity/{PolylineHandler.d.ts → polyline/PolylineHandler.d.ts} +19 -7
  75. package/lib/entity/{Ray.d.ts → ray/Ray.d.ts} +27 -9
  76. package/lib/entity/{RayHandler.d.ts → ray/RayHandler.d.ts} +18 -8
  77. package/lib/entity/{Strip.d.ts → strip/Strip.d.ts} +21 -17
  78. package/lib/entity/{StripHandler.d.ts → strip/StripHandler.d.ts} +11 -6
  79. package/lib/index.d.ts +47 -42
  80. package/lib/layer/BaseGeoImage.d.ts +20 -17
  81. package/lib/layer/CanvasTiles.d.ts +14 -12
  82. package/lib/layer/GeoImage.d.ts +1 -1
  83. package/lib/layer/GeoTexture2d.d.ts +2 -2
  84. package/lib/layer/KML.d.ts +19 -18
  85. package/lib/layer/Layer.d.ts +72 -53
  86. package/lib/layer/Vector.d.ts +47 -30
  87. package/lib/layer/WMS.d.ts +1 -1
  88. package/lib/layer/XYZ.d.ts +11 -12
  89. package/lib/layer/index.d.ts +12 -12
  90. package/lib/math/Line2.d.ts +1 -1
  91. package/lib/math/Line3.d.ts +1 -1
  92. package/lib/math/Mat3.d.ts +3 -13
  93. package/lib/math/Mat4.d.ts +16 -10
  94. package/lib/math/Plane.d.ts +1 -1
  95. package/lib/math/Quat.d.ts +14 -12
  96. package/lib/math/Ray.d.ts +4 -3
  97. package/lib/math/Vec2.d.ts +25 -17
  98. package/lib/math/Vec3.d.ts +33 -31
  99. package/lib/math/Vec4.d.ts +1 -1
  100. package/lib/math/coder.d.ts +1 -1
  101. package/lib/math/index.d.ts +13 -14
  102. package/lib/mercator.d.ts +4 -4
  103. package/lib/og.css +1 -1
  104. package/lib/og.es.js +1 -1
  105. package/lib/og.es.js.map +1 -1
  106. package/lib/quadTree/EntityCollectionNode.d.ts +10 -10
  107. package/lib/quadTree/EntityCollectionsTreeStrategy.d.ts +5 -5
  108. package/lib/quadTree/QuadTreeStrategy.d.ts +3 -4
  109. package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
  110. package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +4 -4
  111. package/lib/renderer/AtmosphereDeferredShading.d.ts +12 -0
  112. package/lib/renderer/IDeferredShadingPass.d.ts +8 -0
  113. package/lib/renderer/ITransparencyPass.d.ts +8 -0
  114. package/lib/renderer/PhongDeferredShading.d.ts +16 -0
  115. package/lib/renderer/Renderer.d.ts +166 -99
  116. package/lib/renderer/RendererEvents.d.ts +15 -5
  117. package/lib/renderer/WOITPass.d.ts +14 -0
  118. package/lib/res/fonts/Ephesis-Regular.json +1 -0
  119. package/lib/res/fonts/Ephesis-Regular.png +0 -0
  120. package/lib/res/fonts/Karla-Bold.json +1 -0
  121. package/lib/res/fonts/Karla-Bold.png +0 -0
  122. package/lib/res/fonts/Karla-Italic.json +1 -0
  123. package/lib/res/fonts/Karla-Italic.png +0 -0
  124. package/lib/res/fonts/Karla-Light.json +1 -0
  125. package/lib/res/fonts/Karla-Light.png +0 -0
  126. package/lib/res/fonts/Karla-Medium.json +1 -0
  127. package/lib/res/fonts/Karla-Medium.png +0 -0
  128. package/lib/res/fonts/Roboto-Regular.json +1 -37147
  129. package/lib/res/fonts/Roboto-Regular.png +0 -0
  130. package/lib/res/fonts/arial.json +1 -4321
  131. package/lib/res/fonts/arial.png +0 -0
  132. package/lib/res/night-4326.png +0 -0
  133. package/lib/res/night.png +0 -0
  134. package/lib/scene/AltitudeNearPlaneStrategy.d.ts +17 -0
  135. package/lib/scene/Axes.d.ts +4 -3
  136. package/lib/scene/Planet.d.ts +244 -69
  137. package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +49 -46
  138. package/lib/scene/SkyBox.d.ts +5 -3
  139. package/lib/scene/index.d.ts +2 -2
  140. package/lib/segment/Segment.d.ts +29 -15
  141. package/lib/segment/SegmentLonLat.d.ts +0 -1
  142. package/lib/shadeModeConstants.d.ts +7 -0
  143. package/lib/shaders/applyDeferredDepth.d.ts +2 -0
  144. package/lib/shaders/atmos/atmos.d.ts +3 -3
  145. package/lib/shaders/billboard/billboard.d.ts +4 -3
  146. package/lib/shaders/deferredShading/deferredShading.d.ts +2 -0
  147. package/lib/shaders/deferredShading/deferredShadingAtmos.d.ts +3 -0
  148. package/lib/shaders/depth.d.ts +2 -2
  149. package/lib/shaders/geo_object/geo_object.d.ts +8 -4
  150. package/lib/shaders/label/label.d.ts +4 -4
  151. package/lib/shaders/pointCloud.d.ts +2 -2
  152. package/lib/shaders/polyline/polyline.d.ts +7 -3
  153. package/lib/shaders/ray/ray.d.ts +3 -2
  154. package/lib/shaders/screenFrame.d.ts +2 -2
  155. package/lib/shaders/segment/segment.d.ts +7 -0
  156. package/lib/shaders/skybox.d.ts +2 -2
  157. package/lib/shaders/strip/strip.d.ts +3 -0
  158. package/lib/shaders/tone_mapping/toneMapping.d.ts +2 -2
  159. package/lib/shaders/weightedOITResolve.d.ts +2 -0
  160. package/lib/terrain/BilTerrain.d.ts +1 -1
  161. package/lib/terrain/EmptyTerrain.d.ts +5 -6
  162. package/lib/terrain/GlobusTerrain.d.ts +18 -23
  163. package/lib/terrain/RgbTerrain.d.ts +8 -8
  164. package/lib/terrain/index.d.ts +5 -5
  165. package/lib/tsconfig.tsbuildinfo +1 -1
  166. package/lib/ui/Button.d.ts +7 -5
  167. package/lib/ui/ButtonGroup.d.ts +1 -1
  168. package/lib/ui/Checkbox.d.ts +2 -2
  169. package/lib/ui/Color.d.ts +2 -2
  170. package/lib/ui/Dialog.d.ts +30 -3
  171. package/lib/ui/Input.d.ts +7 -2
  172. package/lib/ui/Slider.d.ts +5 -2
  173. package/lib/ui/ToggleButton.d.ts +2 -2
  174. package/lib/ui/View.d.ts +1 -1
  175. package/lib/ui/icons.d.ts +1 -1
  176. package/lib/ui/index.d.ts +9 -9
  177. package/lib/utils/FontAtlas.d.ts +57 -8
  178. package/lib/utils/GeoImageCreator.d.ts +2 -2
  179. package/lib/utils/ImagesCacheManager.d.ts +3 -3
  180. package/lib/utils/Loader.d.ts +2 -2
  181. package/lib/utils/PlainSegmentWorker.d.ts +2 -2
  182. package/lib/utils/TerrainWorker.d.ts +2 -2
  183. package/lib/utils/TextureAtlas.d.ts +7 -2
  184. package/lib/utils/TextureResourceManager.d.ts +162 -0
  185. package/lib/utils/VectorTileCreator.d.ts +1 -1
  186. package/lib/utils/colorSpace.d.ts +9 -0
  187. package/lib/utils/gltf/gltfParser.d.ts +9 -2
  188. package/lib/utils/gltf/types.d.ts +20 -2
  189. package/lib/utils/shared.d.ts +11 -5
  190. package/lib/utils/textureResourceMeta.d.ts +9 -0
  191. package/lib/webgl/BaseFramebuffer.d.ts +7 -0
  192. package/lib/webgl/Framebuffer.d.ts +9 -6
  193. package/lib/webgl/Handler.d.ts +81 -99
  194. package/lib/webgl/ShaderProgram.d.ts +190 -0
  195. package/lib/webgl/index.d.ts +2 -2
  196. package/lib/webgl/variableHandlers.d.ts +2 -1
  197. package/package.json +77 -76
  198. package/lib/assets/LabelWorker.worker-BT1uJgYn.js.map +0 -1
  199. package/lib/assets/PlainSegmentWorker.worker-CT1cj8jj.js.map +0 -1
  200. package/lib/assets/TerrainWorker.worker-DmikdfB2.js.map +0 -1
  201. package/lib/control/OldMouseNavigation.d.ts +0 -65
  202. package/lib/control/ZoomControl.d.ts +0 -28
  203. package/lib/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
  204. package/lib/control/visibleExtent/drawnode.d.ts +0 -7
  205. package/lib/entity/Polyline.d.ts +0 -417
  206. package/lib/light/LightSource.d.ts +0 -36
  207. package/lib/res/fonts/Roboto-Regular.ttf.cfg +0 -1340
  208. package/lib/res/fonts/Roboto-Regular.ttf.png +0 -0
  209. package/lib/res/fonts/arial.ttf.cfg +0 -1570
  210. package/lib/res/fonts/arial.ttf.png +0 -0
  211. package/lib/scene/BaseNode.d.ts +0 -61
  212. package/lib/shaders/drawnode/drawnode.d.ts +0 -8
  213. package/lib/webgl/Program.d.ts +0 -161
  214. package/lib/webgl/ProgramController.d.ts +0 -87
  215. /package/lib/control/{geoObjectEditor → entityEditor}/ArrowEntity.d.ts +0 -0
  216. /package/lib/control/{geoObjectEditor → entityEditor}/AxisTrackEntity.d.ts +0 -0
  217. /package/lib/control/{geoObjectEditor → entityEditor}/MoveAxisEntity.d.ts +0 -0
  218. /package/lib/control/{geoObjectEditor → entityEditor}/MovePlaneEntity.d.ts +0 -0
  219. /package/lib/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +0 -0
  220. /package/lib/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
@@ -1,11 +1,12 @@
1
- import { Entity } from "./Entity";
2
- import { RenderNode } from "../scene/RenderNode";
3
- import { Vec3 } from "../math/Vec3";
4
- import { Vec4 } from "../math/Vec4";
5
- import type { NumberArray3 } from "../math/Vec3";
6
- import type { NumberArray4 } from "../math/Vec4";
1
+ import { Entity } from "../Entity";
2
+ import { Scene } from "../../scene/Scene";
3
+ import { Vec3 } from "../../math/Vec3";
4
+ import { Vec4 } from "../../math/Vec4";
5
+ import type { NumberArray3 } from "../../math/Vec3";
6
+ import type { NumberArray4 } from "../../math/Vec4";
7
7
  import { StripHandler } from "./StripHandler";
8
- import type { WebGLBufferExt } from "../webgl/Handler";
8
+ import type { WebGLBufferExt } from "../../webgl/Handler";
9
+ import type { ShaderProgram } from "../../webgl/ShaderProgram";
9
10
  type TPoiExt = Vec3 | NumberArray3;
10
11
  type TStripExt = [TPoiExt, TPoiExt];
11
12
  type TPoi = Vec3;
@@ -41,13 +42,13 @@ declare class Strip {
41
42
  * @type {boolean}
42
43
  */
43
44
  visibility: boolean;
44
- color: Float32Array;
45
+ protected _color: Float32Array;
45
46
  /**
46
47
  * Parent collection render node.
47
48
  * @protected
48
- * @type {RenderNode}
49
+ * @type {Scene}
49
50
  */
50
- protected _renderNode: RenderNode | null;
51
+ protected _scene: Scene | null;
51
52
  /**
52
53
  * Entity instance that holds this strip.
53
54
  * @public
@@ -96,33 +97,36 @@ declare class Strip {
96
97
  setColorHTML(color: string): void;
97
98
  setColor(r: number, g: number, b: number, a?: number): void;
98
99
  /**
99
- * Set strip opacity.
100
+ * Sets strip opacity.
100
101
  * @public
101
- * @param {number} opacity - opacity.
102
+ * @param {number} opacity - Opacity.
102
103
  */
103
104
  setOpacity(opacity: number): void;
105
+ isOpaque(): boolean;
104
106
  /**
105
- * Sets cloud visibility.
107
+ * Sets strip visibility.
106
108
  * @public
107
109
  * @param {boolean} visibility - Visibility flag.
108
110
  */
109
111
  setVisibility(visibility: boolean): void;
110
112
  /**
111
- * @return {boolean} Strip visibility.
113
+ * @returns {boolean} Strip visibility.
112
114
  */
113
115
  getVisibility(): boolean;
114
116
  /**
115
117
  * Assign rendering scene node.
116
118
  * @public
117
- * @param {RenderNode} renderNode - Assigned render node.
119
+ * @param {Scene} scene - Assigned render node.
118
120
  */
119
- setRenderNode(renderNode: RenderNode): void;
121
+ bindScene(scene: Scene): void;
120
122
  /**
121
123
  * Removes from entity.
122
124
  * @public
123
125
  */
124
126
  remove(): void;
125
- draw(): void;
127
+ protected _drawImpl(sh: ShaderProgram, color: Float32Array, opacity: number): void;
128
+ drawTransparent(): void;
129
+ drawOpaque(): void;
126
130
  drawPicking(): void;
127
131
  /**
128
132
  * Delete buffers
@@ -1,6 +1,6 @@
1
- import { EntityCollection } from "./EntityCollection";
2
- import { Renderer } from "../renderer/Renderer";
3
- import { RenderNode } from "../scene/RenderNode";
1
+ import { EntityCollection } from "../EntityCollection";
2
+ import { Renderer } from "../../renderer/Renderer";
3
+ import { Scene } from "../../scene/Scene";
4
4
  import { Strip } from "./Strip";
5
5
  declare class StripHandler {
6
6
  static __counter__: number;
@@ -29,13 +29,18 @@ declare class StripHandler {
29
29
  * @type {Array.<Strip>}
30
30
  */
31
31
  protected _strips: Strip[];
32
+ protected _opaqueCount: number;
32
33
  constructor(entityCollection: EntityCollection);
33
34
  protected _initProgram(): void;
34
- setRenderNode(renderNode: RenderNode): void;
35
+ bindScene(scene: Scene): void;
36
+ protected _swap(i: number, j: number): void;
35
37
  add(strip: Strip): void;
36
38
  remove(strip: Strip): void;
37
- reindexStripArray(startIndex: number): void;
38
- draw(): void;
39
+ drawForward(): void;
40
+ drawOpaque(): void;
41
+ drawTransparent(): void;
42
+ drawTransparentForward(): void;
43
+ updateStripOpacity(strip: Strip): void;
39
44
  drawPicking(): void;
40
45
  clear(): void;
41
46
  }
package/lib/index.d.ts CHANGED
@@ -1,43 +1,48 @@
1
- import '../css/og.css';
2
- import * as jd from './astro/jd';
3
- import * as math from './math';
4
- import * as mercator from './mercator';
5
- import * as utils from './utils/shared';
6
- import * as bv from './bv/index';
7
- import * as control from './control/index';
8
- import * as scene from './scene/index';
9
- import * as terrain from './terrain/index';
10
- import * as layer from './layer/index';
11
- import * as ui from './ui/index';
12
- import * as webgl from './webgl/index';
13
- export * from './control/Control';
14
- export * from './entity/index';
15
- export * from './layer/index';
16
- export * from './Globe';
17
- export type { IControlParams } from './control/Control';
18
- export type { ITouchState } from './renderer/RendererEvents';
1
+ import "../css/og.css";
2
+ import * as jd from "./astro/jd";
3
+ import * as math from "./math";
4
+ import * as mercator from "./mercator";
5
+ import * as utils from "./utils/shared";
6
+ import * as bv from "./bv/index";
7
+ import * as control from "./control/index";
8
+ import * as scene from "./scene/index";
9
+ import * as terrain from "./terrain/index";
10
+ import * as layer from "./layer/index";
11
+ import * as ui from "./ui/index";
12
+ import * as webgl from "./webgl/index";
13
+ export * from "./control/Control";
14
+ export * from "./entity/index";
15
+ export * from "./layer/index";
16
+ export * from "./Globe";
17
+ export type { IControlParams } from "./control/Control";
18
+ export type { ITouchState } from "./renderer/RendererEvents";
19
+ export type { IDeferredShadingPass } from "./renderer/IDeferredShadingPass";
20
+ export type { ITransparencyPass } from "./renderer/ITransparencyPass";
21
+ export { PhongDeferredShading } from "./renderer/PhongDeferredShading";
22
+ export { AtmosphereDeferredShading } from "./renderer/AtmosphereDeferredShading";
23
+ export { WOITPass } from "./renderer/WOITPass";
24
+ export { SHADE_UNLIT, SHADE_PHONG, SHADE_PBR, type ShadeMode, type ShadeModeInput } from "./shadeModeConstants";
19
25
  export declare const version: string;
20
- import { Geoid } from './terrain/Geoid';
21
- import { input } from './input/input';
22
- import { Ellipsoid, wgs84, moon, mars } from './ellipsoid/index';
23
- import { Camera, PlanetCamera } from './camera/index';
24
- import { Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4 } from './math/index';
25
- import { Renderer } from './renderer/Renderer';
26
- import { LightSource } from './light/LightSource';
27
- import { Clock } from './Clock';
28
- import { Events, type EventsHandler, createEvents } from './Events';
29
- import { Extent } from './Extent';
30
- import { LonLat } from './LonLat';
31
- import { RenderNode } from './scene/RenderNode';
32
- import { Planet } from './scene/Planet';
33
- import { Popup } from './Popup';
34
- import { Loader, type IResponse } from './utils/Loader';
35
- import { EarthQuadTreeStrategy, EquiQuadTreeStrategy, QuadTreeStrategy, quadTreeStrategyType, Wgs84QuadTreeStrategy } from './quadTree/index';
36
- import { Object3d } from './Object3d';
37
- import { Handler, Program, Framebuffer, Multisample } from './webgl/index';
38
- import { EmptyTerrain, GlobusTerrain, RgbTerrain, BilTerrain, GlobusRgbTerrain } from './terrain/index';
39
- import { MoveAxisEntity } from "./control/geoObjectEditor/MoveAxisEntity";
40
- import { Gltf } from './utils/gltf/gltfParser';
41
- import { Easing } from './utils/easing';
42
- import type { EasingFunction } from './utils/easing';
43
- export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, moon, mars, terrain, layer, ui, webgl, Easing, EasingFunction, Framebuffer, EmptyTerrain, GlobusTerrain, RgbTerrain, GlobusRgbTerrain, BilTerrain, Camera, Ellipsoid, Planet, PlanetCamera, LightSource, Program, Handler, Multisample, Renderer, Clock, Events, EventsHandler, createEvents, Extent, LonLat, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, Geoid, Popup, QuadTreeStrategy, EquiQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, Object3d, Gltf, MoveAxisEntity, Loader, IResponse };
26
+ import { Geoid } from "./terrain/Geoid";
27
+ import { input } from "./input/input";
28
+ import { Ellipsoid, wgs84, moon, mars } from "./ellipsoid/index";
29
+ import { Camera, PlanetCamera } from "./camera/index";
30
+ import { Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4 } from "./math/index";
31
+ import { Renderer } from "./renderer/Renderer";
32
+ import { Clock } from "./Clock";
33
+ import { Events, type EventsHandler, createEvents } from "./Events";
34
+ import { Extent } from "./Extent";
35
+ import { LonLat } from "./LonLat";
36
+ import { Scene } from "./scene/Scene";
37
+ import { Planet } from "./scene/Planet";
38
+ import { Popup } from "./Popup";
39
+ import { Loader, type IResponse } from "./utils/Loader";
40
+ import { EarthQuadTreeStrategy, EquiQuadTreeStrategy, QuadTreeStrategy, quadTreeStrategyType, Wgs84QuadTreeStrategy } from "./quadTree/index";
41
+ import { Object3d } from "./Object3d";
42
+ import { Handler, ShaderProgram, Framebuffer, Multisample } from "./webgl/index";
43
+ import { EmptyTerrain, GlobusTerrain, RgbTerrain, BilTerrain, GlobusRgbTerrain } from "./terrain/index";
44
+ import { MoveAxisEntity } from "./control/entityEditor/MoveAxisEntity";
45
+ import { Gltf } from "./utils/gltf/gltfParser";
46
+ import { Easing } from "./utils/easing";
47
+ import type { EasingFunction } from "./utils/easing";
48
+ export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, moon, mars, terrain, layer, ui, webgl, Easing, EasingFunction, Framebuffer, EmptyTerrain, GlobusTerrain, RgbTerrain, GlobusRgbTerrain, BilTerrain, Camera, Ellipsoid, Planet, PlanetCamera, ShaderProgram, Handler, Multisample, Renderer, Clock, Events, EventsHandler, createEvents, Extent, LonLat, Scene, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, Geoid, Popup, QuadTreeStrategy, EquiQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, Object3d, Gltf, MoveAxisEntity, Loader, IResponse };
@@ -12,14 +12,11 @@ export interface IBaseGeoImageParams extends ILayerParams {
12
12
  fullExtent?: boolean;
13
13
  corners?: NumberArray2[];
14
14
  }
15
- type BaseGeoImageEventsList = [
16
- "loadend"
17
- ];
15
+ type BaseGeoImageEventsList = ["loadend"];
18
16
  export type BaseGeoImageEventsType = EventsHandler<BaseGeoImageEventsList> & EventsHandler<LayerEventsList>;
19
17
  /**
20
- * BaseGeoImage layer represents square imagery layer that
21
- * could be a static image, or animated video or webgl buffer
22
- * object displayed on the globe.
18
+ * BaseGeoImage represents a square imagery layer displayed on the globe.
19
+ * It can use a static image, animated video, or WebGL buffer as a source.
23
20
  * @class
24
21
  * @extends {Layer}
25
22
  */
@@ -48,12 +45,14 @@ declare class BaseGeoImage extends Layer {
48
45
  protected _cornersWgs84: LonLat[];
49
46
  protected _cornersMerc: LonLat[];
50
47
  protected _isFullExtent: number;
48
+ protected _crossesAntimeridian: boolean;
51
49
  /**
52
50
  * rendering function pointer
53
51
  * @type {Function}
54
52
  */
55
53
  rendering: Function;
56
54
  protected _onLoadend_: EventCallback | null;
55
+ protected _materialMipmapUpdateCounter: number;
57
56
  constructor(name: string | null, options?: IBaseGeoImageParams);
58
57
  get isIdle(): boolean;
59
58
  addTo(planet: Planet): void;
@@ -63,31 +62,33 @@ declare class BaseGeoImage extends Layer {
63
62
  /**
64
63
  * Gets corners coordinates.
65
64
  * @public
66
- * @return {Array.<LonLat>} - (exactly 4 entries)
65
+ * @returns {Array.<LonLat>} - (exactly 4 entries)
67
66
  */
68
67
  getCornersLonLat(): LonLat[];
69
68
  /**
70
69
  * Gets corners coordinates.
71
70
  * @public
72
- * @return {Array.<Array<number>>} - (exactly 3 entries)
71
+ * @returns {Array.<Array<number>>} - (exactly 4 entries)
73
72
  */
74
73
  getCorners(): NumberArray2[];
75
74
  /**
76
75
  * Sets geoImage geographical corners coordinates.
77
76
  * @public
78
- * @param {Array.<Array.<number>>} corners - GeoImage corners coordinates. Where first coordinate (exactly 3 entries)
79
- * coincedents to the left top image corner, secont to the right top image corner, third to the right bottom
80
- * and fourth - left bottom image corner.
77
+ * @param {Array.<Array.<number>>} corners - GeoImage corner coordinates. Each coordinate has exactly 2 entries.
78
+ * The first corner is top-left, the second is top-right, the third is bottom-right, and the fourth is bottom-left.
81
79
  */
82
80
  setCorners(corners: NumberArray2[]): void;
83
81
  /**
84
82
  * Sets geoImage geographical corners coordinates.
85
83
  * @public
86
- * @param {Array.<LonLat>} corners - GeoImage corners coordinates. Where first coordinate
87
- * coincedents to the left top image corner, secont to the right top image corner, third to the right bottom
88
- * and fourth - left bottom image corner. (exactly 4 entries)
84
+ * @param {Array.<LonLat>} corners - GeoImage corner coordinates.
85
+ * The first corner is top-left, the second is top-right, the third is bottom-right, and the fourth is bottom-left.
86
+ * (exactly 4 entries)
89
87
  */
90
88
  setCornersLonLat(corners: LonLat[]): void;
89
+ protected _isExplicitFullWorldLonEdge(lonA: number, lonB: number): boolean;
90
+ protected _unwrapCornersLonLat(corners: LonLat[]): LonLat[];
91
+ protected _detectAntimeridianCrossing(corners: LonLat[]): boolean;
91
92
  /**
92
93
  * Creates geoImage frame.
93
94
  * @protected
@@ -117,22 +118,23 @@ declare class BaseGeoImage extends Layer {
117
118
  * @param {Material} material - GeoImage material.
118
119
  */
119
120
  clearMaterial(material: Material): void;
121
+ protected _getCyclicLonShift(sourceExtent: Extent, targetExtent: Extent, worldWidth: number): number;
120
122
  /**
121
123
  * @public
122
124
  * @override
123
- * @returns {Array<number>} -
125
+ * @returns {NumberArray4}
124
126
  */
125
127
  applyMaterial(material: Material): NumberArray4;
126
128
  /**
127
129
  * Gets frame width size in pixels.
128
130
  * @public
129
- * @returns {Number} Frame width.
131
+ * @returns {number} Frame width.
130
132
  */
131
133
  get getFrameWidth(): number;
132
134
  /**
133
135
  * Gets frame height size in pixels.
134
136
  * @public
135
- * @returns {Number} Frame height.
137
+ * @returns {number} Frame height.
136
138
  */
137
139
  get getFrameHeight(): number;
138
140
  /**
@@ -140,6 +142,7 @@ declare class BaseGeoImage extends Layer {
140
142
  * @protected
141
143
  */
142
144
  protected _createSourceTexture(): void;
145
+ protected _updateMaterialTextureMipmap(): void;
143
146
  _renderingProjType1(): void;
144
147
  protected _renderingProjType0(): void;
145
148
  }
@@ -12,26 +12,26 @@ export interface ICanvasTilesParams extends ILayerParams {
12
12
  minNativeZoom?: number;
13
13
  maxNativeZoom?: number;
14
14
  }
15
- type CanvasTilesEventsList = [
16
- "load",
17
- "loadend"
18
- ];
15
+ type CanvasTilesEventsList = ["load", "loadend"];
19
16
  type CanvasTilesEventsType = EventsHandler<CanvasTilesEventsList> & EventsHandler<LayerEventsList>;
20
17
  /**
21
- * Layer used to rendering each tile as a separate canvas object.
18
+ * Layer that renders each tile as a separate canvas object.
22
19
  * @class
23
20
  * @extends {Layer}
24
- * @param {String} [name="noname"] - Layer name.
25
- * @param {ICanvasTilesParams} options:
21
+ * @param {string} [name="noname"] - Layer name.
22
+ * @param {ICanvasTilesParams} options - Layer options.
26
23
  * @param {number} [options.opacity=1.0] - Layer opacity.
27
24
  * @param {number} [options.minZoom=0] - Minimal visibility zoom level.
28
- * @param {number} [options.maxZoom=0] - Maximal visibility zoom level.
29
- * @param {string} [options.attribution] - Layer attribution that displayed in the attribution area on the screen.
25
+ * @param {number} [options.maxZoom=50] - Maximal visibility zoom level.
26
+ * @param {string} [options.attribution] - Layer attribution shown in the attribution area.
30
27
  * @param {boolean} [options.isBaseLayer=false] - Base layer flag.
31
28
  * @param {boolean} [options.visibility=true] - Layer visibility.
29
+ * @param {boolean} [options.animated=false] - Re-draw ready tiles every frame.
30
+ * @param {number} [options.minNativeZoom=0] - Minimal zoom level where native tile drawing is allowed.
31
+ * @param {number} [options.maxNativeZoom=100] - Maximal zoom level where native tile drawing is allowed.
32
32
  * @param {DrawTileCallback} options.drawTile - Draw tile callback.
33
- * @fires EventsHandler<CanvasTilesEventsList>#load
34
- * @fires EventsHandler<CanvasTilesEventsList>#loadend
33
+ * @fires load
34
+ * @fires loadend
35
35
  */
36
36
  declare class CanvasTiles extends Layer {
37
37
  static MAX_REQUESTS: number;
@@ -47,7 +47,7 @@ declare class CanvasTiles extends Layer {
47
47
  */
48
48
  protected _counter: number;
49
49
  /**
50
- * Tile pending queue that waiting for create.
50
+ * Queue of pending tiles waiting to be created.
51
51
  * @protected
52
52
  * @type {Material[]}
53
53
  */
@@ -99,6 +99,8 @@ declare class CanvasTiles extends Layer {
99
99
  protected _dequeueRequest(): void;
100
100
  protected _whilePendings(): Material | null;
101
101
  applyMaterial(material: Material): NumberArray4;
102
+ protected _apllyMaterialDefault(material: Material): NumberArray4;
103
+ protected _applyMaterialFast(material: Material): NumberArray4;
102
104
  clearMaterial(material: Material): void;
103
105
  }
104
106
  export { CanvasTiles };
@@ -30,7 +30,7 @@ declare class GeoImage extends BaseGeoImage {
30
30
  /**
31
31
  * Sets image source url path.
32
32
  * @public
33
- * @param {string} srs - Image url path.
33
+ * @param {string} src - Image url path.
34
34
  */
35
35
  setSrc(src: string): void;
36
36
  /**
@@ -1,5 +1,5 @@
1
- import { BaseGeoImage } from './BaseGeoImage';
2
- import type { IBaseGeoImageParams } from './BaseGeoImage';
1
+ import { BaseGeoImage } from "./BaseGeoImage";
2
+ import type { IBaseGeoImageParams } from "./BaseGeoImage";
3
3
  import { Material } from "../layer/Material";
4
4
  import type { WebGLTextureExt } from "../webgl/Handler";
5
5
  interface IGeoTexture2dParams extends IBaseGeoImageParams {
@@ -1,19 +1,19 @@
1
- import { Billboard } from "../entity/Billboard";
2
- import type { IBillboardParams } from "../entity/Billboard";
1
+ import type { IBillboardParams } from "../entity/billboard/Billboard";
2
+ import { Billboard } from "../entity/billboard/Billboard";
3
3
  import { Entity } from "../entity/Entity";
4
4
  import { Extent } from "../Extent";
5
- import { Vector } from "./Vector";
6
5
  import type { IVectorParams } from "./Vector";
6
+ import { Vector } from "./Vector";
7
7
  interface IKMLParams extends IVectorParams {
8
8
  color?: string;
9
9
  billboard?: IBillboardParams;
10
10
  }
11
11
  /**
12
- * Layer to render KMLs files
12
+ * Layer to render KML files.
13
13
  * @class
14
14
  * @extends {Vector}
15
- * @param {string} name
16
- * @param {*} [options]
15
+ * @param {string} name - Layer name.
16
+ * @param {IKMLParams} [options] - KML layer options.
17
17
  */
18
18
  export declare class KML extends Vector {
19
19
  protected _color: string;
@@ -24,7 +24,7 @@ export declare class KML extends Vector {
24
24
  protected _AGBRtoRGBA(agbr: string): string | undefined;
25
25
  /**
26
26
  * @protected
27
- * @returns array of longitude, latitude, altitude (altitude optional)
27
+ * @returns {number[][]} Array of `[longitude, latitude, altitude?]`.
28
28
  */
29
29
  protected _parseKMLcoordinates(coords: Element): number[][];
30
30
  protected _kmlPlacemarkToEntity(placemark: Element | undefined | null, extent: Extent): Entity | undefined;
@@ -34,22 +34,23 @@ export declare class KML extends Vector {
34
34
  /**
35
35
  * Creates billboards or polylines from array of lonlat.
36
36
  * @protected
37
- * @param {Array} coordonates
38
- * @param {string} color
39
- * @returns {any}
37
+ * @param {number[][][][]} coordinates - Coordinates grouped by files and paths.
38
+ * @param {string} color - Polyline color.
39
+ * @param {IBillboardParams} [billboard] - Billboard options.
40
+ * @returns {{entities: Array.<(Entity|undefined)>, extent: Extent}}
40
41
  */
41
42
  protected _convertCoordonatesIntoEntities(coordinates: number[][][][], color: string, billboard?: IBillboardParams): any;
42
43
  /**
43
44
  * @protected
44
- * @returns {Document}
45
+ * @returns {Promise<XMLDocument>}
45
46
  */
46
47
  protected _getXmlContent(file: Blob): Promise<XMLDocument>;
47
48
  protected _expandExtents(extent1: Extent | null | undefined, extent2: Extent): Extent;
48
49
  /**
49
50
  * @public
50
- * @param {File[]} kmls
51
- * @param {string} [color]
52
- * @param {Billboard} [billboard]
51
+ * @param {Blob[]} kmls - KML files.
52
+ * @param {string} [color] - Polyline color.
53
+ * @param {IBillboardParams} [billboard] - Billboard options.
53
54
  * @returns {Promise<{entities: Entity[], extent: Extent}>}
54
55
  */
55
56
  addKmlFromFiles(kmls: Blob[], color?: string, billboard?: IBillboardParams): Promise<{
@@ -57,16 +58,16 @@ export declare class KML extends Vector {
57
58
  extent: any;
58
59
  } | null>;
59
60
  /**
60
- * @param {string} color
61
+ * @param {string} color - Layer color.
61
62
  * @public
62
63
  */
63
64
  setColor(color: string): void;
64
65
  protected _getKmlFromUrl(url: string): Promise<Document>;
65
66
  /**
66
67
  * @public
67
- * @param {string} url - Url of the KML to display. './myFile.kml' or 'http://mySite/myFile.kml' for example.
68
- * @param {string} [color]
69
- * @param {Billboard} [billboard]
68
+ * @param {string} url - URL of the KML to display. For example: './myFile.kml' or 'http://mySite/myFile.kml'.
69
+ * @param {string} [color] - Polyline color.
70
+ * @param {Billboard | IBillboardParams} [billboard] - Billboard options.
70
71
  * @returns {Promise<{entities: Entity[], extent: Extent}>}
71
72
  */
72
73
  addKmlFromUrl(url: string, color?: string, billboard?: Billboard | IBillboardParams): Promise<any>;