@openglobus/og 0.12.1 → 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 (173) hide show
  1. package/dist/@openglobus/og.css +1 -0
  2. package/dist/@openglobus/og.esm.js +21 -0
  3. package/dist/@openglobus/og.esm.js.map +1 -0
  4. package/dist/@openglobus/og.umd.js +21 -0
  5. package/dist/@openglobus/og.umd.js.map +1 -0
  6. package/package.json +2 -2
  7. package/src/og/entity/GeoObjectHandler.js +35 -16
  8. package/src/og/layer/KML.js +19 -12
  9. package/src/og/layer/Layer.js +4 -1
  10. package/src/og/scene/Planet.js +14 -14
  11. package/src/og/shaders/geoObject.js +15 -6
  12. package/types/Clock.d.ts +94 -0
  13. package/types/Deferred.d.ts +6 -0
  14. package/types/Events.d.ts +77 -0
  15. package/types/Extent.d.ts +166 -0
  16. package/types/Globe.d.ts +85 -0
  17. package/types/ImageCanvas.d.ts +123 -0
  18. package/types/Lock.d.ts +12 -0
  19. package/types/LonLat.d.ts +108 -0
  20. package/types/Popup.d.ts +42 -0
  21. package/types/QueueArray.d.ts +19 -0
  22. package/types/Rectangle.d.ts +80 -0
  23. package/types/Stack.d.ts +19 -0
  24. package/types/ajax.d.ts +24 -0
  25. package/types/arial.d.ts +48 -0
  26. package/types/astro/astro.d.ts +38 -0
  27. package/types/astro/earth.d.ts +7 -0
  28. package/types/astro/jd.d.ts +254 -0
  29. package/types/bv/Box.d.ts +30 -0
  30. package/types/bv/Sphere.d.ts +38 -0
  31. package/types/bv/index.d.ts +3 -0
  32. package/types/camera/Camera.d.ts +312 -0
  33. package/types/camera/Frustum.d.ts +133 -0
  34. package/types/camera/PlanetCamera.d.ts +219 -0
  35. package/types/camera/index.d.ts +3 -0
  36. package/types/cons.d.ts +40 -0
  37. package/types/control/CompassButton.d.ts +17 -0
  38. package/types/control/Control.d.ts +104 -0
  39. package/types/control/DebugInfo.d.ts +15 -0
  40. package/types/control/EarthCoordinates.d.ts +47 -0
  41. package/types/control/EarthNavigation.d.ts +43 -0
  42. package/types/control/GeoImageDragControl.d.ts +6 -0
  43. package/types/control/KeyboardNavigation.d.ts +21 -0
  44. package/types/control/LayerSwitcher.d.ts +21 -0
  45. package/types/control/Lighting.d.ts +16 -0
  46. package/types/control/MouseNavigation.d.ts +48 -0
  47. package/types/control/MouseWheelZoomControl.d.ts +45 -0
  48. package/types/control/ScaleControl.d.ts +22 -0
  49. package/types/control/ShowFps.d.ts +11 -0
  50. package/types/control/SimpleNavigation.d.ts +25 -0
  51. package/types/control/Sun.d.ts +50 -0
  52. package/types/control/ToggleWireframe.d.ts +12 -0
  53. package/types/control/TouchNavigation.d.ts +48 -0
  54. package/types/control/ZoomControl.d.ts +27 -0
  55. package/types/control/index.d.ts +18 -0
  56. package/types/ellipsoid/Ellipsoid.d.ts +146 -0
  57. package/types/ellipsoid/index.d.ts +3 -0
  58. package/types/ellipsoid/wgs84.d.ts +6 -0
  59. package/types/entity/BaseBillboard.d.ts +215 -0
  60. package/types/entity/Billboard.d.ts +94 -0
  61. package/types/entity/BillboardHandler.d.ts +79 -0
  62. package/types/entity/Entity.d.ts +348 -0
  63. package/types/entity/EntityCollection.d.ts +317 -0
  64. package/types/entity/GeoObject.d.ts +111 -0
  65. package/types/entity/GeoObjectHandler.d.ts +81 -0
  66. package/types/entity/Geometry.d.ts +74 -0
  67. package/types/entity/GeometryHandler.d.ts +76 -0
  68. package/types/entity/Label.d.ts +189 -0
  69. package/types/entity/LabelHandler.d.ts +31 -0
  70. package/types/entity/LabelWorker.d.ts +11 -0
  71. package/types/entity/PointCloud.d.ts +174 -0
  72. package/types/entity/PointCloudHandler.d.ts +38 -0
  73. package/types/entity/Polyline.d.ts +306 -0
  74. package/types/entity/PolylineHandler.d.ts +18 -0
  75. package/types/entity/Ray.d.ts +124 -0
  76. package/types/entity/RayHandler.d.ts +67 -0
  77. package/types/entity/ShapeHandler.d.ts +22 -0
  78. package/types/entity/Strip.d.ts +119 -0
  79. package/types/entity/StripHandler.d.ts +38 -0
  80. package/types/entity/index.d.ts +8 -0
  81. package/types/index.core.d.ts +65 -0
  82. package/types/index.d.ts +45 -0
  83. package/types/index.webgl.d.ts +7 -0
  84. package/types/input/KeyboardHandler.d.ts +10 -0
  85. package/types/input/MouseHandler.d.ts +5 -0
  86. package/types/input/TouchHandler.d.ts +5 -0
  87. package/types/input/input.d.ts +34 -0
  88. package/types/layer/BaseGeoImage.d.ts +94 -0
  89. package/types/layer/CanvasTiles.d.ts +67 -0
  90. package/types/layer/GeoImage.d.ts +52 -0
  91. package/types/layer/GeoTexture2d.d.ts +8 -0
  92. package/types/layer/GeoVideo.d.ts +55 -0
  93. package/types/layer/KML.d.ts +68 -0
  94. package/types/layer/Layer.d.ts +310 -0
  95. package/types/layer/Material.d.ts +45 -0
  96. package/types/layer/Vector.d.ts +208 -0
  97. package/types/layer/WMS.d.ts +61 -0
  98. package/types/layer/XYZ.d.ts +119 -0
  99. package/types/layer/index.d.ts +10 -0
  100. package/types/light/LightSource.d.ts +178 -0
  101. package/types/math/Line2.d.ts +11 -0
  102. package/types/math/Line3.d.ts +10 -0
  103. package/types/math/Mat3.d.ts +65 -0
  104. package/types/math/Mat4.d.ts +176 -0
  105. package/types/math/Plane.d.ts +18 -0
  106. package/types/math/Quat.d.ts +379 -0
  107. package/types/math/Ray.d.ts +82 -0
  108. package/types/math/Vec2.d.ts +309 -0
  109. package/types/math/Vec3.d.ts +467 -0
  110. package/types/math/Vec4.d.ts +162 -0
  111. package/types/math/coder.d.ts +43 -0
  112. package/types/math/index.d.ts +11 -0
  113. package/types/math.d.ts +261 -0
  114. package/types/mercator.d.ts +92 -0
  115. package/types/proj/EPSG3857.d.ts +6 -0
  116. package/types/proj/EPSG4326.d.ts +6 -0
  117. package/types/proj/Proj.d.ts +42 -0
  118. package/types/quadTree/EntityCollectionNode.d.ts +34 -0
  119. package/types/quadTree/Node.d.ts +60 -0
  120. package/types/quadTree/quadTree.d.ts +40 -0
  121. package/types/renderer/Renderer.d.ts +290 -0
  122. package/types/renderer/RendererEvents.d.ts +237 -0
  123. package/types/res/images.d.ts +3 -0
  124. package/types/scene/Axes.d.ts +11 -0
  125. package/types/scene/BaseNode.d.ts +60 -0
  126. package/types/scene/Planet.d.ts +576 -0
  127. package/types/scene/RenderNode.d.ts +142 -0
  128. package/types/scene/SkyBox.d.ts +10 -0
  129. package/types/scene/index.d.ts +4 -0
  130. package/types/segment/Segment.d.ts +275 -0
  131. package/types/segment/SegmentLonLat.d.ts +17 -0
  132. package/types/segment/Slice.d.ts +10 -0
  133. package/types/segment/segmentHelper.d.ts +13 -0
  134. package/types/shaders/billboard.d.ts +3 -0
  135. package/types/shaders/depth.d.ts +2 -0
  136. package/types/shaders/drawnode.d.ts +7 -0
  137. package/types/shaders/geoObject.d.ts +3 -0
  138. package/types/shaders/label.d.ts +4 -0
  139. package/types/shaders/pointCloud.d.ts +2 -0
  140. package/types/shaders/polyline.d.ts +3 -0
  141. package/types/shaders/ray.d.ts +2 -0
  142. package/types/shaders/screenFrame.d.ts +2 -0
  143. package/types/shaders/shape.d.ts +4 -0
  144. package/types/shaders/skybox.d.ts +2 -0
  145. package/types/shaders/toneMapping.d.ts +2 -0
  146. package/types/shapes/BaseShape.d.ts +250 -0
  147. package/types/shapes/Sphere.d.ts +41 -0
  148. package/types/terrain/BilTerrain.d.ts +7 -0
  149. package/types/terrain/EmptyTerrain.d.ts +73 -0
  150. package/types/terrain/Geoid.d.ts +26 -0
  151. package/types/terrain/GlobusTerrain.d.ts +116 -0
  152. package/types/terrain/MapboxTerrain.d.ts +7 -0
  153. package/types/terrain/index.d.ts +5 -0
  154. package/types/utils/FontAtlas.d.ts +15 -0
  155. package/types/utils/GeoImageCreator.d.ts +30 -0
  156. package/types/utils/ImagesCacheManager.d.ts +10 -0
  157. package/types/utils/Loader.d.ts +25 -0
  158. package/types/utils/NormalMapCreator.d.ts +39 -0
  159. package/types/utils/PlainSegmentWorker.d.ts +10 -0
  160. package/types/utils/TerrainWorker.d.ts +9 -0
  161. package/types/utils/TextureAtlas.d.ts +111 -0
  162. package/types/utils/VectorTileCreator.d.ts +16 -0
  163. package/types/utils/colorTable.d.ts +143 -0
  164. package/types/utils/earcut.d.ts +6 -0
  165. package/types/utils/shared.d.ts +231 -0
  166. package/types/webgl/Framebuffer.d.ts +135 -0
  167. package/types/webgl/Handler.d.ts +417 -0
  168. package/types/webgl/Multisample.d.ts +89 -0
  169. package/types/webgl/Program.d.ts +161 -0
  170. package/types/webgl/ProgramController.d.ts +89 -0
  171. package/types/webgl/callbacks.d.ts +1 -0
  172. package/types/webgl/index.d.ts +6 -0
  173. package/types/webgl/types.d.ts +2 -0
@@ -0,0 +1,231 @@
1
+ export function getDefault(param: any, def: any): any;
2
+ export function isEmpty(v: any): boolean;
3
+ export function stamp(obj: any): any;
4
+ export function isString(s: any): boolean;
5
+ /**
6
+ * Synchronous text file loading. Returns file text.
7
+ * @param {string} fileUrl - File name path.
8
+ * @returns {string} -
9
+ */
10
+ export function readTextFile(fileUrl: string): string;
11
+ /**
12
+ * Convert html color string to the RGBA number vector.
13
+ * @param {string} htmlColor - HTML string("#C6C6C6" or "#EF5" or "rgb(8,8,8)" or "rgba(8,8,8)") color.
14
+ * @param {number} [opacity] - Opacity for the output vector.
15
+ * @returns {math.Vec4} -
16
+ */
17
+ export function htmlColorToRgba(htmlColor: string, opacity?: number): math.Vec4;
18
+ export function htmlColorToFloat32Array(htmlColor: any, opacity: any): Float32Array;
19
+ /**
20
+ * Convert html color string to the RGB number vector.
21
+ * @param {string} htmlColor - HTML string("#C6C6C6" or "#EF5" or "rgb(8,8,8)" or "rgba(8,8,8)") color.
22
+ * @param {number} [opacity] - Opacity for the output vector.
23
+ * @returns {Vec3} -
24
+ */
25
+ export function htmlColorToRgb(htmlColor: string): Vec3;
26
+ /**
27
+ * Replace template substrings between '{' and '}' tokens.
28
+ * @param {string} template - String with templates in "{" and "}"
29
+ * @param {Object} params - Template named object with subsrtings.
30
+ * @returns {string} -
31
+ *
32
+ * @example <caption>Example from og.terrain that replaces tile indexes in url:</caption>
33
+ * var substrings = {
34
+ * "x": 12,
35
+ * "y": 15,
36
+ * "z": 8
37
+ * }
38
+ * og.utils.stringTemplate("http://earth3.openglobus.org/{z}/{y}/{x}.ddm", substrins);
39
+ * //returns http://earth3.openglobus.org/8/15/12.ddm
40
+ */
41
+ export function stringTemplate(template: string, params: any): string;
42
+ export function getHTML(template: any, params: any): string;
43
+ export function parseHTML(htmlStr: any): ChildNode[];
44
+ export function print2d(id: any, text: any, x: any, y: any): void;
45
+ export function defaultString(str: any, def: any): any;
46
+ export function createVector3(v: any, def: any): any;
47
+ export function createVector4(v: any, def: any): any;
48
+ export function createColorRGBA(c: any, def: any): any;
49
+ export function createColorRGB(c: any, def: any): any;
50
+ export function createExtent(e: any, def: any): any;
51
+ export function createLonLat(l: any, def: any): any;
52
+ export function binarySearchFast(arr: any, x: any): number;
53
+ /**
54
+ * Finds an item in a sorted array.
55
+ * @param {Array} ar The sorted array to search.
56
+ * @param {Object} el The item to find in the array.
57
+ * @param {utils.binarySearch~compare_fn} compare_fn comparator The function to use to compare the item to
58
+ * elements in the array.
59
+ * @returns {Number} a negative number if a is less than b; 0 if a is equal to b;a positive number of a is greater than b.
60
+ *
61
+ * @example
62
+ * // Create a comparator function to search through an array of numbers.
63
+ * function comparator(a, b) {
64
+ * return a - b;
65
+ * };
66
+ * var numbers = [0, 2, 4, 6, 8];
67
+ * var index = og.utils.binarySearch(numbers, 6, comparator); // 3
68
+ */
69
+ export function binarySearch(ar: any[], el: any, compare_fn: any): number;
70
+ /**
71
+ * Binary insertion that uses binarySearch algorithm.
72
+ * @param {Array} ar - The sorted array to insert.
73
+ * @param {Object} el - The item to insert.
74
+ * @param {utils.binarySearch~compare_fn} compare_fn - comparator The function to use to compare the item to
75
+ * elements in the array.
76
+ * @returns {Number} Array index position in which item inserted in.
77
+ */
78
+ export function binaryInsert(ar: any[], el: any, compare_fn: any): number;
79
+ /**
80
+ * Returns two segment lines intersection coordinate.
81
+ * @static
82
+ * @param {math.Vec2} start1 - First line first coordinate.
83
+ * @param {math.Vec2} end1 - First line second coordinate.
84
+ * @param {math.Vec2} start2 - Second line first coordinate.
85
+ * @param {math.Vec2} end2 - Second line second coordinate.
86
+ * @param {boolean} [isSegment] - Lines are segments.
87
+ * @return {math.Vec2} - Intersection coordinate.
88
+ */
89
+ export function getLinesIntersection2v(start1: math.Vec2, end1: math.Vec2, start2: math.Vec2, end2: math.Vec2, isSegment?: boolean): math.Vec2;
90
+ /**
91
+ * Returns two segment lines intersection coordinate.
92
+ * @static
93
+ * @param {math.Vec2} start1 - First line first coordinate.
94
+ * @param {math.Vec2} end1 - First line second coordinate.
95
+ * @param {math.Vec2} start2 - Second line first coordinate.
96
+ * @param {math.Vec2} end2 - Second line second coordinate.
97
+ * @param {boolean} [isSegment] - Lines are segments.
98
+ * @return {math.Vec2} - Intersection coordinate.
99
+ */
100
+ export function getLinesIntersectionLonLat(start1: math.Vec2, end1: math.Vec2, start2: math.Vec2, end2: math.Vec2, isSegment?: boolean): math.Vec2;
101
+ /**
102
+ * Converts XML to JSON
103
+ * @static
104
+ * @param {Object} xml - Xml object
105
+ * @return {Object} - Json converted object.
106
+ */
107
+ export function xmlToJson(xml: any): any;
108
+ export function base64toBlob(base64Data: any, contentType: any): Blob;
109
+ export function base64StringToBlog(string: any): Blob;
110
+ /**
111
+ * Callback throttling
112
+ * @param {any} func
113
+ * @param {Number} limit
114
+ * @param {Number} skip
115
+ */
116
+ export function throttle(func: any, limit: number, skip: number): (...args: any[]) => void;
117
+ /**
118
+ *
119
+ * y2-----Q12--------------Q22---
120
+ * | | | |
121
+ * | | | |
122
+ * y-------|-----P----------|----
123
+ * | | | |
124
+ * | | | |
125
+ * | | | |
126
+ * | | | |
127
+ * | | | |
128
+ * y1-----Q11----|---------Q21---
129
+ * | | |
130
+ * | | |
131
+ * x1 x x2
132
+ *
133
+ *
134
+ * @param {Number} x -
135
+ * @param {Number} y -
136
+ * @param {Number} fQ11 -
137
+ * @param {Number} fQ21 -
138
+ * @param {Number} fQ12 -
139
+ * @param {Number} fQ22 -
140
+ * @param {Number} [x1=0.0] -
141
+ * @param {Number} [x2=1.0] -
142
+ * @param {Number} [y1=0.0] -
143
+ * @param {Number} [y2=1.0] -
144
+ */
145
+ export function blerp(x: number, y: number, fQ11: number, fQ21: number, fQ12: number, fQ22: number, x1?: number, x2?: number, y1?: number, y2?: number): number;
146
+ export function blerp2(x: any, y: any, fQ11: any, fQ21: any, fQ12: any, fQ22: any): number;
147
+ export function extractElevationTiles(rgbaData: any, outCurrenElevations: any, outChildrenElevations: any): void;
148
+ /**
149
+ * Concatenates two the same type arrays
150
+ * @param {TypedArray} a
151
+ * @param {TypedArray} b
152
+ */
153
+ export function concatTypedArrays(a: TypedArray, b: TypedArray): any;
154
+ /**
155
+ * Concatenates two the same arrays
156
+ * @param {TypedArray | Array} a
157
+ * @param {TypedArray | Array} b
158
+ */
159
+ export function concatArrays(a: TypedArray | any[], b: TypedArray | any[]): any;
160
+ /**
161
+ * Convert simple array to typed
162
+ * @param arr {Array}
163
+ * @param ctor {Float32ArrayConstructor}
164
+ * @returns {TypedArray}
165
+ */
166
+ export function makeArrayTyped(arr: any[], ctor?: Float32ArrayConstructor): TypedArray;
167
+ /**
168
+ * Convert typed array to array
169
+ * @param arr {TypedArray}
170
+ * @returns {Array}
171
+ */
172
+ export function makeArray(arr: TypedArray): any[];
173
+ /**
174
+ *
175
+ * @param {TypedArray | Array} arr
176
+ * @param {Number} starting
177
+ * @param {Number} deleteCount
178
+ * @param {Array} elements
179
+ */
180
+ export function spliceArray(arr: TypedArray | any[], starting: number, deleteCount: number, elements: any[]): any;
181
+ /**
182
+ *
183
+ * @param {TypedArray} arr
184
+ * @param {Number} starting
185
+ * @param {Number} deleteCount
186
+ * @param {Array} elements
187
+ */
188
+ export function spliceTypedArray(arr: TypedArray, starting: number, deleteCount: number, elements?: any[]): any;
189
+ /**
190
+ * Returns triangle coordinate array from inside of the source triangle array.
191
+ * @static
192
+ * @param {Array.<number>} sourceArr - Source array
193
+ * @param {number} gridSize - Source array square matrix size
194
+ * @param {number} i0 - First row index source array matrix
195
+ * @param {number} j0 - First column index
196
+ * @param {number} size - Square matrix result size.
197
+ * @return{Array.<number>} Triangle coordinates array from the source array.
198
+ * @TODO: optimization
199
+ */
200
+ export function getMatrixSubArray(sourceArr: Array<number>, gridSize: number, i0: number, j0: number, size: number): Array<number>;
201
+ /**
202
+ * Returns two float32 triangle coordinate arrays from inside of the source triangle array.
203
+ * @static
204
+ * @param {Array.<number>} sourceArr - Source array
205
+ * @param {number} gridSize - Source array square matrix size
206
+ * @param {number} i0 - First row index source array matrix
207
+ * @param {number} j0 - First column index
208
+ * @param {number} size - Square matrix result size.
209
+ * @param {object} outBounds - Output bounds.
210
+ * @return{Array.<number>} Triangle coordinates array from the source array.
211
+ * @TODO: optimization
212
+ */
213
+ 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
+ export function cloneArray(items: any): any;
215
+ /**
216
+ * Returns true if the object pointer is undefined.
217
+ * @function
218
+ * @param {Object} obj - Object pointer.
219
+ * @returns {boolean} Returns true if object is undefined.
220
+ */
221
+ export function isUndef(obj: any): boolean;
222
+ export namespace castType {
223
+ function string(v: any): any;
224
+ function date(v: any): any;
225
+ function datetime(v: any): any;
226
+ function time(v: any): any;
227
+ function integer(v: any): any;
228
+ function float(v: any): any;
229
+ function boolean(str: any): any;
230
+ }
231
+ import { Vec3 } from "../math/Vec3.js";
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Class represents framebuffer.
3
+ * @class
4
+ * @param {Handler} handler - WebGL handler.
5
+ * @param {Object} [options] - Framebuffer options:
6
+ * @param {number} [options.width] - Framebuffer width. Default is handler canvas width.
7
+ * @param {number} [options.height] - Framebuffer height. Default is handler canvas height.
8
+ * @param {number} [options.size] - Color attachment size.
9
+ * @param {String} [options.internalFormat="RGBA"] - Specifies the color components in the texture.
10
+ * @param {String} [options.format="RGBA"] - Specifies the format of the texel data.
11
+ * @param {String} [options.type="UNSIGNED_BYTE"] - Specifies the data type of the texel data.
12
+ * @param {String} [options.depthComponent="DEPTH_COMPONENT16"] - Specifies depth buffer size.
13
+ * @param {Boolean} [options.useDepth] - Using depth buffer during the rendering.
14
+ */
15
+ export class Framebuffer {
16
+ static blit(sourceFramebuffer: any, destFramebuffer: any, glAttachment: any, glMask: any, glFilter: any): void;
17
+ constructor(handler: any, options?: {});
18
+ /**
19
+ * WebGL handler.
20
+ * @public
21
+ * @type {Handler}
22
+ */
23
+ public handler: Handler;
24
+ /**
25
+ * Framebuffer object.
26
+ * @private
27
+ * @type {Object}
28
+ */
29
+ private _fbo;
30
+ _isBare: any;
31
+ /**
32
+ * Renderbuffer object.
33
+ * @private
34
+ * @type {Object}
35
+ */
36
+ private _depthRenderbuffer;
37
+ _filter: any;
38
+ _internalFormatArr: any;
39
+ _formatArr: any;
40
+ _typeArr: any;
41
+ _attachmentArr: any;
42
+ /**
43
+ * Framebuffer width.
44
+ * @private
45
+ * @type {number}
46
+ */
47
+ private _width;
48
+ /**
49
+ * Framebuffer width.
50
+ * @private
51
+ * @type {number}
52
+ */
53
+ private _height;
54
+ _depthComponent: any;
55
+ _useDepth: any;
56
+ /**
57
+ * Framebuffer activity.
58
+ * @private
59
+ * @type {boolean}
60
+ */
61
+ private _active;
62
+ _size: any;
63
+ /**
64
+ * Framebuffer texture.
65
+ * @public
66
+ * @type {number}
67
+ */
68
+ public textures: number;
69
+ destroy(): void;
70
+ /**
71
+ * Framebuffer initialization.
72
+ * @private
73
+ */
74
+ private init;
75
+ /**
76
+ * Bind buffer texture.
77
+ * @public
78
+ * @param{Object} texture - Output texture.
79
+ * @param {Number} [attachmentIndex=0] - color attachment index.
80
+ */
81
+ public bindOutputTexture(texture: any, glAttachment: any): void;
82
+ /**
83
+ * Sets framebuffer viewport size.
84
+ * @public
85
+ * @param {number} width - Framebuffer width.
86
+ * @param {number} height - Framebuffer height.
87
+ */
88
+ public setSize(width: number, height: number, forceDestroy: any): void;
89
+ /**
90
+ * Returns framebuffer completed.
91
+ * @public
92
+ * @returns {boolean} -
93
+ */
94
+ public isComplete(): boolean;
95
+ /**
96
+ * Gets pixel RBGA color from framebuffer by coordinates.
97
+ * @public
98
+ * @param {Uint8Array} res - Normalized x - coordinate.
99
+ * @param {number} nx - Normalized x - coordinate.
100
+ * @param {number} ny - Normalized y - coordinate.
101
+ * @param {number} [w=1] - Normalized width.
102
+ * @param {number} [h=1] - Normalized height.
103
+ * @param {Number} [attachmentIndex=0] - color attachment index.
104
+ */
105
+ public readPixels(res: Uint8Array, nx: number, ny: number, index?: number, w?: number, h?: number): void;
106
+ /**
107
+ * Reads all pixels(RGBA colors) from framebuffer.
108
+ * @public
109
+ * @param {Uint8Array} res - Result array.
110
+ * @param {Number} [attachmentIndex=0] - color attachment index.
111
+ */
112
+ public readAllPixels(res: Uint8Array, attachmentIndex?: number): void;
113
+ /**
114
+ * Activate framebuffer frame to draw.
115
+ * @public
116
+ * @returns {Framebuffer} Returns Current framebuffer.
117
+ */
118
+ public activate(): Framebuffer;
119
+ /**
120
+ * Deactivate framebuffer frame.
121
+ * @public
122
+ */
123
+ public deactivate(): void;
124
+ /**
125
+ * Gets JavaScript image object that framebuffer has drawn.
126
+ * @public
127
+ * @returns {Object} -
128
+ */
129
+ public getImage(): any;
130
+ /**
131
+ * Open dialog window with framebuffer image.
132
+ * @public
133
+ */
134
+ public openImage(): void;
135
+ }