@openglobus/og 0.14.4 → 0.15.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 (102) hide show
  1. package/css/og.css +377 -274
  2. package/dist/@openglobus/og.css +1 -1
  3. package/dist/@openglobus/og.esm.js +2 -2
  4. package/dist/@openglobus/og.esm.js.map +1 -1
  5. package/dist/@openglobus/og.umd.js +2 -2
  6. package/dist/@openglobus/og.umd.js.map +1 -1
  7. package/package.json +18 -17
  8. package/src/og/Clock.js +218 -194
  9. package/src/og/Globe.js +1 -3
  10. package/src/og/Object3d.js +104 -145
  11. package/src/og/camera/Camera.js +23 -19
  12. package/src/og/cons.js +107 -107
  13. package/src/og/control/Atmosphere.js +396 -0
  14. package/src/og/control/CompassButton.js +11 -18
  15. package/src/og/control/Control.js +187 -188
  16. package/src/og/control/GeoImageDragControl.js +84 -66
  17. package/src/og/control/LayerSwitcher.js +46 -145
  18. package/src/og/control/Lighting.js +314 -186
  19. package/src/og/control/RulerSwitcher.js +24 -19
  20. package/src/og/control/SimpleSkyBackground.js +38 -12
  21. package/src/og/control/Sun.js +2 -0
  22. package/src/og/control/ZoomControl.js +30 -42
  23. package/src/og/control/ruler/RulerScene.js +5 -23
  24. package/src/og/control/selection/Selection.js +21 -50
  25. package/src/og/control/selection/SelectionScene.js +15 -29
  26. package/src/og/control/timeline/TimelineControl.js +99 -0
  27. package/src/og/control/timeline/TimelineModel.js +133 -0
  28. package/src/og/control/timeline/TimelineView.js +449 -0
  29. package/src/og/control/timeline/timelineUtils.js +132 -0
  30. package/src/og/entity/Entity.js +30 -3
  31. package/src/og/entity/EntityCollection.js +0 -2
  32. package/src/og/entity/GeoObject.js +72 -56
  33. package/src/og/entity/GeoObjectHandler.js +487 -656
  34. package/src/og/input/input.js +3 -1
  35. package/src/og/layer/CanvasTiles.js +39 -34
  36. package/src/og/layer/Layer.js +2 -0
  37. package/src/og/layer/Material.js +1 -8
  38. package/src/og/light/LightSource.js +2 -0
  39. package/src/og/quadTree/Node.js +2 -1
  40. package/src/og/renderer/Renderer.js +26 -42
  41. package/src/og/renderer/RendererEvents.js +4 -4
  42. package/src/og/scene/Planet.js +276 -59
  43. package/src/og/scene/RenderNode.js +27 -12
  44. package/src/og/segment/Segment.js +0 -5
  45. package/src/og/shaders/atmos.js +332 -0
  46. package/src/og/shaders/drawnode.js +475 -109
  47. package/src/og/shaders/geoObject.js +96 -51
  48. package/src/og/shaders/polyline.js +212 -17
  49. package/src/og/shaders/utils.js +88 -0
  50. package/src/og/terrain/GlobusTerrain.js +2 -2
  51. package/src/og/ui/Button.js +106 -0
  52. package/src/og/ui/ButtonGroup.js +57 -0
  53. package/src/og/ui/Dialog.js +242 -0
  54. package/src/og/ui/Slider.js +144 -0
  55. package/src/og/ui/ToggleButton.js +51 -0
  56. package/src/og/ui/View.js +190 -0
  57. package/src/og/utils/shared.js +51 -33
  58. package/src/og/webgl/Framebuffer.js +308 -387
  59. package/src/og/webgl/Handler.js +68 -21
  60. package/src/og/webgl/Multisample.js +8 -0
  61. package/types/Clock.d.ts +7 -2
  62. package/types/Object3d.d.ts +14 -3
  63. package/types/camera/Camera.d.ts +15 -14
  64. package/types/control/Atmosphere.d.ts +15 -0
  65. package/types/control/CompassButton.d.ts +1 -2
  66. package/types/control/GeoImageDragControl.d.ts +7 -1
  67. package/types/control/LayerSwitcher.d.ts +4 -5
  68. package/types/control/Lighting.d.ts +32 -7
  69. package/types/control/SimpleSkyBackground.d.ts +4 -0
  70. package/types/control/ZoomControl.d.ts +0 -1
  71. package/types/control/ruler/RulerScene.d.ts +0 -1
  72. package/types/control/selection/Selection.d.ts +2 -4
  73. package/types/control/selection/SelectionScene.d.ts +0 -1
  74. package/types/entity/Entity.d.ts +8 -0
  75. package/types/entity/GeoObject.d.ts +28 -22
  76. package/types/entity/GeoObjectHandler.d.ts +16 -56
  77. package/types/input/input.d.ts +2 -0
  78. package/types/layer/CanvasTiles.d.ts +1 -0
  79. package/types/layer/Layer.d.ts +1 -0
  80. package/types/math/Plane.d.ts +1 -1
  81. package/types/renderer/Renderer.d.ts +7 -1
  82. package/types/scene/Planet.d.ts +20 -2
  83. package/types/scene/RenderNode.d.ts +2 -1
  84. package/types/segment/Segment.d.ts +1 -1
  85. package/types/shaders/atmos.d.ts +4 -0
  86. package/types/shaders/drawnode.d.ts +3 -2
  87. package/types/shaders/utils.d.ts +1 -0
  88. package/types/terrain/GlobusTerrain.d.ts +1 -1
  89. package/types/ui/Button.d.ts +21 -0
  90. package/types/ui/Dialog.d.ts +41 -0
  91. package/types/ui/Slider.d.ts +30 -0
  92. package/types/ui/ToggleButton.d.ts +10 -0
  93. package/types/ui/View.d.ts +32 -0
  94. package/types/utils/shared.d.ts +16 -14
  95. package/types/webgl/Framebuffer.d.ts +2 -5
  96. package/types/webgl/Handler.d.ts +11 -9
  97. package/types/webgl/Multisample.d.ts +2 -0
  98. package/src/og/ajax.js +0 -204
  99. package/src/og/entity/Object3d.js +0 -504
  100. package/types/ajax.d.ts +0 -24
  101. /package/src/og/{control → ui}/UIhelpers.js +0 -0
  102. /package/types/{control → ui}/UIhelpers.d.ts +0 -0
@@ -2,6 +2,7 @@ export class GeoObjectHandler {
2
2
  static set _staticCounter(arg: any);
3
3
  static get _staticCounter(): any;
4
4
  constructor(entityCollection: any);
5
+ __staticId: number;
5
6
  /**
6
7
  * Picking rendering option.
7
8
  * @public
@@ -9,73 +10,32 @@ export class GeoObjectHandler {
9
10
  */
10
11
  public pickingEnabled: boolean;
11
12
  _entityCollection: any;
12
- _renderer: any;
13
13
  _planet: any;
14
14
  _geoObjects: any[];
15
- _pitchRollArr: any[][];
16
- _sizeArr: any[][];
17
- _vertexArr: any[][];
18
- _positionHighArr: any[][];
19
- _positionLowArr: any[][];
20
- _directionArr: any[][];
21
- _rgbaArr: any[][];
22
- _normalsArr: any[][];
23
- _indicesArr: any[][];
24
- _pickingColorArr: any[][];
25
- _vehicleVisibleArr: any[][];
26
- _pitchRollBuffer: any[];
27
- _sizeBuffer: any[];
28
- _vertexBuffer: any[];
29
- _positionHighBuffer: any[];
30
- _positionLowBuffer: any[];
31
- _directionBuffer: any[];
32
- _rgbaBuffer: any[];
33
- _normalsBuffer: any[];
34
- _indicesBuffer: any[];
35
- _pickingColorBuffer: any[];
36
- _vehicleVisibleBuffer: any[];
37
- __staticId: number;
38
- _buffersUpdateCallbacks: (() => void)[];
39
- _changedBuffers: any[];
40
- _instancedTags: Map<any, any>;
41
- getObjectByIndex(index: any): any;
42
- createVertexBuffer(): void;
43
- createPitchRollBuffer(): void;
44
- createVisibleBuffer(): void;
45
- createSizeBuffer(): void;
46
- createPositionBuffer(): void;
47
- createRgbaBuffer(): void;
48
- createDirectionBuffer(): void;
49
- createNormalsBuffer(): void;
50
- createIndicesBuffer(): void;
51
- createPickingColorBuffer(): void;
15
+ _instanceDataMap: Map<any, any>;
16
+ _instanceDataMapValues: any[];
17
+ _dataTagUpdateQueue: any[];
52
18
  initProgram(): void;
53
19
  setRenderNode(renderNode: any): void;
54
- setRenderer(planet: any): void;
55
20
  _addGeoObjectToArray(geoObject: any): void;
56
21
  _displayPASS(): void;
57
22
  drawPicking(): void;
58
23
  _pickingPASS(): void;
59
- _recalculateIndices(startIndex: any): void;
60
- _addIndices(g: any): void;
61
- _removeIndices(geoObject: any): void;
62
- setDirectionArr(index: any, direction: any): void;
63
- setVisibility(index: any, visibility: any): void;
64
- setPositionArr(index: any, positionHigh: any, positionLow: any): void;
65
- setRgbaArr(index: any, rgba: any): void;
66
- getTagIndexByObjectIndex(index: any): any;
67
- getTagDataByObjectIndex(index: any): any;
68
- setPickingColorArr(index: any, color: any): void;
69
- setPitchRollArr(index: any, pitch: any, roll: any): void;
70
- setScaleArr(index: any, scale: any): void;
71
- refresh(): void;
72
- _removeGeoObjects(): void;
73
- clear(): void;
74
- _deleteBuffers(): void;
24
+ _loadDataTagTexture(tagData: any): Promise<void>;
25
+ setDirectionArr(tagData: any, tagDataIndex: any, direction: any): void;
26
+ setVisibility(tagData: any, tagDataIndex: any, visibility: any): void;
27
+ setPositionArr(tagData: any, tagDataIndex: any, positionHigh: any, positionLow: any): void;
28
+ setRgbaArr(tagData: any, tagDataIndex: any, rgba: any): void;
29
+ setPickingColorArr(tagData: any, tagDataIndex: any, color: any): void;
30
+ setPitchRollArr(tagData: any, tagDataIndex: any, pitch: any, roll: any): void;
31
+ setScaleArr(tagData: any, tagDataIndex: any, scale: any): void;
32
+ _updateTag(dataTag: any): void;
75
33
  update(): void;
34
+ _removeAll(): void;
35
+ clear(): void;
76
36
  draw(): void;
77
- _reindexGeoObjects(startIndex: any, tag: any): void;
78
37
  add(geoObject: any): void;
79
38
  remove(geoObject: any): void;
39
+ _clearDataTagQueue(): void;
80
40
  _removeGeoObject(geoObject: any): void;
81
41
  }
@@ -37,4 +37,6 @@ export namespace input {
37
37
  const MB_LEFT: number;
38
38
  const MB_RIGHT: number;
39
39
  const MB_MIDDLE: number;
40
+ const KEY_BACK_SLASH: number;
41
+ const KEY_SINGLE_QUOTE: number;
40
42
  }
@@ -16,6 +16,7 @@
16
16
  * @fires og.layer.CanvasTiles#loadend
17
17
  */
18
18
  export class CanvasTiles extends Layer {
19
+ animated: any;
19
20
  minNativeZoom: any;
20
21
  /**
21
22
  * Current creating tiles couter.
@@ -161,6 +161,7 @@ export class Layer {
161
161
  _ambient: Float32Array;
162
162
  _diffuse: Float32Array;
163
163
  _specular: Float32Array;
164
+ nightTextureCoefficient: any;
164
165
  set diffuse(arg: any);
165
166
  set ambient(arg: any);
166
167
  set specular(arg: any);
@@ -13,6 +13,6 @@ export class Plane {
13
13
  distance(p: any): any;
14
14
  getProjection(v: any, def: any): Vec3;
15
15
  getProjectionPoint(p: any, vh: any): any;
16
- getIntersection(Pn1: any, Pn2: any, L: any): 1 | 0 | 2;
16
+ getIntersection(Pn1: any, Pn2: any, L: any): 0 | 1 | 2;
17
17
  }
18
18
  import { Vec3 } from "./Vec3.js";
@@ -102,6 +102,12 @@ export class Renderer {
102
102
  * @type {utils.TextureAtlas}
103
103
  */
104
104
  protected billboardsTextureAtlas: utils.TextureAtlas;
105
+ /**
106
+ * Texture atlas for the billboards images. One atlas per node.
107
+ * @protected
108
+ * @type {utils.TextureAtlas}
109
+ */
110
+ protected geoObjectsTextureAtlas: utils.TextureAtlas;
105
111
  /**
106
112
  * Texture font atlas for the font families and styles. One atlas per node.
107
113
  * @public
@@ -194,7 +200,7 @@ export class Renderer {
194
200
  depth: any;
195
201
  frustum: any;
196
202
  };
197
- _screenFrameCornersBuffer: any;
203
+ screenFramePositionBuffer: any;
198
204
  outputTexture: any;
199
205
  resize(): void;
200
206
  setCurrentScreen(screenName: any): void;
@@ -252,13 +252,27 @@ export class Planet extends RenderNode {
252
252
  _terrainCompleted: boolean;
253
253
  _terrainCompletedActivated: boolean;
254
254
  _collectRenderNodesIsActive: boolean;
255
- _skipPreRender: boolean;
255
+ /**
256
+ * Night texture brightness coefficient
257
+ * @type {number}
258
+ */
259
+ nightTextureCoefficient: number;
260
+ _renderScreenNodesPASS: () => void;
261
+ _atmosphereEnabled: any;
262
+ _atmosphereMaxMinOpacity: Float32Array;
263
+ set atmosphereMaxOpacity(arg: number);
264
+ get atmosphereMaxOpacity(): number;
265
+ set atmosphereMinOpacity(arg: number);
266
+ get atmosphereMinOpacity(): number;
267
+ set atmosphereEnabled(arg: any);
268
+ get atmosphereEnabled(): any;
256
269
  set diffuse(arg: any);
257
270
  set ambient(arg: any);
258
271
  set specular(arg: any);
259
272
  set shininess(arg: any);
260
273
  get normalMapCreator(): NormalMapCreator;
261
274
  get layers(): Layer[];
275
+ get sunPos(): any;
262
276
  /**
263
277
  * Add the given control to the renderer of the planet scene.
264
278
  * @param {control.Control} control - Control.
@@ -337,6 +351,7 @@ export class Planet extends RenderNode {
337
351
  * @param {Terrain} terrain - Terrain provider.
338
352
  */
339
353
  public setTerrain(terrain: Terrain): void;
354
+ _initializeAtmosphere(): void;
340
355
  /**
341
356
  * @virtual
342
357
  * @protected
@@ -351,6 +366,7 @@ export class Planet extends RenderNode {
351
366
  clearIndexesCache(): void;
352
367
  _preRender(): void;
353
368
  _preLoad(): void;
369
+ _skipPreRender: boolean;
354
370
  /**
355
371
  * Creates default textures first for nirth pole and whole globe and second for south pole.
356
372
  * @public
@@ -395,10 +411,12 @@ export class Planet extends RenderNode {
395
411
  _checkRendercompleted(): void;
396
412
  lockQuadTree(): void;
397
413
  unlockQuadTree(): void;
414
+ _firstPASS(): void;
415
+ _renderScreenNodesPASSNoAtmos(): void;
398
416
  /**
399
417
  * @protected
400
418
  */
401
- protected _renderScreenNodesPASS(): void;
419
+ protected _renderScreenNodesPASSAtmos(): void;
402
420
  /**
403
421
  * @protected
404
422
  */
@@ -33,7 +33,7 @@ export class RenderNode {
33
33
  * @type {Array.<LightSource>}
34
34
  */
35
35
  private _lights;
36
- _lightsTransformedPositions: any[];
36
+ _lightsPositions: any[];
37
37
  _lightsParamsv: any[];
38
38
  _lightsParamsf: any[];
39
39
  _lightsNames: any[];
@@ -122,6 +122,7 @@ export class RenderNode {
122
122
  */
123
123
  public transformLights(): void;
124
124
  updateBillboardsTexCoords(): void;
125
+ updateGeoObjectsTexCoords(): void;
125
126
  /**
126
127
  * @private
127
128
  */
@@ -265,7 +265,7 @@ export class Segment {
265
265
  getExtentMerc(): Extent;
266
266
  getExtent(): Extent;
267
267
  getNodeState(): any;
268
- getNeighborSide(b: any): 1 | -1 | 0 | 2 | 3;
268
+ getNeighborSide(b: any): 0 | 1 | -1 | 2 | 3;
269
269
  }
270
270
  import { Sphere } from "../bv/Sphere.js";
271
271
  import { Box } from "../bv/Box.js";
@@ -0,0 +1,4 @@
1
+ export function transmittance(): Program;
2
+ export function scattering(): Program;
3
+ export const COMMON: string;
4
+ import { Program } from "../webgl/Program.js";
@@ -1,6 +1,7 @@
1
1
  export function drawnode_screen_nl(): Program;
2
- export function drawnode_screen_wl(): Program;
3
- export function drawnode_screen_wl_webgl2(): Program;
2
+ export function drawnode_screen_wl_webgl1NoAtmos(): Program;
3
+ export function drawnode_screen_wl_webgl2NoAtmos(): Program;
4
+ export function drawnode_screen_wl_webgl2Atmos(): Program;
4
5
  export function drawnode_colorPicking(): Program;
5
6
  export function drawnode_heightPicking(): Program;
6
7
  export function drawnode_depth(): Program;
@@ -0,0 +1 @@
1
+ export const UTILS: "\n float getLerpValue(in float min, in float max, in float between)\n {\n return (clamp(between, min, max) - min) / (max - min);\n }\n \n vec3 aces(vec3 color) \n {\n float a = 2.51;\n float b = 0.03;\n float c = 2.43;\n float d = 0.59;\n float e = 0.14;\n return clamp((color * (a * color + b)) / (color * (c * color + d ) + e), 0.0, 1.0);\n }\n \n bool intersectSphere(vec3 rayOrigin, vec3 rayDirection, float radius, inout float t1, inout float t2) \n {\n float b = dot(rayDirection, rayOrigin);\n float c = dot(rayOrigin, rayOrigin) - radius * radius;\n float d = b * b - c;\n if (d < 0.0) {\n return false;\n }\n t1 = -b - sqrt(d);\n t2 = -b + sqrt(d);\n return true;\n }\n \n bool intersectSphere(vec3 rayOrigin, vec3 rayDirection, float radius, inout float t) \n {\n float b = dot(rayDirection, rayOrigin);\n float c = dot(rayOrigin, rayOrigin) - radius * radius;\n float d = b * b - c;\n if (d < 0.0) {\n return false;\n }\n t = -b - sqrt(d);\n return true;\n }\n \n bool intersectEllipsoid( in vec3 ro, in vec3 rd, in vec3 ra, inout float t )\n {\n vec3 ocn = ro/ra;\n vec3 rdn = rd/ra;\n float a = dot( rdn, rdn );\n float b = dot( ocn, rdn );\n float c = dot( ocn, ocn );\n float h = b*b - a*(c-1.0);\n \n if (h < 0.0) \n { \n return false; \n }\n \n t = (-b-sqrt(h))/a;\n \n return true;\n }\n \n bool intersectEllipsoid( in vec3 ro, in vec3 rd, in vec3 ra, inout float t1, inout float t2)\n {\n vec3 ocn = ro/ra;\n vec3 rdn = rd/ra;\n float a = dot( rdn, rdn );\n float b = dot( ocn, rdn );\n float c = dot( ocn, ocn );\n float h = b*b - a*(c-1.0);\n \n if (h < 0.0) \n { \n return false; \n }\n \n h = sqrt(h);\n t1 = (-b-h)/a;\n t2 = (-b+h)/a;\n \n return true;\n }\n \n vec3 normalEllipsoid( in vec3 pos, in vec3 ra )\n {\n return normalize( pos/(ra*ra) );\n }\n";
@@ -9,7 +9,7 @@
9
9
  * @param {string} [options.url="//openglobus.org/heights/srtm3/{z}/{y}/{x}.ddm"] - Terrain source path url template. Default is openglobus ddm elevation file.
10
10
  * @param {Array.<number>} [options.gridSizeByZoom] - Array of segment triangulation grid sizes where array index agreed to the segment zoom index.
11
11
  * @param {number} [options.plainGridSize=32] - Elevation grid size. Default is 32x32. Must be power of two.
12
- * @param {string} [options.responseType="arraybuffer"] - Ajax responce type.
12
+ * @param {string} [options.responseType="arraybuffer"] - Responce type.
13
13
  * @param {number} [options.MAX_LOADING_TILES] - Maximum at one time loading tiles.
14
14
  * @param {Array.<number>} [gridSizeByZoom] - Array of values, where each value corresponds to the size of a tile(or segment) on the globe. Each value must be power of two.
15
15
  * @fires og.terrain.GlobusTerrain#load
@@ -0,0 +1,21 @@
1
+ export class Button extends View {
2
+ name: any;
3
+ render(params: any): Button;
4
+ $icon: any;
5
+ $text: any;
6
+ _initEvents(): void;
7
+ _onMouseClick_: any;
8
+ _onMouseDown_: any;
9
+ _onMouseUp_: any;
10
+ _onTouchStart_: any;
11
+ _onTouchEnd_: any;
12
+ _onTouchCancel_: any;
13
+ _onMouseDown(e: any): void;
14
+ _onMouseUp(e: any): void;
15
+ _onTouchStart(e: any): void;
16
+ _onTouchEnd(e: any): void;
17
+ _onTouchCancel(e: any): void;
18
+ _onMouseClick(e: any): void;
19
+ _clearEvents(): void;
20
+ }
21
+ import { View } from "./View.js";
@@ -0,0 +1,41 @@
1
+ export class Dialog extends View {
2
+ static set __zIndex(arg: any);
3
+ static get __zIndex(): any;
4
+ _startPosX: number;
5
+ _startPosY: number;
6
+ useHide: any;
7
+ _visibility: any;
8
+ setContainer(htmlStr: any): void;
9
+ get container(): any;
10
+ get width(): number;
11
+ get height(): number;
12
+ bringToFront(): void;
13
+ render(params: any): Dialog;
14
+ $header: any;
15
+ $title: any;
16
+ $container: any;
17
+ $buttons: any;
18
+ show(): void;
19
+ hide(): void;
20
+ close(): void;
21
+ setVisibility(visibility: any): void;
22
+ _initButtons(): void;
23
+ _closeBtn: Button;
24
+ _onCloseBtnClick_: any;
25
+ _initEvents(): void;
26
+ _onMouseDown_: any;
27
+ _onMouseDownAll_: any;
28
+ _onCloseBtnClick(e: any): void;
29
+ _onMouseDownAll(): void;
30
+ _onMouseDown(e: any): void;
31
+ _onMouseMove_: any;
32
+ _onMouseUp_: any;
33
+ setPosition(x: any, y: any): void;
34
+ _onMouseMove(e: any): void;
35
+ _startDragging(): void;
36
+ _clearDragging(): void;
37
+ _onMouseUp(): void;
38
+ _clearEvents(): void;
39
+ }
40
+ import { View } from "./View.js";
41
+ import { Button } from "./Button.js";
@@ -0,0 +1,30 @@
1
+ export class Slider extends View {
2
+ _value: any;
3
+ _min: any;
4
+ _max: any;
5
+ _onResize_: any;
6
+ _resizeObserver: ResizeObserver;
7
+ render(params: any): Slider;
8
+ $label: any;
9
+ $pointer: any;
10
+ $progress: any;
11
+ $panel: any;
12
+ $input: any;
13
+ _onResize(e: any): void;
14
+ set value(arg: any);
15
+ get value(): any;
16
+ _initEvents(): void;
17
+ _onMouseDown_: any;
18
+ _onInput_: any;
19
+ _onMouseWheel_: any;
20
+ _onMouseWheel(e: any): void;
21
+ _onInput(e: any): void;
22
+ _onMouseDown(e: any): void;
23
+ _startPosX: any;
24
+ _onMouseMove_: any;
25
+ _onMouseUp_: any;
26
+ _setOffset(x: any): void;
27
+ _onMouseMove(e: any): void;
28
+ _onMouseUp(): void;
29
+ }
30
+ import { View } from "./View.js";
@@ -0,0 +1,10 @@
1
+ export class ToggleButton extends Button {
2
+ constructor(options: any);
3
+ _isActive: any;
4
+ preventClick: any;
5
+ setActive(isActive: any, stopPropagation: any): void;
6
+ _toggle(): void;
7
+ get isActive(): any;
8
+ render(params: any): ToggleButton;
9
+ }
10
+ import { Button } from "./Button.js";
@@ -0,0 +1,32 @@
1
+ export class View {
2
+ static set __staticCounter(arg: any);
3
+ static get __staticCounter(): any;
4
+ static getHTML(template: any, params: any): string;
5
+ static parseHTML(htmlStr: any): ChildNode[];
6
+ static insertAfter(newNodes: any, referenceNode: any): any;
7
+ static insertBefore(newNodes: any, referenceNode: any): void;
8
+ constructor(options?: {});
9
+ __id: number;
10
+ _events: Events;
11
+ model: any;
12
+ template: any;
13
+ parent: any;
14
+ _classList: any;
15
+ on(eventName: any, callback: any, sender: any): void;
16
+ off(eventName: any, callback: any): void;
17
+ insertBefore(view: any): void;
18
+ insertAfter(view: any): void;
19
+ isEqual(view: any): boolean;
20
+ appendTo(node: any, clean: any, firstPosition: any): View;
21
+ afterRender(parentNode: any): void;
22
+ beforeRender(parentNode: any): void;
23
+ stopPropagation(): void;
24
+ renderTemplate(params: any): ChildNode;
25
+ render(params: any): View;
26
+ el: ChildNode;
27
+ select(queryStr: any): any;
28
+ selectRemove(queryStr: any): any;
29
+ selectAll(queryStr: any, callback: any): any;
30
+ remove(): void;
31
+ }
32
+ import { Events } from "../Events.js";
@@ -1,13 +1,15 @@
1
1
  export function getDefault(param: any, def: any): any;
2
2
  export function isEmpty(v: any): boolean;
3
- export function stamp(obj: any): any;
4
- export function isString(s: any): boolean;
5
3
  /**
6
- * Synchronous text file loading. Returns file text.
7
- * @param {string} fileUrl - File name path.
8
- * @returns {string} -
4
+ * Returns true if the object pointer is undefined.
5
+ * @function
6
+ * @param {Object} obj - Object pointer.
7
+ * @returns {boolean} Returns true if object is undefined.
9
8
  */
10
- export function readTextFile(fileUrl: string): string;
9
+ export function isUndef(obj: any): boolean;
10
+ export function isUndefExt(obj: any, defVal: any): any;
11
+ export function stamp(obj: any): any;
12
+ export function isString(s: any): boolean;
11
13
  /**
12
14
  * Convert html color string to the RGBA number vector.
13
15
  * @param {string} htmlColor - HTML string("#C6C6C6" or "#EF5" or "rgb(8,8,8)" or "rgba(8,8,8)") color.
@@ -175,17 +177,17 @@ export function makeArray(arr: TypedArray): any[];
175
177
  * @param {TypedArray | Array} arr
176
178
  * @param {Number} starting
177
179
  * @param {Number} deleteCount
178
- * @param {Array} elements
180
+ * @param {Object} outArr
179
181
  */
180
- export function spliceArray(arr: TypedArray | any[], starting: number, deleteCount: number, elements: any[]): any;
182
+ export function spliceArray(arr: TypedArray | any[], starting: number, deleteCount: number, out: any): any;
181
183
  /**
182
184
  *
183
185
  * @param {TypedArray} arr
184
186
  * @param {Number} starting
185
187
  * @param {Number} deleteCount
186
- * @param {Array} elements
188
+ * @param {Array} outArr
187
189
  */
188
- export function spliceTypedArray(arr: TypedArray, starting: number, deleteCount: number, elements?: any[]): any;
190
+ export function spliceTypedArray(arr: TypedArray, starting: number, deleteCount: number, out: any): any;
189
191
  /**
190
192
  * Returns triangle coordinate array from inside of the source triangle array.
191
193
  * @static
@@ -213,12 +215,12 @@ export function getMatrixSubArray(sourceArr: Array<number>, gridSize: number, i0
213
215
  export function getMatrixSubArrayBoundsExt(sourceArr: Array<number>, sourceArrHigh: any, sourceArrLow: any, noDataVertices: any, gridSize: number, i0: number, j0: number, size: number, outArr: any, outArrHigh: any, outArrLow: any, outBounds: object, outNoDataVertices: any): Array<number>;
214
216
  export function cloneArray(items: any): any;
215
217
  /**
216
- * Returns true if the object pointer is undefined.
218
+ * Promise for load images
217
219
  * @function
218
- * @param {Object} obj - Object pointer.
219
- * @returns {boolean} Returns true if object is undefined.
220
+ * @param {string} url - link to image.
221
+ * @returns {Promise<Image>} Returns promise.
220
222
  */
221
- export function isUndef(obj: any): boolean;
223
+ export function loadImage(url: string): Promise<new (width?: number, height?: number) => HTMLImageElement>;
222
224
  export namespace castType {
223
225
  function string(v: any): any;
224
226
  function date(v: any): any;
@@ -66,6 +66,8 @@ export class Framebuffer {
66
66
  * @type {number}
67
67
  */
68
68
  public textures: number;
69
+ get width(): number;
70
+ get height(): number;
69
71
  destroy(): void;
70
72
  /**
71
73
  * Framebuffer initialization.
@@ -127,9 +129,4 @@ export class Framebuffer {
127
129
  * @returns {Object} -
128
130
  */
129
131
  public getImage(): any;
130
- /**
131
- * Open dialog window with framebuffer image.
132
- * @public
133
- */
134
- public openImage(): void;
135
132
  }
@@ -97,6 +97,7 @@ export class Handler {
97
97
  */
98
98
  private _frameCallback;
99
99
  transparentTexture: any;
100
+ defaultTexture: any;
100
101
  framebufferStack: Stack;
101
102
  createTexture: {
102
103
  NEAREST: any;
@@ -106,7 +107,7 @@ export class Handler {
106
107
  };
107
108
  createTextureDefault: any;
108
109
  ONCANVASRESIZE: any;
109
- createTexture_n: (image: any, internalFormat: any) => any;
110
+ createTexture_n: (image: any, internalFormat: any, texture: any) => any;
110
111
  /**
111
112
  * Sets animation frame function.
112
113
  * @public
@@ -148,56 +149,56 @@ export class Handler {
148
149
  * @param {Object} image - Image or Canvas object.
149
150
  * @returns {Object} - WebGL texture object.
150
151
  */
151
- public createTexture_n_webgl1(image: any, internalFormat: any): any;
152
+ public createTexture_n_webgl1(image: any, internalFormat: any, texture: any): any;
152
153
  /**
153
154
  * Creates LINEAR filter texture.
154
155
  * @public
155
156
  * @param {Object} image - Image or Canvas object.
156
157
  * @returns {Object} - WebGL texture object.
157
158
  */
158
- public createTexture_l_webgl1(image: any, internalFormat: any): any;
159
+ public createTexture_l_webgl1(image: any, internalFormat: any, texture: any): any;
159
160
  /**
160
161
  * Creates MIPMAP filter texture.
161
162
  * @public
162
163
  * @param {Object} image - Image or Canvas object.
163
164
  * @returns {Object} - WebGL texture object.
164
165
  */
165
- public createTexture_mm_webgl1(image: any, internalFormat: any): any;
166
+ public createTexture_mm_webgl1(image: any, internalFormat: any, texture: any): any;
166
167
  /**
167
168
  * Creates ANISOTROPY filter texture.
168
169
  * @public
169
170
  * @param {Object} image - Image or Canvas object.
170
171
  * @returns {Object} - WebGL texture object.
171
172
  */
172
- public createTexture_a_webgl1(image: any, internalFormat: any): any;
173
+ public createTexture_a_webgl1(image: any, internalFormat: any, texture: any): any;
173
174
  /**
174
175
  * Creates NEAREST filter texture.
175
176
  * @public
176
177
  * @param {Object} image - Image or Canvas object.
177
178
  * @returns {Object} - WebGL texture object.
178
179
  */
179
- public createTexture_n_webgl2(image: any, internalFormat: any): any;
180
+ public createTexture_n_webgl2(image: any, internalFormat: any, texture: any): any;
180
181
  /**
181
182
  * Creates LINEAR filter texture.
182
183
  * @public
183
184
  * @param {Object} image - Image or Canvas object.
184
185
  * @returns {Object} - WebGL texture object.
185
186
  */
186
- public createTexture_l_webgl2(image: any, internalFormat: any): any;
187
+ public createTexture_l_webgl2(image: any, internalFormat: any, texture: any): any;
187
188
  /**
188
189
  * Creates MIPMAP filter texture.
189
190
  * @public
190
191
  * @param {Object} image - Image or Canvas object.
191
192
  * @returns {Object} - WebGL texture object.
192
193
  */
193
- public createTexture_mm_webgl2(image: any, internalFormat: any): any;
194
+ public createTexture_mm_webgl2(image: any, internalFormat: any, texture: any): any;
194
195
  /**
195
196
  * Creates ANISOTROPY filter texture.
196
197
  * @public
197
198
  * @param {Object} image - Image or Canvas object.
198
199
  * @returns {Object} - WebGL texture object.
199
200
  */
200
- public createTexture_a_webgl2(image: any, internalFormat: any): any;
201
+ public createTexture_a_webgl2(image: any, internalFormat: any, texture: any): any;
201
202
  /**
202
203
  * Creates cube texture.
203
204
  * @public
@@ -384,6 +385,7 @@ export class Handler {
384
385
  * @param {callback} [success] - Creation callback
385
386
  */
386
387
  public createDefaultTexture(params?: any, success?: callback): void;
388
+ deleteTexture(texture: any): void;
387
389
  /**
388
390
  * @public
389
391
  */
@@ -55,6 +55,8 @@ export class Multisample {
55
55
  _filter: any;
56
56
  _glFilter: any;
57
57
  renderbuffers: any[];
58
+ get width(): number;
59
+ get height(): number;
58
60
  destroy(): void;
59
61
  /**
60
62
  * Framebuffer initialization.