@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
@@ -1,417 +0,0 @@
1
- import { Entity } from "./Entity";
2
- import { Extent } from "../Extent";
3
- import { LonLat } from "../LonLat";
4
- import { Vec3 } from "../math/Vec3";
5
- import type { NumberArray3 } from "../math/Vec3";
6
- import type { NumberArray2 } from "../math/Vec2";
7
- import type { NumberArray4 } from "../math/Vec4";
8
- import { PolylineHandler } from "./PolylineHandler";
9
- import { RenderNode } from "../scene/RenderNode";
10
- import type { WebGLBufferExt } from "../webgl/Handler";
11
- import type { TypedArray } from "../utils/shared";
12
- import { Ellipsoid } from "../ellipsoid/Ellipsoid";
13
- import type { HTMLImageElementExt } from "../utils/ImagesCacheManager";
14
- export type Geodetic = LonLat | NumberArray2 | NumberArray3;
15
- export type Cartesian = Vec3 | NumberArray3;
16
- export type SegmentPath3vExt = Cartesian[];
17
- export type SegmentPathLonLatExt = Geodetic[];
18
- export type SegmentPathColor = NumberArray4[];
19
- export type SegmentPath3v = Vec3[];
20
- export type SegmentPathLonLat = LonLat[];
21
- export interface IPolylineParams {
22
- altitude?: number;
23
- thickness?: number;
24
- opacity?: number;
25
- color?: string;
26
- visibility?: boolean;
27
- isClosed?: boolean;
28
- pathColors?: SegmentPathColor[];
29
- path3v?: SegmentPath3vExt[];
30
- pathLonLat?: SegmentPathLonLatExt[];
31
- visibleSpherePosition?: Cartesian;
32
- visibleSphereRadius?: number;
33
- src?: string;
34
- image?: HTMLImageElement;
35
- texOffset?: number;
36
- strokeSize?: number;
37
- }
38
- /**
39
- * Polyline object.
40
- * @class
41
- * @param {Object} [options] - Polyline options:
42
- * @param {number} [options.thickness] - Thickness in screen pixels 1.5 is default.
43
- * @param {Number} [options.altitude] - Relative to ground layers altitude value.
44
- * @param {Vec4} [options.color] - RGBA color.
45
- * @param {Boolean} [options.opacity] - Line opacity.
46
- * @param {Boolean} [options.visibility] - Polyline visibility. True default.
47
- * @param {Boolean} [options.isClosed] - Closed geometry type identification.
48
- * @param {SegmentPathLonLatExt[]} [options.pathLonLat] - Polyline geodetic coordinates array. [[[0,0,0], [1,1,1],...]]
49
- * @param {SegmentPath3vExt[]} [options.path3v] - LinesString cartesian coordinates array. [[[0,0,0], [1,1,1],...]]
50
- * @param {SegmentPathColor[]} [options.pathColors] - Coordinates color. [[[1,0,0,1], [0,1,0,1],...]] for right and green colors.
51
- */
52
- declare class Polyline {
53
- static __counter__: number;
54
- /**
55
- * Object uniq identifier.
56
- * @protected
57
- * @type {number}
58
- */
59
- protected __id: number;
60
- altitude: number;
61
- /**
62
- * Polyline thickness in screen pixels.
63
- * @public
64
- * @type {number}
65
- */
66
- thickness: number;
67
- protected _opacity: number;
68
- /**
69
- * Polyline RGBA color.
70
- * @protected
71
- * @type {Float32Array}
72
- */
73
- protected _defaultColor: Float32Array | NumberArray4;
74
- /**
75
- * Polyline visibility.
76
- * @public
77
- * @type {boolean}
78
- */
79
- visibility: boolean;
80
- /**
81
- * Polyline geometry ring type identification.
82
- * @protected
83
- * @type {Boolean}
84
- */
85
- protected _closedLine: boolean;
86
- /**
87
- * Polyline cartesian coordinates.
88
- * @public
89
- * @type {Array.<Vec3>}
90
- */
91
- _path3v: SegmentPath3vExt[];
92
- protected _pathLengths: number[];
93
- /**
94
- * Polyline geodetic degrees coordinates.
95
- * @private
96
- * @type {Array.<LonLat>}
97
- */
98
- protected _pathLonLat: SegmentPathLonLatExt[];
99
- /**
100
- * Polyline geodetic mercator coordinates.
101
- * @public
102
- * @type {Array.<LonLat>}
103
- */
104
- _pathLonLatMerc: LonLat[][];
105
- protected _pathColors: SegmentPathColor[];
106
- /**
107
- * Polyline geodetic extent.
108
- * @protected
109
- * @type {Extent}
110
- */
111
- _extent: Extent;
112
- protected _verticesHigh: TypedArray | number[];
113
- protected _verticesLow: TypedArray | number[];
114
- protected _orders: TypedArray | number[];
115
- protected _indexes: TypedArray | number[];
116
- protected _colors: TypedArray | number[];
117
- protected _texCoordArr: TypedArray | number[];
118
- protected _atlasTexCoords: number[];
119
- protected _verticesHighBuffer: WebGLBufferExt | null;
120
- protected _verticesLowBuffer: WebGLBufferExt | null;
121
- protected _ordersBuffer: WebGLBufferExt | null;
122
- protected _indexesBuffer: WebGLBufferExt | null;
123
- protected _colorsBuffer: WebGLBufferExt | null;
124
- protected _texCoordBuffer: WebGLBufferExt | null;
125
- protected _pickingColor: NumberArray3;
126
- protected _renderNode: RenderNode | null;
127
- /**
128
- * Entity instance that holds this Polyline.
129
- * @public
130
- * @type {Entity}
131
- */
132
- _entity: Entity | null;
133
- /**
134
- * Handler that stores and renders this Polyline object.
135
- * @public
136
- * @type {PolylineHandler | null}
137
- */
138
- _handler: PolylineHandler | null;
139
- _handlerIndex: number;
140
- protected _buffersUpdateCallbacks: Function[];
141
- protected _changedBuffers: boolean[];
142
- protected _visibleSphere: Float32Array;
143
- __doubleToTwoFloats: (pos: Vec3, highPos: Vec3, lowPos: Vec3) => void;
144
- /**
145
- * Stroke image src.
146
- * @protected
147
- * @type {string}
148
- */
149
- protected _src: string | null;
150
- /**
151
- * Stroke image object.
152
- * @protected
153
- * @type {Object}
154
- */
155
- protected _image: HTMLImageElement & {
156
- __nodeIndex?: number;
157
- } | null;
158
- protected _texOffset: number;
159
- protected _strokeSize: number;
160
- constructor(options?: IPolylineParams);
161
- get texOffset(): number;
162
- set texOffset(value: number);
163
- get strokeSize(): number;
164
- set strokeSize(value: number);
165
- /**
166
- * Sets image template url source.
167
- * @public
168
- * @param {string} src - Image url.
169
- */
170
- setSrc(src: string | null): void;
171
- getSrc(): string | null;
172
- /**
173
- * Sets image template object.
174
- * @public
175
- * @param {Object} image - JavaScript image object.
176
- */
177
- setImage(image: HTMLImageElement): void;
178
- getImage(): HTMLImageElementExt | null;
179
- _setTexCoordArr(tcoordArr: number[]): void;
180
- setTextureDisabled(): void;
181
- /**
182
- * Appends to the line array new cartesian coordinates line data.
183
- */
184
- protected __appendLineData3v(path3v: SegmentPath3vExt[], pathColors: SegmentPathColor[], defaultColor: NumberArray4, isClosed: boolean, outVerticesHigh: number[], outVerticesLow: number[], outOrders: number[], outIndexes: number[], ellipsoid: Ellipsoid, outTransformedPathLonLat: SegmentPathLonLatExt[], outPath3v: SegmentPath3vExt[], outTransformedPathMerc: LonLat[][], outExtent: Extent, outColors: number[]): void;
185
- /**
186
- * Appends to the line new cartesian coordinates point data.
187
- */
188
- protected __appendPoint3v(path3v: SegmentPath3vExt[], point3v: Vec3, pathColors: SegmentPathColor[], color: NumberArray4, isClosed: boolean, outVerticesHigh: number[], outVerticesLow: number[], outColors: number[], outOrders: number[], outIndexes: number[], ellipsoid: Ellipsoid | null, outTransformedPathLonLat: SegmentPathLonLatExt[], outTransformedPathMerc: LonLat[][], outExtent: Extent): void;
189
- /**
190
-
191
- [1, -1, 2, -2] - orders for triangle strip line segment
192
- t2 t3
193
- (2)-------(-2)
194
- | |
195
- | |
196
- | |
197
- | |
198
- (1)-------(-1)
199
- t0 t1
200
- */
201
- static setPathTexCoords(path3v: SegmentPath3vExt[], tCoordArr: number[], outTexCoords: number[]): void;
202
- static setPathColors(pathLonLat: SegmentPathLonLatExt[], pathColors: SegmentPathColor[], defaultColor: NumberArray4, outColors: number[]): void;
203
- /**
204
- * Appends to the line array new geodetic coordinates line data.
205
- * @static
206
- */
207
- protected __appendLineDataLonLat(pathLonLat: SegmentPathLonLatExt[], pathColors: SegmentPathColor[], defaultColor: NumberArray4, isClosed: boolean, outVerticesHigh: number[], outVerticesLow: number[], outOrders: number[], outIndexes: number[], outTexCoords: number[], ellipsoid: Ellipsoid, outTransformedPathCartesian: SegmentPath3vExt[], outPathLonLat: SegmentPathLonLatExt[], outTransformedPathMerc: LonLat[][], outExtent: Extent, outColors: number[]): void;
208
- /**
209
- * Sets polyline path with cartesian coordinates.
210
- * @protected
211
- * @param {SegmentPath3vExt[]} path3v - Cartesian coordinates.
212
- */
213
- protected _setEqualPath3v(path3v: SegmentPath3vExt[]): void;
214
- /**
215
- * Sets polyline with geodetic coordinates.
216
- * @protected
217
- * @param {SegmentPathLonLat[]} pathLonLat - Geodetic polyline path coordinates.
218
- */
219
- protected _setEqualPathLonLat(pathLonLat: SegmentPathLonLat[]): void;
220
- setPointLonLat(lonlat: LonLat, index: number, segmentIndex: number): void;
221
- /**
222
- * Changes cartesian point coordinates of the path
223
- * @param {Vec3} coordinates - New coordinates
224
- * @param {number} [index=0] - Path segment index
225
- * @param {number} [segmentIndex=0] - Index of the point in the path segment
226
- * @param {boolean} [skipLonLat=false] - Do not update geodetic coordinates
227
- */
228
- setPoint3v(coordinates: Vec3, index?: number, segmentIndex?: number, skipLonLat?: boolean): void;
229
- protected _resizePathLengths(index?: number): void;
230
- /**
231
- * Remove path segment
232
- * @param {number} index - Path segment index
233
- */
234
- removeSegment(index: number): void;
235
- /**
236
- * Remove point from the path
237
- * @param {number} index - Point index in a path segment
238
- * @param {number} [multiLineIndex=0] - Segment path index
239
- */
240
- removePoint(index: number, multiLineIndex?: number): void;
241
- /**
242
- * Insert point coordinates in a path segment
243
- * @param {Vec3} point3v - Point coordinates
244
- * @param {number} [index=0] - Index in the path
245
- * @param {NumberArray4} [color] - Point color
246
- * @param {number} [multilineIndex=0] - Path segment index
247
- */
248
- insertPoint3v(point3v: Vec3, index?: number, color?: NumberArray4, multilineIndex?: number): void;
249
- /**
250
- * Adds a new cartesian point in the end of the path in a last line segment.
251
- * @public
252
- * @param {Vec3} point3v - New coordinates.
253
- * @param {NumberArray4} [color] -
254
- * @param {boolean} [skipEllipsoid] -
255
- */
256
- appendPoint3v(point3v: Vec3, color?: NumberArray4, skipEllipsoid?: boolean): void;
257
- /**
258
- * Append new point in the end of the path.
259
- * @public
260
- * @param {Vec3} point3v - New point coordinates.
261
- * @param {number} [multiLineIndex=0] - Path segment index, first by default.
262
- */
263
- addPoint3v(point3v: Vec3, multiLineIndex?: number): void;
264
- /**
265
- * Append new geodetic point in the end of the path.
266
- * @public
267
- * @param {LonLat} lonLat - New coordinate.
268
- * @param {number} [multiLineIndex=0] - Path segment index, first by default.
269
- */
270
- addPointLonLat(lonLat: LonLat, multiLineIndex?: number): void;
271
- /**
272
- * Clear polyline data.
273
- * @public
274
- */
275
- clear(): void;
276
- /**
277
- * Change path point color
278
- * @param {NumberArray4} color - New color
279
- * @param {number} [index=0] - Point index
280
- * @param {number} [segmentIndex=0] - Path segment index
281
- */
282
- setPointColor(color: NumberArray4, index?: number, segmentIndex?: number): void;
283
- /**
284
- * Sets polyline opacity.
285
- * @public
286
- * @param {number} opacity - Opacity.
287
- */
288
- setOpacity(opacity: number): void;
289
- /**
290
- * Gets polyline opacity.
291
- * @public
292
- */
293
- getOpacity(): number;
294
- /**
295
- * Sets Polyline thickness in screen pixels.
296
- * @public
297
- * @param {number} altitude - ALtitude value.
298
- */
299
- setAltitude(altitude: number): void;
300
- /**
301
- * Sets Polyline thickness in screen pixels.
302
- * @public
303
- * @param {number} thickness - Thickness.
304
- */
305
- setThickness(thickness: number): void;
306
- /**
307
- * Returns thickness.
308
- * @public
309
- * @return {number} Thickness in screen pixels.
310
- */
311
- getThickness(): number;
312
- /**
313
- * Sets visibility.
314
- * @public
315
- * @param {boolean} visibility - Polyline visibility.
316
- */
317
- setVisibility(visibility: boolean): void;
318
- /**
319
- * Gets Polyline visibility.
320
- * @public
321
- * @return {boolean} Polyline visibility.
322
- */
323
- getVisibility(): boolean;
324
- /**
325
- * Assign with render node.
326
- * @public
327
- * @param {RenderNode} renderNode -
328
- */
329
- setRenderNode(renderNode: RenderNode): void;
330
- protected _clearData(): void;
331
- protected _createData3v(path3v: SegmentPath3vExt[]): void;
332
- protected _createDataLonLat(pathLonlat: SegmentPathLonLatExt[]): void;
333
- /**
334
- * Removes from an entity.
335
- * @public
336
- */
337
- remove(): void;
338
- setPickingColor3v(color: Vec3): void;
339
- /**
340
- * Returns polyline geodetic extent.
341
- * @public
342
- * @returns {Extent} - Geodetic extent
343
- */
344
- getExtent(): Extent;
345
- /**
346
- * Returns path cartesian coordinates.
347
- * @return {SegmentPath3vExt[]} Polyline path.
348
- */
349
- getPath3v(): SegmentPath3vExt[];
350
- /**
351
- * Returns geodetic path coordinates.
352
- * @return {SegmentPathLonLatExt[]} Polyline path.
353
- */
354
- getPathLonLat(): SegmentPathLonLatExt[];
355
- getPathColors(): NumberArray4[][];
356
- /**
357
- * Sets polyline colors.
358
- * @todo - Test the function.
359
- * @param {NumberArray4[][]} pathColors
360
- */
361
- setPathColors(pathColors: SegmentPathColor[]): void;
362
- /**
363
- * Sets polyline color
364
- * @param {string} htmlColor - HTML color.
365
- */
366
- setColorHTML(htmlColor: string): void;
367
- setPathLonLatFast(pathLonLat: SegmentPathLonLatExt[], pathColors?: SegmentPathColor[]): void;
368
- setPath3vFast(path3v: SegmentPath3vExt[], pathColors?: SegmentPathColor[]): void;
369
- /**
370
- * Sets polyline geodetic coordinates.
371
- * @public
372
- * @param {SegmentPathLonLat[]} pathLonLat - Polyline path cartesian coordinates.
373
- * @param {Boolean} [forceEqual=false] - OPTIMIZATION FLAG: Makes assigning faster for size equal coordinates array.
374
- */
375
- setPathLonLat(pathLonLat: SegmentPathLonLatExt[], pathColors?: SegmentPathColor[], forceEqual?: boolean): void;
376
- getSize(index?: number): number;
377
- /**
378
- * Sets Polyline cartesian coordinates.
379
- * @public
380
- * @param {SegmentPath3vExt[]} path3v - Polyline path cartesian coordinates. (exactly 3 entries)
381
- * @param {SegmentPathColor[]} [pathColors] - Polyline path cartesian coordinates. (exactly 3 entries)
382
- * @param {Boolean} [forceEqual=false] - Makes assigning faster for size equal coordinates array.
383
- */
384
- setPath3v(path3v: SegmentPath3vExt[], pathColors?: SegmentPathColor[], forceEqual?: boolean): void;
385
- draw(): void;
386
- drawPicking(): void;
387
- /**
388
- * Refresh buffers.
389
- * @protected
390
- */
391
- protected _refresh(): void;
392
- /**
393
- * Updates render buffers.
394
- * @protected
395
- */
396
- protected _update(): void;
397
- /**
398
- * Clear GL buffers.
399
- * @public
400
- */
401
- _deleteBuffers(): void;
402
- /**
403
- * Creates vertices buffers.
404
- * @protected
405
- */
406
- protected _createVerticesBuffer(): void;
407
- /**
408
- * Creates gl index and order buffer.
409
- * @protected
410
- */
411
- protected _createIndexBuffer(): void;
412
- protected _createColorsBuffer(): void;
413
- _createTexCoordBuffer(): void;
414
- setVisibleSphere(p: Vec3, r: number): void;
415
- updateRTCPosition(): void;
416
- }
417
- export { Polyline };
@@ -1,36 +0,0 @@
1
- import { Vec3 } from "../math/Vec3";
2
- import { RenderNode } from "../scene/RenderNode";
3
- export interface ILightSourceParams {
4
- position?: Vec3;
5
- ambient?: Vec3;
6
- diffuse?: Vec3;
7
- specular?: Vec3;
8
- shininess?: number;
9
- }
10
- declare class LightSource {
11
- protected _renderNode: RenderNode | null;
12
- _position: Vec3;
13
- protected _ambient: Vec3;
14
- protected _diffuse: Vec3;
15
- protected _specular: Vec3;
16
- protected _shininess: number;
17
- protected _active: boolean;
18
- protected _tempAmbient: Vec3;
19
- protected _tempDiffuse: Vec3;
20
- protected _tempSpecular: Vec3;
21
- protected _tempShininess: number;
22
- constructor(params: ILightSourceParams);
23
- isActive(): boolean;
24
- setPosition3v(position: Vec3): void;
25
- setPosition(x: number, y: number, z: number): void;
26
- getPosition(): Vec3;
27
- setAmbient3v(rgb: Vec3): void;
28
- setDiffuse3v(rgb: Vec3): void;
29
- setSpecular3v(rgb: Vec3): void;
30
- setAmbient(r: number, g: number, b: number): void;
31
- setDiffuse(r: number, g: number, b: number): void;
32
- setSpecular(r: number, g: number, b: number): void;
33
- setShininess(shininess: number): void;
34
- addTo(renderNode: RenderNode): void;
35
- }
36
- export { LightSource };