@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,48 @@
1
+ /**
2
+ * Mouse planet camera dragging control.
3
+ * @class
4
+ * @extends {Control}
5
+ * @param {Object} [options] - Control options.
6
+ */
7
+ export class MouseNavigation extends Control {
8
+ static getMovePointsFromPixelTerrain(cam: any, planet: any, stepsCount: any, delta: any, point: any, forward: any, dir: any): {}[];
9
+ grabbedPoint: Vec3;
10
+ _eye0: Vec3;
11
+ pointOnEarth: Vec3;
12
+ earthUp: Vec3;
13
+ inertia: number;
14
+ grabbedSpheroid: Sphere;
15
+ planet: any;
16
+ qRot: Quat;
17
+ scaleRot: number;
18
+ distDiff: number;
19
+ stepsCount: number;
20
+ stepsForward: {}[];
21
+ stepIndex: number;
22
+ _lmbDoubleClickActive: boolean;
23
+ minSlope: any;
24
+ _wheelDirection: number;
25
+ _keyLock: Key;
26
+ activateDoubleClickZoom(): void;
27
+ deactivateDoubleClickZoom(): void;
28
+ onMouseEnter(e: any): void;
29
+ onMouseLeave(e: any): void;
30
+ onMouseWheel(event: any): void;
31
+ _deactivate: boolean;
32
+ onMouseLeftButtonDoubleClick(): void;
33
+ onMouseLeftButtonClick(): void;
34
+ stopRotation(): void;
35
+ onMouseLeftButtonUp(e: any): void;
36
+ onMouseLeftButtonDown(e: any): void;
37
+ onMouseRightButtonClick(e: any): void;
38
+ onMouseRightButtonDown(e: any): void;
39
+ onShiftFree(): void;
40
+ _shiftBusy: boolean;
41
+ onMouseMove(e: any): void;
42
+ onDraw(e: any): void;
43
+ }
44
+ import { Control } from "./Control.js";
45
+ import { Vec3 } from "../math/Vec3.js";
46
+ import { Sphere } from "../bv/Sphere.js";
47
+ import { Quat } from "../math/Quat.js";
48
+ import { Key } from "../Lock.js";
@@ -0,0 +1,45 @@
1
+ export function mouseWheelZoomControl(options: any): MouseWheelZoomControl;
2
+ /**
3
+ * Planet zoom buttons control.
4
+ * @class
5
+ * @extends {Control}
6
+ * @params {Object} [options] - Control options.
7
+ */
8
+ export class MouseWheelZoomControl extends Control {
9
+ grabbedPoint: Vec3;
10
+ _eye0: Vec3;
11
+ pointOnEarth: Vec3;
12
+ earthUp: Vec3;
13
+ inertia: number;
14
+ grabbedSpheroid: Sphere;
15
+ planet: any;
16
+ qRot: Quat;
17
+ scaleRot: number;
18
+ distDiff: number;
19
+ stepsCount: number;
20
+ stepsForward: {}[];
21
+ stepIndex: number;
22
+ _lmbDoubleClickActive: boolean;
23
+ minSlope: any;
24
+ _keyLock: Key;
25
+ /**
26
+ * Planet zoom in.
27
+ * @public
28
+ */
29
+ public zoomIn(): void;
30
+ _deactivate: boolean;
31
+ /**
32
+ * Planet zoom out.
33
+ * @public
34
+ */
35
+ public zoomOut(): void;
36
+ stopRotation(): void;
37
+ stopZoom(): void;
38
+ _move: number;
39
+ _draw(e: any): void;
40
+ }
41
+ import { Control } from "./Control.js";
42
+ import { Vec3 } from "../math/Vec3.js";
43
+ import { Sphere } from "../bv/Sphere.js";
44
+ import { Quat } from "../math/Quat.js";
45
+ import { Key } from "../Lock.js";
@@ -0,0 +1,22 @@
1
+ export function scaleControl(options: any): ScaleControl;
2
+ /**
3
+ * Planet zoom buttons control.
4
+ * @class
5
+ * @extends {Control}
6
+ * @params {Object} [options] - Control options.
7
+ */
8
+ export class ScaleControl extends Control {
9
+ constructor(options?: {});
10
+ _template: string;
11
+ planet: any;
12
+ _minWidth: number;
13
+ _maxWidth: number;
14
+ _renderTemplate(): ChildNode;
15
+ el: ChildNode;
16
+ _scaleLabelEl: any;
17
+ _draw(e: any): void;
18
+ _mPx: number;
19
+ currWidth: number;
20
+ _metersInMinSize: number;
21
+ }
22
+ import { Control } from "./Control.js";
@@ -0,0 +1,11 @@
1
+ export function showFps(options: any): ShowFps;
2
+ /**
3
+ * Frame per second(FPS) display control.
4
+ * @class
5
+ * @extends {Control}
6
+ * @param {Object} [options] - Control options.
7
+ */
8
+ export class ShowFps extends Control {
9
+ _draw(): void;
10
+ }
11
+ import { Control } from "./Control.js";
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Creates simple navigation control instance.
3
+ */
4
+ export function simpleNavigation(options: any): SimpleNavigation;
5
+ /**
6
+ * Simple keyboard camera navigation with W,S,A,D and shift keys to fly around the scene.
7
+ * @class
8
+ * @extends {Control}
9
+ * @param {Object} [options] - Control options.
10
+ */
11
+ export class SimpleNavigation extends Control {
12
+ camera: any;
13
+ speed: any;
14
+ onCameraMoveForward(): void;
15
+ onCameraMoveBackward(): void;
16
+ onCameraStrifeLeft(): void;
17
+ onCameraStrifeRight(): void;
18
+ onCameraLookUp(): void;
19
+ onCameraLookDown(): void;
20
+ onCameraTurnLeft(): void;
21
+ onCameraTurnRight(): void;
22
+ onCameraRollLeft(): void;
23
+ onCameraRollRight(): void;
24
+ }
25
+ import { Control } from "./Control.js";
@@ -0,0 +1,50 @@
1
+ export function sun(options: any): any;
2
+ /**
3
+ * Real Sun geocentric position control that place the Sun on the right place by the Earth.
4
+ * @class
5
+ * @extends {Control}
6
+ * @param {Object} [options] - Control options.
7
+ */
8
+ export class Sun extends Control {
9
+ /**
10
+ * Earth planet node.
11
+ * @public
12
+ * @type {Planet}
13
+ */
14
+ public planet: Planet;
15
+ /**
16
+ * Sunlight position placed in the camera eye.
17
+ * @private
18
+ * @type {boolean}
19
+ */
20
+ private offsetVertical;
21
+ offsetHorizontal: any;
22
+ /**
23
+ * Light source.
24
+ * @public
25
+ * @type {LightSource}
26
+ */
27
+ public sunlight: LightSource;
28
+ /**
29
+ * Current frame handler clock date and time.
30
+ * @private
31
+ * @type {Number}
32
+ */
33
+ private _currDate;
34
+ /**
35
+ * Previous frame handler clock date and time.
36
+ * @private
37
+ * @type {Number}
38
+ */
39
+ private _prevDate;
40
+ _clockPtr: any;
41
+ _lightOn: boolean;
42
+ _stopped: any;
43
+ stop(): void;
44
+ bindClock(clock: any): void;
45
+ _draw(): void;
46
+ _f: number;
47
+ _k: number;
48
+ }
49
+ import { Control } from "./Control.js";
50
+ import { LightSource } from "../light/LightSource.js";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Planet GL draw mode(TRIANGLE_STRIP/LINE_STRING) changer.
3
+ * @class
4
+ * @extends {Control}
5
+ * @param {Object} [options] - Control options.
6
+ */
7
+ export class ToggleWireframe extends Control {
8
+ constructor(options?: {});
9
+ _isActive: any;
10
+ toogleWireframe(e: any): void;
11
+ }
12
+ import { Control } from "./Control.js";
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Touch pad planet camera dragging control.
3
+ * @class
4
+ * @extends {Control}
5
+ * @param {Object} [options] - Control options.
6
+ */
7
+ export class TouchNavigation extends Control {
8
+ grabbedPoint: Vec3;
9
+ inertia: number;
10
+ grabbedSpheroid: Sphere;
11
+ planet: any;
12
+ qRot: Quat;
13
+ scaleRot: number;
14
+ rot: number;
15
+ _eye0: Vec3;
16
+ stepsCount: number;
17
+ stepsForward: any;
18
+ stepIndex: number;
19
+ pointOnEarth: any;
20
+ earthUp: any;
21
+ touches: Touch[];
22
+ _keyLock: Key;
23
+ onTouchStart(e: any): void;
24
+ _touching: boolean;
25
+ _startTouchOne(e: any): void;
26
+ stopRotation(): void;
27
+ onDoubleTouch(e: any): void;
28
+ onTouchEnd(e: any): void;
29
+ onTouchCancel(e: any): void;
30
+ onTouchMove(e: any): void;
31
+ onDraw(e: any): void;
32
+ }
33
+ import { Control } from "./Control.js";
34
+ import { Vec3 } from "../math/Vec3.js";
35
+ import { Sphere } from "../bv/Sphere.js";
36
+ import { Quat } from "../math/Quat.js";
37
+ declare class Touch {
38
+ x: number;
39
+ y: number;
40
+ prev_x: number;
41
+ prev_y: number;
42
+ grabbedPoint: Vec3;
43
+ grabbedSpheroid: Sphere;
44
+ dX: () => number;
45
+ dY: () => number;
46
+ }
47
+ import { Key } from "../Lock.js";
48
+ export {};
@@ -0,0 +1,27 @@
1
+ export function zoomControl(options: any): ZoomControl;
2
+ /**
3
+ * Planet zoom buttons control.
4
+ * @class
5
+ * @extends {Control}
6
+ * @params {Object} [options] - Control options.
7
+ */
8
+ export class ZoomControl extends Control {
9
+ _keyLock: Key;
10
+ planet: any;
11
+ _move: number;
12
+ /**
13
+ * Planet zoom in.
14
+ * @public
15
+ */
16
+ public zoomIn(): void;
17
+ _targetPoint: any;
18
+ /**
19
+ * Planet zoom out.
20
+ * @public
21
+ */
22
+ public zoomOut(): void;
23
+ stopZoom(): void;
24
+ _draw(e: any): void;
25
+ }
26
+ import { Control } from "./Control.js";
27
+ import { Key } from "../Lock.js";
@@ -0,0 +1,18 @@
1
+ import { Control } from "./Control.js";
2
+ import { CompassButton } from "./CompassButton.js";
3
+ import { DebugInfo } from "./DebugInfo";
4
+ import { EarthNavigation } from "./EarthNavigation.js";
5
+ import { EarthCoordinates } from "./EarthCoordinates.js";
6
+ import { GeoImageDragControl } from "./GeoImageDragControl.js";
7
+ import { KeyboardNavigation } from "./KeyboardNavigation.js";
8
+ import { LayerSwitcher } from "./LayerSwitcher.js";
9
+ import { MouseNavigation } from "./MouseNavigation.js";
10
+ import { ToggleWireframe } from "./ToggleWireframe.js";
11
+ import { TouchNavigation } from "./TouchNavigation.js";
12
+ import { SimpleNavigation } from "./SimpleNavigation.js";
13
+ import { ShowFps } from "./ShowFps.js";
14
+ import { Sun } from "./Sun.js";
15
+ import { ZoomControl } from "./ZoomControl.js";
16
+ import { MouseWheelZoomControl } from "./MouseWheelZoomControl.js";
17
+ import { Lighting } from "./Lighting.js";
18
+ export { Control, CompassButton, DebugInfo, EarthNavigation, EarthCoordinates, GeoImageDragControl, KeyboardNavigation, LayerSwitcher, MouseNavigation, ToggleWireframe, TouchNavigation, SimpleNavigation, ShowFps, Sun, ZoomControl, MouseWheelZoomControl, Lighting };
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Class represents a plant ellipsoid.
3
+ * @class
4
+ * @param {number} equatorialSize - Equatorial ellipsoid size.
5
+ * @param {number} polarSize - Polar ellipsoid size.
6
+ */
7
+ export class Ellipsoid {
8
+ static getRelativeBearing(a: any, b: any): number;
9
+ /**
10
+ * Returns the midpoint between two points on the great circle.
11
+ * @param {LonLat} lonLat1 - Longitude/latitude of first point.
12
+ * @param {LonLat} lonLat2 - Longitude/latitude of second point.
13
+ * @return {LonLat} Midpoint between points.
14
+ */
15
+ static getMiddlePointOnGreatCircle(lonLat1: LonLat, lonLat2: LonLat): LonLat;
16
+ /**
17
+ * Returns the point at given fraction between two points on the great circle.
18
+ * @param {LonLat} lonLat1 - Longitude/Latitude of source point.
19
+ * @param {LonLat} lonLat2 - Longitude/Latitude of destination point.
20
+ * @param {number} fraction - Fraction between the two points (0 = source point, 1 = destination point).
21
+ * @returns {LonLat} Intermediate point between points.
22
+ */
23
+ static getIntermediatePointOnGreatCircle(lonLat1: LonLat, lonLat2: LonLat, fraction: number): LonLat;
24
+ static getRhumbBearing(lonLat1: any, lonLat2: any): number;
25
+ static getBearing(lonLat1: any, lonLat2: any): number;
26
+ /**
27
+ * Returns the (initial) bearing from source to destination point on the great circle.
28
+ * @param {LonLat} lonLat1 - Longitude/latitude of source point.
29
+ * @param {LonLat} lonLat2 - Longitude/latitude of destination point.
30
+ * @return {number} Initial bearing in degrees from north.
31
+ */
32
+ static getInitialBearing(lonLat1: LonLat, lonLat2: LonLat): number;
33
+ /**
34
+ * Returns the point of intersection of two paths defined by point and bearing.
35
+ * @param {LonLat} p1 - First point.
36
+ * @param {number} brng1 - Initial bearing from first point.
37
+ * @param {LonLat} p2 - Second point.
38
+ * @param {number} brng2 - Initial bearing from second point.
39
+ * @return {LonLat|null} Destination point (null if no unique intersection defined).
40
+ */
41
+ static intersection(p1: LonLat, brng1: number, p2: LonLat, brng2: number): LonLat | null;
42
+ /**
43
+ * Returns final bearing arriving at destination destination point from lonLat1 point; the final bearing
44
+ * will differ from the initial bearing by varying degrees according to distance and latitude.
45
+ * @param {LonLat} lonLat1 - Longitude/latitude of source point.
46
+ * @param {LonLat} lonLat2 - Longitude/latitude of destination point.
47
+ * @return {number} Final bearing in degrees from north.
48
+ */
49
+ static getFinalBearing(lonLat1: LonLat, lonLat2: LonLat): number;
50
+ /**
51
+ * @param {number} equatorialSize - Equatorial ellipsoid size.
52
+ * @param {number} polarSize - Polar ellipsoid size.
53
+ */
54
+ constructor(equatorialSize: number, polarSize: number);
55
+ _a: number;
56
+ _b: number;
57
+ _flattening: number;
58
+ _f: number;
59
+ _a2: number;
60
+ _b2: number;
61
+ _e: number;
62
+ _e2: number;
63
+ _e22: number;
64
+ _k: number;
65
+ _k2: number;
66
+ _radii: Vec3;
67
+ _radii2: Vec3;
68
+ _invRadii: Vec3;
69
+ _invRadii2: Vec3;
70
+ /**
71
+ * Gets ellipsoid equatorial size.
72
+ * @public
73
+ * @returns {number} -
74
+ */
75
+ public getEquatorialSize(): number;
76
+ /**
77
+ * Gets ellipsoid polar size.
78
+ * @public
79
+ * @returns {number} -
80
+ */
81
+ public getPolarSize(): number;
82
+ /**
83
+ * Gets cartesian ECEF from Wgs84 geodetic coordiantes.
84
+ * @public
85
+ * @param {LonLat} lonlat - Degrees geodetic coordiantes.
86
+ * @returns {Vec3} -
87
+ */
88
+ public lonLatToCartesian(lonlat: LonLat): Vec3;
89
+ /**
90
+ * Gets cartesian ECEF from Wgs84 geodetic coordiantes.
91
+ * @public
92
+ * @param {LonLat} lonlat - Degrees geodetic coordiantes.
93
+ * @param {Vec3} res - Output result.
94
+ * @returns {Vec3} -
95
+ */
96
+ public lonLatToCartesianRes(lonlat: LonLat, res: Vec3): Vec3;
97
+ /**
98
+ * Gets cartesian ECEF from Wgs84 geodetic coordiantes.
99
+ * @public
100
+ * @param {Number} lon - Longitude.
101
+ * @param {Number} lat - Latitude.
102
+ * @param {Number} height - Height.
103
+ * @returns {Vec3} -
104
+ */
105
+ public geodeticToCartesian(lon: number, lat: number, height?: number): Vec3;
106
+ /**
107
+ * Gets Wgs84 geodetic coordiantes from cartesian ECEF.
108
+ * @public
109
+ * @param {Vec3} cartesian - Cartesian coordinates.
110
+ * @returns {LonLat} -
111
+ */
112
+ public cartesianToLonLat(cartesian: Vec3): LonLat;
113
+ /**
114
+ * Gets ellipsoid surface normal.
115
+ * @public
116
+ * @param {Vec3} coord - Spatial coordiantes.
117
+ * @returns {Vec3} -
118
+ */
119
+ public getSurfaceNormal3v(coord: Vec3): Vec3;
120
+ getBearingDestination(lonLat1: any, bearing: any, distance: any): LonLat;
121
+ /**
122
+ * Returns the distance from one point to another(using haversine formula) on the great circle.
123
+ * @param {LonLat} lonLat1 - Longitude/latitude of source point.
124
+ * @param {LonLat} lonLat2 - Longitude/latitude of destination point.
125
+ * @return {number} Distance between points.
126
+ */
127
+ getGreatCircleDistance(lonLat1: LonLat, lonLat2: LonLat): number;
128
+ /**
129
+ * Calculates the destination point given start point lat / lon, bearing(deg) and distance (m).
130
+ *
131
+ * Taken from http://movable-type.co.uk/scripts/latlong-vincenty-direct.html and optimized / cleaned up by Mathias Bynens <http://mathiasbynens.be/>
132
+ * Based on the Vincenty direct formula by T. Vincenty, “Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations”, Survey Review, vol XXII no 176, 1975 <http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf>
133
+ */
134
+ getGreatCircleDestination(lonLat: any, brng: any, dist: any): LonLat;
135
+ /**
136
+ * Returns ray vector hit ellipsoid coordinates.
137
+ * If the ray doesn't hit ellipsoid returns null.
138
+ * @public
139
+ * @param {Vec3} origin - Ray origin point.
140
+ * @param {Vec3} direction - Ray direction.
141
+ * @returns {Vec3} -
142
+ */
143
+ public hitRay(origin: Vec3, direction: Vec3): Vec3;
144
+ }
145
+ import { Vec3 } from "../math/Vec3.js";
146
+ import { LonLat } from "../LonLat.js";
@@ -0,0 +1,3 @@
1
+ import { Ellipsoid } from "./Ellipsoid.js";
2
+ import { wgs84 } from "./wgs84.js";
3
+ export { Ellipsoid, wgs84 };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * WGS84 ellipsoid object.
3
+ * @type {Ellipsoid}
4
+ */
5
+ export const wgs84: Ellipsoid;
6
+ import { Ellipsoid } from "./Ellipsoid.js";
@@ -0,0 +1,215 @@
1
+ /**
2
+ * Base prototype for billboard and label classes.
3
+ * @class
4
+ * @param {Object} [options] - Options:
5
+ * @param {Vec3|Array.<number>} [options.position] - Billboard spatial position.
6
+ * @param {number} [options.rotation] - Screen angle rotaion.
7
+ * @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
8
+ * @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
9
+ * @param {Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
10
+ * @param {boolean} [options.visibility] - Visibility.
11
+ */
12
+ export class BaseBillboard {
13
+ static set _staticCounter(arg: any);
14
+ static get _staticCounter(): any;
15
+ constructor(options: any);
16
+ /**
17
+ * Object unic identifier.
18
+ * @public
19
+ * @readonly
20
+ * @type {number}
21
+ */
22
+ public readonly id: number;
23
+ /**
24
+ * Billboard center cartesian position.
25
+ * @protected
26
+ * @type {Vec3}
27
+ */
28
+ protected _position: Vec3;
29
+ _positionHigh: Vec3;
30
+ _positionLow: Vec3;
31
+ /**
32
+ * Screen space rotation angle.
33
+ * @protected
34
+ * @type {number}
35
+ */
36
+ protected _rotation: number;
37
+ /**
38
+ * RGBA color.
39
+ * @protected
40
+ * @type {Vec4}
41
+ */
42
+ protected _color: Vec4;
43
+ /**
44
+ * Cartesian aligned axis vector.
45
+ * @protected
46
+ * @type {Vec3}
47
+ */
48
+ protected _alignedAxis: Vec3;
49
+ /**
50
+ * Billboard center screen space offset. Where x,y - screen space offset and z - depth offset.
51
+ * @protected
52
+ * @type {math.Vecto3}
53
+ */
54
+ protected _offset: math.Vecto3;
55
+ /**
56
+ * Billboard visibility.
57
+ * @protected
58
+ * @type {boolean}
59
+ */
60
+ protected _visibility: boolean;
61
+ /**
62
+ * Entity instance that holds this billboard.
63
+ * @protected
64
+ * @type {Entity}
65
+ */
66
+ protected _entity: Entity;
67
+ /**
68
+ * Handler that stores and renders this billboard object.
69
+ * @protected
70
+ * @type {BillboardHandler}
71
+ */
72
+ protected _handler: BillboardHandler;
73
+ /**
74
+ * Billboard handler array index.
75
+ * @protected
76
+ * @type {number}
77
+ */
78
+ protected _handlerIndex: number;
79
+ /**
80
+ * An indication that the object is ready to draw
81
+ * @protected
82
+ * @type {number}
83
+ */
84
+ protected _isReady: number;
85
+ _lockId: number;
86
+ /**
87
+ * Sets billboard position.
88
+ * @public
89
+ * @param {number} x - X coordinate.
90
+ * @param {number} y - Y coordinate.
91
+ * @param {number} z - Z coordinate.
92
+ */
93
+ public setPosition(x: number, y: number, z: number): void;
94
+ /**
95
+ * Sets billboard position.
96
+ * @public
97
+ * @param {Vec3} position - Cartesian coordinates.
98
+ */
99
+ public setPosition3v(position: Vec3): void;
100
+ /**
101
+ * Returns billboard position.
102
+ * @public
103
+ * @returns {Vec3}
104
+ */
105
+ public getPosition(): Vec3;
106
+ /**
107
+ * Sets screen space offset.
108
+ * @public
109
+ * @param {number} x - X offset.
110
+ * @param {number} y - Y offset.
111
+ * @param {number} [z] - Z offset.
112
+ */
113
+ public setOffset(x: number, y: number, z?: number): void;
114
+ /**
115
+ * Sets screen space offset.
116
+ * @public
117
+ * @param {Vec2} offset - Offset size.
118
+ */
119
+ public setOffset3v(offset: Vec2): void;
120
+ /**
121
+ * Returns billboard screen space offset size.
122
+ * @public
123
+ * @returns {Vec3}
124
+ */
125
+ public getOffset(): Vec3;
126
+ /**
127
+ * Sets billboard screen space rotation in radians.
128
+ * @public
129
+ * @param {number} rotation - Screen space rotation in radians.
130
+ */
131
+ public setRotation(rotation: number): void;
132
+ /**
133
+ * Gets screen space rotation.
134
+ * @public
135
+ * @returns {number}
136
+ */
137
+ public getRotation(): number;
138
+ /**
139
+ * Sets billboard opacity.
140
+ * @public
141
+ * @param {number} a - Billboard opacity.
142
+ */
143
+ public setOpacity(a: number): void;
144
+ /**
145
+ * Sets RGBA color. Each channel from 0.0 to 1.0.
146
+ * @public
147
+ * @param {number} r - Red.
148
+ * @param {number} g - Green.
149
+ * @param {number} b - Blue.
150
+ * @param {number} a - Alpha.
151
+ */
152
+ public setColor(r: number, g: number, b: number, a: number): void;
153
+ /**
154
+ * Sets RGBA color. Each channel from 0.0 to 1.0.
155
+ * @public
156
+ * @param {Vec4} color - RGBA vector.
157
+ */
158
+ public setColor4v(color: Vec4): void;
159
+ /**
160
+ * Sets billboard color.
161
+ * @public
162
+ * @param {string} color - HTML style color.
163
+ */
164
+ public setColorHTML(color: string): void;
165
+ /**
166
+ * Returns RGBA color.
167
+ * @public
168
+ * @returns {Vec4}
169
+ */
170
+ public getColor(): Vec4;
171
+ /**
172
+ * Sets billboard visibility.
173
+ * @public
174
+ * @param {boolean} visibility - Visibility flag.
175
+ */
176
+ public setVisibility(visibility: boolean): void;
177
+ /**
178
+ * Returns billboard visibility.
179
+ * @public
180
+ * @returns {boolean}
181
+ */
182
+ public getVisibility(): boolean;
183
+ /**
184
+ * Sets billboard cartesian aligned vector.
185
+ * @public
186
+ * @param {number} x - Aligned vector X coordinate.
187
+ * @param {number} y - Aligned vector Y coordinate.
188
+ * @param {number} z - Aligned vector Z coordinate.
189
+ */
190
+ public setAlignedAxis(x: number, y: number, z: number): void;
191
+ /**
192
+ * Sets billboard aligned vector.
193
+ * @public
194
+ * @param {math.Vecto3} alignedAxis - Vector to align.
195
+ */
196
+ public setAlignedAxis3v(alignedAxis: math.Vecto3): void;
197
+ /**
198
+ * Returns aligned vector.
199
+ * @public
200
+ * @returns {Vec3}
201
+ */
202
+ public getAlignedAxis(): Vec3;
203
+ /**
204
+ * Removes billboard from hander.
205
+ * @public
206
+ */
207
+ public remove(): void;
208
+ /**
209
+ * Sets billboard picking color.
210
+ * @public
211
+ * @param {Vec3} color - Picking color.
212
+ */
213
+ public setPickingColor3v(color: Vec3): void;
214
+ }
215
+ import { Vec3 } from "../math/Vec3.js";