@openglobus/og 0.10.6 → 0.11.1

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 (163) hide show
  1. package/package.json +10 -7
  2. package/src/og/Extent.js +1 -1
  3. package/src/og/LonLat.js +7 -2
  4. package/src/og/Popup.js +2 -1
  5. package/src/og/camera/PlanetCamera.js +4 -2
  6. package/src/og/entity/EntityCollection.js +1 -1
  7. package/src/og/entity/LabelHandler.js +366 -74
  8. package/src/og/entity/Polyline.js +3 -2
  9. package/src/og/layer/KML.js +7 -5
  10. package/src/og/layer/Vector.js +5 -0
  11. package/src/og/layer/index.js +2 -1
  12. package/src/og/math/Vec2.js +448 -448
  13. package/src/og/math/Vec3.js +759 -757
  14. package/src/og/math/Vec4.js +216 -215
  15. package/src/og/scene/Planet.js +14 -4
  16. package/src/og/segment/SegmentLonLat.js +7 -0
  17. package/src/og/terrain/GlobusTerrain.js +4 -0
  18. package/src/og/utils/GeoImageCreator.js +123 -121
  19. package/src/og/utils/Loader.js +81 -80
  20. package/src/og/utils/NormalMapCreator.js +320 -318
  21. package/src/og/utils/VectorTileCreator.js +251 -250
  22. package/src/og/webgl/Framebuffer.js +265 -264
  23. package/src/og/webgl/Handler.js +1022 -1022
  24. package/src/og/webgl/Multisample.js +169 -168
  25. package/src/og/webgl/ProgramController.js +113 -112
  26. package/types/Clock.d.ts +90 -0
  27. package/types/Deferred.d.ts +6 -0
  28. package/types/Events.d.ts +73 -0
  29. package/types/Extent.d.ts +162 -0
  30. package/types/Globe.d.ts +80 -0
  31. package/types/ImageCanvas.d.ts +121 -0
  32. package/types/Lock.d.ts +12 -0
  33. package/types/LonLat.d.ts +108 -0
  34. package/types/Popup.d.ts +38 -0
  35. package/types/QueueArray.d.ts +15 -0
  36. package/types/Rectangle.d.ts +74 -0
  37. package/types/Stack.d.ts +15 -0
  38. package/types/ajax.d.ts +24 -0
  39. package/types/arial.d.ts +48 -0
  40. package/types/astro/astro.d.ts +38 -0
  41. package/types/astro/earth.d.ts +6 -0
  42. package/types/astro/jd.d.ts +254 -0
  43. package/types/bv/Box.d.ts +25 -0
  44. package/types/bv/Sphere.d.ts +32 -0
  45. package/types/bv/index.d.ts +3 -0
  46. package/types/camera/Camera.d.ts +303 -0
  47. package/types/camera/Frustum.d.ts +129 -0
  48. package/types/camera/PlanetCamera.d.ts +222 -0
  49. package/types/camera/index.d.ts +3 -0
  50. package/types/cons.d.ts +40 -0
  51. package/types/control/CompassButton.d.ts +17 -0
  52. package/types/control/Control.d.ts +101 -0
  53. package/types/control/DebugInfo.d.ts +16 -0
  54. package/types/control/EarthCoordinates.d.ts +47 -0
  55. package/types/control/GeoImageDragControl.d.ts +6 -0
  56. package/types/control/KeyboardNavigation.d.ts +22 -0
  57. package/types/control/LayerSwitcher.d.ts +23 -0
  58. package/types/control/Lighting.d.ts +16 -0
  59. package/types/control/ScaleControl.d.ts +22 -0
  60. package/types/control/ShowFps.d.ts +12 -0
  61. package/types/control/SimpleNavigation.d.ts +28 -0
  62. package/types/control/Sun.d.ts +52 -0
  63. package/types/control/ToggleWireframe.d.ts +12 -0
  64. package/types/control/ZoomControl.d.ts +28 -0
  65. package/types/control/index.d.ts +15 -0
  66. package/types/ellipsoid/Ellipsoid.d.ts +142 -0
  67. package/types/ellipsoid/index.d.ts +3 -0
  68. package/types/ellipsoid/wgs84.d.ts +5 -0
  69. package/types/entity/BaseBillboard.d.ts +208 -0
  70. package/types/entity/Billboard.d.ts +94 -0
  71. package/types/entity/BillboardHandler.d.ts +74 -0
  72. package/types/entity/Entity.d.ts +330 -0
  73. package/types/entity/EntityCollection.d.ts +303 -0
  74. package/types/entity/Geometry.d.ts +72 -0
  75. package/types/entity/GeometryHandler.d.ts +76 -0
  76. package/types/entity/Label.d.ts +194 -0
  77. package/types/entity/LabelHandler.d.ts +24 -0
  78. package/types/entity/PointCloud.d.ts +174 -0
  79. package/types/entity/PointCloudHandler.d.ts +38 -0
  80. package/types/entity/Polyline.d.ts +303 -0
  81. package/types/entity/PolylineHandler.d.ts +18 -0
  82. package/types/entity/Ray.d.ts +123 -0
  83. package/types/entity/RayHandler.d.ts +67 -0
  84. package/types/entity/ShapeHandler.d.ts +22 -0
  85. package/types/entity/Strip.d.ts +118 -0
  86. package/types/entity/StripHandler.d.ts +38 -0
  87. package/types/entity/index.d.ts +8 -0
  88. package/types/index.core.d.ts +65 -0
  89. package/types/index.d.ts +45 -0
  90. package/types/index.webgl.d.ts +7 -0
  91. package/types/inherits.d.ts +4 -0
  92. package/types/input/input.d.ts +34 -0
  93. package/types/layer/BaseGeoImage.d.ts +106 -0
  94. package/types/layer/CanvasTiles.d.ts +75 -0
  95. package/types/layer/GeoImage.d.ts +65 -0
  96. package/types/layer/GeoTexture2d.d.ts +8 -0
  97. package/types/layer/GeoVideo.d.ts +80 -0
  98. package/types/layer/KML.d.ts +58 -0
  99. package/types/layer/WMS.d.ts +66 -0
  100. package/types/layer/XYZ.d.ts +126 -0
  101. package/types/layer/index.d.ts +10 -0
  102. package/types/light/LightSource.d.ts +177 -0
  103. package/types/math/Mat3.d.ts +53 -0
  104. package/types/math/Mat4.d.ts +157 -0
  105. package/types/math/Plane.d.ts +17 -0
  106. package/types/math/Vec2.d.ts +308 -0
  107. package/types/math/Vec3.d.ts +459 -0
  108. package/types/math/Vec4.d.ts +161 -0
  109. package/types/math/coder.d.ts +42 -0
  110. package/types/math/index.d.ts +11 -0
  111. package/types/math.d.ts +261 -0
  112. package/types/mercator.d.ts +92 -0
  113. package/types/proj/EPSG3857.d.ts +5 -0
  114. package/types/proj/EPSG4326.d.ts +5 -0
  115. package/types/quadTree/quadTree.d.ts +40 -0
  116. package/types/renderer/RendererEvents.d.ts +230 -0
  117. package/types/res/images.d.ts +3 -0
  118. package/types/scene/Axes.d.ts +11 -0
  119. package/types/scene/BaseNode.d.ts +60 -0
  120. package/types/scene/Planet.d.ts +572 -0
  121. package/types/scene/RenderNode.d.ts +143 -0
  122. package/types/scene/SkyBox.d.ts +10 -0
  123. package/types/scene/index.d.ts +4 -0
  124. package/types/segment/segmentHelper.d.ts +13 -0
  125. package/types/shaders/billboard.d.ts +3 -0
  126. package/types/shaders/depth.d.ts +2 -0
  127. package/types/shaders/drawnode.d.ts +7 -0
  128. package/types/shaders/label.d.ts +4 -0
  129. package/types/shaders/pointCloud.d.ts +2 -0
  130. package/types/shaders/polyline.d.ts +3 -0
  131. package/types/shaders/ray.d.ts +2 -0
  132. package/types/shaders/screenFrame.d.ts +2 -0
  133. package/types/shaders/shape.d.ts +4 -0
  134. package/types/shaders/skybox.d.ts +2 -0
  135. package/types/shaders/toneMapping.d.ts +2 -0
  136. package/types/shapes/BaseShape.d.ts +247 -0
  137. package/types/shapes/Sphere.d.ts +41 -0
  138. package/types/terrain/BilTerrain.d.ts +8 -0
  139. package/types/terrain/EmptyTerrain.d.ts +72 -0
  140. package/types/terrain/Geoid.d.ts +26 -0
  141. package/types/terrain/GlobusTerrain.d.ts +153 -0
  142. package/types/terrain/MapboxTerrain.d.ts +8 -0
  143. package/types/terrain/index.d.ts +5 -0
  144. package/types/utils/FontAtlas.d.ts +14 -0
  145. package/types/utils/GeoImageCreator.d.ts +29 -0
  146. package/types/utils/ImagesCacheManager.d.ts +10 -0
  147. package/types/utils/Loader.d.ts +25 -0
  148. package/types/utils/NormalMapCreator.d.ts +39 -0
  149. package/types/utils/PlainSegmentWorker.d.ts +10 -0
  150. package/types/utils/TerrainWorker.d.ts +9 -0
  151. package/types/utils/TextureAtlas.d.ts +111 -0
  152. package/types/utils/VectorTileCreator.d.ts +16 -0
  153. package/types/utils/colorTable.d.ts +143 -0
  154. package/types/utils/earcut.d.ts +6 -0
  155. package/types/utils/shared.d.ts +230 -0
  156. package/types/webgl/Framebuffer.d.ts +135 -0
  157. package/types/webgl/Handler.d.ts +372 -0
  158. package/types/webgl/Multisample.d.ts +89 -0
  159. package/types/webgl/Program.d.ts +155 -0
  160. package/types/webgl/ProgramController.d.ts +84 -0
  161. package/types/webgl/callbacks.d.ts +1 -0
  162. package/types/webgl/index.d.ts +6 -0
  163. package/types/webgl/types.d.ts +2 -0
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Used to load and display a video stream by specific corners coordinates on the globe, implements og.layer.BaseGeoImage interface.
3
+ * @class
4
+ * @extends {og.layer.BaseGeoImage}
5
+ */
6
+ export class GeoVideo {
7
+ constructor(name: any, options: any);
8
+ /**
9
+ * @protected
10
+ * @const
11
+ * @type {Boolean}
12
+ */
13
+ protected _animate: boolean;
14
+ /**
15
+ * HTML5 video element object.
16
+ * @private
17
+ * @type {Object}
18
+ */
19
+ private _video;
20
+ /**
21
+ * VIdeo source url path.
22
+ * @private
23
+ * @type {String}
24
+ */
25
+ private _src;
26
+ get instanceName(): string;
27
+ /**
28
+ * Sets video source url path.
29
+ * @public
30
+ * @param {String} srs - Video url path.
31
+ */
32
+ public setSrc(src: any): void;
33
+ _sourceReady: boolean;
34
+ /**
35
+ * Sets HTML5 video object.
36
+ * @public
37
+ * @param {Object} video - HTML5 video element object.
38
+ */
39
+ public setVideoElement(video: any): void;
40
+ /**
41
+ * Sets layer visibility.
42
+ * @public
43
+ * @param {boolean} visibility - Layer visibility.
44
+ */
45
+ public setVisibility(visibility: boolean): void;
46
+ /**
47
+ * Creates or refresh source video GL texture.
48
+ * @virtual
49
+ * @protected
50
+ */
51
+ protected _createSourceTexture(): void;
52
+ _sourceTexture: any;
53
+ _sourceCreated: boolean;
54
+ /**
55
+ * @private
56
+ */
57
+ private _onCanPlay;
58
+ _frameWidth: any;
59
+ _frameHeight: any;
60
+ /**
61
+ * @private
62
+ */
63
+ private _onError;
64
+ /**
65
+ * Loads planet segment material. In this case - GeoImage source video.
66
+ * @virtual
67
+ * @public
68
+ * @param {og.planetSegment.Material} material - GeoImage planet material.
69
+ */
70
+ public loadMaterial(material: any): void;
71
+ _creationProceeding: boolean;
72
+ /**
73
+ * @virtual
74
+ * @param {og.planetSegment.Material} material - GeoImage material.
75
+ */
76
+ abortMaterialLoading(material: any): void;
77
+ _renderingProjType1(): void;
78
+ _ready: boolean;
79
+ _renderingProjType0(): void;
80
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Layer to render KMLs files
3
+ * @class
4
+ * @extends {og.Vector}
5
+ */
6
+ export class KML {
7
+ /**
8
+ *
9
+ * @param {string} name
10
+ * @param {*} [options]
11
+ */
12
+ constructor(name: string, options?: any);
13
+ _extent: any;
14
+ _billboard: any;
15
+ _color: any;
16
+ get instanceName(): string;
17
+ /**
18
+ * @private
19
+ */
20
+ private _extractCoordonatesFromKml;
21
+ /**
22
+ * Creates billboards or polylines from array of lonlat.
23
+ * @private
24
+ * @param {Array} coordonates
25
+ * @param {string} color
26
+ * @returns {Array<og.Entity>}
27
+ */
28
+ private _convertCoordonatesIntoEntities;
29
+ /**
30
+ * @private
31
+ */
32
+ private _getXmlContent;
33
+ /**
34
+ * @private
35
+ */
36
+ private _expandExtents;
37
+ /**
38
+ * @public
39
+ * @param {File[]} kmls
40
+ * @returns {Promise}
41
+ */
42
+ public addKmlFromFiles(kmls: File[]): Promise<any>;
43
+ /**
44
+ * @param {string} color
45
+ * @public
46
+ */
47
+ public setColor(color: string): void;
48
+ /**
49
+ * @private
50
+ */
51
+ private _getKmlFromUrl;
52
+ /**
53
+ * @public
54
+ * @param {string} url - Url of the KML to display. './myFile.kml' or 'http://mySite/myFile.kml' for example.
55
+ * @returns {Promise}
56
+ */
57
+ public addKmlFromUrl(url: string): Promise<any>;
58
+ }
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Used to display WMS services as tile layers on the globe.
3
+ * @class
4
+ * @extends {og.layer.XYZ}
5
+ * //TODO: WMS version, format, and custom srs cpecification.
6
+ * @param {string} name - Layer name.
7
+ * @param {Object} options - Options:
8
+ * @param {number} [options.opacity=1.0] - Layer opacity.
9
+ * @param {Array.<number,number,number>} [options.transparentColor=[-1,-1,-1]] - RGB color that defines transparent color.
10
+ * @param {number} [options.minZoom=0] - Minimal visibility zoom level.
11
+ * @param {number} [options.maxZoom=0] - Maximal visibility zoom level.
12
+ * @param {string} [options.attribution] - Layer attribution that displayed in the attribution area on the screen.
13
+ * @param {boolean} [options.isBaseLayer=false] - Base layer flag.
14
+ * @param {boolean} [options.visibility=true] - Layer visibility.
15
+ * @param {string} options.url - WMS url source.
16
+ * @param {number} [options.width=256] - Tile width.
17
+ * @param {number} [options.height=256] - Tile height.
18
+ * @param {string} options.layers - WMS layers string.
19
+ * @param {string} [options.version="1.1.1"] - WMS version.
20
+ * @example:
21
+ * new og.layer.WMS("USA States", {
22
+ * isBaseLayer: false,
23
+ * url: "http://openglobus.org/geoserver/",
24
+ * layers: "topp:states",
25
+ * opacity: 0.5,
26
+ * zIndex: 50,
27
+ * attribution: 'USA states - geoserver WMS example',
28
+ * transparentColor: [1.0, 1.0, 1.0],
29
+ * version: "1.1.1",
30
+ * visibility: false }
31
+ * );
32
+ *
33
+ * @fires og.layer.XYZ#load
34
+ * @fires og.layer.XYZ#loadend
35
+ */
36
+ export class WMS {
37
+ static createRequestUrl(url: any, layers: any, format: string, version: string, request: string, srs: any, bbox: any, width?: number, height?: number): string;
38
+ static get_bbox_v1_1_1(extent: any): string;
39
+ static get_bbox_v1_3_0(extent: any): string;
40
+ constructor(name: any, options: any);
41
+ /**
42
+ * WMS layers string.
43
+ * @public
44
+ * @type {string}
45
+ */
46
+ public layers: string;
47
+ /**
48
+ * WMS tile width.
49
+ * @public
50
+ * @type {number}
51
+ */
52
+ public imageWidth: number;
53
+ /**
54
+ * WMS tile height.
55
+ * @public
56
+ * @type {number}
57
+ */
58
+ public imageHeight: number;
59
+ _getBbox: typeof WMS.get_bbox_v1_1_1;
60
+ _checkSegment(segment: any): boolean;
61
+ get instanceName(): string;
62
+ _createUrl(segment: any): string;
63
+ setVersion(version: any): void;
64
+ _version: any;
65
+ _correctFullExtent(): void;
66
+ }
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Represents an imagery tiles source provider.
3
+ * @class
4
+ * @extends {og.Layer}
5
+ * @param {string} name - Layer name.
6
+ * @param {Object} options:
7
+ * @param {number} [options.opacity=1.0] - Layer opacity.
8
+ * @param {Array.<number,number,number>} [options.transparentColor=[-1,-1,-1]] - RGB color that defines transparent color.
9
+ * @param {Array.<string>} [options.subdomains=['a','b','c']] - Subdomains of the tile service.
10
+ * @param {number} [options.minZoom=0] - Minimal visibility zoom level.
11
+ * @param {number} [options.maxZoom=0] - Maximal visibility zoom level.
12
+ * @param {number} [options.minNativeZoom=0] - Minimal available zoom level.
13
+ * @param {number} [options.maxNativeZoom=19] - Maximal available zoom level.
14
+ * @param {string} [options.attribution] - Layer attribution that displayed in the attribution area on the screen.
15
+ * @param {boolean} [options.isBaseLayer=false] - Base layer flag.
16
+ * @param {boolean} [options.visibility=true] - Layer visibility.
17
+ * @param {string} [options.crossOrigin=true] - If true, all tiles will have their crossOrigin attribute set to ''.
18
+ * @param {string} options.url - Tile url source template(see example below).
19
+ * @param {og.layer.XYZ~_urlRewriteCallback} options.urlRewrite - Url rewrite function.
20
+ * @fires og.layer.XYZ#load
21
+ * @fires og.layer.XYZ#loadend
22
+ *
23
+ * @example <caption>Creates OpenStreetMap base tile layer</caption>
24
+ * new og.layer.XYZ("OpenStreetMap", {
25
+ * isBaseLayer: true,
26
+ * url: "http://b.tile.openstreetmap.org/{z}/{x}/{y}.png",
27
+ * visibility: true,
28
+ * attribution: 'Data @ <a href="http://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="http://www.openstreetmap.org/copyright">ODbL</a>'
29
+ * });
30
+ */
31
+ export class XYZ {
32
+ constructor(name: any, options: any);
33
+ transparentColor: any;
34
+ /**
35
+ * Tile url source template.
36
+ * @public
37
+ * @type {string}
38
+ */
39
+ public url: string;
40
+ /**
41
+ * @protected
42
+ */
43
+ protected _s: any;
44
+ /**
45
+ * Minimal native zoom level when tiles are available.
46
+ * @public
47
+ * @type {number}
48
+ */
49
+ public minNativeZoom: number;
50
+ /**
51
+ * Maximal native zoom level when tiles are available.
52
+ * @public
53
+ * @type {number}
54
+ */
55
+ public maxNativeZoom: number;
56
+ /**
57
+ * @protected
58
+ */
59
+ protected _crossOrigin: any;
60
+ /**
61
+ * Rewrites imagery tile url query.
62
+ * @private
63
+ * @callback og.layer.XYZ~_urlRewriteCallback
64
+ * @param {og.planetSegment.Segment} segment - Segment to load.
65
+ * @param {string} url - Created url.
66
+ * @returns {string} - Url query string.
67
+ */
68
+ private _urlRewriteCallback;
69
+ get instanceName(): string;
70
+ /**
71
+ * Abort loading tiles.
72
+ * @public
73
+ */
74
+ public abortLoading(): void;
75
+ /**
76
+ * Sets layer visibility.
77
+ * @public
78
+ * @param {boolean} visibility - Layer visibility.
79
+ */
80
+ public setVisibility(visibility: boolean): void;
81
+ /**
82
+ * Sets imagery tiles url source template.
83
+ * @public
84
+ * @param {string} url - Url template.
85
+ * @example
86
+ * http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
87
+ * where {z}, {x} and {y} - replaces by current tile values, {s} - random domen.
88
+ */
89
+ public setUrl(url: string): void;
90
+ _checkSegment(segment: any): boolean;
91
+ /**
92
+ * Start to load tile material.
93
+ * @public
94
+ * @virtual
95
+ * @param {og.planetSegment.Material} material - Loads current material.
96
+ */
97
+ public loadMaterial(material: any, forceLoading: any): void;
98
+ /**
99
+ * Creates query url.
100
+ * @protected
101
+ * @virtual
102
+ * @param {og.planetSegment.Segment} segment - Creates specific url for current segment.
103
+ * @returns {String} - Returns url string.
104
+ */
105
+ protected _createUrl(segment: any): string;
106
+ _getSubdomain(): any;
107
+ /**
108
+ * Returns actual url query string.
109
+ * @protected
110
+ * @param {og.planetSegment.Segment} segment - Segment that loads image data.
111
+ * @returns {string} - Url string.
112
+ */
113
+ protected _getHTTPRequestString(segment: any): string;
114
+ /**
115
+ * Sets url rewrite callback, used for custom url rewriting for every tile laoding.
116
+ * @public
117
+ * @param {og.layer.XYZ~_urlRewriteCallback} ur - The callback that returns tile custom created url.
118
+ */
119
+ public setUrlRewriteCallback(ur: any): void;
120
+ applyMaterial(material: any): any;
121
+ clearMaterial(material: any): void;
122
+ /**
123
+ * @protected
124
+ */
125
+ protected _correctFullExtent(): void;
126
+ }
@@ -0,0 +1,10 @@
1
+ import { CanvasTiles } from "./CanvasTiles.js";
2
+ import { GeoImage } from "./GeoImage.js";
3
+ import { GeoTexture2d } from "./GeoTexture2d.js";
4
+ import { GeoVideo } from "./GeoVideo.js";
5
+ import { KML } from "./KML.js";
6
+ import { Layer } from "./Layer.js";
7
+ import { Vector } from "./Vector.js";
8
+ import { WMS } from "./WMS.js";
9
+ import { XYZ } from "./XYZ.js";
10
+ export { CanvasTiles, GeoImage, GeoTexture2d, GeoVideo, KML, Layer, Vector, WMS, XYZ };
@@ -0,0 +1,177 @@
1
+ /**
2
+ * Represents basic light source.
3
+ * @class
4
+ * @param {string} [name] - Light source name.
5
+ * @param {Object} [params] - Light parameters:
6
+ * @param {og.Vec3} [params.position] - Light source position if it is a point light, otherwise it is a light direction vector.
7
+ * @param {og.Vec3} [params.ambient] - Ambient RGB color.
8
+ * @param {og.Vec3} [params.diffuse] - Diffuse RGB color.
9
+ * @param {og.Vec3} [params.specular] - Specular RGB color.
10
+ * @param {number} [params.shininess] - Specular shininess.
11
+ */
12
+ export class LightSource {
13
+ static set _staticCounter(arg: any);
14
+ static get _staticCounter(): any;
15
+ constructor(name: any, params: any);
16
+ /**
17
+ * Light name.
18
+ * @protected
19
+ * @type {string}
20
+ */
21
+ protected _name: string;
22
+ /**
23
+ * Render node where light is shines.
24
+ * @protected
25
+ * @type {og.scene.RenderNode}
26
+ */
27
+ protected _renderNode: any;
28
+ /**
29
+ * Light position.
30
+ * @protected
31
+ * @type {og.Vec3}
32
+ */
33
+ protected _position: any;
34
+ /**
35
+ * True if the light is directional.
36
+ * @public
37
+ * @type {boolean}
38
+ */
39
+ public directional: boolean;
40
+ /**
41
+ * Ambient color.
42
+ * @protected
43
+ * @type {og.Vec3}
44
+ */
45
+ protected _ambient: any;
46
+ /**
47
+ * Diffuse color.
48
+ * @protected
49
+ * @type {og.Vec3}
50
+ */
51
+ protected _diffuse: any;
52
+ /**
53
+ * Specular color.
54
+ * @protected
55
+ * @type {og.Vec3}
56
+ */
57
+ protected _specular: any;
58
+ /**
59
+ * Shininess.
60
+ * @protected
61
+ * @type {number}
62
+ */
63
+ protected _shininess: number;
64
+ /**
65
+ * Light activity.
66
+ * @protected
67
+ * @type {boolean}
68
+ */
69
+ protected _active: boolean;
70
+ _tempAmbient: any;
71
+ _tempDiffuse: any;
72
+ _tempSpecular: any;
73
+ _tempShininess: number;
74
+ /**
75
+ * Creates clone of the current light object.
76
+ * @todo: TODO
77
+ * @public
78
+ * @returns {og.LightSource}
79
+ */
80
+ public clone(): any;
81
+ /**
82
+ * Set light activity. If activity is false the light doesn't shine.
83
+ * @public
84
+ * @param {boolean} active - Light activity.
85
+ */
86
+ public setActive(active: boolean): void;
87
+ /**
88
+ * Gets light activity.
89
+ * @public
90
+ * @returns {boolean}
91
+ */
92
+ public isActive(): boolean;
93
+ /**
94
+ * Set light source position, or if it is a directional type sets light direction vector.
95
+ * @public
96
+ * @param {og.Vec3} position - Light position or direction vector.
97
+ * @returns {og.LightSource}
98
+ */
99
+ public setPosition3v(position: any): any;
100
+ /**
101
+ * Set light source position, or if it is a directional type sets light direction vector.
102
+ * @public
103
+ * @param {og.Vec3} position - Light position or direction vector.
104
+ * @returns {og.LightSource}
105
+ */
106
+ public setPosition(x: any, y: any, z: any): any;
107
+ /**
108
+ * Returns light source position, or if it is a directional type sets light direction vector.
109
+ * @public
110
+ * @returns {og.Vec3} - Light source position/direction.
111
+ */
112
+ public getPosition(): any;
113
+ /**
114
+ * Set ambient color.
115
+ * @public
116
+ * @param {og.Vec3} rgb - Ambient color.
117
+ * @returns {og.LightSource}
118
+ */
119
+ public setAmbient3v(rgb: any): any;
120
+ /**
121
+ * Set diffuse color.
122
+ * @public
123
+ * @param {og.Vec3} rgb - Diffuse color.
124
+ * @returns {og.LightSource}
125
+ */
126
+ public setDiffuse3v(rgb: any): any;
127
+ /**
128
+ * Set specular color.
129
+ * @public
130
+ * @param {og.Vec3} rgb - Specular color.
131
+ * @returns {og.LightSource}
132
+ */
133
+ public setSpecular3v(rgb: any): any;
134
+ /**
135
+ * Set ambient color.
136
+ * @public
137
+ * @param {og.Vec3} rgb - Ambient color.
138
+ * @returns {og.LightSource}
139
+ */
140
+ public setAmbient(r: any, g: any, b: any): any;
141
+ /**
142
+ * Set diffuse color.
143
+ * @public
144
+ * @returns {og.LightSource}
145
+ */
146
+ public setDiffuse(r: any, g: any, b: any): any;
147
+ /**
148
+ * Set specular color.
149
+ * @public
150
+ * @returns {og.LightSource}
151
+ */
152
+ public setSpecular(r: any, g: any, b: any): any;
153
+ /**
154
+ * Set material shininess.
155
+ * @public
156
+ * @returns {og.LightSource}
157
+ */
158
+ public setShininess(shininess: any): any;
159
+ /**
160
+ * Sets light to black.
161
+ * @public
162
+ * @returns {og.LightSource}
163
+ */
164
+ public setBlack(): any;
165
+ /**
166
+ * Adds current light to the render node scene.
167
+ * @public
168
+ * @param {og.scene.RenderNode} renderNode - Render node scene.
169
+ * @returns {og.LightSource}
170
+ */
171
+ public addTo(renderNode: any): any;
172
+ /**
173
+ * Removes from render node scene.
174
+ * @public
175
+ */
176
+ public remove(): void;
177
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Mat3 factory.
3
+ * @static
4
+ * @return {og.Mat3}
5
+ */
6
+ export function mat3(): any;
7
+ export class Mat3 {
8
+ /**
9
+ * Sets column-major order array matrix.
10
+ * @public
11
+ * @param {Array.<number>} m - Matrix array.
12
+ * @returns {og.Mat3}
13
+ */
14
+ public set(m: Array<number>): any;
15
+ /**
16
+ * Duplicates a Mat3 instance.
17
+ * @public
18
+ * @returns {og.Mat3}
19
+ */
20
+ public clone(): any;
21
+ /**
22
+ * Copy matrix.
23
+ * @public
24
+ * @param {og.Mat3} a - Matrix to copy.
25
+ * @returns {og.Mat3}
26
+ */
27
+ public copy(a: any): any;
28
+ /**
29
+ * Creates trasposed matrix from the current.
30
+ * @public
31
+ * @returns {og.Mat3}
32
+ */
33
+ public transposeTo(): any;
34
+ /**
35
+ * Sets matrix to identity.
36
+ * @public
37
+ * @returns {og.Mat3}
38
+ */
39
+ public setIdentity(): any;
40
+ /**
41
+ * Multiply to 3d vector.
42
+ * @public
43
+ * @params {og.Vec3} p - 3d vector.
44
+ * @returns {og.Vec3}
45
+ */
46
+ public mulVec(p: any): any;
47
+ /**
48
+ * Converts to 4x4 matrix.
49
+ * @public
50
+ * @returns {og.Mat4}
51
+ */
52
+ public toMatrix4(): any;
53
+ }