@openglobus/og 0.15.5 → 0.16.0

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 (122) hide show
  1. package/README.md +1 -1
  2. package/css/og.css +1 -1
  3. package/dist/@openglobus/og.css +1 -1
  4. package/dist/@openglobus/og.esm.js +2 -2
  5. package/dist/@openglobus/og.esm.js.map +1 -1
  6. package/dist/@openglobus/og.umd.js +2 -2
  7. package/dist/@openglobus/og.umd.js.map +1 -1
  8. package/package.json +13 -14
  9. package/src/og/Globe.js +5 -2
  10. package/src/og/LonLat.js +18 -1
  11. package/src/og/Object3d.js +21 -2
  12. package/src/og/bv/index.js +2 -2
  13. package/src/og/camera/PlanetCamera.js +4 -10
  14. package/src/og/control/RulerSwitcher.js +2 -2
  15. package/src/og/control/ZoomControl.js +2 -2
  16. package/src/og/control/heightRuler/HeightRulerScene.js +6 -2
  17. package/src/og/control/index.js +5 -2
  18. package/src/og/control/ruler/RulerScene.js +11 -8
  19. package/src/og/control/timeline/TimelineControl.js +5 -3
  20. package/src/og/control/timeline/TimelineModel.js +4 -0
  21. package/src/og/control/timeline/TimelineView.js +10 -3
  22. package/src/og/control/visibleExtent/Segment.js +36 -42
  23. package/src/og/ellipsoid/Ellipsoid.js +23 -10
  24. package/src/og/entity/Entity.js +3 -3
  25. package/src/og/entity/EntityCollection.js +2 -2
  26. package/src/og/entity/Label.js +1 -1
  27. package/src/og/entity/Polyline.js +4 -2
  28. package/src/og/index.js +4 -7
  29. package/src/og/layer/CanvasTiles.js +70 -23
  30. package/src/og/layer/GeoImage.js +40 -18
  31. package/src/og/layer/Vector.js +14 -11
  32. package/src/og/layer/WMS.js +2 -2
  33. package/src/og/math.js +2 -1
  34. package/src/og/quadTree/EPSG4326QuadTreeStrategy.js +26 -0
  35. package/src/og/quadTree/Node.js +44 -50
  36. package/src/og/quadTree/index.js +2 -0
  37. package/src/og/renderer/Renderer.js +13 -1
  38. package/src/og/scene/Planet.js +4 -4
  39. package/src/og/scene/index.js +3 -3
  40. package/src/og/segment/Segment.js +88 -76
  41. package/src/og/terrain/EmptyTerrain.js +19 -7
  42. package/src/og/terrain/GlobusTerrain.js +23 -18
  43. package/src/og/terrain/MapboxTerrain.js +7 -8
  44. package/src/og/terrain/index.js +4 -4
  45. package/src/og/utils/objParser.js +227 -0
  46. package/src/og/utils/shared.js +9 -0
  47. package/src/og/webgl/Handler.js +1 -3
  48. package/types/Globe.d.ts +2 -0
  49. package/types/LonLat.d.ts +12 -1
  50. package/types/Object3d.d.ts +2 -0
  51. package/types/Popup.d.ts +1 -1
  52. package/types/bv/index.d.ts +2 -2
  53. package/types/camera/PlanetCamera.d.ts +0 -7
  54. package/types/camera/index.d.ts +2 -2
  55. package/types/control/GeoImageDragControl.d.ts +1 -1
  56. package/types/control/LayerAnimation.d.ts +1 -1
  57. package/types/control/Lighting.d.ts +2 -2
  58. package/types/control/heightRuler/HeightRulerScene.d.ts +1 -1
  59. package/types/control/index.d.ts +3 -2
  60. package/types/control/ruler/RulerScene.d.ts +5 -4
  61. package/types/control/selection/SelectionScene.d.ts +3 -3
  62. package/types/control/timeline/TimelineControl.d.ts +10 -0
  63. package/types/control/timeline/TimelineModel.d.ts +33 -0
  64. package/types/control/timeline/TimelineView.d.ts +57 -0
  65. package/types/control/timeline/timelineUtils.d.ts +9 -0
  66. package/types/ellipsoid/Ellipsoid.d.ts +16 -9
  67. package/types/ellipsoid/index.d.ts +2 -2
  68. package/types/entity/Entity.d.ts +3 -3
  69. package/types/entity/EntityCollection.d.ts +2 -2
  70. package/types/entity/Label.d.ts +1 -1
  71. package/types/entity/Polyline.d.ts +1 -0
  72. package/types/index.d.ts +45 -46
  73. package/types/layer/CanvasTiles.d.ts +2 -1
  74. package/types/layer/GeoImage.d.ts +7 -1
  75. package/types/layer/GeoTexture2d.d.ts +1 -1
  76. package/types/layer/Vector.d.ts +3 -3
  77. package/types/layer/index.d.ts +9 -9
  78. package/types/math/Line2.d.ts +1 -1
  79. package/types/math/Line3.d.ts +1 -1
  80. package/types/math/index.d.ts +10 -10
  81. package/types/mercator.d.ts +1 -1
  82. package/types/quadTree/EPSG4326QuadTreeStrategy.d.ts +3 -0
  83. package/types/quadTree/EntityCollectionNode.d.ts +1 -1
  84. package/types/quadTree/index.d.ts +2 -0
  85. package/types/renderer/Renderer.d.ts +2 -2
  86. package/types/scene/Axes.d.ts +1 -1
  87. package/types/scene/SkyBox.d.ts +1 -1
  88. package/types/scene/index.d.ts +3 -3
  89. package/types/segment/Segment.d.ts +9 -11
  90. package/types/shaders/atmos.d.ts +1 -1
  91. package/types/shaders/billboard.d.ts +1 -1
  92. package/types/shaders/depth.d.ts +1 -1
  93. package/types/shaders/label.d.ts +1 -1
  94. package/types/shaders/pickingMask.d.ts +1 -1
  95. package/types/shaders/pointCloud.d.ts +1 -1
  96. package/types/shaders/polyline.d.ts +1 -1
  97. package/types/shaders/ray.d.ts +1 -1
  98. package/types/shaders/screenFrame.d.ts +1 -1
  99. package/types/shaders/skybox.d.ts +1 -1
  100. package/types/shaders/toneMapping.d.ts +1 -1
  101. package/types/terrain/BilTerrain.d.ts +1 -0
  102. package/types/terrain/EmptyTerrain.d.ts +13 -2
  103. package/types/terrain/GlobusTerrain.d.ts +2 -1
  104. package/types/terrain/MapboxTerrain.d.ts +1 -3
  105. package/types/terrain/index.d.ts +4 -4
  106. package/types/ui/Button.d.ts +1 -1
  107. package/types/ui/ButtonGroup.d.ts +12 -0
  108. package/types/ui/Dialog.d.ts +2 -2
  109. package/types/ui/Slider.d.ts +1 -1
  110. package/types/ui/ToggleButton.d.ts +1 -1
  111. package/types/ui/View.d.ts +1 -1
  112. package/types/utils/GeoImageCreator.d.ts +2 -2
  113. package/types/utils/ImagesCacheManager.d.ts +1 -1
  114. package/types/utils/Loader.d.ts +1 -1
  115. package/types/utils/VectorTileCreator.d.ts +1 -1
  116. package/types/utils/objParser.d.ts +8 -0
  117. package/types/utils/shared.d.ts +6 -0
  118. package/types/webgl/Handler.d.ts +2 -2
  119. package/src/og/index.core.js +0 -116
  120. package/src/og/index.webgl.js +0 -17
  121. package/types/index.core.d.ts +0 -65
  122. package/types/index.webgl.d.ts +0 -7
@@ -7,4 +7,4 @@ export class ToggleButton extends Button {
7
7
  get isActive(): any;
8
8
  render(params: any): ToggleButton;
9
9
  }
10
- import { Button } from "./Button.js";
10
+ import { Button } from './Button.js';
@@ -30,4 +30,4 @@ export class View {
30
30
  selectAll(queryStr: any, callback: any): any;
31
31
  remove(): void;
32
32
  }
33
- import { Events } from "../Events.js";
33
+ import { Events } from '../Events.js';
@@ -26,5 +26,5 @@ export class GeoImageCreator {
26
26
  _quadVertexBuffer: any;
27
27
  _initShaders(): void;
28
28
  }
29
- import { Framebuffer } from "../webgl/Framebuffer.js";
30
- import { LonLat } from "../LonLat.js";
29
+ import { Framebuffer } from '../webgl/Framebuffer.js';
30
+ import { LonLat } from '../LonLat.js';
@@ -7,4 +7,4 @@ export class ImagesCacheManager {
7
7
  _exec(req: any): void;
8
8
  _dequeueRequest(): void;
9
9
  }
10
- import { QueueArray } from "../QueueArray.js";
10
+ import { QueueArray } from '../QueueArray.js';
@@ -28,4 +28,4 @@ export class Loader {
28
28
  abort(sender: any): void;
29
29
  abortAll(): void;
30
30
  }
31
- import { Events } from "../Events.js";
31
+ import { Events } from '../Events.js';
@@ -11,4 +11,4 @@ export class VectorTileCreator {
11
11
  add(material: any): void;
12
12
  remove(material: any): void;
13
13
  }
14
- import { Framebuffer } from "../webgl/Framebuffer.js";
14
+ import { Framebuffer } from '../webgl/Framebuffer.js';
@@ -0,0 +1,8 @@
1
+ export function objParser(text: any): {
2
+ geometries: any[];
3
+ materialLibs: any[];
4
+ };
5
+ export function transformLeftToRightCoordinateSystem(objData: any): {
6
+ geometries: any;
7
+ materialLibs: any;
8
+ };
@@ -221,6 +221,12 @@ export function cloneArray(items: any): any;
221
221
  * @returns {Promise<Image>} Returns promise.
222
222
  */
223
223
  export function loadImage(url: string): Promise<new (width?: number, height?: number) => HTMLImageElement>;
224
+ /**
225
+ * Gets image is loaded
226
+ * @param {HTMLImageElement} image
227
+ * @returns {boolean} Returns true is the image is loaded
228
+ */
229
+ export function isImageLoaded(image: HTMLImageElement): boolean;
224
230
  export namespace castType {
225
231
  function string(v: any): any;
226
232
  function date(v: any): any;
@@ -145,10 +145,10 @@ export class Handler {
145
145
  /**
146
146
  * Creates NEAREST filter texture.
147
147
  * @public
148
- * @param {Object} image - Image or Canvas object.
148
+ * @param {HTMLCanvasElement | Image} image - Image or Canvas object.
149
149
  * @returns {Object} - WebGL texture object.
150
150
  */
151
- public createTexture_n_webgl1(image: any, internalFormat: any, texture: any): any;
151
+ public createTexture_n_webgl1(image: HTMLCanvasElement | (new (width?: number, height?: number) => HTMLImageElement), internalFormat: any, texture: any): any;
152
152
  /**
153
153
  * Creates LINEAR filter texture.
154
154
  * @public
@@ -1,116 +0,0 @@
1
- 'use strict';
2
-
3
- import * as jd from './astro/jd.js';
4
- import * as math from './math.js';
5
- import * as utils from './utils/shared.js';
6
-
7
- import { Box } from './bv/Box.js';
8
- import { Sphere } from './bv/Sphere.js';
9
-
10
- import { Control } from './control/Control.js';
11
- import { DebugInfo } from './control/DebugInfo';
12
- import { ShowFps } from './control/ShowFps.js';
13
- import { SimpleNavigation } from './control/SimpleNavigation.js';
14
-
15
- import { Billboard } from './entity/Billboard.js';
16
- import { Entity } from './entity/Entity.js';
17
- import { EntityCollection } from './entity/EntityCollection.js';
18
- import { Label } from './entity/Label.js';
19
- import { PointCloud } from './entity/PointCloud.js';
20
- import { Polyline } from './entity/Polyline.js';
21
-
22
- import { input } from './input/input.js';
23
-
24
- import { Camera } from './camera/Camera.js';
25
-
26
- import { Line2 } from './math/Line2.js';
27
- import { Line3 } from './math/Line3.js';
28
- import { Mat3 } from './math/Mat3.js';
29
- import { Mat4 } from './math/Mat4.js';
30
- import { Plane } from './math/Plane.js';
31
- import { Quat } from './math/Quat.js';
32
- import { Ray } from './math/Ray.js';
33
- import { Vec2 } from './math/Vec2.js';
34
- import { Vec3 } from './math/Vec3.js';
35
- import { Vec4 } from './math/Vec4.js';
36
-
37
- import { Framebuffer } from './webgl/Framebuffer.js';
38
- import { Handler } from './webgl/Handler.js';
39
- import { Multisample } from './webgl/Multisample.js';
40
- import { Program } from './webgl/Program.js';
41
- import { types } from './webgl/types.js';
42
-
43
- import { Renderer } from './renderer/Renderer.js';
44
-
45
- import { LightSource } from './light/LightSource.js';
46
-
47
- import { Clock } from './Clock.js';
48
- import { Events } from './Events.js';
49
-
50
- import { Axes } from './scene/Axes.js';
51
- import { RenderNode } from './scene/RenderNode.js';
52
-
53
- import { TextureAtlas } from './utils/TextureAtlas.js';
54
-
55
- const bv = {
56
- Box: Box,
57
- Sphere: Sphere
58
- };
59
-
60
- const control = {
61
- DebugInfo: DebugInfo,
62
- SimpleNavigation: SimpleNavigation,
63
- ShowFps: ShowFps
64
- };
65
-
66
- const entity = {
67
- Billboard: Billboard,
68
- Label: Label,
69
- PointCloud: PointCloud,
70
- Polyline: Polyline
71
- };
72
-
73
- const webgl = {
74
- Framebuffer: Framebuffer,
75
- Handler: Handler,
76
- Multisample: Multisample,
77
- types: types,
78
- Program: Program
79
- };
80
-
81
- const scene = {
82
- Axes: Axes
83
- };
84
-
85
- export {
86
- bv,
87
- jd,
88
- math,
89
- utils,
90
- input,
91
- Control,
92
- control,
93
- webgl,
94
- Camera,
95
- LightSource,
96
- EntityCollection,
97
- Handler,
98
- Renderer,
99
- Clock,
100
- Events,
101
- scene,
102
- RenderNode,
103
- Line2,
104
- Line3,
105
- Mat3,
106
- Mat4,
107
- Plane,
108
- Quat,
109
- Ray,
110
- TextureAtlas,
111
- Vec2,
112
- Vec3,
113
- Vec4,
114
- entity,
115
- Entity
116
- };
@@ -1,17 +0,0 @@
1
- 'use strict';
2
-
3
- import { TextureAtlas } from './utils/TextureAtlas.js';
4
- import { Framebuffer } from './webgl/Framebuffer.js';
5
- import { Handler } from './webgl/Handler.js';
6
- import { Multisample } from './webgl/Multisample.js';
7
- import { Program } from './webgl/Program.js';
8
- import { types } from './webgl/types.js';
9
-
10
- export {
11
- Handler,
12
- Framebuffer,
13
- Multisample,
14
- types,
15
- Program,
16
- TextureAtlas
17
- };
@@ -1,65 +0,0 @@
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 };
@@ -1,7 +0,0 @@
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 };