@openglobus/og 0.11.7 → 0.12.3

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 (211) hide show
  1. package/css/og.css +5 -2
  2. package/dist/@openglobus/og.css +1 -0
  3. package/dist/@openglobus/og.esm.js +21 -0
  4. package/dist/@openglobus/og.esm.js.map +1 -0
  5. package/dist/@openglobus/og.umd.js +21 -0
  6. package/dist/@openglobus/og.umd.js.map +1 -0
  7. package/package.json +11 -11
  8. package/src/og/Globe.js +18 -6
  9. package/src/og/camera/Camera.js +70 -79
  10. package/src/og/camera/PlanetCamera.js +25 -30
  11. package/src/og/control/DebugInfo.js +2 -2
  12. package/src/og/control/EarthNavigation.js +26 -17
  13. package/src/og/control/Lighting.js +52 -73
  14. package/src/og/control/MouseNavigation.js +30 -29
  15. package/src/og/control/MouseWheelZoomControl.js +257 -0
  16. package/src/og/control/Sun.js +3 -3
  17. package/src/og/control/index.js +2 -0
  18. package/src/og/control/visibleExtent/Segment.js +1862 -0
  19. package/src/og/control/visibleExtent/VisibleExtent.js +80 -0
  20. package/src/og/control/visibleExtent/drawnode.js +751 -0
  21. package/src/og/entity/BaseBillboard.js +9 -9
  22. package/src/og/entity/Entity.js +742 -742
  23. package/src/og/entity/GeoObjectHandler.js +138 -134
  24. package/src/og/entity/Label.js +7 -7
  25. package/src/og/entity/LabelHandler.js +2 -1
  26. package/src/og/layer/CanvasTiles.js +8 -12
  27. package/src/og/layer/GeoImage.js +2 -10
  28. package/src/og/layer/GeoTexture2d.js +2 -10
  29. package/src/og/layer/GeoVideo.js +2 -10
  30. package/src/og/layer/KML.js +19 -12
  31. package/src/og/layer/Layer.js +4 -23
  32. package/src/og/layer/WMS.js +0 -2
  33. package/src/og/layer/XYZ.js +31 -33
  34. package/src/og/math/Vec3.js +18 -2
  35. package/src/og/quadTree/Node.js +48 -93
  36. package/src/og/quadTree/quadTree.js +1 -1
  37. package/src/og/renderer/Renderer.js +69 -96
  38. package/src/og/renderer/RendererEvents.js +3 -1
  39. package/src/og/scene/Planet.js +171 -173
  40. package/src/og/segment/Segment.js +99 -268
  41. package/src/og/segment/Slice.js +45 -0
  42. package/src/og/shaders/drawnode.js +171 -350
  43. package/src/og/shaders/geoObject.js +15 -6
  44. package/src/og/terrain/EmptyTerrain.js +3 -2
  45. package/src/og/terrain/GlobusTerrain.js +2 -0
  46. package/src/og/utils/GeoImageCreator.js +5 -1
  47. package/src/og/utils/Loader.js +1 -1
  48. package/src/og/utils/PlainSegmentWorker.js +0 -13
  49. package/src/og/webgl/Handler.js +14 -10
  50. package/types/Clock.d.ts +94 -0
  51. package/types/Deferred.d.ts +6 -0
  52. package/types/Events.d.ts +77 -0
  53. package/types/Extent.d.ts +166 -0
  54. package/types/Globe.d.ts +85 -0
  55. package/types/ImageCanvas.d.ts +123 -0
  56. package/types/Lock.d.ts +12 -0
  57. package/types/LonLat.d.ts +108 -0
  58. package/types/Popup.d.ts +42 -0
  59. package/types/QueueArray.d.ts +19 -0
  60. package/types/Rectangle.d.ts +80 -0
  61. package/types/Stack.d.ts +19 -0
  62. package/types/ajax.d.ts +24 -0
  63. package/types/arial.d.ts +48 -0
  64. package/types/astro/astro.d.ts +38 -0
  65. package/types/astro/earth.d.ts +7 -0
  66. package/types/astro/jd.d.ts +254 -0
  67. package/types/bv/Box.d.ts +30 -0
  68. package/types/bv/Sphere.d.ts +38 -0
  69. package/types/bv/index.d.ts +3 -0
  70. package/types/camera/Camera.d.ts +312 -0
  71. package/types/camera/Frustum.d.ts +133 -0
  72. package/types/camera/PlanetCamera.d.ts +219 -0
  73. package/types/camera/index.d.ts +3 -0
  74. package/types/cons.d.ts +40 -0
  75. package/types/control/CompassButton.d.ts +17 -0
  76. package/types/control/Control.d.ts +104 -0
  77. package/types/control/DebugInfo.d.ts +15 -0
  78. package/types/control/EarthCoordinates.d.ts +47 -0
  79. package/types/control/EarthNavigation.d.ts +43 -0
  80. package/types/control/GeoImageDragControl.d.ts +6 -0
  81. package/types/control/KeyboardNavigation.d.ts +21 -0
  82. package/types/control/LayerSwitcher.d.ts +21 -0
  83. package/types/control/Lighting.d.ts +16 -0
  84. package/types/control/MouseNavigation.d.ts +48 -0
  85. package/types/control/MouseWheelZoomControl.d.ts +45 -0
  86. package/types/control/ScaleControl.d.ts +22 -0
  87. package/types/control/ShowFps.d.ts +11 -0
  88. package/types/control/SimpleNavigation.d.ts +25 -0
  89. package/types/control/Sun.d.ts +50 -0
  90. package/types/control/ToggleWireframe.d.ts +12 -0
  91. package/types/control/TouchNavigation.d.ts +48 -0
  92. package/types/control/ZoomControl.d.ts +27 -0
  93. package/types/control/index.d.ts +18 -0
  94. package/types/ellipsoid/Ellipsoid.d.ts +146 -0
  95. package/types/ellipsoid/index.d.ts +3 -0
  96. package/types/ellipsoid/wgs84.d.ts +6 -0
  97. package/types/entity/BaseBillboard.d.ts +215 -0
  98. package/types/entity/Billboard.d.ts +94 -0
  99. package/types/entity/BillboardHandler.d.ts +79 -0
  100. package/types/entity/Entity.d.ts +348 -0
  101. package/types/entity/EntityCollection.d.ts +317 -0
  102. package/types/entity/GeoObject.d.ts +111 -0
  103. package/types/entity/GeoObjectHandler.d.ts +81 -0
  104. package/types/entity/Geometry.d.ts +74 -0
  105. package/types/entity/GeometryHandler.d.ts +76 -0
  106. package/types/entity/Label.d.ts +189 -0
  107. package/types/entity/LabelHandler.d.ts +31 -0
  108. package/types/entity/LabelWorker.d.ts +11 -0
  109. package/types/entity/PointCloud.d.ts +174 -0
  110. package/types/entity/PointCloudHandler.d.ts +38 -0
  111. package/types/entity/Polyline.d.ts +306 -0
  112. package/types/entity/PolylineHandler.d.ts +18 -0
  113. package/types/entity/Ray.d.ts +124 -0
  114. package/types/entity/RayHandler.d.ts +67 -0
  115. package/types/entity/ShapeHandler.d.ts +22 -0
  116. package/types/entity/Strip.d.ts +119 -0
  117. package/types/entity/StripHandler.d.ts +38 -0
  118. package/types/entity/index.d.ts +8 -0
  119. package/types/index.core.d.ts +65 -0
  120. package/types/index.d.ts +45 -0
  121. package/types/index.webgl.d.ts +7 -0
  122. package/types/input/KeyboardHandler.d.ts +10 -0
  123. package/types/input/MouseHandler.d.ts +5 -0
  124. package/types/input/TouchHandler.d.ts +5 -0
  125. package/types/input/input.d.ts +34 -0
  126. package/types/layer/BaseGeoImage.d.ts +94 -0
  127. package/types/layer/CanvasTiles.d.ts +67 -0
  128. package/types/layer/GeoImage.d.ts +52 -0
  129. package/types/layer/GeoTexture2d.d.ts +8 -0
  130. package/types/layer/GeoVideo.d.ts +55 -0
  131. package/types/layer/KML.d.ts +68 -0
  132. package/types/layer/Layer.d.ts +310 -0
  133. package/types/layer/Material.d.ts +45 -0
  134. package/types/layer/Vector.d.ts +208 -0
  135. package/types/layer/WMS.d.ts +61 -0
  136. package/types/layer/XYZ.d.ts +119 -0
  137. package/types/layer/index.d.ts +10 -0
  138. package/types/light/LightSource.d.ts +178 -0
  139. package/types/math/Line2.d.ts +11 -0
  140. package/types/math/Line3.d.ts +10 -0
  141. package/types/math/Mat3.d.ts +65 -0
  142. package/types/math/Mat4.d.ts +176 -0
  143. package/types/math/Plane.d.ts +18 -0
  144. package/types/math/Quat.d.ts +379 -0
  145. package/types/math/Ray.d.ts +82 -0
  146. package/types/math/Vec2.d.ts +309 -0
  147. package/types/math/Vec3.d.ts +467 -0
  148. package/types/math/Vec4.d.ts +162 -0
  149. package/types/math/coder.d.ts +43 -0
  150. package/types/math/index.d.ts +11 -0
  151. package/types/math.d.ts +261 -0
  152. package/types/mercator.d.ts +92 -0
  153. package/types/proj/EPSG3857.d.ts +6 -0
  154. package/types/proj/EPSG4326.d.ts +6 -0
  155. package/types/proj/Proj.d.ts +42 -0
  156. package/types/quadTree/EntityCollectionNode.d.ts +34 -0
  157. package/types/quadTree/Node.d.ts +60 -0
  158. package/types/quadTree/quadTree.d.ts +40 -0
  159. package/types/renderer/Renderer.d.ts +290 -0
  160. package/types/renderer/RendererEvents.d.ts +237 -0
  161. package/types/res/images.d.ts +3 -0
  162. package/types/scene/Axes.d.ts +11 -0
  163. package/types/scene/BaseNode.d.ts +60 -0
  164. package/types/scene/Planet.d.ts +576 -0
  165. package/types/scene/RenderNode.d.ts +142 -0
  166. package/types/scene/SkyBox.d.ts +10 -0
  167. package/types/scene/index.d.ts +4 -0
  168. package/types/segment/Segment.d.ts +275 -0
  169. package/types/segment/SegmentLonLat.d.ts +17 -0
  170. package/types/segment/Slice.d.ts +10 -0
  171. package/types/segment/segmentHelper.d.ts +13 -0
  172. package/types/shaders/billboard.d.ts +3 -0
  173. package/types/shaders/depth.d.ts +2 -0
  174. package/types/shaders/drawnode.d.ts +7 -0
  175. package/types/shaders/geoObject.d.ts +3 -0
  176. package/types/shaders/label.d.ts +4 -0
  177. package/types/shaders/pointCloud.d.ts +2 -0
  178. package/types/shaders/polyline.d.ts +3 -0
  179. package/types/shaders/ray.d.ts +2 -0
  180. package/types/shaders/screenFrame.d.ts +2 -0
  181. package/types/shaders/shape.d.ts +4 -0
  182. package/types/shaders/skybox.d.ts +2 -0
  183. package/types/shaders/toneMapping.d.ts +2 -0
  184. package/types/shapes/BaseShape.d.ts +250 -0
  185. package/types/shapes/Sphere.d.ts +41 -0
  186. package/types/terrain/BilTerrain.d.ts +7 -0
  187. package/types/terrain/EmptyTerrain.d.ts +73 -0
  188. package/types/terrain/Geoid.d.ts +26 -0
  189. package/types/terrain/GlobusTerrain.d.ts +116 -0
  190. package/types/terrain/MapboxTerrain.d.ts +7 -0
  191. package/types/terrain/index.d.ts +5 -0
  192. package/types/utils/FontAtlas.d.ts +15 -0
  193. package/types/utils/GeoImageCreator.d.ts +30 -0
  194. package/types/utils/ImagesCacheManager.d.ts +10 -0
  195. package/types/utils/Loader.d.ts +25 -0
  196. package/types/utils/NormalMapCreator.d.ts +39 -0
  197. package/types/utils/PlainSegmentWorker.d.ts +10 -0
  198. package/types/utils/TerrainWorker.d.ts +9 -0
  199. package/types/utils/TextureAtlas.d.ts +111 -0
  200. package/types/utils/VectorTileCreator.d.ts +16 -0
  201. package/types/utils/colorTable.d.ts +143 -0
  202. package/types/utils/earcut.d.ts +6 -0
  203. package/types/utils/shared.d.ts +231 -0
  204. package/types/webgl/Framebuffer.d.ts +135 -0
  205. package/types/webgl/Handler.d.ts +417 -0
  206. package/types/webgl/Multisample.d.ts +89 -0
  207. package/types/webgl/Program.d.ts +161 -0
  208. package/types/webgl/ProgramController.d.ts +89 -0
  209. package/types/webgl/callbacks.d.ts +1 -0
  210. package/types/webgl/index.d.ts +6 -0
  211. package/types/webgl/types.d.ts +2 -0
@@ -0,0 +1,10 @@
1
+ export class SkyBox extends RenderNode {
2
+ static createDefault(RESOURCES_URL: any): SkyBox;
3
+ params: any;
4
+ vertexPositionBuffer: any;
5
+ texture: any;
6
+ init(): void;
7
+ frame(): void;
8
+ _createBuffers(): void;
9
+ }
10
+ import { RenderNode } from "./RenderNode.js";
@@ -0,0 +1,4 @@
1
+ import { Planet } from "./Planet";
2
+ import { Axes } from "./Axes";
3
+ import { SkyBox } from "./SkyBox";
4
+ export { Planet, Axes, SkyBox };
@@ -0,0 +1,275 @@
1
+ /**
2
+ * Planet segment Web Mercator tile class that stored and rendered with quad tree.
3
+ * @class
4
+ * @param {quadTree.Node} node - Segment node.
5
+ * @param {Planet} planet - Current planet scene.
6
+ * @param {Number} tileZoom - Zoom index.
7
+ * @param {Extent} extent - Segment extent.
8
+ */
9
+ export class Segment {
10
+ /**
11
+ * @param {quadTree.Node} node - Segment node.
12
+ * @param {Planet} planet - Current planet scene.
13
+ * @param {number} tileZoom - Zoom index.
14
+ * @param {Extent} extent - Segment extent.
15
+ */
16
+ constructor(node: quadTree.Node, planet: Planet, tileZoom: number, extent: Extent);
17
+ isPole: boolean;
18
+ _tileGroup: number;
19
+ _projection: import("../proj/Proj.js").Proj;
20
+ /**
21
+ * Quad tree node of the segment.
22
+ * @type {quadTree.Node}
23
+ */
24
+ node: quadTree.Node;
25
+ /**
26
+ * Planet pointer.
27
+ * @type {Planet}
28
+ */
29
+ planet: Planet;
30
+ /**
31
+ * WebGl handler pointer.
32
+ * @type {Handler}
33
+ */
34
+ handler: Handler;
35
+ /**
36
+ * Segment bounding sphere
37
+ * @type {Sphere}
38
+ */
39
+ bsphere: Sphere;
40
+ _plainRadius: number;
41
+ /**
42
+ * Segment bounding box.
43
+ * @type {Box}
44
+ */
45
+ bbox: Box;
46
+ _sw: Vec3;
47
+ _nw: Vec3;
48
+ _se: Vec3;
49
+ _ne: Vec3;
50
+ centerNormal: Vec3;
51
+ /**
52
+ * Geographical extent.
53
+ * @type {Extent}
54
+ */
55
+ _extent: Extent;
56
+ _extentLonLat: Extent;
57
+ /**
58
+ * Vertices grid size.
59
+ * @type {number}
60
+ */
61
+ gridSize: number;
62
+ fileGridSize: number;
63
+ /**
64
+ * Tile zoom index.
65
+ * @type {number}
66
+ */
67
+ tileZoom: number;
68
+ /**
69
+ * Horizontal tile index.
70
+ * @type {number}
71
+ */
72
+ tileX: number;
73
+ tileXE: number;
74
+ tileXW: number;
75
+ tileYN: number;
76
+ tileYS: number;
77
+ /**
78
+ * Vertical tile index.
79
+ * @type {number}
80
+ */
81
+ tileY: number;
82
+ tileIndex: string;
83
+ /**
84
+ * Texture materials array.
85
+ * @type {Array.<planetSegment.Material>}
86
+ */
87
+ materials: Array<planetSegment.Material>;
88
+ /**
89
+ * Plain segment vertices was created.
90
+ * @type {boolean}
91
+ */
92
+ plainReady: boolean;
93
+ /**
94
+ * Segment is ready to create plain vertices.
95
+ * @type {boolean}
96
+ */
97
+ initialized: boolean;
98
+ /**
99
+ * Normal map is allready made.
100
+ * @type {boolean}
101
+ */
102
+ normalMapReady: boolean;
103
+ /**
104
+ * Parent normal map is made allready(optimization parameter).
105
+ * @type {boolean}
106
+ */
107
+ parentNormalMapReady: boolean;
108
+ /**
109
+ * Terrain is allready applied flag.
110
+ * @type {boolean}
111
+ */
112
+ terrainReady: boolean;
113
+ /**
114
+ * Terrain is loading now flag.
115
+ * @type {boolean}
116
+ */
117
+ terrainIsLoading: boolean;
118
+ /**
119
+ * Terrain existing flag.
120
+ * @type {boolean}
121
+ */
122
+ terrainExists: boolean;
123
+ /**
124
+ * Means that tree passage reach the segment, and the segment terrain is ready.
125
+ * @type {boolean}
126
+ */
127
+ passReady: boolean;
128
+ plainVertices: any;
129
+ plainVerticesHigh: any;
130
+ plainVerticesLow: any;
131
+ plainNormals: any;
132
+ terrainVertices: any;
133
+ terrainVerticesHigh: any;
134
+ terrainVerticesLow: any;
135
+ noDataVertices: any;
136
+ tempVertices: any;
137
+ tempVerticesHigh: any;
138
+ tempVerticesLow: any;
139
+ normalMapTexture: any;
140
+ normalMapTextureBias: Float32Array;
141
+ normalMapVertices: any;
142
+ normalMapVerticesHigh: any;
143
+ normalMapVerticesLow: any;
144
+ normalMapNormals: any;
145
+ vertexNormalBuffer: any;
146
+ vertexPositionBuffer: any;
147
+ vertexPositionBufferHigh: any;
148
+ vertexPositionBufferLow: any;
149
+ vertexTextureCoordBuffer: any;
150
+ _globalTextureCoordinates: Float32Array;
151
+ _inTheQueue: boolean;
152
+ _appliedNeighborsZoom: number[];
153
+ _slices: any[];
154
+ _indexBuffer: any;
155
+ readyToEngage: boolean;
156
+ plainProcessing: boolean;
157
+ /**
158
+ * Returns entity terrain point.
159
+ * @public
160
+ * @param {Entity} entity - Entity.
161
+ * @param {Vec3} res - Point coordinates.
162
+ * @param {Vec3} [normal] - Terrain point normal.
163
+ * @returns {Vec3} -
164
+ */
165
+ public getEntityTerrainPoint(entity: Entity, res: Vec3, normal?: Vec3): Vec3;
166
+ isEntityInside(e: any): boolean;
167
+ /**
168
+ * Returns distance from object to terrain coordinates and terrain point that calculates out in the res parameter.
169
+ * @public
170
+ * @param {Vec3} xyz - Cartesian object position.
171
+ * @param {LonLat} insideSegmentPosition - Geodetic object position.
172
+ * @param {Vec3} [res] - Result cartesian coordiantes on the terrain.
173
+ * @param {Vec3} [normal] - Terrain point normal.
174
+ * @returns {number} -
175
+ */
176
+ public getTerrainPoint(xyz: Vec3, insideSegmentPosition: LonLat, res?: Vec3, normal?: Vec3): number;
177
+ /**
178
+ * Project wgs86 to segment native projection.
179
+ * @public
180
+ * @param {LonLat} lonlat - Coordinates to project.
181
+ * @returns {LonLat} -
182
+ */
183
+ public projectNative(lonlat: LonLat): LonLat;
184
+ /**
185
+ *
186
+ * @param {boolean} forceLoading
187
+ */
188
+ loadTerrain(forceLoading: boolean): void;
189
+ /**
190
+ * Terrain obtained from server.
191
+ * @param {Float32Array} elevations - Elevation data.
192
+ */
193
+ elevationsExists(elevations: Float32Array): void;
194
+ _checkEqualization(neighborSide: any, neigborNode: any): boolean;
195
+ equalize(): void;
196
+ engage(): void;
197
+ _plainSegmentWorkerCallback(data: any): void;
198
+ _terrainWorkerCallback(data: any): void;
199
+ normalMapTexturePtr: any;
200
+ /**
201
+ * Terrain is not obtained or not exists on the server.
202
+ */
203
+ elevationsNotExists(): void;
204
+ _normalMapEdgeEqualize(side: any): void;
205
+ applyTerrain(elevations: any): void;
206
+ /**
207
+ * Delete segment gl buffers.
208
+ */
209
+ deleteBuffers(): void;
210
+ /**
211
+ * Delete materials.
212
+ */
213
+ deleteMaterials(): void;
214
+ /**
215
+ * Delete elevation data.
216
+ */
217
+ deleteElevations(): void;
218
+ /**
219
+ * Clear but not destroy segment data.
220
+ */
221
+ clearSegment(): void;
222
+ /**
223
+ * Removes cache records.
224
+ */
225
+ _freeCache(): void;
226
+ /**
227
+ * Clear and destroy all segment data.
228
+ */
229
+ destroySegment(): void;
230
+ _setExtentLonLat(): void;
231
+ /**
232
+ * Creates bound volumes by segment geographical extent.
233
+ */
234
+ createBoundsByExtent(): void;
235
+ createBoundsByParent(): void;
236
+ setBoundingSphere(x: any, y: any, z: any, v: any): void;
237
+ setBoundingVolume(xmin: any, ymin: any, zmin: any, xmax: any, ymax: any, zmax: any): void;
238
+ setBoundingVolume3v(vmin: any, vmax: any): void;
239
+ setBoundingVolumeArr(bounds: any): void;
240
+ createCoordsBuffers(verticesHigh: any, verticesLow: any, gridSize: any): void;
241
+ _addViewExtent(): void;
242
+ _assignTileIndexes(): void;
243
+ initialize(): void;
244
+ _assignGlobalTextureCoordinates(): void;
245
+ createPlainSegmentAsync(): void;
246
+ createPlainSegment(): void;
247
+ _createPlainVertices(): void;
248
+ /**
249
+ * Gets specific layer material.
250
+ * @public
251
+ * @param {Layer} layer - Layer object.
252
+ * @returns {planetSegment.Material} - Segment material.
253
+ */
254
+ public getMaterialByLayer(layer: Layer): planetSegment.Material;
255
+ _getLayerExtentOffset(layer: any): number[];
256
+ screenRendering(sh: any, layerSlice: any, sliceIndex: any, defaultTexture: any, isOverlay: any): void;
257
+ heightPickingRendering(sh: any, layerSlice: any): void;
258
+ colorPickingRendering(sh: any, layerSlice: any, sliceIndex: any, defaultTexture: any, isOverlay: any): void;
259
+ depthRendering(sh: any, layerSlice: any): void;
260
+ _getIndexBuffer(): any;
261
+ _collectVisibleNodes(): void;
262
+ layerOverlap(layer: any): boolean;
263
+ getDefaultTexture(): any;
264
+ getExtentLonLat(): Extent;
265
+ getExtentMerc(): Extent;
266
+ getExtent(): Extent;
267
+ getNodeState(): any;
268
+ getNeighborSide(b: any): 1 | -1 | 0 | 2 | 3;
269
+ }
270
+ import { Sphere } from "../bv/Sphere.js";
271
+ import { Box } from "../bv/Box.js";
272
+ import { Vec3 } from "../math/Vec3.js";
273
+ import { Extent } from "../Extent.js";
274
+ import { LonLat } from "../LonLat.js";
275
+ import { Layer } from "../layer/Layer.js";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Planet segment Web Mercator tile class that stored and rendered with quad tree.
3
+ * @class
4
+ * @extends {Segment}
5
+ * @param {quadNode.Node} node - Quad tree segment node.
6
+ * @param {Planet} planet - Scene planet.
7
+ * @param {Number} tileZoom - Segment tile zoom index.
8
+ * @param {Extent} extent - Segment WGS84 extent.
9
+ */
10
+ export class SegmentLonLat extends Segment {
11
+ _extentMerc: Extent;
12
+ acceptForRendering(camera: any): any;
13
+ _isNorth: boolean;
14
+ normalMapNormalsRaw: Float32Array;
15
+ }
16
+ import { Segment } from "./Segment.js";
17
+ import { Extent } from "../Extent.js";
@@ -0,0 +1,10 @@
1
+ export class Slice {
2
+ constructor(segment: any);
3
+ segment: any;
4
+ layers: any[];
5
+ tileOffsetArr: Float32Array;
6
+ layerOpacityArr: Float32Array;
7
+ init(): void;
8
+ clear(): void;
9
+ append(layer: any, material: any): void;
10
+ }
@@ -0,0 +1,13 @@
1
+ export function getInstance(): SegmentHelper;
2
+ declare class SegmentHelper {
3
+ constructor(maxGridSize?: number);
4
+ _maxGridSize: number;
5
+ get maxGridSize(): number;
6
+ init(): void;
7
+ centerIndexesTable: Uint32Array[];
8
+ skirtsIndexesTable: any[][];
9
+ setMaxGridSize(gridSize: any): void;
10
+ createSegmentIndexes(size: any, sidesSizes: any): Uint32Array;
11
+ initTextureCoordsTable(pow: any): Uint16Array[];
12
+ }
13
+ export {};
@@ -0,0 +1,3 @@
1
+ export function billboardPicking(): Program;
2
+ export function billboard_screen(): Program;
3
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function depth(): Program;
2
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,7 @@
1
+ export function drawnode_screen_nl(): Program;
2
+ export function drawnode_screen_wl(): Program;
3
+ export function drawnode_screen_wl_webgl2(): Program;
4
+ export function drawnode_colorPicking(): Program;
5
+ export function drawnode_heightPicking(): Program;
6
+ export function drawnode_depth(): Program;
7
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,3 @@
1
+ export function geo_object(): Program;
2
+ export function geo_object_picking(): Program;
3
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,4 @@
1
+ export function label_webgl2(): Program;
2
+ export function labelPicking(): Program;
3
+ export function label_screen(): Program;
4
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function pointCloud(): Program;
2
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,3 @@
1
+ export function polyline_screen(): Program;
2
+ export function polyline_picking(): Program;
3
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function rayScreen(): Program;
2
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function screenFrame(): Program;
2
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,4 @@
1
+ export function shape_wl(): Program;
2
+ export function shape_nl(): Program;
3
+ export function shape_picking(): Program;
4
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function skybox(): Program;
2
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function toneMapping(): Program;
2
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,250 @@
1
+ /**
2
+ * Base geometry shape class.
3
+ * @class
4
+ * @param {Object} options - Shape parameters:
5
+ * @param {Vec3} [options.position] - Shape position.
6
+ * @param {Quat} [options.orientation] - Shape orientation(rotation).
7
+ * @param {Vec3} [options.scale] - Scale vector.
8
+ * @param {Array.<number>} [options.color] - Shape RGBA color. (exactly 4 entries)
9
+ * @param {string} [options.src] - Texture image url source.
10
+ * @param {boolean} [options.visibility] - Shape visibility.
11
+ */
12
+ export class BaseShape {
13
+ static set _staticCounter(arg: any);
14
+ static get _staticCounter(): any;
15
+ constructor(options: any);
16
+ /**
17
+ * Unic identifier.
18
+ * @public
19
+ * @readonly
20
+ * @type {number}
21
+ */
22
+ public readonly id: number;
23
+ /**
24
+ * Shape position.
25
+ * @public
26
+ * @type {Vec3}
27
+ */
28
+ public position: Vec3;
29
+ /**
30
+ * Shape orientation(rotation)
31
+ * @public
32
+ * @type {Quat}
33
+ */
34
+ public orientation: Quat;
35
+ /**
36
+ * Scale.
37
+ * @public
38
+ * @type {Vec3}
39
+ */
40
+ public scale: Vec3;
41
+ /**
42
+ * Shape RGBA color.
43
+ * @public
44
+ * @type {Array.<number>} - (exactly 4 entries)
45
+ */
46
+ public color: Array<number>;
47
+ /**
48
+ * Shape visibility.
49
+ * @public
50
+ * @type {boolean}
51
+ */
52
+ public visibility: boolean;
53
+ /**
54
+ * Image url source.
55
+ * @protected
56
+ * @type {string}
57
+ */
58
+ protected _src: string;
59
+ /**
60
+ * Vertices position gl buffer.
61
+ * @protected
62
+ */
63
+ protected _positionBuffer: any;
64
+ /**
65
+ * Vertices normal gl buffer.
66
+ * @protected
67
+ */
68
+ protected _normalBuffer: any;
69
+ /**
70
+ * Vertices indexes gl buffer.
71
+ * @protected
72
+ */
73
+ protected _indexBuffer: any;
74
+ /**
75
+ * Vertex texture coordinates gl buffer.
76
+ * @protected
77
+ */
78
+ protected _textureCoordBuffer: any;
79
+ /**
80
+ * Vertex positions.
81
+ * @protected
82
+ * @type {Array.<number>}
83
+ */
84
+ protected _positionData: Array<number>;
85
+ /**
86
+ * Vertex normals.
87
+ * @protected
88
+ * @type {Array.<number>}
89
+ */
90
+ protected _normalData: Array<number>;
91
+ /**
92
+ * Vertex indeces.
93
+ * @protected
94
+ * @type {Array.<number>}
95
+ */
96
+ protected _indexData: Array<number>;
97
+ /**
98
+ * Vertex texture coordinates.
99
+ * @protected
100
+ * @type {Array.<number>}
101
+ */
102
+ protected _textureCoordData: Array<number>;
103
+ /**
104
+ * Scale matrix.
105
+ * @protected
106
+ * @type {Mat4}
107
+ */
108
+ protected _mxScale: Mat4;
109
+ /**
110
+ * Translation matrix.
111
+ * @protected
112
+ * @type {Mat4}
113
+ */
114
+ protected _mxTranslation: Mat4;
115
+ /**
116
+ * Model matrix.
117
+ * @protected
118
+ * @type {Mat4}
119
+ */
120
+ protected _mxModel: Mat4;
121
+ /**
122
+ * Gl texture pointer.
123
+ * @protected
124
+ */
125
+ protected texture: any;
126
+ /**
127
+ * Assigned render node.
128
+ * @protected
129
+ * @type {RenderNode}
130
+ */
131
+ protected _renderNode: RenderNode;
132
+ /**
133
+ * Assigned picking color.
134
+ * @protected
135
+ * @type {Array.<number>} - (exactly 3 entries)
136
+ */
137
+ protected _pickingColor: Array<number>;
138
+ /**
139
+ * Entity instance that holds this shape.
140
+ * @protected
141
+ * @type {Entity}
142
+ */
143
+ protected _entity: Entity;
144
+ /**
145
+ * Handler that stores and renders this shape object.
146
+ * @protected
147
+ * @type {ShapeHandler}
148
+ */
149
+ protected _handler: ShapeHandler;
150
+ /**
151
+ * Shape handler array index.
152
+ * @protected
153
+ * @type {number}
154
+ */
155
+ protected _handlerIndex: number;
156
+ /**
157
+ * Clear shape parameters.
158
+ * @public
159
+ */
160
+ public clear(): void;
161
+ /**
162
+ * Sets shape color.
163
+ * @public
164
+ * @param {Array.<number>} color - RGBA color values array. (exactly 4 entries)
165
+ */
166
+ public setColor(color: Array<number>): void;
167
+ /**
168
+ * Sets shape color.
169
+ * @public
170
+ * @param {Vec4} color - RGBA color vector.
171
+ */
172
+ public setColor4v(color: Vec4): void;
173
+ /**
174
+ * Sets shape opacity value.
175
+ * @public
176
+ * @param {number} opacity - Opacity value.
177
+ */
178
+ public setOpacity(opacity: number): void;
179
+ /**
180
+ * Delete gl buffers.
181
+ * @protected
182
+ */
183
+ protected _deleteBuffers(): void;
184
+ /**
185
+ * Sets shape visibility.
186
+ * @public
187
+ * @param {boolean} visibility - Visibility.
188
+ */
189
+ public setVisibility(visibility: boolean): void;
190
+ /**
191
+ * Gets visibilty flag.
192
+ * @public
193
+ * @returns {boolean} -
194
+ */
195
+ public getVisibility(): boolean;
196
+ /**
197
+ * Assign render node.
198
+ * @public
199
+ * @param {RenderNode} renderNode - Render node to assign.
200
+ */
201
+ public setRenderNode(renderNode: RenderNode): void;
202
+ /**
203
+ * Sets shape position.
204
+ * @public
205
+ * @param {Vec3} position - Shape position.
206
+ */
207
+ public setPosition3v(position: Vec3): void;
208
+ /**
209
+ * Translate shape position to vector.
210
+ * @public
211
+ * @param {Vec3} vec - Translation vector.
212
+ */
213
+ public translate3v(vec: Vec3): void;
214
+ /**
215
+ * Sets shape scale.
216
+ * @param {Vec3} scale - Scale vector.
217
+ */
218
+ setScale3v(scale: Vec3): void;
219
+ setScale(scale: any): void;
220
+ /**
221
+ * Removes shape from shape handler.
222
+ * @public
223
+ */
224
+ public remove(): void;
225
+ /**
226
+ * Assign picking color.
227
+ * @protected
228
+ * @param {Vec3} color - Picking RGB color.
229
+ */
230
+ protected setPickingColor3v(color: Vec3): void;
231
+ /**
232
+ * Creates buffers.
233
+ * @protected
234
+ */
235
+ protected _createBuffers(): void;
236
+ /**
237
+ * Update model matrix.
238
+ * @public
239
+ */
240
+ public refresh(): void;
241
+ /**
242
+ * Shape rendering.
243
+ * @public
244
+ */
245
+ public draw(): void;
246
+ drawPicking(): void;
247
+ }
248
+ import { Vec3 } from "../math/Vec3.js";
249
+ import { Quat } from "../math/Quat.js";
250
+ import { Mat4 } from "../math/Mat4.js";
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @class
3
+ * @extends {BaseShape}
4
+ * @param {Object} options - Sphere parameters:
5
+ * @param {Vec3} [options.position] - Sphere position.
6
+ * @param {Quat} [options.orientation] - Sphere orientation(rotation).
7
+ * @param {Vec3} [options.scale] - Scale vector.
8
+ * @param {Array.<number>} [options.color] - Sphere RGBA color. (exactly 4 entries)
9
+ * @param {string} [options.src] - Texture image url source.
10
+ * @param {boolean} [options.visibility] - Sphere visibility.
11
+ * @param {number} [options.radius=100] - Sphere radius.
12
+ * @param {number} [options.latBands=16] - Number of latitude bands.
13
+ * @param {number} [options.lonBands=16] - Number of longitude bands.
14
+ */
15
+ export class Sphere extends BaseShape {
16
+ /**
17
+ * Sphere radius.
18
+ * @protected
19
+ * @type {number}
20
+ */
21
+ protected _radius: number;
22
+ /**
23
+ * Number of latitude bands.
24
+ * @protected
25
+ * @type {number}
26
+ */
27
+ protected _latBands: number;
28
+ /**
29
+ * Number of longitude bands.
30
+ * @protected
31
+ * @type {number}
32
+ */
33
+ protected _lonBands: number;
34
+ /**
35
+ * Create specific shape vertices data.
36
+ * @protected
37
+ * @virtual
38
+ */
39
+ protected _createData(): void;
40
+ }
41
+ import { BaseShape } from "./BaseShape.js";
@@ -0,0 +1,7 @@
1
+ export class BilTerrain extends GlobusTerrain {
2
+ constructor(options: any);
3
+ _format: string;
4
+ _layers: any;
5
+ _imageSize: any;
6
+ }
7
+ import { GlobusTerrain } from "./GlobusTerrain.js";