@openglobus/og 0.11.2 → 0.11.7

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 (273) hide show
  1. package/package.json +13 -13
  2. package/src/og/Clock.js +10 -10
  3. package/src/og/Events.js +8 -6
  4. package/src/og/Extent.js +82 -41
  5. package/src/og/Globe.js +25 -13
  6. package/src/og/ImageCanvas.js +22 -16
  7. package/src/og/LonLat.js +16 -13
  8. package/src/og/Popup.js +21 -14
  9. package/src/og/QueueArray.js +6 -2
  10. package/src/og/Rectangle.js +11 -6
  11. package/src/og/Stack.js +5 -2
  12. package/src/og/ajax.js +21 -33
  13. package/src/og/astro/astro.js +5 -5
  14. package/src/og/astro/earth.js +22 -16
  15. package/src/og/astro/jd.js +23 -18
  16. package/src/og/astro/orbit.js +13 -11
  17. package/src/og/astro/rotation.js +17 -8
  18. package/src/og/bv/Box.js +7 -3
  19. package/src/og/bv/Sphere.js +14 -11
  20. package/src/og/camera/Camera.js +51 -54
  21. package/src/og/camera/Frustum.js +29 -18
  22. package/src/og/camera/PlanetCamera.js +32 -23
  23. package/src/og/control/CompassButton.js +5 -1
  24. package/src/og/control/Control.js +12 -10
  25. package/src/og/control/DebugInfo.js +4 -1
  26. package/src/og/control/EarthCoordinates.js +54 -33
  27. package/src/og/control/KeyboardNavigation.js +10 -10
  28. package/src/og/control/LayerSwitcher.js +22 -21
  29. package/src/og/control/Lighting.js +34 -3
  30. package/src/og/control/MouseNavigation.js +1 -1
  31. package/src/og/control/ScaleControl.js +1 -1
  32. package/src/og/control/SegmentBoundVisualization.js +6 -7
  33. package/src/og/control/ShowFps.js +13 -8
  34. package/src/og/control/SimpleNavigation.js +6 -8
  35. package/src/og/control/Sun.js +25 -15
  36. package/src/og/control/ToggleWireframe.js +4 -4
  37. package/src/og/control/TouchNavigation.js +44 -33
  38. package/src/og/control/ZoomControl.js +41 -25
  39. package/src/og/ellipsoid/Ellipsoid.js +162 -66
  40. package/src/og/ellipsoid/wgs84.js +4 -4
  41. package/src/og/entity/BaseBillboard.js +100 -56
  42. package/src/og/entity/Billboard.js +14 -10
  43. package/src/og/entity/BillboardHandler.js +317 -60
  44. package/src/og/entity/Entity.js +100 -68
  45. package/src/og/entity/EntityCollection.js +70 -47
  46. package/src/og/entity/GeoObject.js +228 -0
  47. package/src/og/entity/GeoObjectHandler.js +910 -0
  48. package/src/og/entity/Geometry.js +27 -24
  49. package/src/og/entity/GeometryHandler.js +596 -124
  50. package/src/og/entity/Label.js +80 -49
  51. package/src/og/entity/LabelHandler.js +45 -244
  52. package/src/og/entity/LabelWorker.js +218 -0
  53. package/src/og/entity/Object3d.js +504 -0
  54. package/src/og/entity/PointCloud.js +80 -32
  55. package/src/og/entity/PointCloudHandler.js +8 -8
  56. package/src/og/entity/Polyline.js +16 -16
  57. package/src/og/entity/Ray.js +60 -27
  58. package/src/og/entity/Strip.js +77 -48
  59. package/src/og/entity/StripHandler.js +26 -26
  60. package/src/og/entity/index.js +8 -16
  61. package/src/og/layer/BaseGeoImage.js +54 -23
  62. package/src/og/layer/CanvasTiles.js +24 -24
  63. package/src/og/layer/GeoImage.js +9 -9
  64. package/src/og/layer/GeoVideo.js +3 -3
  65. package/src/og/layer/KML.js +63 -37
  66. package/src/og/layer/Layer.js +44 -21
  67. package/src/og/layer/Material.js +23 -20
  68. package/src/og/layer/Vector.js +114 -68
  69. package/src/og/layer/WMS.js +34 -17
  70. package/src/og/layer/XYZ.js +48 -46
  71. package/src/og/light/LightSource.js +46 -39
  72. package/src/og/math/Mat3.js +34 -22
  73. package/src/og/math/Mat4.js +603 -459
  74. package/src/og/math/Plane.js +21 -20
  75. package/src/og/math/Quat.js +182 -139
  76. package/src/og/math/Ray.js +38 -33
  77. package/src/og/math/Vec2.js +85 -75
  78. package/src/og/math/Vec3.js +142 -112
  79. package/src/og/math/Vec4.js +27 -31
  80. package/src/og/math/coder.js +10 -10
  81. package/src/og/math.js +12 -12
  82. package/src/og/proj/EPSG3857.js +4 -4
  83. package/src/og/proj/EPSG4326.js +4 -4
  84. package/src/og/proj/Proj.js +4 -6
  85. package/src/og/quadTree/Node.js +8 -8
  86. package/src/og/renderer/Renderer.js +59 -52
  87. package/src/og/renderer/RendererEvents.js +50 -27
  88. package/src/og/scene/BaseNode.js +7 -8
  89. package/src/og/scene/Planet.js +102 -103
  90. package/src/og/scene/RenderNode.js +28 -21
  91. package/src/og/segment/Segment.js +26 -21
  92. package/src/og/segment/SegmentLonLat.js +5 -5
  93. package/src/og/shaders/drawnode.js +135 -142
  94. package/src/og/shaders/geoObject.js +211 -0
  95. package/src/og/shaders/pointCloud.js +41 -41
  96. package/src/og/shaders/shape.js +12 -18
  97. package/src/og/shaders/skybox.js +36 -36
  98. package/src/og/shaders/toneMapping.js +1 -0
  99. package/src/og/shapes/BaseShape.js +126 -54
  100. package/src/og/shapes/Icosphere.js +29 -14
  101. package/src/og/shapes/Sphere.js +12 -15
  102. package/src/og/terrain/BilTerrain.js +1 -0
  103. package/src/og/terrain/EmptyTerrain.js +2 -2
  104. package/src/og/terrain/GlobusTerrain.js +9 -9
  105. package/src/og/utils/FontAtlas.js +6 -2
  106. package/src/og/utils/TextureAtlas.js +22 -24
  107. package/src/og/utils/VectorTileCreator.js +1 -3
  108. package/src/og/utils/shared.js +16 -16
  109. package/src/og/webgl/Framebuffer.js +88 -40
  110. package/src/og/webgl/Handler.js +243 -169
  111. package/src/og/webgl/Multisample.js +47 -19
  112. package/src/og/webgl/Program.js +79 -34
  113. package/src/og/webgl/ProgramController.js +17 -13
  114. package/src/og/webgl/callbacks.js +8 -8
  115. package/src/og/inherits.js +0 -8
  116. package/src/og/utils/polylabel.js +0 -176
  117. package/types/Clock.d.ts +0 -90
  118. package/types/Deferred.d.ts +0 -6
  119. package/types/Events.d.ts +0 -73
  120. package/types/Extent.d.ts +0 -166
  121. package/types/Globe.d.ts +0 -75
  122. package/types/ImageCanvas.d.ts +0 -121
  123. package/types/Lock.d.ts +0 -12
  124. package/types/LonLat.d.ts +0 -108
  125. package/types/Popup.d.ts +0 -38
  126. package/types/QueueArray.d.ts +0 -15
  127. package/types/Rectangle.d.ts +0 -74
  128. package/types/Stack.d.ts +0 -15
  129. package/types/ajax.d.ts +0 -24
  130. package/types/arial.d.ts +0 -48
  131. package/types/astro/astro.d.ts +0 -38
  132. package/types/astro/earth.d.ts +0 -6
  133. package/types/astro/jd.d.ts +0 -254
  134. package/types/bv/Box.d.ts +0 -25
  135. package/types/bv/Sphere.d.ts +0 -38
  136. package/types/bv/index.d.ts +0 -3
  137. package/types/camera/Camera.d.ts +0 -303
  138. package/types/camera/Frustum.d.ts +0 -129
  139. package/types/camera/PlanetCamera.d.ts +0 -223
  140. package/types/camera/index.d.ts +0 -3
  141. package/types/cons.d.ts +0 -40
  142. package/types/control/CompassButton.d.ts +0 -18
  143. package/types/control/Control.d.ts +0 -101
  144. package/types/control/DebugInfo.d.ts +0 -16
  145. package/types/control/EarthCoordinates.d.ts +0 -47
  146. package/types/control/EarthNavigation.d.ts +0 -42
  147. package/types/control/GeoImageDragControl.d.ts +0 -6
  148. package/types/control/KeyboardNavigation.d.ts +0 -22
  149. package/types/control/LayerSwitcher.d.ts +0 -23
  150. package/types/control/Lighting.d.ts +0 -16
  151. package/types/control/MouseNavigation.d.ts +0 -51
  152. package/types/control/ScaleControl.d.ts +0 -22
  153. package/types/control/ShowFps.d.ts +0 -12
  154. package/types/control/SimpleNavigation.d.ts +0 -28
  155. package/types/control/Sun.d.ts +0 -52
  156. package/types/control/ToggleWireframe.d.ts +0 -12
  157. package/types/control/TouchNavigation.d.ts +0 -50
  158. package/types/control/ZoomControl.d.ts +0 -28
  159. package/types/control/index.d.ts +0 -17
  160. package/types/ellipsoid/Ellipsoid.d.ts +0 -142
  161. package/types/ellipsoid/index.d.ts +0 -3
  162. package/types/ellipsoid/wgs84.d.ts +0 -5
  163. package/types/entity/BaseBillboard.d.ts +0 -208
  164. package/types/entity/Billboard.d.ts +0 -94
  165. package/types/entity/BillboardHandler.d.ts +0 -74
  166. package/types/entity/Entity.d.ts +0 -331
  167. package/types/entity/EntityCollection.d.ts +0 -303
  168. package/types/entity/Geometry.d.ts +0 -73
  169. package/types/entity/GeometryHandler.d.ts +0 -76
  170. package/types/entity/Label.d.ts +0 -194
  171. package/types/entity/LabelHandler.d.ts +0 -24
  172. package/types/entity/PointCloud.d.ts +0 -174
  173. package/types/entity/PointCloudHandler.d.ts +0 -38
  174. package/types/entity/Polyline.d.ts +0 -304
  175. package/types/entity/PolylineHandler.d.ts +0 -18
  176. package/types/entity/Ray.d.ts +0 -123
  177. package/types/entity/RayHandler.d.ts +0 -67
  178. package/types/entity/ShapeHandler.d.ts +0 -22
  179. package/types/entity/Strip.d.ts +0 -118
  180. package/types/entity/StripHandler.d.ts +0 -38
  181. package/types/entity/index.d.ts +0 -8
  182. package/types/index.core.d.ts +0 -65
  183. package/types/index.d.ts +0 -45
  184. package/types/index.webgl.d.ts +0 -7
  185. package/types/inherits.d.ts +0 -4
  186. package/types/input/KeyboardHandler.d.ts +0 -10
  187. package/types/input/MouseHandler.d.ts +0 -5
  188. package/types/input/TouchHandler.d.ts +0 -5
  189. package/types/input/input.d.ts +0 -34
  190. package/types/layer/BaseGeoImage.d.ts +0 -107
  191. package/types/layer/CanvasTiles.d.ts +0 -75
  192. package/types/layer/GeoImage.d.ts +0 -65
  193. package/types/layer/GeoTexture2d.d.ts +0 -8
  194. package/types/layer/GeoVideo.d.ts +0 -80
  195. package/types/layer/KML.d.ts +0 -58
  196. package/types/layer/Layer.d.ts +0 -321
  197. package/types/layer/Material.d.ts +0 -48
  198. package/types/layer/Vector.d.ts +0 -228
  199. package/types/layer/WMS.d.ts +0 -66
  200. package/types/layer/XYZ.d.ts +0 -130
  201. package/types/layer/index.d.ts +0 -10
  202. package/types/light/LightSource.d.ts +0 -177
  203. package/types/math/Line2.d.ts +0 -11
  204. package/types/math/Line3.d.ts +0 -10
  205. package/types/math/Mat3.d.ts +0 -63
  206. package/types/math/Mat4.d.ts +0 -173
  207. package/types/math/Plane.d.ts +0 -17
  208. package/types/math/Quat.d.ts +0 -376
  209. package/types/math/Ray.d.ts +0 -81
  210. package/types/math/Vec2.d.ts +0 -308
  211. package/types/math/Vec3.d.ts +0 -459
  212. package/types/math/Vec4.d.ts +0 -161
  213. package/types/math/coder.d.ts +0 -42
  214. package/types/math/index.d.ts +0 -11
  215. package/types/math.d.ts +0 -261
  216. package/types/mercator.d.ts +0 -92
  217. package/types/proj/EPSG3857.d.ts +0 -5
  218. package/types/proj/EPSG4326.d.ts +0 -5
  219. package/types/proj/Proj.d.ts +0 -42
  220. package/types/quadTree/EntityCollectionNode.d.ts +0 -34
  221. package/types/quadTree/Node.d.ts +0 -61
  222. package/types/quadTree/quadTree.d.ts +0 -40
  223. package/types/renderer/Renderer.d.ts +0 -296
  224. package/types/renderer/RendererEvents.d.ts +0 -230
  225. package/types/res/images.d.ts +0 -3
  226. package/types/scene/Axes.d.ts +0 -11
  227. package/types/scene/BaseNode.d.ts +0 -60
  228. package/types/scene/Planet.d.ts +0 -574
  229. package/types/scene/RenderNode.d.ts +0 -143
  230. package/types/scene/SkyBox.d.ts +0 -10
  231. package/types/scene/index.d.ts +0 -4
  232. package/types/segment/Segment.d.ts +0 -271
  233. package/types/segment/SegmentLonLat.d.ts +0 -62
  234. package/types/segment/segmentHelper.d.ts +0 -13
  235. package/types/shaders/billboard.d.ts +0 -3
  236. package/types/shaders/depth.d.ts +0 -2
  237. package/types/shaders/drawnode.d.ts +0 -7
  238. package/types/shaders/label.d.ts +0 -4
  239. package/types/shaders/pointCloud.d.ts +0 -2
  240. package/types/shaders/polyline.d.ts +0 -3
  241. package/types/shaders/ray.d.ts +0 -2
  242. package/types/shaders/screenFrame.d.ts +0 -2
  243. package/types/shaders/shape.d.ts +0 -4
  244. package/types/shaders/skybox.d.ts +0 -2
  245. package/types/shaders/toneMapping.d.ts +0 -2
  246. package/types/shapes/BaseShape.d.ts +0 -247
  247. package/types/shapes/Sphere.d.ts +0 -41
  248. package/types/terrain/BilTerrain.d.ts +0 -8
  249. package/types/terrain/EmptyTerrain.d.ts +0 -72
  250. package/types/terrain/Geoid.d.ts +0 -26
  251. package/types/terrain/GlobusTerrain.d.ts +0 -153
  252. package/types/terrain/MapboxTerrain.d.ts +0 -8
  253. package/types/terrain/index.d.ts +0 -5
  254. package/types/utils/FontAtlas.d.ts +0 -14
  255. package/types/utils/GeoImageCreator.d.ts +0 -30
  256. package/types/utils/ImagesCacheManager.d.ts +0 -10
  257. package/types/utils/Loader.d.ts +0 -25
  258. package/types/utils/NormalMapCreator.d.ts +0 -39
  259. package/types/utils/PlainSegmentWorker.d.ts +0 -10
  260. package/types/utils/TerrainWorker.d.ts +0 -9
  261. package/types/utils/TextureAtlas.d.ts +0 -111
  262. package/types/utils/VectorTileCreator.d.ts +0 -16
  263. package/types/utils/colorTable.d.ts +0 -143
  264. package/types/utils/earcut.d.ts +0 -6
  265. package/types/utils/shared.d.ts +0 -230
  266. package/types/webgl/Framebuffer.d.ts +0 -135
  267. package/types/webgl/Handler.d.ts +0 -372
  268. package/types/webgl/Multisample.d.ts +0 -89
  269. package/types/webgl/Program.d.ts +0 -155
  270. package/types/webgl/ProgramController.d.ts +0 -84
  271. package/types/webgl/callbacks.d.ts +0 -1
  272. package/types/webgl/index.d.ts +0 -6
  273. package/types/webgl/types.d.ts +0 -2
@@ -1,142 +0,0 @@
1
- /**
2
- * Class represents a plant ellipsoid.
3
- * @class
4
- * @param {number} equatorialSize - Equatorial ellipsoid size.
5
- * @param {number} polarSize - Polar ellipsoid size.
6
- */
7
- export class Ellipsoid {
8
- static getRelativeBearing(a: any, b: any): number;
9
- /**
10
- * Returns the midpoint between two points on the great circle.
11
- * @param {LonLat} lonLat1 - Longitude/latitude of first point.
12
- * @param {LonLat} lonLat2 - Longitude/latitude of second point.
13
- * @return {LonLat} Midpoint between points.
14
- */
15
- static getMiddlePointOnGreatCircle(lonLat1: LonLat, lonLat2: LonLat): LonLat;
16
- /**
17
- * Returns the point at given fraction between two points on the great circle.
18
- * @param {LonLat} lonLat1 - Longitude/Latitude of source point.
19
- * @param {LonLat} lonLat2 - Longitude/Latitude of destination point.
20
- * @param {number} fraction - Fraction between the two points (0 = source point, 1 = destination point).
21
- * @returns {LonLat} Intermediate point between points.
22
- */
23
- static getIntermediatePointOnGreatCircle(lonLat1: LonLat, lonLat2: LonLat, fraction: number): LonLat;
24
- static getRhumbBearing(lonLat1: any, lonLat2: any): number;
25
- static getBearing(lonLat1: any, lonLat2: any): number;
26
- /**
27
- * Returns the (initial) bearing from source to destination point on the great circle.
28
- * @param {LonLat} lonLat1 - Longitude/latitude of source point.
29
- * @param {LonLat} lonLat2 - Longitude/latitude of destination point.
30
- * @return {number} Initial bearing in degrees from north.
31
- */
32
- static getInitialBearing(lonLat1: LonLat, lonLat2: LonLat): number;
33
- /**
34
- * Returns the point of intersection of two paths defined by point and bearing.
35
- * @param {LonLat} p1 - First point.
36
- * @param {number} brng1 - Initial bearing from first point.
37
- * @param {LonLat} p2 - Second point.
38
- * @param {number} brng2 - Initial bearing from second point.
39
- * @return {LonLat|null} Destination point (null if no unique intersection defined).
40
- */
41
- static intersection(p1: LonLat, brng1: number, p2: LonLat, brng2: number): LonLat | null;
42
- /**
43
- * Returns final bearing arriving at destination destination point from lonLat1 point; the final bearing
44
- * will differ from the initial bearing by varying degrees according to distance and latitude.
45
- * @param {LonLat} lonLat1 - Longitude/latitude of source point.
46
- * @param {LonLat} lonLat2 - Longitude/latitude of destination point.
47
- * @return {number} Final bearing in degrees from north.
48
- */
49
- static getFinalBearing(lonLat1: LonLat, lonLat2: LonLat): number;
50
- constructor(equatorialSize: any, polarSize: any);
51
- _a: any;
52
- _b: any;
53
- _flattening: number;
54
- _f: number;
55
- _a2: number;
56
- _b2: number;
57
- _e: number;
58
- _e2: number;
59
- _e22: number;
60
- _k: number;
61
- _k2: number;
62
- _radii: Vec3;
63
- _radii2: Vec3;
64
- _invRadii: Vec3;
65
- _invRadii2: Vec3;
66
- /**
67
- * Gets ellipsoid equatorial size.
68
- * @public
69
- * @returns {number} -
70
- */
71
- public getEquatorialSize(): number;
72
- /**
73
- * Gets ellipsoid polar size.
74
- * @public
75
- * @returns {number} -
76
- */
77
- public getPolarSize(): number;
78
- /**
79
- * Gets cartesian ECEF from Wgs84 geodetic coordiantes.
80
- * @public
81
- * @param {LonLat} lonlat - Degrees geodetic coordiantes.
82
- * @returns {og.Vec3} -
83
- */
84
- public lonLatToCartesian(lonlat: LonLat): any;
85
- /**
86
- * Gets cartesian ECEF from Wgs84 geodetic coordiantes.
87
- * @public
88
- * @param {LonLat} lonlat - Degrees geodetic coordiantes.
89
- * @param {og.Vec3} res - Output result.
90
- * @returns {og.Vec3} -
91
- */
92
- public lonLatToCartesianRes(lonlat: LonLat, res: any): any;
93
- /**
94
- * Gets cartesian ECEF from Wgs84 geodetic coordiantes.
95
- * @public
96
- * @param {Number} lon - Longitude.
97
- * @param {Number} lat - Latitude.
98
- * @param {Number} height - Height.
99
- * @returns {og.Vec3} -
100
- */
101
- public geodeticToCartesian(lon: number, lat: number, height?: number): any;
102
- /**
103
- * Gets Wgs84 geodetic coordiantes from cartesian ECEF.
104
- * @public
105
- * @param {og.Vec3} cartesian - Cartesian coordinates.
106
- * @returns {LonLat} -
107
- */
108
- public cartesianToLonLat(cartesian: any): LonLat;
109
- /**
110
- * Gets ellipsoid surface normal.
111
- * @public
112
- * @param {og.Vec3} coord - Spatial coordiantes.
113
- * @returns {og.Vec3} -
114
- */
115
- public getSurfaceNormal3v(coord: any): any;
116
- getBearingDestination(lonLat1: any, bearing: any, distance: any): LonLat;
117
- /**
118
- * Returns the distance from one point to another(using haversine formula) on the great circle.
119
- * @param {LonLat} lonLat1 - Longitude/latitude of source point.
120
- * @param {LonLat} lonLat2 - Longitude/latitude of destination point.
121
- * @return {number} Distance between points.
122
- */
123
- getGreatCircleDistance(lonLat1: LonLat, lonLat2: LonLat): number;
124
- /**
125
- * Calculates the destination point given start point lat / lon, bearing(deg) and distance (m).
126
- *
127
- * Taken from http://movable-type.co.uk/scripts/latlong-vincenty-direct.html and optimized / cleaned up by Mathias Bynens <http://mathiasbynens.be/>
128
- * Based on the Vincenty direct formula by T. Vincenty, “Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations”, Survey Review, vol XXII no 176, 1975 <http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf>
129
- */
130
- getGreatCircleDestination(lonLat: any, brng: any, dist: any): LonLat;
131
- /**
132
- * Returns ray vector hit ellipsoid coordinates.
133
- * If the ray doesn't hit ellipsoid returns null.
134
- * @public
135
- * @param {og.Vec3} origin - Ray origin point.
136
- * @param {og.Vec3} direction - Ray direction.
137
- * @returns {og.Vec3} -
138
- */
139
- public hitRay(origin: any, direction: any): any;
140
- }
141
- import { Vec3 } from "../math/Vec3.js";
142
- import { LonLat } from "../LonLat.js";
@@ -1,3 +0,0 @@
1
- import { Ellipsoid } from "./Ellipsoid.js";
2
- import { wgs84 } from "./wgs84.js";
3
- export { Ellipsoid, wgs84 };
@@ -1,5 +0,0 @@
1
- /**
2
- * WGS84 ellipsoid object.
3
- * @type {og.Ellipsoid}
4
- */
5
- export const wgs84: any;
@@ -1,208 +0,0 @@
1
- /**
2
- * Base prototype for billboard and label classes.
3
- * @class
4
- * @param {Object} [options] - Options:
5
- * @param {og.Vec3|Array.<number>} [options.position] - Billboard spatial position.
6
- * @param {number} [options.rotation] - Screen angle rotaion.
7
- * @param {og.Vec4|string|Array.<number>} [options.color] - Billboard color.
8
- * @param {og.Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
9
- * @param {og.Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
10
- * @param {boolean} [options.visibility] - Visibility.
11
- */
12
- export class BaseBillboard {
13
- static set _staticCounter(arg: any);
14
- static get _staticCounter(): any;
15
- constructor(options: any);
16
- /**
17
- * Object unic identifier.
18
- * @public
19
- * @readonly
20
- * @type {number}
21
- */
22
- public readonly id: number;
23
- /**
24
- * Billboard center cartesian position.
25
- * @protected
26
- * @type {og.Vec3}
27
- */
28
- protected _position: any;
29
- _positionHigh: Vec3;
30
- _positionLow: Vec3;
31
- /**
32
- * Screen space rotation angle.
33
- * @protected
34
- * @type {number}
35
- */
36
- protected _rotation: number;
37
- /**
38
- * RGBA color.
39
- * @protected
40
- * @type {og.Vec4}
41
- */
42
- protected _color: any;
43
- /**
44
- * Cartesian aligned axis vector.
45
- * @protected
46
- * @type {og.Vec3}
47
- */
48
- protected _alignedAxis: any;
49
- /**
50
- * Billboard center screen space offset. Where x,y - screen space offset and z - depth offset.
51
- * @protected
52
- * @type {og.math.Vecto3}
53
- */
54
- protected _offset: any;
55
- /**
56
- * Billboard visibility.
57
- * @protected
58
- * @type {boolean}
59
- */
60
- protected _visibility: boolean;
61
- /**
62
- * Entity instance that holds this billboard.
63
- * @protected
64
- * @type {og.Entity}
65
- */
66
- protected _entity: any;
67
- /**
68
- * Handler that stores and renders this billboard object.
69
- * @protected
70
- * @type {og.BillboardHandler}
71
- */
72
- protected _handler: any;
73
- /**
74
- * Billboard handler array index.
75
- * @protected
76
- * @type {number}
77
- */
78
- protected _handlerIndex: number;
79
- /**
80
- * Sets billboard position.
81
- * @public
82
- * @param {number} x - X coordinate.
83
- * @param {number} y - Y coordinate.
84
- * @param {number} z - Z coordinate.
85
- */
86
- public setPosition(x: number, y: number, z: number): void;
87
- /**
88
- * Sets billboard position.
89
- * @public
90
- * @param {og.Vec3} position - Cartesian coordinates.
91
- */
92
- public setPosition3v(position: any): void;
93
- /**
94
- * Returns billboard position.
95
- * @public
96
- * @returns {og.Vec3}
97
- */
98
- public getPosition(): any;
99
- /**
100
- * Sets screen space offset.
101
- * @public
102
- * @param {number} x - X offset.
103
- * @param {number} y - Y offset.
104
- * @param {number} [z] - Z offset.
105
- */
106
- public setOffset(x: number, y: number, z?: number): void;
107
- /**
108
- * Sets screen space offset.
109
- * @public
110
- * @param {og.Vec2} offset - Offset size.
111
- */
112
- public setOffset3v(offset: any): void;
113
- /**
114
- * Returns billboard screen space offset size.
115
- * @public
116
- * @returns {og.Vec3}
117
- */
118
- public getOffset(): any;
119
- /**
120
- * Sets billboard screen space rotation in radians.
121
- * @public
122
- * @param {number} rotation - Screen space rotation in radians.
123
- */
124
- public setRotation(rotation: number): void;
125
- /**
126
- * Gets screen space rotation.
127
- * @public
128
- * @returns {number}
129
- */
130
- public getRotation(): number;
131
- /**
132
- * Sets billboard opacity.
133
- * @public
134
- * @param {number} a - Billboard opacity.
135
- */
136
- public setOpacity(a: number): void;
137
- /**
138
- * Sets RGBA color. Each channel from 0.0 to 1.0.
139
- * @public
140
- * @param {number} r - Red.
141
- * @param {number} g - Green.
142
- * @param {number} b - Blue.
143
- * @param {number} a - Alpha.
144
- */
145
- public setColor(r: number, g: number, b: number, a: number): void;
146
- /**
147
- * Sets RGBA color. Each channel from 0.0 to 1.0.
148
- * @public
149
- * @param {og.Vec4} color - RGBA vector.
150
- */
151
- public setColor4v(color: any): void;
152
- /**
153
- * Sets billboard color.
154
- * @public
155
- * @param {string} color - HTML style color.
156
- */
157
- public setColorHTML(color: string): void;
158
- /**
159
- * Returns RGBA color.
160
- * @public
161
- * @returns {og.Vec4}
162
- */
163
- public getColor(): any;
164
- /**
165
- * Sets billboard visibility.
166
- * @public
167
- * @param {boolean} visibility - Visibility flag.
168
- */
169
- public setVisibility(visibility: boolean): void;
170
- /**
171
- * Returns billboard visibility.
172
- * @public
173
- * @returns {boolean}
174
- */
175
- public getVisibility(): boolean;
176
- /**
177
- * Sets billboard cartesian aligned vector.
178
- * @public
179
- * @param {number} x - Aligned vector X coordinate.
180
- * @param {number} y - Aligned vector Y coordinate.
181
- * @param {number} z - Aligned vector Z coordinate.
182
- */
183
- public setAlignedAxis(x: number, y: number, z: number): void;
184
- /**
185
- * Sets billboard aligned vector.
186
- * @public
187
- * @param {og.math.Vecto3} alignedAxis - Vector to align.
188
- */
189
- public setAlignedAxis3v(alignedAxis: any): void;
190
- /**
191
- * Returns aligned vector.
192
- * @public
193
- * @returns {og.Vec3}
194
- */
195
- public getAlignedAxis(): any;
196
- /**
197
- * Removes billboard from hander.
198
- * @public
199
- */
200
- public remove(): void;
201
- /**
202
- * Sets billboard picking color.
203
- * @public
204
- * @param {og.Vec3} color - Picking color.
205
- */
206
- public setPickingColor3v(color: any): void;
207
- }
208
- import { Vec3 } from "../math/Vec3.js";
@@ -1,94 +0,0 @@
1
- /**
2
- * Represents basic quad billboard image.
3
- * @class
4
- * @extends {og.BaseBillboard}
5
- * @param {Object} [options] - Options:
6
- * @param {og.Vec3|Array.<number>} [options.position] - Billboard spatial position.
7
- * @param {number} [options.rotation] - Screen angle rotaion.
8
- * @param {og.Vec4|string|Array.<number>} [options.color] - Billboard color.
9
- * @param {og.Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
10
- * @param {og.Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
11
- * @param {boolean} [options.visibility] - Visibility.
12
- * @param {string} [options.src] - Billboard image url source.
13
- * @param {Image} [options.image] - Billboard image object.
14
- * @param {number} [options.width] - Screen width.
15
- * @param {number} [options.height] - Screen height.
16
- * @param {number} [options.scale] - Billboard scale.
17
- */
18
- export class Billboard {
19
- constructor(options: any);
20
- /**
21
- * Image src.
22
- * @protected
23
- * @type {string}
24
- */
25
- protected _src: string;
26
- /**
27
- * Image object.
28
- * @protected
29
- * @type {Object}
30
- */
31
- protected _image: any;
32
- _scale: number;
33
- /**
34
- * Billboard screen width.
35
- * @protected
36
- * @type {number}
37
- */
38
- protected _width: number;
39
- /**
40
- * Billboard screen height.
41
- * @protected
42
- * @type {number}
43
- */
44
- protected _height: number;
45
- /**
46
- * Sets billboard image url source.
47
- * @public
48
- * @param {string} src - Image url.
49
- */
50
- public setSrc(src: string): void;
51
- /**
52
- * Sets image object.
53
- * @public
54
- * @param {Object} image - JavaScript image object.
55
- */
56
- public setImage(image: any): void;
57
- /**
58
- * Sets billboard screen size in pixels.
59
- * @public
60
- * @param {number} width - Billboard width.
61
- * @param {number} height - Billboard height.
62
- */
63
- public setSize(width: number, height: number): void;
64
- /**
65
- * Returns billboard screen size.
66
- * @public
67
- * @returns {Object}
68
- */
69
- public getSize(): any;
70
- /**
71
- * Sets billboard screen width.
72
- * @public
73
- * @param {number} width - Width.
74
- */
75
- public setWidth(width: number): void;
76
- /**
77
- * Gets billboard screen width.
78
- * @public
79
- * @returns {number}
80
- */
81
- public getWidth(): number;
82
- /**
83
- * Sets billboard screen heigh.
84
- * @public
85
- * @param {number} height - Height.
86
- */
87
- public setHeight(height: number): void;
88
- /**
89
- * Gets billboard screen height.
90
- * @public
91
- * @returns {number}
92
- */
93
- public getHeight(): number;
94
- }
@@ -1,74 +0,0 @@
1
- export class BillboardHandler {
2
- static set _staticCounter(arg: any);
3
- static get _staticCounter(): any;
4
- static concArr(dest: any, curr: any): void;
5
- constructor(entityCollection: any);
6
- /**
7
- * Picking rendering option.
8
- * @public
9
- * @type {boolean}
10
- */
11
- public pickingEnabled: boolean;
12
- _entityCollection: any;
13
- _renderer: any;
14
- _billboards: any[];
15
- _positionHighBuffer: any;
16
- _positionLowBuffer: any;
17
- _sizeBuffer: any;
18
- _offsetBuffer: any;
19
- _rgbaBuffer: any;
20
- _rotationBuffer: any;
21
- _texCoordBuffer: any;
22
- _vertexBuffer: any;
23
- _alignedAxisBuffer: any;
24
- _texCoordArr: Float32Array;
25
- _vertexArr: Float32Array;
26
- _positionHighArr: Float32Array;
27
- _positionLowArr: Float32Array;
28
- _sizeArr: Float32Array;
29
- _offsetArr: Float32Array;
30
- _rgbaArr: Float32Array;
31
- _rotationArr: Float32Array;
32
- _alignedAxisArr: Float32Array;
33
- _pickingColorBuffer: any;
34
- _pickingColorArr: Float32Array;
35
- _buffersUpdateCallbacks: (() => void)[];
36
- _changedBuffers: any[];
37
- __staticId: number;
38
- initProgram(): void;
39
- setRenderer(renderer: any): void;
40
- refresh(): void;
41
- _removeBillboards(): void;
42
- clear(): void;
43
- _deleteBuffers(): void;
44
- update(): void;
45
- add(billboard: any): void;
46
- _addBillboardToArrays(billboard: any): void;
47
- _displayPASS(): void;
48
- _pickingPASS(): void;
49
- draw(): void;
50
- drawPicking(): void;
51
- reindexBillbordsArray(startIndex: any): void;
52
- _removeBillboard(billboard: any): void;
53
- remove(billboard: any): void;
54
- setPositionArr(index: any, positionHigh: any, positionLow: any): void;
55
- setPickingColorArr(index: any, color: any): void;
56
- setSizeArr(index: any, width: any, height: any): void;
57
- setOffsetArr(index: any, offset: any): void;
58
- setRgbaArr(index: any, rgba: any): void;
59
- setRotationArr(index: any, rotation: any): void;
60
- setTexCoordArr(index: any, tcoordArr: any): void;
61
- setVisibility(index: any, visibility: any): void;
62
- setVertexArr(index: any, vertexArr: any): void;
63
- setAlignedAxisArr(index: any, alignedAxis: any): void;
64
- createPositionBuffer(): void;
65
- createSizeBuffer(): void;
66
- createOffsetBuffer(): void;
67
- createRgbaBuffer(): void;
68
- createRotationBuffer(): void;
69
- createVertexBuffer(): void;
70
- createTexCoordBuffer(): void;
71
- createAlignedAxisBuffer(): void;
72
- createPickingColorBuffer(): void;
73
- refreshTexCoordsArr(): void;
74
- }