@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.
- package/LICENSE.md +218 -4
- package/README.md +31 -18
- package/lib/Deferred.d.ts +2 -2
- package/lib/Events.d.ts +1 -1
- package/lib/Globe.d.ts +8 -5
- package/lib/Object3d.d.ts +17 -14
- package/lib/Popup.d.ts +2 -2
- package/lib/assets/LabelWorker.worker-DYd7xn3M.js.map +1 -0
- package/lib/assets/PlainSegmentWorker.worker-JsKldq-e.js.map +1 -0
- package/lib/assets/TerrainWorker.worker-CqUJvMOv.js.map +1 -0
- package/lib/bv/index.d.ts +2 -2
- package/lib/camera/Camera.d.ts +280 -27
- package/lib/camera/Frustum.d.ts +100 -15
- package/lib/camera/PlanetCamera.d.ts +93 -8
- package/lib/camera/index.d.ts +2 -2
- package/lib/control/CameraFrameComposer.d.ts +2 -2
- package/lib/control/CameraFrameHandler.d.ts +1 -1
- package/lib/control/CompassButton.d.ts +2 -2
- package/lib/control/EarthCoordinates.d.ts +5 -2
- package/lib/control/FramebufferPreview.d.ts +3 -3
- package/lib/control/GeoImageDragControl.d.ts +1 -1
- package/lib/control/LayerAnimation.d.ts +2 -2
- package/lib/control/LayerSwitcher.d.ts +3 -0
- package/lib/control/Lighting.d.ts +4 -2
- package/lib/control/Navigation.d.ts +15 -11
- package/lib/control/OrthoSwitcher.d.ts +18 -0
- package/lib/control/SimpleTouchNavigation.d.ts +44 -0
- package/lib/control/Sun.d.ts +4 -2
- package/lib/control/TouchNavigation.d.ts +4 -8
- package/lib/control/atmosphere/Atmosphere.d.ts +2 -0
- package/lib/control/atmosphere/AtmosphereConfig.d.ts +2 -6
- package/lib/control/cameraDepthHandler/CameraDepthHandler.d.ts +17 -3
- package/lib/control/cameraDepthHandler/camera_depth.d.ts +2 -2
- package/lib/control/drawing/LineStringDrawingScene.d.ts +1 -0
- package/lib/control/drawing/PolygonDrawingScene.d.ts +14 -14
- package/lib/control/elevationProfile/ElevationProfile.d.ts +1 -1
- package/lib/control/elevationProfile/ElevationProfileLegend.d.ts +1 -1
- package/lib/control/elevationProfile/ElevationProfileScene.d.ts +9 -12
- package/lib/control/elevationProfile/ElevationProfileView.d.ts +16 -5
- package/lib/control/entityEditor/EntityEditor.d.ts +19 -0
- package/lib/control/{geoObjectEditor/GeoObjectEditorDialog.d.ts → entityEditor/EntityEditorDialog.d.ts} +9 -8
- package/lib/control/{geoObjectEditor/GeoObjectEditorScene.d.ts → entityEditor/EntityEditorScene.d.ts} +12 -12
- package/lib/control/{geoObjectEditor → entityEditor}/colors.d.ts +2 -2
- package/lib/control/entityTree/EntityTree.d.ts +46 -0
- package/lib/control/entityTree/EntityTreeView.d.ts +24 -0
- package/lib/control/heightRuler/HeightRulerScene.d.ts +3 -2
- package/lib/control/index.d.ts +5 -3
- package/lib/control/ruler/RulerScene.d.ts +8 -8
- package/lib/control/selection/SelectionScene.d.ts +6 -6
- package/lib/control/timeline/TimelineControl.d.ts +2 -2
- package/lib/control/timeline/TimelineModel.d.ts +1 -1
- package/lib/control/timeline/TimelineView.d.ts +52 -13
- package/lib/control/visibleExtent/segment.d.ts +7 -0
- package/lib/ellipsoid/index.d.ts +4 -4
- package/lib/entity/Entity.d.ts +114 -100
- package/lib/entity/EntityCollection.d.ts +95 -70
- package/lib/entity/{BaseBillboard.d.ts → billboard/BaseBillboard.d.ts} +16 -17
- package/lib/entity/{BaseBillboardHandler.d.ts → billboard/BaseBillboardHandler.d.ts} +24 -9
- package/lib/entity/{Billboard.d.ts → billboard/Billboard.d.ts} +11 -7
- package/lib/entity/{BillboardHandler.d.ts → billboard/BillboardHandler.d.ts} +1 -1
- package/lib/entity/{GeoObject.d.ts → geoObject/GeoObject.d.ts} +7 -6
- package/lib/entity/{GeoObjectHandler.d.ts → geoObject/GeoObjectHandler.d.ts} +29 -11
- package/lib/entity/{InstanceData.d.ts → geoObject/InstanceData.d.ts} +18 -13
- package/lib/entity/{Geometry.d.ts → geometry/Geometry.d.ts} +10 -10
- package/lib/entity/{GeometryHandler.d.ts → geometry/GeometryHandler.d.ts} +7 -7
- package/lib/entity/index.d.ts +8 -8
- package/lib/entity/{Label.d.ts → label/Label.d.ts} +12 -13
- package/lib/entity/{LabelHandler.d.ts → label/LabelHandler.d.ts} +31 -7
- package/lib/entity/{LabelWorker.d.ts → label/LabelWorker.d.ts} +3 -3
- package/lib/entity/{PointCloud.d.ts → pointCloud/PointCloud.d.ts} +18 -12
- package/lib/entity/{PointCloudHandler.d.ts → pointCloud/PointCloudHandler.d.ts} +4 -4
- package/lib/entity/polyline/Polyline.d.ts +242 -0
- package/lib/entity/polyline/PolylineBatchRenderer.d.ts +443 -0
- package/lib/entity/{PolylineHandler.d.ts → polyline/PolylineHandler.d.ts} +19 -7
- package/lib/entity/{Ray.d.ts → ray/Ray.d.ts} +27 -9
- package/lib/entity/{RayHandler.d.ts → ray/RayHandler.d.ts} +18 -8
- package/lib/entity/{Strip.d.ts → strip/Strip.d.ts} +21 -17
- package/lib/entity/{StripHandler.d.ts → strip/StripHandler.d.ts} +11 -6
- package/lib/index.d.ts +47 -42
- package/lib/layer/BaseGeoImage.d.ts +20 -17
- package/lib/layer/CanvasTiles.d.ts +14 -12
- package/lib/layer/GeoImage.d.ts +1 -1
- package/lib/layer/GeoTexture2d.d.ts +2 -2
- package/lib/layer/KML.d.ts +19 -18
- package/lib/layer/Layer.d.ts +72 -53
- package/lib/layer/Vector.d.ts +47 -30
- package/lib/layer/WMS.d.ts +1 -1
- package/lib/layer/XYZ.d.ts +11 -12
- package/lib/layer/index.d.ts +12 -12
- package/lib/math/Line2.d.ts +1 -1
- package/lib/math/Line3.d.ts +1 -1
- package/lib/math/Mat3.d.ts +3 -13
- package/lib/math/Mat4.d.ts +16 -10
- package/lib/math/Plane.d.ts +1 -1
- package/lib/math/Quat.d.ts +14 -12
- package/lib/math/Ray.d.ts +4 -3
- package/lib/math/Vec2.d.ts +25 -17
- package/lib/math/Vec3.d.ts +33 -31
- package/lib/math/Vec4.d.ts +1 -1
- package/lib/math/coder.d.ts +1 -1
- package/lib/math/index.d.ts +13 -14
- package/lib/mercator.d.ts +4 -4
- package/lib/og.css +1 -1
- package/lib/og.es.js +1 -1
- package/lib/og.es.js.map +1 -1
- package/lib/quadTree/EntityCollectionNode.d.ts +10 -10
- package/lib/quadTree/EntityCollectionsTreeStrategy.d.ts +5 -5
- package/lib/quadTree/QuadTreeStrategy.d.ts +3 -4
- package/lib/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +4 -4
- package/lib/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +4 -4
- package/lib/renderer/AtmosphereDeferredShading.d.ts +12 -0
- package/lib/renderer/IDeferredShadingPass.d.ts +8 -0
- package/lib/renderer/ITransparencyPass.d.ts +8 -0
- package/lib/renderer/PhongDeferredShading.d.ts +16 -0
- package/lib/renderer/Renderer.d.ts +166 -99
- package/lib/renderer/RendererEvents.d.ts +15 -5
- package/lib/renderer/WOITPass.d.ts +14 -0
- package/lib/res/fonts/Ephesis-Regular.json +1 -0
- package/lib/res/fonts/Ephesis-Regular.png +0 -0
- package/lib/res/fonts/Karla-Bold.json +1 -0
- package/lib/res/fonts/Karla-Bold.png +0 -0
- package/lib/res/fonts/Karla-Italic.json +1 -0
- package/lib/res/fonts/Karla-Italic.png +0 -0
- package/lib/res/fonts/Karla-Light.json +1 -0
- package/lib/res/fonts/Karla-Light.png +0 -0
- package/lib/res/fonts/Karla-Medium.json +1 -0
- package/lib/res/fonts/Karla-Medium.png +0 -0
- package/lib/res/fonts/Roboto-Regular.json +1 -37147
- package/lib/res/fonts/Roboto-Regular.png +0 -0
- package/lib/res/fonts/arial.json +1 -4321
- package/lib/res/fonts/arial.png +0 -0
- package/lib/res/night-4326.png +0 -0
- package/lib/res/night.png +0 -0
- package/lib/scene/AltitudeNearPlaneStrategy.d.ts +17 -0
- package/lib/scene/Axes.d.ts +4 -3
- package/lib/scene/Planet.d.ts +244 -69
- package/lib/scene/{RenderNode.d.ts → Scene.d.ts} +49 -46
- package/lib/scene/SkyBox.d.ts +5 -3
- package/lib/scene/index.d.ts +2 -2
- package/lib/segment/Segment.d.ts +29 -15
- package/lib/segment/SegmentLonLat.d.ts +0 -1
- package/lib/shadeModeConstants.d.ts +7 -0
- package/lib/shaders/applyDeferredDepth.d.ts +2 -0
- package/lib/shaders/atmos/atmos.d.ts +3 -3
- package/lib/shaders/billboard/billboard.d.ts +4 -3
- package/lib/shaders/deferredShading/deferredShading.d.ts +2 -0
- package/lib/shaders/deferredShading/deferredShadingAtmos.d.ts +3 -0
- package/lib/shaders/depth.d.ts +2 -2
- package/lib/shaders/geo_object/geo_object.d.ts +8 -4
- package/lib/shaders/label/label.d.ts +4 -4
- package/lib/shaders/pointCloud.d.ts +2 -2
- package/lib/shaders/polyline/polyline.d.ts +7 -3
- package/lib/shaders/ray/ray.d.ts +3 -2
- package/lib/shaders/screenFrame.d.ts +2 -2
- package/lib/shaders/segment/segment.d.ts +7 -0
- package/lib/shaders/skybox.d.ts +2 -2
- package/lib/shaders/strip/strip.d.ts +3 -0
- package/lib/shaders/tone_mapping/toneMapping.d.ts +2 -2
- package/lib/shaders/weightedOITResolve.d.ts +2 -0
- package/lib/terrain/BilTerrain.d.ts +1 -1
- package/lib/terrain/EmptyTerrain.d.ts +5 -6
- package/lib/terrain/GlobusTerrain.d.ts +18 -23
- package/lib/terrain/RgbTerrain.d.ts +8 -8
- package/lib/terrain/index.d.ts +5 -5
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/ui/Button.d.ts +7 -5
- package/lib/ui/ButtonGroup.d.ts +1 -1
- package/lib/ui/Checkbox.d.ts +2 -2
- package/lib/ui/Color.d.ts +2 -2
- package/lib/ui/Dialog.d.ts +30 -3
- package/lib/ui/Input.d.ts +7 -2
- package/lib/ui/Slider.d.ts +5 -2
- package/lib/ui/ToggleButton.d.ts +2 -2
- package/lib/ui/View.d.ts +1 -1
- package/lib/ui/icons.d.ts +1 -1
- package/lib/ui/index.d.ts +9 -9
- package/lib/utils/FontAtlas.d.ts +57 -8
- package/lib/utils/GeoImageCreator.d.ts +2 -2
- package/lib/utils/ImagesCacheManager.d.ts +3 -3
- package/lib/utils/Loader.d.ts +2 -2
- package/lib/utils/PlainSegmentWorker.d.ts +2 -2
- package/lib/utils/TerrainWorker.d.ts +2 -2
- package/lib/utils/TextureAtlas.d.ts +7 -2
- package/lib/utils/TextureResourceManager.d.ts +162 -0
- package/lib/utils/VectorTileCreator.d.ts +1 -1
- package/lib/utils/colorSpace.d.ts +9 -0
- package/lib/utils/gltf/gltfParser.d.ts +9 -2
- package/lib/utils/gltf/types.d.ts +20 -2
- package/lib/utils/shared.d.ts +11 -5
- package/lib/utils/textureResourceMeta.d.ts +9 -0
- package/lib/webgl/BaseFramebuffer.d.ts +7 -0
- package/lib/webgl/Framebuffer.d.ts +9 -6
- package/lib/webgl/Handler.d.ts +81 -99
- package/lib/webgl/ShaderProgram.d.ts +190 -0
- package/lib/webgl/index.d.ts +2 -2
- package/lib/webgl/variableHandlers.d.ts +2 -1
- package/package.json +77 -76
- package/lib/assets/LabelWorker.worker-BT1uJgYn.js.map +0 -1
- package/lib/assets/PlainSegmentWorker.worker-CT1cj8jj.js.map +0 -1
- package/lib/assets/TerrainWorker.worker-DmikdfB2.js.map +0 -1
- package/lib/control/OldMouseNavigation.d.ts +0 -65
- package/lib/control/ZoomControl.d.ts +0 -28
- package/lib/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
- package/lib/control/visibleExtent/drawnode.d.ts +0 -7
- package/lib/entity/Polyline.d.ts +0 -417
- package/lib/light/LightSource.d.ts +0 -36
- package/lib/res/fonts/Roboto-Regular.ttf.cfg +0 -1340
- package/lib/res/fonts/Roboto-Regular.ttf.png +0 -0
- package/lib/res/fonts/arial.ttf.cfg +0 -1570
- package/lib/res/fonts/arial.ttf.png +0 -0
- package/lib/scene/BaseNode.d.ts +0 -61
- package/lib/shaders/drawnode/drawnode.d.ts +0 -8
- package/lib/webgl/Program.d.ts +0 -161
- package/lib/webgl/ProgramController.d.ts +0 -87
- /package/lib/control/{geoObjectEditor → entityEditor}/ArrowEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/AxisTrackEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/MoveAxisEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/MovePlaneEntity.d.ts +0 -0
- /package/lib/control/{geoObjectEditor → entityEditor}/RotateEntity.d.ts +0 -0
- /package/lib/entity/{LabelWorker.worker.d.ts → label/LabelWorker.worker.d.ts} +0 -0
|
Binary file
|
package/lib/scene/BaseNode.d.ts
DELETED
|
@@ -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;
|
package/lib/webgl/Program.d.ts
DELETED
|
@@ -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
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|