@openglobus/og 0.11.7 → 0.12.3

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 (211) hide show
  1. package/css/og.css +5 -2
  2. package/dist/@openglobus/og.css +1 -0
  3. package/dist/@openglobus/og.esm.js +21 -0
  4. package/dist/@openglobus/og.esm.js.map +1 -0
  5. package/dist/@openglobus/og.umd.js +21 -0
  6. package/dist/@openglobus/og.umd.js.map +1 -0
  7. package/package.json +11 -11
  8. package/src/og/Globe.js +18 -6
  9. package/src/og/camera/Camera.js +70 -79
  10. package/src/og/camera/PlanetCamera.js +25 -30
  11. package/src/og/control/DebugInfo.js +2 -2
  12. package/src/og/control/EarthNavigation.js +26 -17
  13. package/src/og/control/Lighting.js +52 -73
  14. package/src/og/control/MouseNavigation.js +30 -29
  15. package/src/og/control/MouseWheelZoomControl.js +257 -0
  16. package/src/og/control/Sun.js +3 -3
  17. package/src/og/control/index.js +2 -0
  18. package/src/og/control/visibleExtent/Segment.js +1862 -0
  19. package/src/og/control/visibleExtent/VisibleExtent.js +80 -0
  20. package/src/og/control/visibleExtent/drawnode.js +751 -0
  21. package/src/og/entity/BaseBillboard.js +9 -9
  22. package/src/og/entity/Entity.js +742 -742
  23. package/src/og/entity/GeoObjectHandler.js +138 -134
  24. package/src/og/entity/Label.js +7 -7
  25. package/src/og/entity/LabelHandler.js +2 -1
  26. package/src/og/layer/CanvasTiles.js +8 -12
  27. package/src/og/layer/GeoImage.js +2 -10
  28. package/src/og/layer/GeoTexture2d.js +2 -10
  29. package/src/og/layer/GeoVideo.js +2 -10
  30. package/src/og/layer/KML.js +19 -12
  31. package/src/og/layer/Layer.js +4 -23
  32. package/src/og/layer/WMS.js +0 -2
  33. package/src/og/layer/XYZ.js +31 -33
  34. package/src/og/math/Vec3.js +18 -2
  35. package/src/og/quadTree/Node.js +48 -93
  36. package/src/og/quadTree/quadTree.js +1 -1
  37. package/src/og/renderer/Renderer.js +69 -96
  38. package/src/og/renderer/RendererEvents.js +3 -1
  39. package/src/og/scene/Planet.js +171 -173
  40. package/src/og/segment/Segment.js +99 -268
  41. package/src/og/segment/Slice.js +45 -0
  42. package/src/og/shaders/drawnode.js +171 -350
  43. package/src/og/shaders/geoObject.js +15 -6
  44. package/src/og/terrain/EmptyTerrain.js +3 -2
  45. package/src/og/terrain/GlobusTerrain.js +2 -0
  46. package/src/og/utils/GeoImageCreator.js +5 -1
  47. package/src/og/utils/Loader.js +1 -1
  48. package/src/og/utils/PlainSegmentWorker.js +0 -13
  49. package/src/og/webgl/Handler.js +14 -10
  50. package/types/Clock.d.ts +94 -0
  51. package/types/Deferred.d.ts +6 -0
  52. package/types/Events.d.ts +77 -0
  53. package/types/Extent.d.ts +166 -0
  54. package/types/Globe.d.ts +85 -0
  55. package/types/ImageCanvas.d.ts +123 -0
  56. package/types/Lock.d.ts +12 -0
  57. package/types/LonLat.d.ts +108 -0
  58. package/types/Popup.d.ts +42 -0
  59. package/types/QueueArray.d.ts +19 -0
  60. package/types/Rectangle.d.ts +80 -0
  61. package/types/Stack.d.ts +19 -0
  62. package/types/ajax.d.ts +24 -0
  63. package/types/arial.d.ts +48 -0
  64. package/types/astro/astro.d.ts +38 -0
  65. package/types/astro/earth.d.ts +7 -0
  66. package/types/astro/jd.d.ts +254 -0
  67. package/types/bv/Box.d.ts +30 -0
  68. package/types/bv/Sphere.d.ts +38 -0
  69. package/types/bv/index.d.ts +3 -0
  70. package/types/camera/Camera.d.ts +312 -0
  71. package/types/camera/Frustum.d.ts +133 -0
  72. package/types/camera/PlanetCamera.d.ts +219 -0
  73. package/types/camera/index.d.ts +3 -0
  74. package/types/cons.d.ts +40 -0
  75. package/types/control/CompassButton.d.ts +17 -0
  76. package/types/control/Control.d.ts +104 -0
  77. package/types/control/DebugInfo.d.ts +15 -0
  78. package/types/control/EarthCoordinates.d.ts +47 -0
  79. package/types/control/EarthNavigation.d.ts +43 -0
  80. package/types/control/GeoImageDragControl.d.ts +6 -0
  81. package/types/control/KeyboardNavigation.d.ts +21 -0
  82. package/types/control/LayerSwitcher.d.ts +21 -0
  83. package/types/control/Lighting.d.ts +16 -0
  84. package/types/control/MouseNavigation.d.ts +48 -0
  85. package/types/control/MouseWheelZoomControl.d.ts +45 -0
  86. package/types/control/ScaleControl.d.ts +22 -0
  87. package/types/control/ShowFps.d.ts +11 -0
  88. package/types/control/SimpleNavigation.d.ts +25 -0
  89. package/types/control/Sun.d.ts +50 -0
  90. package/types/control/ToggleWireframe.d.ts +12 -0
  91. package/types/control/TouchNavigation.d.ts +48 -0
  92. package/types/control/ZoomControl.d.ts +27 -0
  93. package/types/control/index.d.ts +18 -0
  94. package/types/ellipsoid/Ellipsoid.d.ts +146 -0
  95. package/types/ellipsoid/index.d.ts +3 -0
  96. package/types/ellipsoid/wgs84.d.ts +6 -0
  97. package/types/entity/BaseBillboard.d.ts +215 -0
  98. package/types/entity/Billboard.d.ts +94 -0
  99. package/types/entity/BillboardHandler.d.ts +79 -0
  100. package/types/entity/Entity.d.ts +348 -0
  101. package/types/entity/EntityCollection.d.ts +317 -0
  102. package/types/entity/GeoObject.d.ts +111 -0
  103. package/types/entity/GeoObjectHandler.d.ts +81 -0
  104. package/types/entity/Geometry.d.ts +74 -0
  105. package/types/entity/GeometryHandler.d.ts +76 -0
  106. package/types/entity/Label.d.ts +189 -0
  107. package/types/entity/LabelHandler.d.ts +31 -0
  108. package/types/entity/LabelWorker.d.ts +11 -0
  109. package/types/entity/PointCloud.d.ts +174 -0
  110. package/types/entity/PointCloudHandler.d.ts +38 -0
  111. package/types/entity/Polyline.d.ts +306 -0
  112. package/types/entity/PolylineHandler.d.ts +18 -0
  113. package/types/entity/Ray.d.ts +124 -0
  114. package/types/entity/RayHandler.d.ts +67 -0
  115. package/types/entity/ShapeHandler.d.ts +22 -0
  116. package/types/entity/Strip.d.ts +119 -0
  117. package/types/entity/StripHandler.d.ts +38 -0
  118. package/types/entity/index.d.ts +8 -0
  119. package/types/index.core.d.ts +65 -0
  120. package/types/index.d.ts +45 -0
  121. package/types/index.webgl.d.ts +7 -0
  122. package/types/input/KeyboardHandler.d.ts +10 -0
  123. package/types/input/MouseHandler.d.ts +5 -0
  124. package/types/input/TouchHandler.d.ts +5 -0
  125. package/types/input/input.d.ts +34 -0
  126. package/types/layer/BaseGeoImage.d.ts +94 -0
  127. package/types/layer/CanvasTiles.d.ts +67 -0
  128. package/types/layer/GeoImage.d.ts +52 -0
  129. package/types/layer/GeoTexture2d.d.ts +8 -0
  130. package/types/layer/GeoVideo.d.ts +55 -0
  131. package/types/layer/KML.d.ts +68 -0
  132. package/types/layer/Layer.d.ts +310 -0
  133. package/types/layer/Material.d.ts +45 -0
  134. package/types/layer/Vector.d.ts +208 -0
  135. package/types/layer/WMS.d.ts +61 -0
  136. package/types/layer/XYZ.d.ts +119 -0
  137. package/types/layer/index.d.ts +10 -0
  138. package/types/light/LightSource.d.ts +178 -0
  139. package/types/math/Line2.d.ts +11 -0
  140. package/types/math/Line3.d.ts +10 -0
  141. package/types/math/Mat3.d.ts +65 -0
  142. package/types/math/Mat4.d.ts +176 -0
  143. package/types/math/Plane.d.ts +18 -0
  144. package/types/math/Quat.d.ts +379 -0
  145. package/types/math/Ray.d.ts +82 -0
  146. package/types/math/Vec2.d.ts +309 -0
  147. package/types/math/Vec3.d.ts +467 -0
  148. package/types/math/Vec4.d.ts +162 -0
  149. package/types/math/coder.d.ts +43 -0
  150. package/types/math/index.d.ts +11 -0
  151. package/types/math.d.ts +261 -0
  152. package/types/mercator.d.ts +92 -0
  153. package/types/proj/EPSG3857.d.ts +6 -0
  154. package/types/proj/EPSG4326.d.ts +6 -0
  155. package/types/proj/Proj.d.ts +42 -0
  156. package/types/quadTree/EntityCollectionNode.d.ts +34 -0
  157. package/types/quadTree/Node.d.ts +60 -0
  158. package/types/quadTree/quadTree.d.ts +40 -0
  159. package/types/renderer/Renderer.d.ts +290 -0
  160. package/types/renderer/RendererEvents.d.ts +237 -0
  161. package/types/res/images.d.ts +3 -0
  162. package/types/scene/Axes.d.ts +11 -0
  163. package/types/scene/BaseNode.d.ts +60 -0
  164. package/types/scene/Planet.d.ts +576 -0
  165. package/types/scene/RenderNode.d.ts +142 -0
  166. package/types/scene/SkyBox.d.ts +10 -0
  167. package/types/scene/index.d.ts +4 -0
  168. package/types/segment/Segment.d.ts +275 -0
  169. package/types/segment/SegmentLonLat.d.ts +17 -0
  170. package/types/segment/Slice.d.ts +10 -0
  171. package/types/segment/segmentHelper.d.ts +13 -0
  172. package/types/shaders/billboard.d.ts +3 -0
  173. package/types/shaders/depth.d.ts +2 -0
  174. package/types/shaders/drawnode.d.ts +7 -0
  175. package/types/shaders/geoObject.d.ts +3 -0
  176. package/types/shaders/label.d.ts +4 -0
  177. package/types/shaders/pointCloud.d.ts +2 -0
  178. package/types/shaders/polyline.d.ts +3 -0
  179. package/types/shaders/ray.d.ts +2 -0
  180. package/types/shaders/screenFrame.d.ts +2 -0
  181. package/types/shaders/shape.d.ts +4 -0
  182. package/types/shaders/skybox.d.ts +2 -0
  183. package/types/shaders/toneMapping.d.ts +2 -0
  184. package/types/shapes/BaseShape.d.ts +250 -0
  185. package/types/shapes/Sphere.d.ts +41 -0
  186. package/types/terrain/BilTerrain.d.ts +7 -0
  187. package/types/terrain/EmptyTerrain.d.ts +73 -0
  188. package/types/terrain/Geoid.d.ts +26 -0
  189. package/types/terrain/GlobusTerrain.d.ts +116 -0
  190. package/types/terrain/MapboxTerrain.d.ts +7 -0
  191. package/types/terrain/index.d.ts +5 -0
  192. package/types/utils/FontAtlas.d.ts +15 -0
  193. package/types/utils/GeoImageCreator.d.ts +30 -0
  194. package/types/utils/ImagesCacheManager.d.ts +10 -0
  195. package/types/utils/Loader.d.ts +25 -0
  196. package/types/utils/NormalMapCreator.d.ts +39 -0
  197. package/types/utils/PlainSegmentWorker.d.ts +10 -0
  198. package/types/utils/TerrainWorker.d.ts +9 -0
  199. package/types/utils/TextureAtlas.d.ts +111 -0
  200. package/types/utils/VectorTileCreator.d.ts +16 -0
  201. package/types/utils/colorTable.d.ts +143 -0
  202. package/types/utils/earcut.d.ts +6 -0
  203. package/types/utils/shared.d.ts +231 -0
  204. package/types/webgl/Framebuffer.d.ts +135 -0
  205. package/types/webgl/Handler.d.ts +417 -0
  206. package/types/webgl/Multisample.d.ts +89 -0
  207. package/types/webgl/Program.d.ts +161 -0
  208. package/types/webgl/ProgramController.d.ts +89 -0
  209. package/types/webgl/callbacks.d.ts +1 -0
  210. package/types/webgl/index.d.ts +6 -0
  211. package/types/webgl/types.d.ts +2 -0
@@ -0,0 +1,8 @@
1
+ import { Entity } from "./Entity.js";
2
+ import { EntityCollection } from "./EntityCollection.js";
3
+ import { Billboard } from "./Billboard.js";
4
+ import { Geometry } from "./Geometry.js";
5
+ import { Label } from "./Label.js";
6
+ import { PointCloud } from "./PointCloud.js";
7
+ import { Polyline } from "./Polyline.js";
8
+ export { Entity, EntityCollection, Billboard, Geometry, Label, PointCloud, Polyline };
@@ -0,0 +1,65 @@
1
+ export namespace bv {
2
+ export { Box };
3
+ export { Sphere };
4
+ }
5
+ import * as jd from "./astro/jd.js";
6
+ import * as math from "./math.js";
7
+ import * as utils from "./utils/shared.js";
8
+ import { input } from "./input/input.js";
9
+ import { Control } from "./control/Control.js";
10
+ export namespace control {
11
+ export { DebugInfo };
12
+ export { SimpleNavigation };
13
+ export { ShowFps };
14
+ }
15
+ export namespace webgl {
16
+ export { Framebuffer };
17
+ export { Handler };
18
+ export { Multisample };
19
+ export { types };
20
+ export { Program };
21
+ }
22
+ import { Camera } from "./camera/Camera.js";
23
+ import { LightSource } from "./light/LightSource.js";
24
+ import { EntityCollection } from "./entity/EntityCollection.js";
25
+ import { Handler } from "./webgl/Handler.js";
26
+ import { Renderer } from "./renderer/Renderer.js";
27
+ import { Clock } from "./Clock.js";
28
+ import { Events } from "./Events.js";
29
+ export namespace scene {
30
+ export { Axes };
31
+ }
32
+ import { RenderNode } from "./scene/RenderNode.js";
33
+ import { Line2 } from "./math/Line2.js";
34
+ import { Line3 } from "./math/Line3.js";
35
+ import { Mat3 } from "./math/Mat3.js";
36
+ import { Mat4 } from "./math/Mat4.js";
37
+ import { Plane } from "./math/Plane.js";
38
+ import { Quat } from "./math/Quat.js";
39
+ import { Ray } from "./math/Ray.js";
40
+ import { TextureAtlas } from "./utils/TextureAtlas.js";
41
+ import { Vec2 } from "./math/Vec2.js";
42
+ import { Vec3 } from "./math/Vec3.js";
43
+ import { Vec4 } from "./math/Vec4.js";
44
+ export namespace entity {
45
+ export { Billboard };
46
+ export { Label };
47
+ export { PointCloud };
48
+ export { Polyline };
49
+ }
50
+ import { Entity } from "./entity/Entity.js";
51
+ import { Box } from "./bv/Box.js";
52
+ import { Sphere } from "./bv/Sphere.js";
53
+ import { DebugInfo } from "./control/DebugInfo";
54
+ import { SimpleNavigation } from "./control/SimpleNavigation.js";
55
+ import { ShowFps } from "./control/ShowFps.js";
56
+ import { Framebuffer } from "./webgl/Framebuffer.js";
57
+ import { Multisample } from "./webgl/Multisample.js";
58
+ import { types } from "./webgl/types.js";
59
+ import { Program } from "./webgl/Program.js";
60
+ import { Axes } from "./scene/Axes.js";
61
+ import { Billboard } from "./entity/Billboard.js";
62
+ import { Label } from "./entity/Label.js";
63
+ import { PointCloud } from "./entity/PointCloud.js";
64
+ import { Polyline } from "./entity/Polyline.js";
65
+ export { jd, math, utils, input, Control, Camera, LightSource, EntityCollection, Handler, Renderer, Clock, Events, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, TextureAtlas, Vec2, Vec3, Vec4, Entity };
@@ -0,0 +1,45 @@
1
+ export namespace version {
2
+ const version: any;
3
+ }
4
+ import * as bv from "./bv/index.js";
5
+ import * as jd from "./astro/jd.js";
6
+ import * as math from "./math.js";
7
+ import * as mercator from "./mercator.js";
8
+ import * as utils from "./utils/shared.js";
9
+ import { input } from "./input/input.js";
10
+ export const Layer: typeof layer.Layer;
11
+ import * as layer from "./layer/index.js";
12
+ import * as terrain from "./terrain/index.js";
13
+ export const Control: typeof control.Control;
14
+ import * as control from "./control/index.js";
15
+ import * as webgl from "./webgl/index.js";
16
+ import { wgs84 } from "./ellipsoid/index.js";
17
+ import { Camera } from "./camera/index.js";
18
+ import { Ellipsoid } from "./ellipsoid/index.js";
19
+ import { PlanetCamera } from "./camera/index.js";
20
+ import { Globe } from "./Globe.js";
21
+ import { LightSource } from "./light/LightSource.js";
22
+ export const EntityCollection: typeof entity.EntityCollection;
23
+ export const Handler: typeof webgl.Handler;
24
+ import { Renderer } from "./renderer/Renderer.js";
25
+ import { Clock } from "./Clock.js";
26
+ import { Events } from "./Events.js";
27
+ import { Extent } from "./Extent.js";
28
+ import { LonLat } from "./LonLat.js";
29
+ import * as scene from "./scene/index.js";
30
+ import { RenderNode } from "./scene/RenderNode.js";
31
+ import { Line2 } from "./math/index.js";
32
+ import { Line3 } from "./math/index.js";
33
+ import { Mat3 } from "./math/index.js";
34
+ import { Mat4 } from "./math/index.js";
35
+ import { Plane } from "./math/index.js";
36
+ import { Quat } from "./math/index.js";
37
+ import { Ray } from "./math/index.js";
38
+ import { Vec2 } from "./math/index.js";
39
+ import { Vec3 } from "./math/index.js";
40
+ import { Vec4 } from "./math/index.js";
41
+ import * as entity from "./entity/index.js";
42
+ export const Entity: typeof entity.Entity;
43
+ import { Geoid } from "./terrain/Geoid.js";
44
+ import { Popup } from "./Popup.js";
45
+ export { bv, jd, math, mercator, utils, input, layer, terrain, control, webgl, wgs84, Camera, Ellipsoid, PlanetCamera, Globe, LightSource, Renderer, Clock, Events, Extent, LonLat, scene, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, entity, Geoid, Popup };
@@ -0,0 +1,7 @@
1
+ import { Handler } from "./webgl/Handler.js";
2
+ import { Framebuffer } from "./webgl/Framebuffer.js";
3
+ import { Multisample } from "./webgl/Multisample.js";
4
+ import { types } from "./webgl/types.js";
5
+ import { Program } from "./webgl/Program.js";
6
+ import { TextureAtlas } from "./utils/TextureAtlas.js";
7
+ export { Handler, Framebuffer, Multisample, types, Program, TextureAtlas };
@@ -0,0 +1,10 @@
1
+ export class KeyboardHandler {
2
+ removeEvent: (events: any, callback: any) => void;
3
+ setActivity: (activity: any) => void;
4
+ releaseKeys: () => void;
5
+ addEvent: (event: any, sender: any, callback: any, keyCode: any, priority: any) => void;
6
+ isKeyPressed: (keyCode: any) => any;
7
+ handleKeyDown: () => void;
8
+ handleKeyUp: () => void;
9
+ handleEvents: () => void;
10
+ }
@@ -0,0 +1,5 @@
1
+ export class MouseHandler {
2
+ constructor(htmlObject: any);
3
+ _htmlObject: any;
4
+ setEvent(event: any, sender: any, callback: any): void;
5
+ }
@@ -0,0 +1,5 @@
1
+ export class TouchHandler {
2
+ constructor(htmlObject: any);
3
+ _htmlObject: any;
4
+ setEvent(event: any, sender: any, callback: any): void;
5
+ }
@@ -0,0 +1,34 @@
1
+ export namespace input {
2
+ const KEY_CTRL: number;
3
+ const KEY_ALT: number;
4
+ const KEY_SHIFT: number;
5
+ const KEY_SPACE: number;
6
+ const KEY_LEFT: number;
7
+ const KEY_UP: number;
8
+ const KEY_RIGHT: number;
9
+ const KEY_DOWN: number;
10
+ const KEY_PRINTSCREEN: number;
11
+ const KEY_A: number;
12
+ const KEY_C: number;
13
+ const KEY_D: number;
14
+ const KEY_E: number;
15
+ const KEY_F: number;
16
+ const KEY_H: number;
17
+ const KEY_I: number;
18
+ const KEY_K: number;
19
+ const KEY_L: number;
20
+ const KEY_O: number;
21
+ const KEY_P: number;
22
+ const KEY_Q: number;
23
+ const KEY_R: number;
24
+ const KEY_S: number;
25
+ const KEY_V: number;
26
+ const KEY_W: number;
27
+ const KEY_X: number;
28
+ const KEY_Z: number;
29
+ const KEY_F1: number;
30
+ const KEY_APOSTROPHE: number;
31
+ const MB_LEFT: number;
32
+ const MB_RIGHT: number;
33
+ const MB_MIDDLE: number;
34
+ }
@@ -0,0 +1,94 @@
1
+ /**
2
+ * BaseGeoImage layer represents square imagery layer that could be an static image, or animated video or webgl buffer object displayed on the globe.
3
+ * @class
4
+ * @extends {Layer}
5
+ */
6
+ export class BaseGeoImage extends Layer {
7
+ constructor(name: any, options: any);
8
+ _projType: number;
9
+ _frameWidth: number;
10
+ _frameHeight: number;
11
+ _sourceReady: boolean;
12
+ _sourceTexture: any;
13
+ _materialTexture: any;
14
+ _gridBuffer: any;
15
+ _extentWgs84Params: number[];
16
+ _refreshFrame: boolean;
17
+ _frameCreated: boolean;
18
+ _sourceCreated: boolean;
19
+ _animate: boolean;
20
+ _ready: boolean;
21
+ _creationProceeding: boolean;
22
+ _isRendering: boolean;
23
+ _extentWgs84: Extent;
24
+ _cornersWgs84: number[] | LonLat[];
25
+ rendering: any;
26
+ /**
27
+ * Gets corners coordinates.
28
+ * @public
29
+ * @return {Array.<LonLat>} - (exactly 4 entries)
30
+ */
31
+ public getCornersLonLat(): Array<LonLat>;
32
+ /**
33
+ * Gets corners coordinates.
34
+ * @public
35
+ * @return {Array.<Array<number>>} - (exactly 3 entries)
36
+ */
37
+ public getCorners(): Array<Array<number>>;
38
+ /**
39
+ * Sets geoImage geographical corners coordinates.
40
+ * @public
41
+ * @param {Array.<Array.<number>>} corners - GeoImage corners coordinates. Where first coordinate (exactly 3 entries)
42
+ * coincedents to the left top image corner, secont to the right top image corner, third to the right bottom
43
+ * and fourth - left bottom image corner.
44
+ */
45
+ public setCorners(corners: Array<Array<number>>): void;
46
+ /**
47
+ * Sets geoImage geographical corners coordinates.
48
+ * @public
49
+ * @param {Array.<LonLat>} corners - GeoImage corners coordinates. Where first coordinate
50
+ * coincedents to the left top image corner, secont to the right top image corner, third to the right bottom
51
+ * and fourth - left bottom image corner. (exactly 4 entries)
52
+ */
53
+ public setCornersLonLat(corners: Array<LonLat>): void;
54
+ /**
55
+ * Creates geoImage frame.
56
+ * @protected
57
+ */
58
+ protected _createFrame(): void;
59
+ _cornersMerc: any[];
60
+ _extentMercParams: number[];
61
+ /**
62
+ * @virtual
63
+ * @param {Material} material - GeoImage material.
64
+ */
65
+ abortMaterialLoading(material: Material): void;
66
+ /**
67
+ * @virtual
68
+ * @protected
69
+ * @param {Material} material - GeoImage material.
70
+ */
71
+ protected clearMaterial(material: Material): void;
72
+ /**
73
+ * @virtual
74
+ * @protected
75
+ * @param {Material} material - GeoImage material.
76
+ * @returns {Array<number> } -
77
+ */
78
+ protected applyMaterial(material: Material): Array<number>;
79
+ /**
80
+ * Gets frame width size in pixels.
81
+ * @public
82
+ * @returns {Number} Frame width.
83
+ */
84
+ public get getFrameWidth(): number;
85
+ /**
86
+ * Gets frame height size in pixels.
87
+ * @public
88
+ * @returns {Number} Frame height.
89
+ */
90
+ public get getFrameHeight(): number;
91
+ }
92
+ import { Layer } from "./Layer.js";
93
+ import { Extent } from "../Extent.js";
94
+ import { LonLat } from "../LonLat.js";
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Layer used to rendering each tile as a separate canvas object.
3
+ * @class
4
+ * @extends {Layer}
5
+ * //TODO: make asynchronous handler.
6
+ * @param {String} [name="noname"] - Layer name.
7
+ * @param {Object} options:
8
+ * @param {number} [options.opacity=1.0] - Layer opacity.
9
+ * @param {number} [options.minZoom=0] - Minimal visibility zoom level.
10
+ * @param {number} [options.maxZoom=0] - Maximal visibility zoom level.
11
+ * @param {string} [options.attribution] - Layer attribution that displayed in the attribution area on the screen.
12
+ * @param {boolean} [options.isBaseLayer=false] - Base layer flag.
13
+ * @param {boolean} [options.visibility=true] - Layer visibility.
14
+ * @param {layer.CanvasTiles~drawTileCallback} [options.drawTile] - Draw tile callback.
15
+ * @fires og.layer.CanvasTiles#load
16
+ * @fires og.layer.CanvasTiles#loadend
17
+ */
18
+ export class CanvasTiles extends Layer {
19
+ constructor(name: any, options: any);
20
+ /**
21
+ * Current creating tiles couter.
22
+ * @protected
23
+ * @type {number}
24
+ */
25
+ protected _counter: number;
26
+ /**
27
+ * Tile pending queue that waiting for create.
28
+ * @protected
29
+ * @type {Array.<planetSegment.Material>}
30
+ */
31
+ protected _pendingsQueue: Array<planetSegment.Material>;
32
+ /**
33
+ * Draw tile callback.
34
+ * @type {layer.CanvasTiles~drawTileCallback}
35
+ * @public
36
+ */
37
+ public drawTile: layer.CanvasTiles;
38
+ /**
39
+ * Abort loading tiles.
40
+ * @public
41
+ */
42
+ public abortLoading(): void;
43
+ /**
44
+ * Start to load tile material.
45
+ * @public
46
+ * @virtual
47
+ * @param {Material} material -
48
+ */
49
+ public loadMaterial(material: Material): void;
50
+ /**
51
+ * Loads material image and apply it to the planet segment.
52
+ * @protected
53
+ * @param {Material} material - Loads material image.
54
+ */
55
+ protected _exec(material: Material): void;
56
+ /**
57
+ * Abort exact material loading.
58
+ * @public
59
+ * @param {Material} material - Segment material.
60
+ */
61
+ public abortMaterialLoading(material: Material): void;
62
+ _dequeueRequest(): void;
63
+ _whilePendings(): any;
64
+ applyMaterial(material: any): number[];
65
+ clearMaterial(material: any): void;
66
+ }
67
+ import { Layer } from "./Layer.js";
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Used to load and display a single image over specific corner coordinates on the globe, implements og.layer.BaseGeoImage interface.
3
+ * @class
4
+ * @extends {BaseGeoImage}
5
+ */
6
+ export class GeoImage extends BaseGeoImage {
7
+ /**
8
+ * Image object.
9
+ * @private
10
+ * @type {Image}
11
+ */
12
+ private _image;
13
+ /**
14
+ * Image source url path.
15
+ * @private
16
+ * @type {String}
17
+ */
18
+ private _src;
19
+ /**
20
+ * Sets image source url path.
21
+ * @public
22
+ * @param {String} srs - Image url path.
23
+ */
24
+ public setSrc(src: any): void;
25
+ /**
26
+ * Sets image object.
27
+ * @public
28
+ * @param {Image} image - Image object.
29
+ */
30
+ public setImage(image: new (width?: number, height?: number) => HTMLImageElement): void;
31
+ /**
32
+ * Creates source gl texture.
33
+ * @virtual
34
+ * @protected
35
+ */
36
+ protected _createSourceTexture(): void;
37
+ /**
38
+ * @private
39
+ * @param {Image} img
40
+ */
41
+ private _onLoad;
42
+ /**
43
+ * Loads planet segment material. In this case - GeoImage source image.
44
+ * @virtual
45
+ * @public
46
+ * @param {Material} material - GeoImage planet material.
47
+ */
48
+ public loadMaterial(material: Material): void;
49
+ _renderingProjType1(): void;
50
+ _renderingProjType0(): void;
51
+ }
52
+ import { BaseGeoImage } from "./BaseGeoImage.js";
@@ -0,0 +1,8 @@
1
+ export class GeoTexture2d extends BaseGeoImage {
2
+ loadMaterial(material: any): void;
3
+ bindTexture(texture: any): void;
4
+ setSize(width: any, height: any): void;
5
+ _renderingProjType1(): void;
6
+ _renderingProjType0(): void;
7
+ }
8
+ import { BaseGeoImage } from "./BaseGeoImage.js";
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Used to load and display a video stream by specific corners coordinates on the globe, implements og.layer.BaseGeoImage interface.
3
+ * @class
4
+ * @extends {BaseGeoImage}
5
+ */
6
+ export class GeoVideo extends BaseGeoImage {
7
+ /**
8
+ * HTML5 video element object.
9
+ * @private
10
+ * @type {Object}
11
+ */
12
+ private _video;
13
+ /**
14
+ * VIdeo source url path.
15
+ * @private
16
+ * @type {String}
17
+ */
18
+ private _src;
19
+ /**
20
+ * Sets video source url path.
21
+ * @public
22
+ * @param {String} srs - Video url path.
23
+ */
24
+ public setSrc(src: any): void;
25
+ /**
26
+ * Sets HTML5 video object.
27
+ * @public
28
+ * @param {Object} video - HTML5 video element object.
29
+ */
30
+ public setVideoElement(video: any): void;
31
+ /**
32
+ * Creates or refresh source video GL texture.
33
+ * @virtual
34
+ * @protected
35
+ */
36
+ protected _createSourceTexture(): void;
37
+ /**
38
+ * @private
39
+ */
40
+ private _onCanPlay;
41
+ /**
42
+ * @private
43
+ */
44
+ private _onError;
45
+ /**
46
+ * Loads planet segment material. In this case - GeoImage source video.
47
+ * @virtual
48
+ * @public
49
+ * @param {Material} material - GeoImage planet material.
50
+ */
51
+ public loadMaterial(material: Material): void;
52
+ _renderingProjType1(): void;
53
+ _renderingProjType0(): void;
54
+ }
55
+ import { BaseGeoImage } from "./BaseGeoImage.js";
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Layer to render KMLs files
3
+ * @class
4
+ * @extends {Vector}
5
+ */
6
+ export class KML extends Vector {
7
+ _billboard: any;
8
+ /**
9
+ * @type {string}
10
+ */
11
+ _color: string;
12
+ /**
13
+ * @private
14
+ */
15
+ private _extractCoordonatesFromKml;
16
+ /**
17
+ * Creates billboards or polylines from array of lonlat.
18
+ * @private
19
+ * @param {Array} coordonates
20
+ * @param {string} color
21
+ * @returns {Array<Entity>}
22
+ */
23
+ private _convertCoordonatesIntoEntities;
24
+ /**
25
+ * @private
26
+ * @returns {Document}
27
+ */
28
+ private _getXmlContent;
29
+ /**
30
+ * @private
31
+ */
32
+ private _expandExtents;
33
+ /**
34
+ * @public
35
+ * @param {File[]} kmls
36
+ * @param {string} [color]
37
+ * @param {Billboard} [billboard]
38
+ * @returns {Promise<{entities: Entity[], extent: Extent}>}
39
+ */
40
+ public addKmlFromFiles(kmls: File[], color?: string, billboard?: Billboard): Promise<{
41
+ entities: Entity[];
42
+ extent: Extent;
43
+ }>;
44
+ /**
45
+ * @param {string} color
46
+ * @public
47
+ */
48
+ public setColor(color: string): void;
49
+ /**
50
+ * @private
51
+ */
52
+ private _getKmlFromUrl;
53
+ /**
54
+ * @public
55
+ * @param {string} url - Url of the KML to display. './myFile.kml' or 'http://mySite/myFile.kml' for example.
56
+ * @param {string} [color]
57
+ * @param {Billboard} [billboard]
58
+ * @returns {Promise<{entities: Entity[], extent: Extent}>}
59
+ */
60
+ public addKmlFromUrl(url: string, color?: string, billboard?: Billboard): Promise<{
61
+ entities: Entity[];
62
+ extent: Extent;
63
+ }>;
64
+ }
65
+ import { Vector } from "./Vector.js";
66
+ import { Billboard } from "../entity/Billboard.js";
67
+ import { Entity } from "../entity/Entity.js";
68
+ import { Extent } from "../Extent.js";