@openglobus/og 0.11.5 → 0.11.6
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/package.json +5 -7
- package/src/og/Clock.js +6 -10
- package/src/og/Events.js +5 -7
- package/src/og/Extent.js +73 -32
- package/src/og/ImageCanvas.js +18 -15
- package/src/og/LonLat.js +13 -10
- package/src/og/Popup.js +18 -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/Frustum.js +19 -12
- package/src/og/camera/PlanetCamera.js +0 -1
- package/src/og/control/CompassButton.js +1 -2
- package/src/og/control/Control.js +7 -9
- package/src/og/control/DebugInfo.js +0 -1
- package/src/og/control/KeyboardNavigation.js +9 -9
- package/src/og/control/LayerSwitcher.js +21 -20
- 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 +22 -12
- 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/ellipsoid/Ellipsoid.js +148 -56
- package/src/og/ellipsoid/wgs84.js +3 -3
- package/src/og/entity/BaseBillboard.js +65 -14
- package/src/og/entity/Billboard.js +9 -5
- package/src/og/entity/BillboardHandler.js +310 -64
- package/src/og/entity/Entity.js +39 -1
- package/src/og/entity/EntityCollection.js +47 -24
- package/src/og/entity/GeoObject.js +228 -0
- package/src/og/entity/GeoObjectHandler.js +910 -0
- package/src/og/entity/GeometryHandler.js +595 -123
- package/src/og/entity/Label.js +53 -18
- package/src/og/entity/LabelHandler.js +42 -244
- package/src/og/entity/LabelWorker.js +213 -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 -16
- package/src/og/layer/GeoImage.js +6 -6
- package/src/og/layer/KML.js +55 -33
- package/src/og/layer/Layer.js +3 -3
- package/src/og/layer/Vector.js +94 -48
- package/src/og/layer/WMS.js +33 -16
- 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 +60 -30
- 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 +31 -17
- package/src/og/renderer/Renderer.js +23 -6
- package/src/og/renderer/RendererEvents.js +1 -1
- package/src/og/scene/BaseNode.js +2 -3
- package/src/og/scene/Planet.js +2 -2
- package/src/og/scene/RenderNode.js +15 -8
- 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/shapes/BaseShape.js +107 -35
- package/src/og/shapes/Icosphere.js +25 -10
- package/src/og/shapes/Sphere.js +8 -11
- package/src/og/utils/TextureAtlas.js +16 -18
- package/src/og/utils/shared.js +1 -1
- package/src/og/webgl/Handler.js +68 -49
- 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/Deferred.d.ts +1 -1
- package/types/Events.d.ts +2 -2
- package/types/Extent.d.ts +1 -1
- package/types/Rectangle.d.ts +1 -1
- package/types/ajax.d.ts +1 -1
- package/types/bv/Box.d.ts +1 -1
- package/types/bv/Sphere.d.ts +1 -1
- package/types/camera/Camera.d.ts +5 -5
- package/types/camera/Frustum.d.ts +6 -6
- package/types/camera/PlanetCamera.d.ts +8 -8
- package/types/control/Control.d.ts +1 -1
- package/types/control/EarthCoordinates.d.ts +1 -1
- package/types/control/Sun.d.ts +1 -1
- package/types/entity/BaseBillboard.d.ts +15 -8
- package/types/entity/Entity.d.ts +24 -9
- package/types/entity/EntityCollection.d.ts +15 -9
- package/types/entity/GeoObject.d.ts +111 -0
- package/types/entity/GeoObjectHandler.d.ts +77 -0
- package/types/entity/Geometry.d.ts +1 -1
- package/types/entity/GeometryHandler.d.ts +1 -1
- package/types/entity/Label.d.ts +3 -3
- package/types/entity/LabelHandler.d.ts +2 -0
- package/types/entity/LabelWorker.d.ts +9 -0
- package/types/entity/PointCloud.d.ts +1 -1
- package/types/entity/Polyline.d.ts +5 -5
- package/types/entity/Ray.d.ts +1 -1
- package/types/entity/Strip.d.ts +1 -1
- package/types/layer/BaseGeoImage.d.ts +3 -3
- package/types/layer/CanvasTiles.d.ts +5 -5
- package/types/layer/GeoImage.d.ts +1 -1
- package/types/layer/GeoVideo.d.ts +1 -1
- package/types/layer/Layer.d.ts +5 -5
- package/types/layer/Vector.d.ts +9 -9
- package/types/layer/XYZ.d.ts +3 -3
- package/types/light/LightSource.d.ts +7 -7
- package/types/math/Plane.d.ts +1 -1
- package/types/math/Ray.d.ts +1 -1
- package/types/math/Vec2.d.ts +34 -34
- package/types/math/Vec3.d.ts +1 -1
- package/types/math/Vec4.d.ts +1 -1
- package/types/math/coder.d.ts +1 -1
- package/types/math.d.ts +1 -1
- package/types/proj/Proj.d.ts +2 -2
- package/types/quadTree/Node.d.ts +1 -1
- package/types/renderer/Renderer.d.ts +12 -10
- package/types/renderer/RendererEvents.d.ts +1 -1
- package/types/scene/BaseNode.d.ts +4 -4
- package/types/scene/Planet.d.ts +40 -40
- package/types/scene/RenderNode.d.ts +9 -9
- package/types/segment/Segment.d.ts +9 -9
- package/types/shaders/geoObject.d.ts +3 -0
- package/types/shapes/BaseShape.d.ts +5 -5
- package/types/terrain/EmptyTerrain.d.ts +2 -2
- package/types/terrain/GlobusTerrain.d.ts +4 -4
- package/types/utils/TextureAtlas.d.ts +4 -4
- package/types/utils/shared.d.ts +9 -9
- package/types/webgl/Framebuffer.d.ts +1 -1
- package/types/webgl/Handler.d.ts +16 -7
- package/types/webgl/Multisample.d.ts +2 -2
- package/types/webgl/Program.d.ts +6 -0
- package/types/webgl/ProgramController.d.ts +1 -1
package/types/webgl/Handler.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export namespace createTexture {
|
|
|
5
5
|
export { LINEAR };
|
|
6
6
|
import MIPMAP = Handler.createTexture_mm;
|
|
7
7
|
export { MIPMAP };
|
|
8
|
-
import
|
|
9
|
-
export {
|
|
8
|
+
import ANISOTROPIC = Handler.createTexture_a;
|
|
9
|
+
export { ANISOTROPIC };
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* A WebGL handler for accessing low-level WebGL capabilities.
|
|
@@ -14,10 +14,9 @@ export namespace createTexture {
|
|
|
14
14
|
* @param {string} id - Canvas element id that WebGL handler assing with. If it's null
|
|
15
15
|
* or undefined creates hidden canvas and handler bacomes hidden.
|
|
16
16
|
* @param {Object} [params] - Handler options:
|
|
17
|
-
* @param {number} [params.anisotropy] -
|
|
17
|
+
* @param {number} [params.anisotropy] - Anisotropy filter degree. 8 is default.
|
|
18
18
|
* @param {number} [params.width] - Hidden handler width. 256 is default.
|
|
19
19
|
* @param {number} [params.height] - Hidden handler height. 256 is default.
|
|
20
|
-
* @param {Object} [param.scontext] - Native WebGL context attributes. See https://www.khronos.org/registry/webgl/specs/latest/1.0/#WEBGLCONTEXTATTRIBUTES
|
|
21
20
|
* @param {Array.<string>} [params.extensions] - Additional WebGL extension list. Available by default: EXT_texture_filter_anisotropic.
|
|
22
21
|
*/
|
|
23
22
|
export class Handler {
|
|
@@ -202,7 +201,7 @@ export class Handler {
|
|
|
202
201
|
* @param {boolean} [notActivate] - If it's true program will not compile.
|
|
203
202
|
* @return {Program} -
|
|
204
203
|
*/
|
|
205
|
-
public addProgram(program:
|
|
204
|
+
public addProgram(program: Program, notActivate?: boolean): Program;
|
|
206
205
|
/**
|
|
207
206
|
* Removes shader program from handler.
|
|
208
207
|
* @public
|
|
@@ -214,7 +213,7 @@ export class Handler {
|
|
|
214
213
|
* @public
|
|
215
214
|
* @param {Array.<Program>} programsArr - Shader program array.
|
|
216
215
|
*/
|
|
217
|
-
public addPrograms(programsArr: Array<
|
|
216
|
+
public addPrograms(programsArr: Array<Program>): void;
|
|
218
217
|
/**
|
|
219
218
|
* Used in addProgram
|
|
220
219
|
* @private
|
|
@@ -304,6 +303,16 @@ export class Handler {
|
|
|
304
303
|
* @return {Object} -
|
|
305
304
|
*/
|
|
306
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;
|
|
307
316
|
/**
|
|
308
317
|
* Creates ELEMENT ARRAY buffer.
|
|
309
318
|
* @public
|
|
@@ -374,7 +383,7 @@ export class Handler {
|
|
|
374
383
|
* @param {Object} [params] - Texture parameters:
|
|
375
384
|
* @param {callback} [success] - Creation callback
|
|
376
385
|
*/
|
|
377
|
-
public createDefaultTexture(params?: any, success?:
|
|
386
|
+
public createDefaultTexture(params?: any, success?: callback): void;
|
|
378
387
|
/**
|
|
379
388
|
* @public
|
|
380
389
|
*/
|
|
@@ -16,7 +16,7 @@ export class Multisample {
|
|
|
16
16
|
* @public
|
|
17
17
|
* @type {Handler}
|
|
18
18
|
*/
|
|
19
|
-
public handler:
|
|
19
|
+
public handler: Handler;
|
|
20
20
|
_internalFormat: any;
|
|
21
21
|
/**
|
|
22
22
|
* Framebuffer object.
|
|
@@ -80,7 +80,7 @@ export class Multisample {
|
|
|
80
80
|
* @public
|
|
81
81
|
* @returns {Framebuffer} Returns Current framebuffer.
|
|
82
82
|
*/
|
|
83
|
-
public activate():
|
|
83
|
+
public activate(): Framebuffer;
|
|
84
84
|
/**
|
|
85
85
|
* Deactivate framebuffer frame.
|
|
86
86
|
* @public
|
package/types/webgl/Program.d.ts
CHANGED
|
@@ -79,6 +79,12 @@ export class Program {
|
|
|
79
79
|
* @type {Array.<Object>}
|
|
80
80
|
*/
|
|
81
81
|
private _attribArrays;
|
|
82
|
+
/**
|
|
83
|
+
* Program attributes divisor.
|
|
84
|
+
* @private
|
|
85
|
+
* @type {Array.<Object>}
|
|
86
|
+
*/
|
|
87
|
+
private _attribDivisor;
|
|
82
88
|
/**
|
|
83
89
|
* Sets the current program frame.
|
|
84
90
|
* @public
|
|
@@ -76,7 +76,7 @@ export class ProgramController {
|
|
|
76
76
|
* @param {WEBGLBuffer} buffer - Buffer to draw.
|
|
77
77
|
* @return {ProgramController} Returns current shader controller instance.
|
|
78
78
|
*/
|
|
79
|
-
public drawIndexBuffer(mode: number, buffer:
|
|
79
|
+
public drawIndexBuffer(mode: number, buffer: WEBGLBuffer): ProgramController;
|
|
80
80
|
/**
|
|
81
81
|
* Calls Gl drawArray function.
|
|
82
82
|
* @param {number} mode - Gl draw mode.
|