@openglobus/og 0.28.7 → 1.0.0-rc2

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 (220) hide show
  1. package/LICENSE.md +218 -4
  2. package/README.md +31 -18
  3. package/lib/Deferred.d.ts +2 -2
  4. package/lib/Events.d.ts +1 -1
  5. package/lib/Globe.d.ts +8 -5
  6. package/lib/Object3d.d.ts +17 -14
  7. package/lib/Popup.d.ts +2 -2
  8. package/lib/assets/LabelWorker.worker-DYd7xn3M.js.map +1 -0
  9. package/lib/assets/PlainSegmentWorker.worker-JsKldq-e.js.map +1 -0
  10. package/lib/assets/TerrainWorker.worker-CqUJvMOv.js.map +1 -0
  11. package/lib/bv/index.d.ts +2 -2
  12. package/lib/camera/Camera.d.ts +280 -27
  13. package/lib/camera/Frustum.d.ts +100 -15
  14. package/lib/camera/PlanetCamera.d.ts +93 -8
  15. package/lib/camera/index.d.ts +2 -2
  16. package/lib/control/CameraFrameComposer.d.ts +2 -2
  17. package/lib/control/CameraFrameHandler.d.ts +1 -1
  18. package/lib/control/CompassButton.d.ts +2 -2
  19. package/lib/control/EarthCoordinates.d.ts +5 -2
  20. package/lib/control/FramebufferPreview.d.ts +3 -3
  21. package/lib/control/GeoImageDragControl.d.ts +1 -1
  22. package/lib/control/LayerAnimation.d.ts +2 -2
  23. package/lib/control/LayerSwitcher.d.ts +3 -0
  24. package/lib/control/Lighting.d.ts +4 -2
  25. package/lib/control/Navigation.d.ts +15 -11
  26. package/lib/control/OrthoSwitcher.d.ts +18 -0
  27. package/lib/control/SimpleTouchNavigation.d.ts +44 -0
  28. package/lib/control/Sun.d.ts +4 -2
  29. package/lib/control/TouchNavigation.d.ts +4 -8
  30. package/lib/control/atmosphere/Atmosphere.d.ts +2 -0
  31. package/lib/control/atmosphere/AtmosphereConfig.d.ts +2 -6
  32. package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +17 -3
  33. package/lib/control/cameraDepthHandler/camera_depth.d.ts +2 -2
  34. package/lib/control/drawing/LineStringDrawingScene.d.ts +1 -0
  35. package/lib/control/drawing/PolygonDrawingScene.d.ts +14 -14
  36. package/lib/control/elevationProfile/ElevationProfile.d.ts +1 -1
  37. package/lib/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
  38. package/lib/control/elevationProfile/ElevationProfileScene.d.ts +9 -12
  39. package/lib/control/elevationProfile/ElevationProfileView.d.ts +16 -5
  40. package/lib/control/entityEditor/EntityEditor.d.ts +19 -0
  41. package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorDialog.d.ts} +9 -8
  42. package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +12 -12
  43. package/lib/control/{geoObjectEditor → entityEditor}/colors.d.ts +2 -2
  44. package/lib/control/entityTree/EntityTree.d.ts +46 -0
  45. package/lib/control/entityTree/EntityTreeView.d.ts +24 -0
  46. package/lib/control/heightRuler/HeightRulerScene.d.ts +3 -2
  47. package/lib/control/index.d.ts +5 -3
  48. package/lib/control/ruler/RulerScene.d.ts +8 -8
  49. package/lib/control/selection/SelectionScene.d.ts +6 -6
  50. package/lib/control/timeline/TimelineControl.d.ts +2 -2
  51. package/lib/control/timeline/TimelineModel.d.ts +1 -1
  52. package/lib/control/timeline/TimelineView.d.ts +52 -13
  53. package/lib/control/visibleExtent/segment.d.ts +7 -0
  54. package/lib/ellipsoid/index.d.ts +4 -4
  55. package/lib/entity/Entity.d.ts +114 -100
  56. package/lib/entity/EntityCollection.d.ts +95 -70
  57. package/lib/entity/{BaseBillboard.d.ts → billboard/BaseBillboard.d.ts} +16 -17
  58. package/lib/entity/{BaseBillboardHandler.d.ts → billboard/BaseBillboardHandler.d.ts} +24 -9
  59. package/lib/entity/{Billboard.d.ts → billboard/Billboard.d.ts} +11 -7
  60. package/lib/entity/{BillboardHandler.d.ts → billboard/BillboardHandler.d.ts} +1 -1
  61. package/lib/entity/{GeoObject.d.ts → geoObject/GeoObject.d.ts} +7 -6
  62. package/lib/entity/{GeoObjectHandler.d.ts → geoObject/GeoObjectHandler.d.ts} +29 -11
  63. package/lib/entity/{InstanceData.d.ts → geoObject/InstanceData.d.ts} +18 -13
  64. package/lib/entity/{Geometry.d.ts → geometry/Geometry.d.ts} +10 -10
  65. package/lib/entity/{GeometryHandler.d.ts → geometry/GeometryHandler.d.ts} +7 -7
  66. package/lib/entity/index.d.ts +8 -8
  67. package/lib/entity/{Label.d.ts → label/Label.d.ts} +12 -13
  68. package/lib/entity/{LabelHandler.d.ts → label/LabelHandler.d.ts} +31 -7
  69. package/lib/entity/{LabelWorker.d.ts → label/LabelWorker.d.ts} +3 -3
  70. package/lib/entity/{PointCloud.d.ts → pointCloud/PointCloud.d.ts} +18 -12
  71. package/lib/entity/{PointCloudHandler.d.ts → pointCloud/PointCloudHandler.d.ts} +4 -4
  72. package/lib/entity/polyline/Polyline.d.ts +242 -0
  73. package/lib/entity/polyline/PolylineBatchRenderer.d.ts +443 -0
  74. package/lib/entity/{PolylineHandler.d.ts → polyline/PolylineHandler.d.ts} +19 -7
  75. package/lib/entity/{Ray.d.ts → ray/Ray.d.ts} +27 -9
  76. package/lib/entity/{RayHandler.d.ts → ray/RayHandler.d.ts} +18 -8
  77. package/lib/entity/{Strip.d.ts → strip/Strip.d.ts} +21 -17
  78. package/lib/entity/{StripHandler.d.ts → strip/StripHandler.d.ts} +11 -6
  79. package/lib/index.d.ts +47 -42
  80. package/lib/layer/BaseGeoImage.d.ts +20 -17
  81. package/lib/layer/CanvasTiles.d.ts +14 -12
  82. package/lib/layer/GeoImage.d.ts +1 -1
  83. package/lib/layer/GeoTexture2d.d.ts +2 -2
  84. package/lib/layer/KML.d.ts +19 -18
  85. package/lib/layer/Layer.d.ts +72 -53
  86. package/lib/layer/Vector.d.ts +47 -30
  87. package/lib/layer/WMS.d.ts +1 -1
  88. package/lib/layer/XYZ.d.ts +11 -12
  89. package/lib/layer/index.d.ts +12 -12
  90. package/lib/math/Line2.d.ts +1 -1
  91. package/lib/math/Line3.d.ts +1 -1
  92. package/lib/math/Mat3.d.ts +3 -13
  93. package/lib/math/Mat4.d.ts +16 -10
  94. package/lib/math/Plane.d.ts +1 -1
  95. package/lib/math/Quat.d.ts +14 -12
  96. package/lib/math/Ray.d.ts +4 -3
  97. package/lib/math/Vec2.d.ts +25 -17
  98. package/lib/math/Vec3.d.ts +33 -31
  99. package/lib/math/Vec4.d.ts +1 -1
  100. package/lib/math/coder.d.ts +1 -1
  101. package/lib/math/index.d.ts +13 -14
  102. package/lib/mercator.d.ts +4 -4
  103. package/lib/og.css +1 -1
  104. package/lib/og.es.js +1 -1
  105. package/lib/og.es.js.map +1 -1
  106. package/lib/quadTree/EntityCollectionNode.d.ts +10 -10
  107. package/lib/quadTree/EntityCollectionsTreeStrategy.d.ts +5 -5
  108. package/lib/quadTree/QuadTreeStrategy.d.ts +3 -4
  109. package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
  110. package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +4 -4
  111. package/lib/renderer/AtmosphereDeferredShading.d.ts +12 -0
  112. package/lib/renderer/IDeferredShadingPass.d.ts +8 -0
  113. package/lib/renderer/ITransparencyPass.d.ts +8 -0
  114. package/lib/renderer/PhongDeferredShading.d.ts +16 -0
  115. package/lib/renderer/Renderer.d.ts +166 -99
  116. package/lib/renderer/RendererEvents.d.ts +15 -5
  117. package/lib/renderer/WOITPass.d.ts +14 -0
  118. package/lib/res/fonts/Ephesis-Regular.json +1 -0
  119. package/lib/res/fonts/Ephesis-Regular.png +0 -0
  120. package/lib/res/fonts/Karla-Bold.json +1 -0
  121. package/lib/res/fonts/Karla-Bold.png +0 -0
  122. package/lib/res/fonts/Karla-Italic.json +1 -0
  123. package/lib/res/fonts/Karla-Italic.png +0 -0
  124. package/lib/res/fonts/Karla-Light.json +1 -0
  125. package/lib/res/fonts/Karla-Light.png +0 -0
  126. package/lib/res/fonts/Karla-Medium.json +1 -0
  127. package/lib/res/fonts/Karla-Medium.png +0 -0
  128. package/lib/res/fonts/Roboto-Regular.json +1 -37147
  129. package/lib/res/fonts/Roboto-Regular.png +0 -0
  130. package/lib/res/fonts/arial.json +1 -4321
  131. package/lib/res/fonts/arial.png +0 -0
  132. package/lib/res/night-4326.png +0 -0
  133. package/lib/res/night.png +0 -0
  134. package/lib/scene/AltitudeNearPlaneStrategy.d.ts +17 -0
  135. package/lib/scene/Axes.d.ts +4 -3
  136. package/lib/scene/Planet.d.ts +244 -69
  137. package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +49 -46
  138. package/lib/scene/SkyBox.d.ts +5 -3
  139. package/lib/scene/index.d.ts +2 -2
  140. package/lib/segment/Segment.d.ts +29 -15
  141. package/lib/segment/SegmentLonLat.d.ts +0 -1
  142. package/lib/shadeModeConstants.d.ts +7 -0
  143. package/lib/shaders/applyDeferredDepth.d.ts +2 -0
  144. package/lib/shaders/atmos/atmos.d.ts +3 -3
  145. package/lib/shaders/billboard/billboard.d.ts +4 -3
  146. package/lib/shaders/deferredShading/deferredShading.d.ts +2 -0
  147. package/lib/shaders/deferredShading/deferredShadingAtmos.d.ts +3 -0
  148. package/lib/shaders/depth.d.ts +2 -2
  149. package/lib/shaders/geo_object/geo_object.d.ts +8 -4
  150. package/lib/shaders/label/label.d.ts +4 -4
  151. package/lib/shaders/pointCloud.d.ts +2 -2
  152. package/lib/shaders/polyline/polyline.d.ts +7 -3
  153. package/lib/shaders/ray/ray.d.ts +3 -2
  154. package/lib/shaders/screenFrame.d.ts +2 -2
  155. package/lib/shaders/segment/segment.d.ts +7 -0
  156. package/lib/shaders/skybox.d.ts +2 -2
  157. package/lib/shaders/strip/strip.d.ts +3 -0
  158. package/lib/shaders/tone_mapping/toneMapping.d.ts +2 -2
  159. package/lib/shaders/weightedOITResolve.d.ts +2 -0
  160. package/lib/terrain/BilTerrain.d.ts +1 -1
  161. package/lib/terrain/EmptyTerrain.d.ts +5 -6
  162. package/lib/terrain/GlobusTerrain.d.ts +18 -23
  163. package/lib/terrain/RgbTerrain.d.ts +8 -8
  164. package/lib/terrain/index.d.ts +5 -5
  165. package/lib/tsconfig.tsbuildinfo +1 -1
  166. package/lib/ui/Button.d.ts +7 -5
  167. package/lib/ui/ButtonGroup.d.ts +1 -1
  168. package/lib/ui/Checkbox.d.ts +2 -2
  169. package/lib/ui/Color.d.ts +2 -2
  170. package/lib/ui/Dialog.d.ts +30 -3
  171. package/lib/ui/Input.d.ts +7 -2
  172. package/lib/ui/Slider.d.ts +5 -2
  173. package/lib/ui/ToggleButton.d.ts +2 -2
  174. package/lib/ui/View.d.ts +1 -1
  175. package/lib/ui/icons.d.ts +1 -1
  176. package/lib/ui/index.d.ts +9 -9
  177. package/lib/utils/FontAtlas.d.ts +57 -8
  178. package/lib/utils/GeoImageCreator.d.ts +2 -2
  179. package/lib/utils/ImagesCacheManager.d.ts +3 -3
  180. package/lib/utils/Loader.d.ts +2 -2
  181. package/lib/utils/PlainSegmentWorker.d.ts +2 -2
  182. package/lib/utils/TerrainWorker.d.ts +2 -2
  183. package/lib/utils/TextureAtlas.d.ts +7 -2
  184. package/lib/utils/TextureResourceManager.d.ts +162 -0
  185. package/lib/utils/VectorTileCreator.d.ts +1 -1
  186. package/lib/utils/colorSpace.d.ts +9 -0
  187. package/lib/utils/gltf/gltfParser.d.ts +9 -2
  188. package/lib/utils/gltf/types.d.ts +20 -2
  189. package/lib/utils/shared.d.ts +11 -5
  190. package/lib/utils/textureResourceMeta.d.ts +9 -0
  191. package/lib/webgl/BaseFramebuffer.d.ts +7 -0
  192. package/lib/webgl/Framebuffer.d.ts +9 -6
  193. package/lib/webgl/Handler.d.ts +81 -99
  194. package/lib/webgl/ShaderProgram.d.ts +190 -0
  195. package/lib/webgl/index.d.ts +2 -2
  196. package/lib/webgl/variableHandlers.d.ts +2 -1
  197. package/package.json +77 -76
  198. package/lib/assets/LabelWorker.worker-BT1uJgYn.js.map +0 -1
  199. package/lib/assets/PlainSegmentWorker.worker-CT1cj8jj.js.map +0 -1
  200. package/lib/assets/TerrainWorker.worker-DmikdfB2.js.map +0 -1
  201. package/lib/control/OldMouseNavigation.d.ts +0 -65
  202. package/lib/control/ZoomControl.d.ts +0 -28
  203. package/lib/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
  204. package/lib/control/visibleExtent/drawnode.d.ts +0 -7
  205. package/lib/entity/Polyline.d.ts +0 -417
  206. package/lib/light/LightSource.d.ts +0 -36
  207. package/lib/res/fonts/Roboto-Regular.ttf.cfg +0 -1340
  208. package/lib/res/fonts/Roboto-Regular.ttf.png +0 -0
  209. package/lib/res/fonts/arial.ttf.cfg +0 -1570
  210. package/lib/res/fonts/arial.ttf.png +0 -0
  211. package/lib/scene/BaseNode.d.ts +0 -61
  212. package/lib/shaders/drawnode/drawnode.d.ts +0 -8
  213. package/lib/webgl/Program.d.ts +0 -161
  214. package/lib/webgl/ProgramController.d.ts +0 -87
  215. /package/lib/control/{geoObjectEditor → entityEditor}/ArrowEntity.d.ts +0 -0
  216. /package/lib/control/{geoObjectEditor → entityEditor}/AxisTrackEntity.d.ts +0 -0
  217. /package/lib/control/{geoObjectEditor → entityEditor}/MoveAxisEntity.d.ts +0 -0
  218. /package/lib/control/{geoObjectEditor → entityEditor}/MovePlaneEntity.d.ts +0 -0
  219. /package/lib/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +0 -0
  220. /package/lib/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
Binary file
@@ -1,61 +0,0 @@
1
- /**
2
- * Scene node base class.
3
- * @class
4
- * @param {string} name - Node name.
5
- */
6
- declare class BaseNode {
7
- static __counter__: number;
8
- protected __id: number;
9
- /**
10
- * Node name.
11
- * @public
12
- * @type {string}
13
- */
14
- protected _name: string;
15
- /**
16
- * Top scene tree node pointer.
17
- * @public
18
- * @type {BaseNode}
19
- */
20
- topNode: BaseNode;
21
- protected _dictionary: Record<string, BaseNode>;
22
- /**
23
- * Children nodes.
24
- * @public
25
- * @type {Array.<BaseNode>}
26
- */
27
- childNodes: BaseNode[];
28
- /**
29
- * Parent node pointer.
30
- * @public
31
- * @type {BaseNode}
32
- */
33
- parentNode: BaseNode | null;
34
- constructor(name?: string);
35
- get name(): string;
36
- /**
37
- * Adds node to the current hierarchy.
38
- * @public
39
- * @type {BaseNode}
40
- */
41
- addNode(node: BaseNode): void;
42
- /**
43
- * Destroy node.
44
- * @public
45
- */
46
- destroy(): void;
47
- /**
48
- * Gets node by name in the current.
49
- * @public
50
- * @param {string} name - Node name.
51
- * @return {RenderNode} Node object in the current node.
52
- */
53
- getNodeByName(name: string): BaseNode;
54
- /**
55
- * Clear current node.
56
- * @protected
57
- */
58
- protected _clear(): void;
59
- isEqual(node: BaseNode): boolean;
60
- }
61
- export { BaseNode };
@@ -1,8 +0,0 @@
1
- import type { AtmosphereParameters } from "../atmos/atmos";
2
- import { Program } from "../../webgl/Program";
3
- export declare function drawnode_screen_nl(): Program;
4
- export declare function drawnode_screen_wl_webgl1NoAtmos(): Program;
5
- export declare function drawnode_screen_wl_webgl2NoAtmos(): Program;
6
- export declare function drawnode_screen_wl_webgl2Atmos(atmosParams?: AtmosphereParameters): Program;
7
- export declare function drawnode_colorPicking(): Program;
8
- export declare function drawnode_depth(): Program;
@@ -1,161 +0,0 @@
1
- import type { ProgramVariable } from "./variableHandlers";
2
- import type { WebGLBufferExt } from "./Handler";
3
- import { ProgramController } from "./ProgramController";
4
- type WebGLProgramExt = WebGLProgram & {
5
- [id: string]: WebGLUniformLocation;
6
- };
7
- type ProgramMaterial = {
8
- attributes: Record<string, any>;
9
- uniforms: Record<string, any>;
10
- vertexShader: string;
11
- fragmentShader: string;
12
- };
13
- /**
14
- * Represents more comfortable using WebGL shader program.
15
- * @class
16
- * @param {string} name - Program name.
17
- * @param {ProgramMaterial} material - Object stores uniforms, attributes and program codes:
18
- * @param {Record<string, any>} material.uniforms - Uniforms definition section.
19
- * @param {Record<string, any>} material.attributes - Attributes definition section.
20
- * @param {string} material.vertexShader - Vertex glsl code.
21
- * @param {string} material.fragmentShader - Fragment glsl code.
22
- */
23
- declare class Program {
24
- /**
25
- * Shader program name.
26
- * @public
27
- * @type {string}
28
- */
29
- name: string;
30
- _programController: ProgramController | null;
31
- attributes: {
32
- [id: string]: number;
33
- };
34
- uniforms: {
35
- [id: string]: WebGLUniformLocation;
36
- };
37
- _attributes: Record<string, ProgramVariable>;
38
- _uniforms: Record<string, ProgramVariable>;
39
- vertexShader: string;
40
- fragmentShader: string;
41
- drawElementsInstanced: Function | null;
42
- vertexAttribDivisor: Function | null;
43
- /**
44
- * Webgl context.
45
- * @public
46
- * @type {WebGL2RenderingContext | null}
47
- */
48
- gl: WebGL2RenderingContext | null;
49
- /**
50
- * All program variables.
51
- * @private
52
- * @type {Record<string, ProgramVariable>}
53
- */
54
- protected _variables: Record<string, ProgramVariable>;
55
- /**
56
- * Program pointer.
57
- * @private
58
- * @type {WebGLProgramExt | null}
59
- */
60
- _p: WebGLProgramExt | null;
61
- /**
62
- * Texture counter.
63
- * @protected
64
- * @type {number}
65
- */
66
- _textureID: number;
67
- /**
68
- * Program attributes array.
69
- * @private
70
- * @type {number[]}
71
- */
72
- protected _attribArrays: number[];
73
- /**
74
- * Program attributes divisors.
75
- * @protected
76
- * @type {number[]}
77
- */
78
- protected _attribDivisor: number[];
79
- constructor(name: string, material: ProgramMaterial);
80
- /**
81
- * Bind program buffer.
82
- * @function
83
- * @param {Program} program - Used program.
84
- * @param {Object} variable - Variable represents buffer data.
85
- */
86
- static bindBuffer(program: Program, variable: ProgramVariable): void;
87
- /**
88
- * Sets the current program frame.
89
- * @public
90
- */
91
- use(): void;
92
- /**
93
- * Sets program variables.
94
- * @public
95
- * @param {Object} material - Variables and values object.
96
- */
97
- set(material: Record<string, any>): void;
98
- /**
99
- * Apply current variables.
100
- * @public
101
- */
102
- apply(): void;
103
- /**
104
- * Calls drawElements index buffer function.
105
- * @public
106
- * @param {number} mode - Draw mode(GL_TRIANGLES, GL_LINESTRING etc.).
107
- * @param {Object} buffer - Index buffer.
108
- */
109
- drawIndexBuffer(mode: number, buffer: WebGLBufferExt): void;
110
- /**
111
- * Calls drawArrays function.
112
- * @public
113
- * @param {number} mode - Draw mode GL_TRIANGLES, GL_LINESTRING, etc.
114
- * @param {number} numItems - Items to draw
115
- */
116
- drawArrays(mode: number, numItems: number): void;
117
- /**
118
- * Check and log for a shader compile errors and warnings. Returns True - if no errors otherwise returns False.
119
- * @private
120
- * @param {WebGLShader} shader - WebGl shader program.
121
- * @param {string} src - Shader program source.
122
- * @returns {boolean} -
123
- */
124
- protected _getShaderCompileStatus(shader: WebGLShader, src: string): boolean;
125
- /**
126
- * Returns compiled vertex shader program pointer.
127
- * @private
128
- * @param {string} src - Vertex shader source code.
129
- * @returns {Object} -
130
- */
131
- protected _createVertexShader(src: string): WebGLShader | undefined;
132
- /**
133
- * Returns compiled fragment shader program pointer.
134
- * @private
135
- * @param {string} src - Vertex shader source code.
136
- * @returns {Object} -
137
- */
138
- protected _createFragmentShader(src: string): WebGLShader | undefined;
139
- /**
140
- * Disable current program vertexAttribArrays.
141
- * @public
142
- */
143
- disableAttribArrays(): void;
144
- /**
145
- * Enable current program vertexAttribArrays.
146
- * @public
147
- */
148
- enableAttribArrays(): void;
149
- /**
150
- * Delete program.
151
- * @public
152
- */
153
- delete(): void;
154
- /**
155
- * Creates program.
156
- * @public
157
- * @param {Object} gl - WebGl context.
158
- */
159
- createProgram(gl: WebGL2RenderingContext): void;
160
- }
161
- export { Program };
@@ -1,87 +0,0 @@
1
- import { Handler } from "./Handler";
2
- import type { WebGLBufferExt } from "./Handler";
3
- import { Program } from "./Program";
4
- /**
5
- * This is shader program controller that used by handler object to access the shader
6
- * program capabilities, like switching program during the rendering.
7
- * Get access to the program from ...handler.programs.<program name> etc.
8
- * @class
9
- * @param {Handler} handler - Handler.
10
- * @param {Program} program - Shader program.
11
- */
12
- export declare class ProgramController {
13
- /**
14
- * Handler.
15
- * @protected
16
- * @type {Handler}
17
- */
18
- protected _handler: Handler;
19
- /**
20
- * Shader program.
21
- * @public
22
- * @type {Program}
23
- */
24
- _program: Program;
25
- /**
26
- * Program current frame activation flag.
27
- * @public
28
- * @type {boolean}
29
- */
30
- _activated: boolean;
31
- constructor(handler: Handler, program: Program);
32
- /**
33
- * Lazy create program call.
34
- * @public
35
- */
36
- initialize(): void;
37
- /**
38
- * Returns controller's shader program.
39
- * @public
40
- * @return {Program} -
41
- */
42
- getProgram(): Program;
43
- /**
44
- * Activates current shader program.
45
- * @public
46
- * @returns {ProgramController} -
47
- */
48
- activate(): this;
49
- /**
50
- * Remove program from handler
51
- * @public
52
- */
53
- remove(): void;
54
- /**
55
- * Deactivate shader program. This is not necessary while activate function used.
56
- * @public
57
- */
58
- deactivate(): void;
59
- /**
60
- * Returns program activity.
61
- * @public
62
- * @return {boolean} -
63
- */
64
- isActive(): boolean;
65
- /**
66
- * Sets program uniforms and attributes values and return controller instance.
67
- * @public
68
- * @param {Record<string, any>} params - Object with variable name and value like { value: 12, someArray:[1,2,3], uSampler: texture,... }
69
- * @return {ProgramController} -
70
- */
71
- set(params: Record<string, any>): this;
72
- /**
73
- * Draw index buffer with this program.
74
- * @public
75
- * @param {number} mode - Gl draw mode
76
- * @param {WebGLBuffer} buffer - Buffer to draw.
77
- * @return {ProgramController} Returns current shader controller instance.
78
- */
79
- drawIndexBuffer(mode: number, buffer: WebGLBufferExt): ProgramController;
80
- /**
81
- * Calls Gl drawArray function.
82
- * @param {number} mode - Gl draw mode.
83
- * @param {number} numItems - draw items count.
84
- * @return {ProgramController} Returns current shader controller instance.
85
- */
86
- drawArrays(mode: number, numItems: number): ProgramController;
87
- }