@openglobus/og 0.11.6 → 0.11.7

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 (185) hide show
  1. package/package.json +11 -11
  2. package/src/og/Globe.js +8 -5
  3. package/src/og/Popup.js +3 -2
  4. package/src/og/camera/PlanetCamera.js +9 -4
  5. package/src/og/control/Lighting.js +33 -2
  6. package/src/og/ellipsoid/Ellipsoid.js +1 -1
  7. package/src/og/entity/BaseBillboard.js +67 -76
  8. package/src/og/entity/BillboardHandler.js +15 -8
  9. package/src/og/entity/Label.js +44 -47
  10. package/src/og/entity/LabelHandler.js +25 -25
  11. package/src/og/entity/LabelWorker.js +21 -16
  12. package/src/og/layer/Layer.js +28 -15
  13. package/src/og/layer/Material.js +1 -1
  14. package/src/og/quadTree/Node.js +16 -30
  15. package/src/og/renderer/Renderer.js +19 -29
  16. package/src/og/renderer/RendererEvents.js +41 -21
  17. package/src/og/scene/Planet.js +11 -28
  18. package/src/og/shaders/drawnode.js +135 -142
  19. package/src/og/shaders/toneMapping.js +1 -0
  20. package/src/og/shapes/BaseShape.js +1 -1
  21. package/src/og/utils/FontAtlas.js +6 -2
  22. package/src/og/utils/TextureAtlas.js +2 -2
  23. package/src/og/utils/VectorTileCreator.js +1 -3
  24. package/src/og/utils/shared.js +1 -1
  25. package/src/og/webgl/Handler.js +152 -118
  26. package/types/Clock.d.ts +0 -94
  27. package/types/Deferred.d.ts +0 -6
  28. package/types/Events.d.ts +0 -77
  29. package/types/Extent.d.ts +0 -166
  30. package/types/Globe.d.ts +0 -82
  31. package/types/ImageCanvas.d.ts +0 -123
  32. package/types/Lock.d.ts +0 -12
  33. package/types/LonLat.d.ts +0 -108
  34. package/types/Popup.d.ts +0 -42
  35. package/types/QueueArray.d.ts +0 -19
  36. package/types/Rectangle.d.ts +0 -80
  37. package/types/Stack.d.ts +0 -19
  38. package/types/ajax.d.ts +0 -24
  39. package/types/arial.d.ts +0 -48
  40. package/types/astro/astro.d.ts +0 -38
  41. package/types/astro/earth.d.ts +0 -7
  42. package/types/astro/jd.d.ts +0 -254
  43. package/types/bv/Box.d.ts +0 -30
  44. package/types/bv/Sphere.d.ts +0 -38
  45. package/types/bv/index.d.ts +0 -3
  46. package/types/camera/Camera.d.ts +0 -312
  47. package/types/camera/Frustum.d.ts +0 -133
  48. package/types/camera/PlanetCamera.d.ts +0 -218
  49. package/types/camera/index.d.ts +0 -3
  50. package/types/cons.d.ts +0 -40
  51. package/types/control/CompassButton.d.ts +0 -17
  52. package/types/control/Control.d.ts +0 -104
  53. package/types/control/DebugInfo.d.ts +0 -15
  54. package/types/control/EarthCoordinates.d.ts +0 -47
  55. package/types/control/EarthNavigation.d.ts +0 -42
  56. package/types/control/GeoImageDragControl.d.ts +0 -6
  57. package/types/control/KeyboardNavigation.d.ts +0 -21
  58. package/types/control/LayerSwitcher.d.ts +0 -21
  59. package/types/control/Lighting.d.ts +0 -16
  60. package/types/control/MouseNavigation.d.ts +0 -47
  61. package/types/control/ScaleControl.d.ts +0 -22
  62. package/types/control/ShowFps.d.ts +0 -11
  63. package/types/control/SimpleNavigation.d.ts +0 -25
  64. package/types/control/Sun.d.ts +0 -50
  65. package/types/control/ToggleWireframe.d.ts +0 -12
  66. package/types/control/TouchNavigation.d.ts +0 -48
  67. package/types/control/ZoomControl.d.ts +0 -27
  68. package/types/control/index.d.ts +0 -17
  69. package/types/ellipsoid/Ellipsoid.d.ts +0 -146
  70. package/types/ellipsoid/index.d.ts +0 -3
  71. package/types/ellipsoid/wgs84.d.ts +0 -6
  72. package/types/entity/BaseBillboard.d.ts +0 -215
  73. package/types/entity/Billboard.d.ts +0 -94
  74. package/types/entity/BillboardHandler.d.ts +0 -78
  75. package/types/entity/Entity.d.ts +0 -348
  76. package/types/entity/EntityCollection.d.ts +0 -317
  77. package/types/entity/GeoObject.d.ts +0 -111
  78. package/types/entity/GeoObjectHandler.d.ts +0 -77
  79. package/types/entity/Geometry.d.ts +0 -74
  80. package/types/entity/GeometryHandler.d.ts +0 -76
  81. package/types/entity/Label.d.ts +0 -189
  82. package/types/entity/LabelHandler.d.ts +0 -31
  83. package/types/entity/LabelWorker.d.ts +0 -9
  84. package/types/entity/PointCloud.d.ts +0 -174
  85. package/types/entity/PointCloudHandler.d.ts +0 -38
  86. package/types/entity/Polyline.d.ts +0 -306
  87. package/types/entity/PolylineHandler.d.ts +0 -18
  88. package/types/entity/Ray.d.ts +0 -124
  89. package/types/entity/RayHandler.d.ts +0 -67
  90. package/types/entity/ShapeHandler.d.ts +0 -22
  91. package/types/entity/Strip.d.ts +0 -119
  92. package/types/entity/StripHandler.d.ts +0 -38
  93. package/types/entity/index.d.ts +0 -8
  94. package/types/index.core.d.ts +0 -65
  95. package/types/index.d.ts +0 -45
  96. package/types/index.webgl.d.ts +0 -7
  97. package/types/input/KeyboardHandler.d.ts +0 -10
  98. package/types/input/MouseHandler.d.ts +0 -5
  99. package/types/input/TouchHandler.d.ts +0 -5
  100. package/types/input/input.d.ts +0 -34
  101. package/types/layer/BaseGeoImage.d.ts +0 -94
  102. package/types/layer/CanvasTiles.d.ts +0 -68
  103. package/types/layer/GeoImage.d.ts +0 -52
  104. package/types/layer/GeoTexture2d.d.ts +0 -8
  105. package/types/layer/GeoVideo.d.ts +0 -55
  106. package/types/layer/KML.d.ts +0 -63
  107. package/types/layer/Layer.d.ts +0 -326
  108. package/types/layer/Material.d.ts +0 -45
  109. package/types/layer/Vector.d.ts +0 -208
  110. package/types/layer/WMS.d.ts +0 -63
  111. package/types/layer/XYZ.d.ts +0 -120
  112. package/types/layer/index.d.ts +0 -10
  113. package/types/light/LightSource.d.ts +0 -178
  114. package/types/math/Line2.d.ts +0 -11
  115. package/types/math/Line3.d.ts +0 -10
  116. package/types/math/Mat3.d.ts +0 -65
  117. package/types/math/Mat4.d.ts +0 -176
  118. package/types/math/Plane.d.ts +0 -18
  119. package/types/math/Quat.d.ts +0 -379
  120. package/types/math/Ray.d.ts +0 -82
  121. package/types/math/Vec2.d.ts +0 -309
  122. package/types/math/Vec3.d.ts +0 -460
  123. package/types/math/Vec4.d.ts +0 -162
  124. package/types/math/coder.d.ts +0 -43
  125. package/types/math/index.d.ts +0 -11
  126. package/types/math.d.ts +0 -261
  127. package/types/mercator.d.ts +0 -92
  128. package/types/proj/EPSG3857.d.ts +0 -6
  129. package/types/proj/EPSG4326.d.ts +0 -6
  130. package/types/proj/Proj.d.ts +0 -42
  131. package/types/quadTree/EntityCollectionNode.d.ts +0 -34
  132. package/types/quadTree/Node.d.ts +0 -61
  133. package/types/quadTree/quadTree.d.ts +0 -40
  134. package/types/renderer/Renderer.d.ts +0 -300
  135. package/types/renderer/RendererEvents.d.ts +0 -233
  136. package/types/res/images.d.ts +0 -3
  137. package/types/scene/Axes.d.ts +0 -11
  138. package/types/scene/BaseNode.d.ts +0 -60
  139. package/types/scene/Planet.d.ts +0 -577
  140. package/types/scene/RenderNode.d.ts +0 -142
  141. package/types/scene/SkyBox.d.ts +0 -10
  142. package/types/scene/index.d.ts +0 -4
  143. package/types/segment/Segment.d.ts +0 -279
  144. package/types/segment/SegmentLonLat.d.ts +0 -16
  145. package/types/segment/segmentHelper.d.ts +0 -13
  146. package/types/shaders/billboard.d.ts +0 -3
  147. package/types/shaders/depth.d.ts +0 -2
  148. package/types/shaders/drawnode.d.ts +0 -7
  149. package/types/shaders/geoObject.d.ts +0 -3
  150. package/types/shaders/label.d.ts +0 -4
  151. package/types/shaders/pointCloud.d.ts +0 -2
  152. package/types/shaders/polyline.d.ts +0 -3
  153. package/types/shaders/ray.d.ts +0 -2
  154. package/types/shaders/screenFrame.d.ts +0 -2
  155. package/types/shaders/shape.d.ts +0 -4
  156. package/types/shaders/skybox.d.ts +0 -2
  157. package/types/shaders/toneMapping.d.ts +0 -2
  158. package/types/shapes/BaseShape.d.ts +0 -250
  159. package/types/shapes/Sphere.d.ts +0 -41
  160. package/types/terrain/BilTerrain.d.ts +0 -7
  161. package/types/terrain/EmptyTerrain.d.ts +0 -72
  162. package/types/terrain/Geoid.d.ts +0 -26
  163. package/types/terrain/GlobusTerrain.d.ts +0 -116
  164. package/types/terrain/MapboxTerrain.d.ts +0 -7
  165. package/types/terrain/index.d.ts +0 -5
  166. package/types/utils/FontAtlas.d.ts +0 -14
  167. package/types/utils/GeoImageCreator.d.ts +0 -30
  168. package/types/utils/ImagesCacheManager.d.ts +0 -10
  169. package/types/utils/Loader.d.ts +0 -25
  170. package/types/utils/NormalMapCreator.d.ts +0 -39
  171. package/types/utils/PlainSegmentWorker.d.ts +0 -10
  172. package/types/utils/TerrainWorker.d.ts +0 -9
  173. package/types/utils/TextureAtlas.d.ts +0 -111
  174. package/types/utils/VectorTileCreator.d.ts +0 -16
  175. package/types/utils/colorTable.d.ts +0 -143
  176. package/types/utils/earcut.d.ts +0 -6
  177. package/types/utils/shared.d.ts +0 -231
  178. package/types/webgl/Framebuffer.d.ts +0 -135
  179. package/types/webgl/Handler.d.ts +0 -397
  180. package/types/webgl/Multisample.d.ts +0 -89
  181. package/types/webgl/Program.d.ts +0 -161
  182. package/types/webgl/ProgramController.d.ts +0 -89
  183. package/types/webgl/callbacks.d.ts +0 -1
  184. package/types/webgl/index.d.ts +0 -6
  185. package/types/webgl/types.d.ts +0 -2
@@ -1,397 +0,0 @@
1
- export namespace createTexture {
2
- import NEAREST = Handler.createTexture_n;
3
- export { NEAREST };
4
- import LINEAR = Handler.createTexture_l;
5
- export { LINEAR };
6
- import MIPMAP = Handler.createTexture_mm;
7
- export { MIPMAP };
8
- import ANISOTROPIC = Handler.createTexture_a;
9
- export { ANISOTROPIC };
10
- }
11
- /**
12
- * A WebGL handler for accessing low-level WebGL capabilities.
13
- * @class
14
- * @param {string} id - Canvas element id that WebGL handler assing with. If it's null
15
- * or undefined creates hidden canvas and handler bacomes hidden.
16
- * @param {Object} [params] - Handler options:
17
- * @param {number} [params.anisotropy] - Anisotropy filter degree. 8 is default.
18
- * @param {number} [params.width] - Hidden handler width. 256 is default.
19
- * @param {number} [params.height] - Hidden handler height. 256 is default.
20
- * @param {Array.<string>} [params.extensions] - Additional WebGL extension list. Available by default: EXT_texture_filter_anisotropic.
21
- */
22
- export class Handler {
23
- /**
24
- * The return value is null if the extension is not supported, or an extension object otherwise.
25
- * @param {Object} gl - WebGl context pointer.
26
- * @param {String} name - Extension name.
27
- * @returns {Object} -
28
- */
29
- static getExtension(gl: any, name: string): any;
30
- /**
31
- * Returns a drawing context on the canvas, or null if the context identifier is not supported.
32
- * @param {Object} canvas - HTML canvas object.
33
- * @param {Object} [contextAttributes] - See canvas.getContext contextAttributes.
34
- * @returns {Object} -
35
- */
36
- static getContext(canvas: any, contextAttributes?: any): any;
37
- /**
38
- * Creates NEAREST filter texture.
39
- * @public
40
- * @param {Object} image - Image or Canvas object.
41
- * @returns {Object} - WebGL texture object.
42
- */
43
- public static createTexture_n(handler: any, image: any): any;
44
- /**
45
- * Creates LINEAR filter texture.
46
- * @public
47
- * @param {Object} image - Image or Canvas object.
48
- * @returns {Object} - WebGL texture object.
49
- */
50
- public static createTexture_l(handler: any, image: any): any;
51
- /**
52
- * Creates MIPMAP filter texture.
53
- * @public
54
- * @param {Object} image - Image or Canvas object.
55
- * @returns {Object} - WebGL texture object.
56
- */
57
- public static createTexture_mm(handler: any, image: any): any;
58
- /**
59
- * Creates ANISOTROPY filter texture.
60
- * @public
61
- * @param {Object} image - Image or Canvas object.
62
- * @returns {Object} - WebGL texture object.
63
- */
64
- public static createTexture_a(handler: any, image: any): any;
65
- constructor(id: any, params: any);
66
- /**
67
- * Application default timer.
68
- * @public
69
- * @type {Clock}
70
- */
71
- public defaultClock: Clock;
72
- /**
73
- * Custom timers.
74
- * @protected
75
- * @type{Clock[]}
76
- */
77
- protected _clocks: Clock[];
78
- /**
79
- * Draw frame time in milliseconds.
80
- * @public
81
- * @readonly
82
- * @type {number}
83
- */
84
- public readonly deltaTime: number;
85
- /**
86
- * WebGL rendering canvas element.
87
- * @public
88
- * @type {Object}
89
- */
90
- public canvas: any;
91
- /**
92
- * WebGL context.
93
- * @public
94
- * @type {Object}
95
- */
96
- public gl: any;
97
- /**
98
- * Shader program controller list.
99
- * @public
100
- * @type {Object.<og.webgl.ProgramController>}
101
- */
102
- public programs: any;
103
- /**
104
- * Current active shader program controller.
105
- * @public
106
- * @type {ProgramController}
107
- */
108
- public activeProgram: ProgramController;
109
- /**
110
- * Handler parameters.
111
- * @private
112
- * @type {Object}
113
- */
114
- private _params;
115
- _oneByHeight: number;
116
- /**
117
- * Current WebGL extensions. Becomes here after context initialization.
118
- * @public
119
- * @type {Object}
120
- */
121
- public extensions: any;
122
- /**
123
- * HTML Canvas object id.
124
- * @private
125
- * @type {Object}
126
- */
127
- private _id;
128
- _lastAnimationFrameTime: number;
129
- _initialized: boolean;
130
- /**
131
- * Animation frame function assigned from outside(Ex. from Renderer).
132
- * @private
133
- * @type {frameCallback}
134
- */
135
- private _frameCallback;
136
- transparentTexture: any;
137
- framebufferStack: Stack;
138
- /**
139
- * Sets animation frame function.
140
- * @public
141
- * @param {callback} callback - Frame callback.
142
- */
143
- public setFrameCallback(callback: any): void;
144
- /**
145
- * Creates empty texture.
146
- * @public
147
- * @param {Number} [width=1] - Specifies the width of the texture image..
148
- * @param {Number} [height=1] - Specifies the width of the texture image..
149
- * @param {String} [filter="NEAREST"] - Specifies GL_TEXTURE_MIN(MAX)_FILTER texture value.
150
- * @param {String} [internalFormat="RGBA"] - Specifies the color components in the texture.
151
- * @param {String} [format="RGBA"] - Specifies the format of the texel data.
152
- * @param {String} [type="UNSIGNED_BYTE"] - Specifies the data type of the texel data.
153
- * @param {Number} [levels=0] - Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
154
- * @returns {Object} - WebGL texture object.
155
- */
156
- public createEmptyTexture2DExt(width?: number, height?: number, filter?: string, internalFormat?: string, format?: string, type?: string, level?: number): any;
157
- /**
158
- * Creates Empty NEAREST filtered texture.
159
- * @public
160
- * @param {number} width - Empty texture width.
161
- * @param {number} height - Empty texture height.
162
- * @returns {Object} - WebGL texture object.
163
- */
164
- public createEmptyTexture_n(width: number, height: number): any;
165
- /**
166
- * Creates empty LINEAR filtered texture.
167
- * @public
168
- * @param {number} width - Empty texture width.
169
- * @param {number} height - Empty texture height.
170
- * @returns {Object} - WebGL texture object.
171
- */
172
- public createEmptyTexture_l(width: number, height: number): any;
173
- /**
174
- * Creates DEFAULT filter texture, ANISOTROPY is default.
175
- * @public
176
- * @param {Object} image - Image or Canvas object.
177
- * @returns {Object} - WebGL texture object.
178
- */
179
- public createTexture(image: any): any;
180
- createTexture_n(image: any): any;
181
- createTexture_l(image: any): any;
182
- createTexture_mm(image: any): any;
183
- createTexture_a(image: any): any;
184
- /**
185
- * Creates cube texture.
186
- * @public
187
- * @param {Object.<string>} params - Face image urls:
188
- * @param {string} params.px - Positive X or right image url.
189
- * @param {string} params.nx - Negative X or left image url.
190
- * @param {string} params.py - Positive Y or up image url.
191
- * @param {string} params.ny - Negative Y or bottom image url.
192
- * @param {string} params.pz - Positive Z or face image url.
193
- * @param {string} params.nz - Negative Z or back image url.
194
- * @returns {Object} - WebGL texture object.
195
- */
196
- public loadCubeMapTexture(params: any): any;
197
- /**
198
- * Adds shader program to the handler.
199
- * @public
200
- * @param {Program} program - Shader program.
201
- * @param {boolean} [notActivate] - If it's true program will not compile.
202
- * @return {Program} -
203
- */
204
- public addProgram(program: Program, notActivate?: boolean): Program;
205
- /**
206
- * Removes shader program from handler.
207
- * @public
208
- * @param {String} name - Shader program name.
209
- */
210
- public removeProgram(name: string): void;
211
- /**
212
- * Adds shader programs to the handler.
213
- * @public
214
- * @param {Array.<Program>} programsArr - Shader program array.
215
- */
216
- public addPrograms(programsArr: Array<Program>): void;
217
- /**
218
- * Used in addProgram
219
- * @private
220
- * @param {ProgramController} sc - Program controller
221
- */
222
- private _initProgramController;
223
- /**
224
- * Used in init function.
225
- * @private
226
- */
227
- private _initPrograms;
228
- /**
229
- * Initialize additional WebGL extensions.
230
- * @public
231
- * @param {string} extensionStr - Extension name.
232
- * @param {boolean} showLog - Show logging.
233
- * @return {Object} -
234
- */
235
- public initializeExtension(extensionStr: string, showLog: boolean): any;
236
- /**
237
- * Main function that initialize handler.
238
- * @public
239
- */
240
- public initialize(): void;
241
- /**
242
- * Sets default gl render parameters. Used in init function.
243
- * @private
244
- */
245
- private _setDefaults;
246
- /**
247
- * Activate depth test.
248
- * @public
249
- */
250
- public activateDepthTest(): void;
251
- /**
252
- * Deactivate depth test.
253
- * @public
254
- */
255
- public deactivateDepthTest(): void;
256
- /**
257
- * Activate face culling.
258
- * @public
259
- */
260
- public activateFaceCulling(): void;
261
- /**
262
- * Deactivate face cullting.
263
- * @public
264
- */
265
- public deactivateFaceCulling(): void;
266
- /**
267
- * Activate blending.
268
- * @public
269
- */
270
- public activateBlending(): void;
271
- /**
272
- * Deactivate blending.
273
- * @public
274
- */
275
- public deactivateBlending(): void;
276
- /**
277
- * Creates STREAM_DRAW ARRAY buffer.
278
- * @public
279
- * @param {Array.<number>} array - Input array.
280
- * @param {number} itemSize - Array item size.
281
- * @param {number} numItems - Items quantity.
282
- * @param {number} [usage=STATIC_DRAW] - Parameter of the bufferData call can be one of STATIC_DRAW, DYNAMIC_DRAW, or STREAM_DRAW.
283
- * @return {Object} -
284
- */
285
- public createStreamArrayBuffer(itemSize: number, numItems: number, usage?: number, bites?: number): any;
286
- /**
287
- * Load stream ARRAY buffer.
288
- * @public
289
- * @param {Array.<number>} array - Input array.
290
- * @param {number} itemSize - Array item size.
291
- * @param {number} numItems - Items quantity.
292
- * @param {number} [usage=STATIC_DRAW] - Parameter of the bufferData call can be one of STATIC_DRAW, DYNAMIC_DRAW, or STREAM_DRAW.
293
- * @return {Object} -
294
- */
295
- public setStreamArrayBuffer(buffer: any, array: Array<number>, offset?: number): any;
296
- /**
297
- * Creates ARRAY buffer.
298
- * @public
299
- * @param {Array.<number>} array - Input array.
300
- * @param {number} itemSize - Array item size.
301
- * @param {number} numItems - Items quantity.
302
- * @param {number} [usage=STATIC_DRAW] - Parameter of the bufferData call can be one of STATIC_DRAW, DYNAMIC_DRAW, or STREAM_DRAW.
303
- * @return {Object} -
304
- */
305
- public createArrayBuffer(array: Array<number>, itemSize: number, numItems: number, usage?: number): any;
306
- /**
307
- * Creates ARRAY buffer specific length.
308
- * @public
309
- * @param {Array.<number>} array - Input array.
310
- * @param {number} itemSize - Array item size.
311
- * @param {number} numItems - Items quantity.
312
- * @param {number} [usage=STATIC_DRAW] - Parameter of the bufferData call can be one of STATIC_DRAW, DYNAMIC_DRAW, or STREAM_DRAW.
313
- * @return {Object} -
314
- */
315
- public createArrayBufferLength(size: any, usage?: number): any;
316
- /**
317
- * Creates ELEMENT ARRAY buffer.
318
- * @public
319
- * @param {Array.<number>} array - Input array.
320
- * @param {number} itemSize - Array item size.
321
- * @param {number} numItems - Items quantity.
322
- * @param {number} [usage=STATIC_DRAW] - Parameter of the bufferData call can be one of STATIC_DRAW, DYNAMIC_DRAW, or STREAM_DRAW.
323
- * @return {Object} -
324
- */
325
- public createElementArrayBuffer(array: Array<number>, itemSize: number, numItems: number, usage?: number): any;
326
- /**
327
- * Sets handler canvas size.
328
- * @public
329
- * @param {number} w - Canvas width.
330
- * @param {number} h - Canvas height.
331
- */
332
- public setSize(w: number, h: number): void;
333
- /**
334
- * Returns context screen width.
335
- * @public
336
- * @returns {number} -
337
- */
338
- public getWidth(): number;
339
- /**
340
- * Returns context screen height.
341
- * @public
342
- * @returns {number} -
343
- */
344
- public getHeight(): number;
345
- /**
346
- * Returns canvas aspect ratio.
347
- * @public
348
- * @returns {number} -
349
- */
350
- public getClientAspect(): number;
351
- /**
352
- * Returns screen center coordinates.
353
- * @public
354
- * @returns {number} -
355
- */
356
- public getCenter(): number;
357
- /**
358
- * Draw single frame.
359
- * @public
360
- * @param {number} now - Frame current time milliseconds.
361
- */
362
- public drawFrame(): void;
363
- /**
364
- * Clearing gl frame.
365
- * @public
366
- */
367
- public clearFrame(): void;
368
- /**
369
- * Starts animation loop.
370
- * @public
371
- */
372
- public start(): void;
373
- stop(): void;
374
- _requestAnimationFrameId: number;
375
- /**
376
- * Make animation.
377
- * @private
378
- */
379
- private _animationFrameCallback;
380
- /**
381
- * Creates default texture object
382
- * @public
383
- * @param {Object} [params] - Texture parameters:
384
- * @param {callback} [success] - Creation callback
385
- */
386
- public createDefaultTexture(params?: any, success?: callback): void;
387
- /**
388
- * @public
389
- */
390
- public destroy(): void;
391
- addClock(clock: any): void;
392
- addClocks(clockArr: any): void;
393
- removeClock(clock: any): void;
394
- }
395
- import { Clock } from "../Clock.js";
396
- import { ProgramController } from "./ProgramController.js";
397
- import { Stack } from "../Stack.js";
@@ -1,89 +0,0 @@
1
- /**
2
- * Class represents multisample 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 {Object} [options.texture] - Texture to render.
9
- * @param {String} [options.depthComponent="DEPTH_COMPONENT16"] - Specifies depth buffer size.
10
- * @param {Boolean} [options.useDepth] - Using depth buffer during the rendering.
11
- */
12
- export class Multisample {
13
- constructor(handler: any, options: any);
14
- /**
15
- * WebGL handler.
16
- * @public
17
- * @type {Handler}
18
- */
19
- public handler: Handler;
20
- _internalFormat: any;
21
- /**
22
- * Framebuffer object.
23
- * @private
24
- * @type {Object}
25
- */
26
- private _fbo;
27
- /**
28
- * Renderbuffer object.
29
- * @private
30
- * @type {Object}
31
- */
32
- private _depthRenderbuffer;
33
- /**
34
- * Framebuffer width.
35
- * @private
36
- * @type {number}
37
- */
38
- private _width;
39
- /**
40
- * Framebuffer width.
41
- * @private
42
- * @type {number}
43
- */
44
- private _height;
45
- _msaa: any;
46
- _useDepth: any;
47
- _depthComponent: any;
48
- /**
49
- * Framebuffer activity.
50
- * @private
51
- * @type {boolean}
52
- */
53
- private _active;
54
- _size: any;
55
- _filter: any;
56
- _glFilter: any;
57
- renderbuffers: any[];
58
- destroy(): void;
59
- /**
60
- * Framebuffer initialization.
61
- * @private
62
- */
63
- private init;
64
- blitTo(framebuffer: any, attachmentIndex?: number): void;
65
- /**
66
- * Sets framebuffer viewport size.
67
- * @public
68
- * @param {number} width - Framebuffer width.
69
- * @param {number} height - Framebuffer height.
70
- */
71
- public setSize(width: number, height: number, forceDestroy: any): void;
72
- /**
73
- * Returns framebuffer completed.
74
- * @public
75
- * @returns {boolean} -
76
- */
77
- public isComplete(): boolean;
78
- /**
79
- * Activate framebuffer frame to draw.
80
- * @public
81
- * @returns {Framebuffer} Returns Current framebuffer.
82
- */
83
- public activate(): Framebuffer;
84
- /**
85
- * Deactivate framebuffer frame.
86
- * @public
87
- */
88
- public deactivate(): void;
89
- }
@@ -1,161 +0,0 @@
1
- /**
2
- * Represents more comfortable using WebGL shader program.
3
- * @class
4
- * @param {string} name - Shader program name identificator.
5
- * @param {object} material - Object stores uniforms, attributes and program codes:
6
- * @param {object} material.uniforms - Uniforms definition section.
7
- * @param {object} material.attributes - Attributes definition section.
8
- * @param {string} material.vertexShader - Vertex glsl code.
9
- * @param {string} material.fragmentShader - Fragment glsl code.
10
- */
11
- export class Program {
12
- /**
13
- * Bind program buffer.
14
- * @function
15
- * @param {Program} program - Used program.
16
- * @param {Object} variable - Variable represents buffer data.
17
- */
18
- static bindBuffer(program: Program, variable: any): void;
19
- constructor(name: any, material: any);
20
- /**
21
- * Shader progarm name.
22
- * @public
23
- * @type {string}
24
- */
25
- public name: string;
26
- attributes: {};
27
- uniforms: {};
28
- /**
29
- * Attributes.
30
- * @public
31
- * @type {Object}
32
- */
33
- public _attributes: any;
34
- /**
35
- * Uniforms.
36
- * @public
37
- * @type {Object}
38
- */
39
- public _uniforms: any;
40
- /**
41
- * Vertex shader.
42
- * @public
43
- * @type {string}
44
- */
45
- public vertexShader: string;
46
- /**
47
- * Fragment shader.
48
- * @public
49
- * @type {string}
50
- */
51
- public fragmentShader: string;
52
- /**
53
- * Webgl context.
54
- * @public
55
- * @type {Object}
56
- */
57
- public gl: any;
58
- /**
59
- * All program variables.
60
- * @private
61
- * @type {Object}
62
- */
63
- private _variables;
64
- /**
65
- * Program pointer.
66
- * @private
67
- * @type {Object}
68
- */
69
- private _p;
70
- /**
71
- * Texture counter.
72
- * @prvate
73
- * @type {number}
74
- */
75
- _textureID: number;
76
- /**
77
- * Program attributes array.
78
- * @private
79
- * @type {Array.<Object>}
80
- */
81
- private _attribArrays;
82
- /**
83
- * Program attributes divisor.
84
- * @private
85
- * @type {Array.<Object>}
86
- */
87
- private _attribDivisor;
88
- /**
89
- * Sets the current program frame.
90
- * @public
91
- */
92
- public use(): void;
93
- /**
94
- * Sets program variables.
95
- * @public
96
- * @param {Object} material - Variables and values object.
97
- */
98
- public set(material: any): void;
99
- /**
100
- * Apply current variables.
101
- * @public
102
- */
103
- public apply(): void;
104
- /**
105
- * Calls drawElements index buffer function.
106
- * @public
107
- * @param {number} mode - Draw mode(GL_TRIANGLES, GL_LINESTRING etc.).
108
- * @param {Object} buffer - Index buffer.
109
- */
110
- public drawIndexBuffer(mode: number, buffer: any): void;
111
- /**
112
- * Calls drawArrays function.
113
- * @public
114
- * @param {number} mode - Draw mode(GL_TRIANGLES, GL_LINESTRING etc.).
115
- * @param {number} numItems - Curent binded buffer drawing items count.
116
- */
117
- public drawArrays(mode: number, numItems: number): void;
118
- /**
119
- * Check and log for an shader compile errors and warnings. Returns True - if no errors otherwise returns False.
120
- * @private
121
- * @param {Object} shader - WebGl shader program.
122
- * @param {string} src - Shader program source.
123
- * @returns {boolean} -
124
- */
125
- private _getShaderCompileStatus;
126
- /**
127
- * Returns compiled vertex shader program pointer.
128
- * @private
129
- * @param {string} src - Vertex shader source code.
130
- * @returns {Object} -
131
- */
132
- private _createVertexShader;
133
- /**
134
- * Returns compiled fragment shader program pointer.
135
- * @private
136
- * @param {string} src - Vertex shader source code.
137
- * @returns {Object} -
138
- */
139
- private _createFragmentShader;
140
- /**
141
- * Disable current program vertexAttribArrays.
142
- * @public
143
- */
144
- public disableAttribArrays(): void;
145
- /**
146
- * Enable current program vertexAttribArrays.
147
- * @public
148
- */
149
- public enableAttribArrays(): void;
150
- /**
151
- * Delete program.
152
- * @public
153
- */
154
- public delete(): void;
155
- /**
156
- * Creates program.
157
- * @public
158
- * @param {Object} gl - WebGl context.
159
- */
160
- public createProgram(gl: any): void;
161
- }