@openglobus/og 0.11.5 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/og.css +5 -2
- package/package.json +12 -14
- package/src/og/Clock.js +6 -10
- package/src/og/Events.js +5 -7
- package/src/og/Extent.js +73 -32
- package/src/og/Globe.js +25 -10
- package/src/og/ImageCanvas.js +18 -15
- package/src/og/LonLat.js +13 -10
- package/src/og/Popup.js +19 -17
- package/src/og/QueueArray.js +3 -4
- package/src/og/Rectangle.js +4 -6
- package/src/og/Stack.js +2 -4
- package/src/og/ajax.js +20 -14
- package/src/og/astro/earth.js +21 -15
- package/src/og/bv/Box.js +2 -3
- package/src/og/bv/Sphere.js +10 -7
- package/src/og/camera/Camera.js +70 -79
- package/src/og/camera/Frustum.js +19 -12
- package/src/og/camera/PlanetCamera.js +33 -34
- package/src/og/control/CompassButton.js +1 -2
- package/src/og/control/Control.js +7 -9
- package/src/og/control/DebugInfo.js +2 -3
- package/src/og/control/EarthNavigation.js +26 -17
- package/src/og/control/KeyboardNavigation.js +9 -9
- package/src/og/control/LayerSwitcher.js +21 -20
- package/src/og/control/Lighting.js +74 -64
- package/src/og/control/MouseNavigation.js +30 -29
- package/src/og/control/MouseWheelZoomControl.js +257 -0
- package/src/og/control/SegmentBoundVisualization.js +5 -6
- package/src/og/control/ShowFps.js +12 -7
- package/src/og/control/SimpleNavigation.js +5 -7
- package/src/og/control/Sun.js +24 -14
- package/src/og/control/ToggleWireframe.js +3 -3
- package/src/og/control/TouchNavigation.js +43 -32
- package/src/og/control/ZoomControl.js +40 -24
- package/src/og/control/index.js +2 -0
- package/src/og/control/visibleExtent/Segment.js +1862 -0
- package/src/og/control/visibleExtent/VisibleExtent.js +80 -0
- package/src/og/control/visibleExtent/drawnode.js +751 -0
- package/src/og/ellipsoid/Ellipsoid.js +149 -57
- package/src/og/ellipsoid/wgs84.js +3 -3
- package/src/og/entity/BaseBillboard.js +72 -30
- package/src/og/entity/Billboard.js +9 -5
- package/src/og/entity/BillboardHandler.js +315 -62
- package/src/og/entity/Entity.js +742 -704
- package/src/og/entity/EntityCollection.js +47 -24
- package/src/og/entity/GeoObject.js +228 -0
- package/src/og/entity/GeoObjectHandler.js +895 -0
- package/src/og/entity/GeometryHandler.js +595 -123
- package/src/og/entity/Label.js +62 -30
- package/src/og/entity/LabelHandler.js +42 -243
- package/src/og/entity/LabelWorker.js +218 -0
- package/src/og/entity/Object3d.js +504 -0
- package/src/og/entity/PointCloud.js +76 -28
- package/src/og/entity/PointCloudHandler.js +5 -5
- package/src/og/entity/Ray.js +49 -16
- package/src/og/entity/Strip.js +72 -43
- package/src/og/entity/StripHandler.js +23 -23
- package/src/og/layer/BaseGeoImage.js +50 -19
- package/src/og/layer/CanvasTiles.js +16 -17
- package/src/og/layer/GeoImage.js +8 -16
- package/src/og/layer/GeoTexture2d.js +2 -10
- package/src/og/layer/GeoVideo.js +2 -10
- package/src/og/layer/KML.js +55 -33
- package/src/og/layer/Layer.js +24 -33
- package/src/og/layer/Material.js +1 -1
- package/src/og/layer/Vector.js +94 -48
- package/src/og/layer/WMS.js +33 -18
- package/src/og/layer/XYZ.js +24 -26
- package/src/og/light/LightSource.js +19 -12
- package/src/og/math/Mat3.js +24 -12
- package/src/og/math/Mat4.js +603 -603
- package/src/og/math/Plane.js +19 -18
- package/src/og/math/Ray.js +17 -12
- package/src/og/math/Vec2.js +24 -14
- package/src/og/math/Vec3.js +78 -32
- package/src/og/math/coder.js +7 -7
- package/src/og/proj/EPSG3857.js +3 -3
- package/src/og/proj/EPSG4326.js +3 -3
- package/src/og/proj/Proj.js +2 -4
- package/src/og/quadTree/Node.js +50 -95
- package/src/og/quadTree/quadTree.js +1 -1
- package/src/og/renderer/Renderer.js +106 -126
- package/src/og/renderer/RendererEvents.js +45 -23
- package/src/og/scene/BaseNode.js +2 -3
- package/src/og/scene/Planet.js +139 -191
- package/src/og/scene/RenderNode.js +15 -8
- package/src/og/segment/Segment.js +93 -268
- package/src/og/segment/Slice.js +45 -0
- package/src/og/shaders/drawnode.js +174 -360
- package/src/og/shaders/geoObject.js +211 -0
- package/src/og/shaders/pointCloud.js +41 -41
- package/src/og/shaders/shape.js +12 -18
- package/src/og/shaders/skybox.js +36 -36
- package/src/og/shaders/toneMapping.js +1 -0
- package/src/og/shapes/BaseShape.js +108 -36
- package/src/og/shapes/Icosphere.js +25 -10
- package/src/og/shapes/Sphere.js +8 -11
- package/src/og/terrain/EmptyTerrain.js +3 -2
- package/src/og/terrain/GlobusTerrain.js +2 -0
- package/src/og/utils/FontAtlas.js +6 -2
- package/src/og/utils/GeoImageCreator.js +5 -1
- package/src/og/utils/Loader.js +1 -1
- package/src/og/utils/PlainSegmentWorker.js +0 -13
- package/src/og/utils/TextureAtlas.js +18 -20
- package/src/og/utils/VectorTileCreator.js +1 -3
- package/src/og/utils/shared.js +2 -2
- package/src/og/webgl/Handler.js +219 -162
- package/src/og/webgl/Multisample.js +44 -16
- package/src/og/webgl/Program.js +78 -33
- package/src/og/webgl/callbacks.js +3 -3
- package/types/Clock.d.ts +0 -94
- package/types/Deferred.d.ts +0 -6
- package/types/Events.d.ts +0 -77
- package/types/Extent.d.ts +0 -166
- package/types/Globe.d.ts +0 -82
- package/types/ImageCanvas.d.ts +0 -123
- package/types/Lock.d.ts +0 -12
- package/types/LonLat.d.ts +0 -108
- package/types/Popup.d.ts +0 -42
- package/types/QueueArray.d.ts +0 -19
- package/types/Rectangle.d.ts +0 -80
- package/types/Stack.d.ts +0 -19
- package/types/ajax.d.ts +0 -24
- package/types/arial.d.ts +0 -48
- package/types/astro/astro.d.ts +0 -38
- package/types/astro/earth.d.ts +0 -7
- package/types/astro/jd.d.ts +0 -254
- package/types/bv/Box.d.ts +0 -30
- package/types/bv/Sphere.d.ts +0 -38
- package/types/bv/index.d.ts +0 -3
- package/types/camera/Camera.d.ts +0 -312
- package/types/camera/Frustum.d.ts +0 -133
- package/types/camera/PlanetCamera.d.ts +0 -218
- package/types/camera/index.d.ts +0 -3
- package/types/cons.d.ts +0 -40
- package/types/control/CompassButton.d.ts +0 -17
- package/types/control/Control.d.ts +0 -104
- package/types/control/DebugInfo.d.ts +0 -15
- package/types/control/EarthCoordinates.d.ts +0 -47
- package/types/control/EarthNavigation.d.ts +0 -42
- package/types/control/GeoImageDragControl.d.ts +0 -6
- package/types/control/KeyboardNavigation.d.ts +0 -21
- package/types/control/LayerSwitcher.d.ts +0 -21
- package/types/control/Lighting.d.ts +0 -16
- package/types/control/MouseNavigation.d.ts +0 -47
- package/types/control/ScaleControl.d.ts +0 -22
- package/types/control/ShowFps.d.ts +0 -11
- package/types/control/SimpleNavigation.d.ts +0 -25
- package/types/control/Sun.d.ts +0 -50
- package/types/control/ToggleWireframe.d.ts +0 -12
- package/types/control/TouchNavigation.d.ts +0 -48
- package/types/control/ZoomControl.d.ts +0 -27
- package/types/control/index.d.ts +0 -17
- package/types/ellipsoid/Ellipsoid.d.ts +0 -146
- package/types/ellipsoid/index.d.ts +0 -3
- package/types/ellipsoid/wgs84.d.ts +0 -6
- package/types/entity/BaseBillboard.d.ts +0 -208
- package/types/entity/Billboard.d.ts +0 -94
- package/types/entity/BillboardHandler.d.ts +0 -78
- package/types/entity/Entity.d.ts +0 -333
- package/types/entity/EntityCollection.d.ts +0 -311
- package/types/entity/Geometry.d.ts +0 -74
- package/types/entity/GeometryHandler.d.ts +0 -76
- package/types/entity/Label.d.ts +0 -189
- package/types/entity/LabelHandler.d.ts +0 -29
- package/types/entity/PointCloud.d.ts +0 -174
- package/types/entity/PointCloudHandler.d.ts +0 -38
- package/types/entity/Polyline.d.ts +0 -306
- package/types/entity/PolylineHandler.d.ts +0 -18
- package/types/entity/Ray.d.ts +0 -124
- package/types/entity/RayHandler.d.ts +0 -67
- package/types/entity/ShapeHandler.d.ts +0 -22
- package/types/entity/Strip.d.ts +0 -119
- package/types/entity/StripHandler.d.ts +0 -38
- package/types/entity/index.d.ts +0 -8
- package/types/index.core.d.ts +0 -65
- package/types/index.d.ts +0 -45
- package/types/index.webgl.d.ts +0 -7
- package/types/input/KeyboardHandler.d.ts +0 -10
- package/types/input/MouseHandler.d.ts +0 -5
- package/types/input/TouchHandler.d.ts +0 -5
- package/types/input/input.d.ts +0 -34
- package/types/layer/BaseGeoImage.d.ts +0 -94
- package/types/layer/CanvasTiles.d.ts +0 -68
- package/types/layer/GeoImage.d.ts +0 -52
- package/types/layer/GeoTexture2d.d.ts +0 -8
- package/types/layer/GeoVideo.d.ts +0 -55
- package/types/layer/KML.d.ts +0 -63
- package/types/layer/Layer.d.ts +0 -326
- package/types/layer/Material.d.ts +0 -45
- package/types/layer/Vector.d.ts +0 -208
- package/types/layer/WMS.d.ts +0 -63
- package/types/layer/XYZ.d.ts +0 -120
- package/types/layer/index.d.ts +0 -10
- package/types/light/LightSource.d.ts +0 -178
- package/types/math/Line2.d.ts +0 -11
- package/types/math/Line3.d.ts +0 -10
- package/types/math/Mat3.d.ts +0 -65
- package/types/math/Mat4.d.ts +0 -176
- package/types/math/Plane.d.ts +0 -18
- package/types/math/Quat.d.ts +0 -379
- package/types/math/Ray.d.ts +0 -82
- package/types/math/Vec2.d.ts +0 -309
- package/types/math/Vec3.d.ts +0 -460
- package/types/math/Vec4.d.ts +0 -162
- package/types/math/coder.d.ts +0 -43
- package/types/math/index.d.ts +0 -11
- package/types/math.d.ts +0 -261
- package/types/mercator.d.ts +0 -92
- package/types/proj/EPSG3857.d.ts +0 -6
- package/types/proj/EPSG4326.d.ts +0 -6
- package/types/proj/Proj.d.ts +0 -42
- package/types/quadTree/EntityCollectionNode.d.ts +0 -34
- package/types/quadTree/Node.d.ts +0 -61
- package/types/quadTree/quadTree.d.ts +0 -40
- package/types/renderer/Renderer.d.ts +0 -298
- package/types/renderer/RendererEvents.d.ts +0 -233
- package/types/res/images.d.ts +0 -3
- package/types/scene/Axes.d.ts +0 -11
- package/types/scene/BaseNode.d.ts +0 -60
- package/types/scene/Planet.d.ts +0 -577
- package/types/scene/RenderNode.d.ts +0 -142
- package/types/scene/SkyBox.d.ts +0 -10
- package/types/scene/index.d.ts +0 -4
- package/types/segment/Segment.d.ts +0 -279
- package/types/segment/SegmentLonLat.d.ts +0 -16
- package/types/segment/segmentHelper.d.ts +0 -13
- package/types/shaders/billboard.d.ts +0 -3
- package/types/shaders/depth.d.ts +0 -2
- package/types/shaders/drawnode.d.ts +0 -7
- package/types/shaders/label.d.ts +0 -4
- package/types/shaders/pointCloud.d.ts +0 -2
- package/types/shaders/polyline.d.ts +0 -3
- package/types/shaders/ray.d.ts +0 -2
- package/types/shaders/screenFrame.d.ts +0 -2
- package/types/shaders/shape.d.ts +0 -4
- package/types/shaders/skybox.d.ts +0 -2
- package/types/shaders/toneMapping.d.ts +0 -2
- package/types/shapes/BaseShape.d.ts +0 -250
- package/types/shapes/Sphere.d.ts +0 -41
- package/types/terrain/BilTerrain.d.ts +0 -7
- package/types/terrain/EmptyTerrain.d.ts +0 -72
- package/types/terrain/Geoid.d.ts +0 -26
- package/types/terrain/GlobusTerrain.d.ts +0 -116
- package/types/terrain/MapboxTerrain.d.ts +0 -7
- package/types/terrain/index.d.ts +0 -5
- package/types/utils/FontAtlas.d.ts +0 -14
- package/types/utils/GeoImageCreator.d.ts +0 -30
- package/types/utils/ImagesCacheManager.d.ts +0 -10
- package/types/utils/Loader.d.ts +0 -25
- package/types/utils/NormalMapCreator.d.ts +0 -39
- package/types/utils/PlainSegmentWorker.d.ts +0 -10
- package/types/utils/TerrainWorker.d.ts +0 -9
- package/types/utils/TextureAtlas.d.ts +0 -111
- package/types/utils/VectorTileCreator.d.ts +0 -16
- package/types/utils/colorTable.d.ts +0 -143
- package/types/utils/earcut.d.ts +0 -6
- package/types/utils/shared.d.ts +0 -231
- package/types/webgl/Framebuffer.d.ts +0 -135
- package/types/webgl/Handler.d.ts +0 -388
- package/types/webgl/Multisample.d.ts +0 -89
- package/types/webgl/Program.d.ts +0 -155
- package/types/webgl/ProgramController.d.ts +0 -89
- package/types/webgl/callbacks.d.ts +0 -1
- package/types/webgl/index.d.ts +0 -6
- package/types/webgl/types.d.ts +0 -2
package/types/utils/shared.d.ts
DELETED
|
@@ -1,231 +0,0 @@
|
|
|
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): any;
|
|
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: any, end1: any, start2: any, end2: any, isSegment?: boolean): any;
|
|
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: any, end1: any, start2: any, end2: any, isSegment?: boolean): any;
|
|
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: any, b: any): any;
|
|
154
|
-
/**
|
|
155
|
-
* Concatenates two the same arrays
|
|
156
|
-
* @param {TypedArray | Array} a
|
|
157
|
-
* @param {TypedArray | Array} b
|
|
158
|
-
*/
|
|
159
|
-
export function concatArrays(a: any | any[], b: any | 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): any;
|
|
167
|
-
/**
|
|
168
|
-
* Convert typed array to array
|
|
169
|
-
* @param arr {TypedArray}
|
|
170
|
-
* @returns {Array}
|
|
171
|
-
*/
|
|
172
|
-
export function makeArray(arr: any): 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: any | 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: any, 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";
|
|
@@ -1,135 +0,0 @@
|
|
|
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: any;
|
|
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
|
-
}
|