@openglobus/og 0.11.5 → 0.12.0

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 (267) hide show
  1. package/css/og.css +5 -2
  2. package/package.json +12 -14
  3. package/src/og/Clock.js +6 -10
  4. package/src/og/Events.js +5 -7
  5. package/src/og/Extent.js +73 -32
  6. package/src/og/Globe.js +25 -10
  7. package/src/og/ImageCanvas.js +18 -15
  8. package/src/og/LonLat.js +13 -10
  9. package/src/og/Popup.js +19 -17
  10. package/src/og/QueueArray.js +3 -4
  11. package/src/og/Rectangle.js +4 -6
  12. package/src/og/Stack.js +2 -4
  13. package/src/og/ajax.js +20 -14
  14. package/src/og/astro/earth.js +21 -15
  15. package/src/og/bv/Box.js +2 -3
  16. package/src/og/bv/Sphere.js +10 -7
  17. package/src/og/camera/Camera.js +70 -79
  18. package/src/og/camera/Frustum.js +19 -12
  19. package/src/og/camera/PlanetCamera.js +33 -34
  20. package/src/og/control/CompassButton.js +1 -2
  21. package/src/og/control/Control.js +7 -9
  22. package/src/og/control/DebugInfo.js +2 -3
  23. package/src/og/control/EarthNavigation.js +26 -17
  24. package/src/og/control/KeyboardNavigation.js +9 -9
  25. package/src/og/control/LayerSwitcher.js +21 -20
  26. package/src/og/control/Lighting.js +74 -64
  27. package/src/og/control/MouseNavigation.js +30 -29
  28. package/src/og/control/MouseWheelZoomControl.js +257 -0
  29. package/src/og/control/SegmentBoundVisualization.js +5 -6
  30. package/src/og/control/ShowFps.js +12 -7
  31. package/src/og/control/SimpleNavigation.js +5 -7
  32. package/src/og/control/Sun.js +24 -14
  33. package/src/og/control/ToggleWireframe.js +3 -3
  34. package/src/og/control/TouchNavigation.js +43 -32
  35. package/src/og/control/ZoomControl.js +40 -24
  36. package/src/og/control/index.js +2 -0
  37. package/src/og/control/visibleExtent/Segment.js +1862 -0
  38. package/src/og/control/visibleExtent/VisibleExtent.js +80 -0
  39. package/src/og/control/visibleExtent/drawnode.js +751 -0
  40. package/src/og/ellipsoid/Ellipsoid.js +149 -57
  41. package/src/og/ellipsoid/wgs84.js +3 -3
  42. package/src/og/entity/BaseBillboard.js +72 -30
  43. package/src/og/entity/Billboard.js +9 -5
  44. package/src/og/entity/BillboardHandler.js +315 -62
  45. package/src/og/entity/Entity.js +742 -704
  46. package/src/og/entity/EntityCollection.js +47 -24
  47. package/src/og/entity/GeoObject.js +228 -0
  48. package/src/og/entity/GeoObjectHandler.js +895 -0
  49. package/src/og/entity/GeometryHandler.js +595 -123
  50. package/src/og/entity/Label.js +62 -30
  51. package/src/og/entity/LabelHandler.js +42 -243
  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 +76 -28
  55. package/src/og/entity/PointCloudHandler.js +5 -5
  56. package/src/og/entity/Ray.js +49 -16
  57. package/src/og/entity/Strip.js +72 -43
  58. package/src/og/entity/StripHandler.js +23 -23
  59. package/src/og/layer/BaseGeoImage.js +50 -19
  60. package/src/og/layer/CanvasTiles.js +16 -17
  61. package/src/og/layer/GeoImage.js +8 -16
  62. package/src/og/layer/GeoTexture2d.js +2 -10
  63. package/src/og/layer/GeoVideo.js +2 -10
  64. package/src/og/layer/KML.js +55 -33
  65. package/src/og/layer/Layer.js +24 -33
  66. package/src/og/layer/Material.js +1 -1
  67. package/src/og/layer/Vector.js +94 -48
  68. package/src/og/layer/WMS.js +33 -18
  69. package/src/og/layer/XYZ.js +24 -26
  70. package/src/og/light/LightSource.js +19 -12
  71. package/src/og/math/Mat3.js +24 -12
  72. package/src/og/math/Mat4.js +603 -603
  73. package/src/og/math/Plane.js +19 -18
  74. package/src/og/math/Ray.js +17 -12
  75. package/src/og/math/Vec2.js +24 -14
  76. package/src/og/math/Vec3.js +78 -32
  77. package/src/og/math/coder.js +7 -7
  78. package/src/og/proj/EPSG3857.js +3 -3
  79. package/src/og/proj/EPSG4326.js +3 -3
  80. package/src/og/proj/Proj.js +2 -4
  81. package/src/og/quadTree/Node.js +50 -95
  82. package/src/og/quadTree/quadTree.js +1 -1
  83. package/src/og/renderer/Renderer.js +106 -126
  84. package/src/og/renderer/RendererEvents.js +45 -23
  85. package/src/og/scene/BaseNode.js +2 -3
  86. package/src/og/scene/Planet.js +139 -191
  87. package/src/og/scene/RenderNode.js +15 -8
  88. package/src/og/segment/Segment.js +93 -268
  89. package/src/og/segment/Slice.js +45 -0
  90. package/src/og/shaders/drawnode.js +174 -360
  91. package/src/og/shaders/geoObject.js +211 -0
  92. package/src/og/shaders/pointCloud.js +41 -41
  93. package/src/og/shaders/shape.js +12 -18
  94. package/src/og/shaders/skybox.js +36 -36
  95. package/src/og/shaders/toneMapping.js +1 -0
  96. package/src/og/shapes/BaseShape.js +108 -36
  97. package/src/og/shapes/Icosphere.js +25 -10
  98. package/src/og/shapes/Sphere.js +8 -11
  99. package/src/og/terrain/EmptyTerrain.js +3 -2
  100. package/src/og/terrain/GlobusTerrain.js +2 -0
  101. package/src/og/utils/FontAtlas.js +6 -2
  102. package/src/og/utils/GeoImageCreator.js +5 -1
  103. package/src/og/utils/Loader.js +1 -1
  104. package/src/og/utils/PlainSegmentWorker.js +0 -13
  105. package/src/og/utils/TextureAtlas.js +18 -20
  106. package/src/og/utils/VectorTileCreator.js +1 -3
  107. package/src/og/utils/shared.js +2 -2
  108. package/src/og/webgl/Handler.js +219 -162
  109. package/src/og/webgl/Multisample.js +44 -16
  110. package/src/og/webgl/Program.js +78 -33
  111. package/src/og/webgl/callbacks.js +3 -3
  112. package/types/Clock.d.ts +0 -94
  113. package/types/Deferred.d.ts +0 -6
  114. package/types/Events.d.ts +0 -77
  115. package/types/Extent.d.ts +0 -166
  116. package/types/Globe.d.ts +0 -82
  117. package/types/ImageCanvas.d.ts +0 -123
  118. package/types/Lock.d.ts +0 -12
  119. package/types/LonLat.d.ts +0 -108
  120. package/types/Popup.d.ts +0 -42
  121. package/types/QueueArray.d.ts +0 -19
  122. package/types/Rectangle.d.ts +0 -80
  123. package/types/Stack.d.ts +0 -19
  124. package/types/ajax.d.ts +0 -24
  125. package/types/arial.d.ts +0 -48
  126. package/types/astro/astro.d.ts +0 -38
  127. package/types/astro/earth.d.ts +0 -7
  128. package/types/astro/jd.d.ts +0 -254
  129. package/types/bv/Box.d.ts +0 -30
  130. package/types/bv/Sphere.d.ts +0 -38
  131. package/types/bv/index.d.ts +0 -3
  132. package/types/camera/Camera.d.ts +0 -312
  133. package/types/camera/Frustum.d.ts +0 -133
  134. package/types/camera/PlanetCamera.d.ts +0 -218
  135. package/types/camera/index.d.ts +0 -3
  136. package/types/cons.d.ts +0 -40
  137. package/types/control/CompassButton.d.ts +0 -17
  138. package/types/control/Control.d.ts +0 -104
  139. package/types/control/DebugInfo.d.ts +0 -15
  140. package/types/control/EarthCoordinates.d.ts +0 -47
  141. package/types/control/EarthNavigation.d.ts +0 -42
  142. package/types/control/GeoImageDragControl.d.ts +0 -6
  143. package/types/control/KeyboardNavigation.d.ts +0 -21
  144. package/types/control/LayerSwitcher.d.ts +0 -21
  145. package/types/control/Lighting.d.ts +0 -16
  146. package/types/control/MouseNavigation.d.ts +0 -47
  147. package/types/control/ScaleControl.d.ts +0 -22
  148. package/types/control/ShowFps.d.ts +0 -11
  149. package/types/control/SimpleNavigation.d.ts +0 -25
  150. package/types/control/Sun.d.ts +0 -50
  151. package/types/control/ToggleWireframe.d.ts +0 -12
  152. package/types/control/TouchNavigation.d.ts +0 -48
  153. package/types/control/ZoomControl.d.ts +0 -27
  154. package/types/control/index.d.ts +0 -17
  155. package/types/ellipsoid/Ellipsoid.d.ts +0 -146
  156. package/types/ellipsoid/index.d.ts +0 -3
  157. package/types/ellipsoid/wgs84.d.ts +0 -6
  158. package/types/entity/BaseBillboard.d.ts +0 -208
  159. package/types/entity/Billboard.d.ts +0 -94
  160. package/types/entity/BillboardHandler.d.ts +0 -78
  161. package/types/entity/Entity.d.ts +0 -333
  162. package/types/entity/EntityCollection.d.ts +0 -311
  163. package/types/entity/Geometry.d.ts +0 -74
  164. package/types/entity/GeometryHandler.d.ts +0 -76
  165. package/types/entity/Label.d.ts +0 -189
  166. package/types/entity/LabelHandler.d.ts +0 -29
  167. package/types/entity/PointCloud.d.ts +0 -174
  168. package/types/entity/PointCloudHandler.d.ts +0 -38
  169. package/types/entity/Polyline.d.ts +0 -306
  170. package/types/entity/PolylineHandler.d.ts +0 -18
  171. package/types/entity/Ray.d.ts +0 -124
  172. package/types/entity/RayHandler.d.ts +0 -67
  173. package/types/entity/ShapeHandler.d.ts +0 -22
  174. package/types/entity/Strip.d.ts +0 -119
  175. package/types/entity/StripHandler.d.ts +0 -38
  176. package/types/entity/index.d.ts +0 -8
  177. package/types/index.core.d.ts +0 -65
  178. package/types/index.d.ts +0 -45
  179. package/types/index.webgl.d.ts +0 -7
  180. package/types/input/KeyboardHandler.d.ts +0 -10
  181. package/types/input/MouseHandler.d.ts +0 -5
  182. package/types/input/TouchHandler.d.ts +0 -5
  183. package/types/input/input.d.ts +0 -34
  184. package/types/layer/BaseGeoImage.d.ts +0 -94
  185. package/types/layer/CanvasTiles.d.ts +0 -68
  186. package/types/layer/GeoImage.d.ts +0 -52
  187. package/types/layer/GeoTexture2d.d.ts +0 -8
  188. package/types/layer/GeoVideo.d.ts +0 -55
  189. package/types/layer/KML.d.ts +0 -63
  190. package/types/layer/Layer.d.ts +0 -326
  191. package/types/layer/Material.d.ts +0 -45
  192. package/types/layer/Vector.d.ts +0 -208
  193. package/types/layer/WMS.d.ts +0 -63
  194. package/types/layer/XYZ.d.ts +0 -120
  195. package/types/layer/index.d.ts +0 -10
  196. package/types/light/LightSource.d.ts +0 -178
  197. package/types/math/Line2.d.ts +0 -11
  198. package/types/math/Line3.d.ts +0 -10
  199. package/types/math/Mat3.d.ts +0 -65
  200. package/types/math/Mat4.d.ts +0 -176
  201. package/types/math/Plane.d.ts +0 -18
  202. package/types/math/Quat.d.ts +0 -379
  203. package/types/math/Ray.d.ts +0 -82
  204. package/types/math/Vec2.d.ts +0 -309
  205. package/types/math/Vec3.d.ts +0 -460
  206. package/types/math/Vec4.d.ts +0 -162
  207. package/types/math/coder.d.ts +0 -43
  208. package/types/math/index.d.ts +0 -11
  209. package/types/math.d.ts +0 -261
  210. package/types/mercator.d.ts +0 -92
  211. package/types/proj/EPSG3857.d.ts +0 -6
  212. package/types/proj/EPSG4326.d.ts +0 -6
  213. package/types/proj/Proj.d.ts +0 -42
  214. package/types/quadTree/EntityCollectionNode.d.ts +0 -34
  215. package/types/quadTree/Node.d.ts +0 -61
  216. package/types/quadTree/quadTree.d.ts +0 -40
  217. package/types/renderer/Renderer.d.ts +0 -298
  218. package/types/renderer/RendererEvents.d.ts +0 -233
  219. package/types/res/images.d.ts +0 -3
  220. package/types/scene/Axes.d.ts +0 -11
  221. package/types/scene/BaseNode.d.ts +0 -60
  222. package/types/scene/Planet.d.ts +0 -577
  223. package/types/scene/RenderNode.d.ts +0 -142
  224. package/types/scene/SkyBox.d.ts +0 -10
  225. package/types/scene/index.d.ts +0 -4
  226. package/types/segment/Segment.d.ts +0 -279
  227. package/types/segment/SegmentLonLat.d.ts +0 -16
  228. package/types/segment/segmentHelper.d.ts +0 -13
  229. package/types/shaders/billboard.d.ts +0 -3
  230. package/types/shaders/depth.d.ts +0 -2
  231. package/types/shaders/drawnode.d.ts +0 -7
  232. package/types/shaders/label.d.ts +0 -4
  233. package/types/shaders/pointCloud.d.ts +0 -2
  234. package/types/shaders/polyline.d.ts +0 -3
  235. package/types/shaders/ray.d.ts +0 -2
  236. package/types/shaders/screenFrame.d.ts +0 -2
  237. package/types/shaders/shape.d.ts +0 -4
  238. package/types/shaders/skybox.d.ts +0 -2
  239. package/types/shaders/toneMapping.d.ts +0 -2
  240. package/types/shapes/BaseShape.d.ts +0 -250
  241. package/types/shapes/Sphere.d.ts +0 -41
  242. package/types/terrain/BilTerrain.d.ts +0 -7
  243. package/types/terrain/EmptyTerrain.d.ts +0 -72
  244. package/types/terrain/Geoid.d.ts +0 -26
  245. package/types/terrain/GlobusTerrain.d.ts +0 -116
  246. package/types/terrain/MapboxTerrain.d.ts +0 -7
  247. package/types/terrain/index.d.ts +0 -5
  248. package/types/utils/FontAtlas.d.ts +0 -14
  249. package/types/utils/GeoImageCreator.d.ts +0 -30
  250. package/types/utils/ImagesCacheManager.d.ts +0 -10
  251. package/types/utils/Loader.d.ts +0 -25
  252. package/types/utils/NormalMapCreator.d.ts +0 -39
  253. package/types/utils/PlainSegmentWorker.d.ts +0 -10
  254. package/types/utils/TerrainWorker.d.ts +0 -9
  255. package/types/utils/TextureAtlas.d.ts +0 -111
  256. package/types/utils/VectorTileCreator.d.ts +0 -16
  257. package/types/utils/colorTable.d.ts +0 -143
  258. package/types/utils/earcut.d.ts +0 -6
  259. package/types/utils/shared.d.ts +0 -231
  260. package/types/webgl/Framebuffer.d.ts +0 -135
  261. package/types/webgl/Handler.d.ts +0 -388
  262. package/types/webgl/Multisample.d.ts +0 -89
  263. package/types/webgl/Program.d.ts +0 -155
  264. package/types/webgl/ProgramController.d.ts +0 -89
  265. package/types/webgl/callbacks.d.ts +0 -1
  266. package/types/webgl/index.d.ts +0 -6
  267. package/types/webgl/types.d.ts +0 -2
@@ -1,254 +0,0 @@
1
- /**
2
- * Returns julian days from Epoch.
3
- * @param {number} jd - Julian date.
4
- * @returns {number} Days from epoch
5
- */
6
- export function T(jd: number): number;
7
- /**
8
- * Gets the date's julian day.
9
- * @param {number} year - Year.
10
- * @param {number} month - Month.
11
- * @param {number} day - Day.
12
- * @returns {Number} Day number
13
- */
14
- export function getDayNumber(year: number, month: number, day: number): number;
15
- /**
16
- * Converts javascript date to the universal(UTC) julian date.
17
- * @param {Date} date - Date.
18
- * @returns {number} UTC julian date
19
- */
20
- export function DateToUTC(date: Date): number;
21
- /**
22
- * Converts javascript date to the atomic(TAI) julian date.
23
- * @param {Date} date - Date.
24
- * @returns {number} TAI julian date
25
- */
26
- export function DateToTAI(date: Date): number;
27
- /**
28
- * Converts coordinated universal(UTC) julian date to atomic(TAI) julian date.
29
- * @param {number} jd - UTC julian date.
30
- * @returns {number} TAI julian date
31
- */
32
- export function UTCtoTAI(jd: number): number;
33
- /**
34
- * Converts atomic julian date(TAI) to the coordinated universal(UTC) julian date.
35
- * @param {number} tai - TAI julian date.
36
- * @returns {number} UTC julian date
37
- */
38
- export function TAItoUTC(tai: number): number;
39
- /**
40
- * Converts UTC julian date to the javascript date object.
41
- * @param {number} utc - UTC julian date.
42
- * @returns {Date} JavaScript Date object
43
- */
44
- export function UTCtoDate(utc: number): Date;
45
- /**
46
- * Converts TAI julian date to the javascript date object.
47
- * @param {number} tai - TAI julian date.
48
- * @returns {Date} JavaScript Date object
49
- */
50
- export function TAItoDate(tai: number): Date;
51
- /**
52
- * Adds milliseconds to the julian date.
53
- * @param {number} jd - Julian date.
54
- * @param {number} milliseconds - Milliseconds to add.
55
- * @returns {number} Julian date
56
- */
57
- export function addMilliseconds(jd: number, milliseconds: number): number;
58
- /**
59
- * Adds seconds to the julian date.
60
- * @param {number} jd - Julian date.
61
- * @param {number} seconds - Seconds to add.
62
- * @returns {number} Julian date
63
- */
64
- export function addSeconds(jd: number, seconds: number): number;
65
- /**
66
- * Adds hours to the julian date.
67
- * @param {number} jd - Julian date.
68
- * @param {number} hours - Hours to add.
69
- * @returns {number} Julian date
70
- */
71
- export function addHours(jd: number, hours: number): number;
72
- /**
73
- * Adds minutes to the julian date.
74
- * @param {number} jd - Julian date.
75
- * @param {number} minutes - Minutes to add.
76
- * @returns {number} Julian date
77
- */
78
- export function addMinutes(jd: number, minutes: number): number;
79
- /**
80
- * Adds days to the julian date.
81
- * @param {number} jd - Julian date.
82
- * @param {number} days - Days to add.
83
- * @returns {number} Julian date
84
- */
85
- export function addDays(jd: number, days: number): number;
86
- /**
87
- * Gets milliseconds of a julian date.
88
- * @param {number} js - julian date.
89
- * @returns {number} Milliseconds
90
- */
91
- export function getMilliseconds(jd: any): number;
92
- /**
93
- * Gets seconds of a julian date.
94
- * @param {number} js - julian date.
95
- * @returns {number} Seconds
96
- */
97
- export function getSeconds(jd: any): number;
98
- /**
99
- * Gets hours of a julian date.
100
- * @param {number} js - julian date.
101
- * @returns {number} Hours
102
- */
103
- export function getHours(jd: any): number;
104
- /**
105
- * Gets minutes of a julian date.
106
- * @param {number} js - julian date.
107
- * @returns {number} Minutes
108
- */
109
- export function getMinutes(jd: any): number;
110
- /**
111
- * Gets days of a julian date.
112
- * @param {number} js - julian date.
113
- * @returns {number} Days
114
- */
115
- export function getDays(jd: any): number;
116
- /**
117
- * Returns days in seconds.
118
- * @param {number} s - Seconds.
119
- * @returns {number} Days
120
- */
121
- export function secondsToDays(s: number): number;
122
- /**
123
- * Returns seconds in days.
124
- * @param {number} d - Days.
125
- * @returns {number} Seconds
126
- */
127
- export function daysToSeconds(d: number): number;
128
- /**
129
- * Seconds in millisecond.
130
- * @const
131
- * @default
132
- */
133
- export const SECONDS_PER_MILLISECOND: 0.001;
134
- /**
135
- * Milliseconds in second.
136
- * @const
137
- * @default
138
- */
139
- export const MILLISECONDS_PER_SECOND: 1000;
140
- /**
141
- * Seconds in minute.
142
- * @const
143
- * @default
144
- */
145
- export const SECONDS_PER_MINUTE: 60;
146
- /**
147
- * One by seconds in minute.
148
- * @const
149
- * @default
150
- */
151
- export const ONE_BY_SECONDS_PER_MINUTE: number;
152
- /**
153
- * Minutes in hour.
154
- * @const
155
- * @default
156
- */
157
- export const MINUTES_PER_HOUR: 60;
158
- /**
159
- * Hours in day.
160
- * @const
161
- * @default
162
- */
163
- export const HOURS_PER_DAY: 24;
164
- /**
165
- * One by hours in day.
166
- * @const
167
- * @default
168
- */
169
- export const ONE_BY_HOURS_PER_DAY: number;
170
- /**
171
- * Seconds in hour.
172
- * @const
173
- * @default
174
- */
175
- export const SECONDS_PER_HOUR: 3600;
176
- /**
177
- * One by seconds in hour.
178
- * @const
179
- * @default
180
- */
181
- export const ONE_BY_SECONDS_PER_HOUR: number;
182
- /**
183
- * Seconds in 12 hours.
184
- * @const
185
- * @default
186
- */
187
- export const SECONDS_PER_12_HOURS: number;
188
- /**
189
- * Minutes in day.
190
- * @const
191
- * @default
192
- */
193
- export const MINUTES_PER_DAY: 1440;
194
- /**
195
- * One by minutes in day.
196
- * @const
197
- * @default
198
- */
199
- export const ONE_BY_MINUTES_PER_DAY: number;
200
- /**
201
- * Seconds in day.
202
- * @const
203
- * @default
204
- */
205
- export const SECONDS_PER_DAY: 86400;
206
- /**
207
- * Milliseconds in day.
208
- * @const
209
- * @default
210
- */
211
- export const MILLISECONDS_PER_DAY: 86400000;
212
- /**
213
- * One by milliseconds in day.
214
- * @const
215
- * @default
216
- */
217
- export const ONE_BY_MILLISECONDS_PER_DAY: number;
218
- /**
219
- * One by seconds in day.
220
- * @const
221
- * @default
222
- */
223
- export const ONE_BY_SECONDS_PER_DAY: number;
224
- /**
225
- * Days in julian century.
226
- * @const
227
- * @default
228
- */
229
- export const DAYS_PER_JULIAN_CENTURY: 36525;
230
- /**
231
- * Days in julian year.
232
- * @const
233
- * @default
234
- */
235
- export const DAYS_PER_JULIAN_YEAR: 365.25;
236
- /**
237
- * Seconds in picosecond.
238
- * @const
239
- * @default
240
- */
241
- export const PICOSECOND: 1e-9;
242
- /**
243
- * Modified julian date difference.
244
- * @const
245
- * @default
246
- */
247
- export const MODIFIED_JULIAN_DATE_DIFFERENCE: 2400000.5;
248
- /**
249
- * Julian date of 2000 year. Epoch.
250
- * @const
251
- * @default
252
- */
253
- export const J2000: 2451545;
254
- export const J2000TAI: number;
package/types/bv/Box.d.ts DELETED
@@ -1,30 +0,0 @@
1
- /**
2
- * Bounding box class.
3
- * @class
4
- */
5
- export class Box {
6
- /**
7
- *
8
- * @param {*} boundsArr
9
- */
10
- constructor(boundsArr: any);
11
- /**
12
- * Vertices array.
13
- * @public
14
- * @type{Array.<Vec3>}
15
- */
16
- public vertices: Array<Vec3>;
17
- copy(bbox: any): void;
18
- /**
19
- * Sets bounding box coordinates by the bounds array.
20
- * @param {Array.<number>} bounds - Bounds is an array where [minX, minY, minZ, maxX, maxY, maxZ]
21
- */
22
- setFromBoundsArr(bounds: Array<number>): void;
23
- /**
24
- * Sets bounding box coordiantes by ellipsoid geodetic extend.
25
- * @param {Ellipsoid} ellipsoid - Ellipsoid.
26
- * @param {Extent} extent - Geodetic extent.
27
- */
28
- setFromExtent(ellipsoid: any, extent: any): void;
29
- }
30
- import { Vec3 } from "../math/Vec3.js";
@@ -1,38 +0,0 @@
1
- /**
2
- * Bounding sphere class.
3
- * @class
4
- * @param {Number} [radius] - Bounding sphere radius.
5
- * @param {Vec3} [center] - Bounding sphere coordiantes.
6
- */
7
- export class Sphere {
8
- /**
9
- *
10
- * @param {number} radius
11
- * @param {Vec3} center
12
- */
13
- constructor(radius: number, center: Vec3);
14
- /**
15
- * Sphere radius.
16
- * @public
17
- * @type {Number}
18
- */
19
- public radius: number;
20
- /**
21
- * Sphere coordiantes.
22
- * @public
23
- * @type {Vec3}
24
- */
25
- public center: Vec3;
26
- /**
27
- * Sets bounding sphere coordinates by the bounds array.
28
- * @param {Array.<number>} bounds - Bounds is an array where [minX, minY, minZ, maxX, maxY, maxZ]
29
- */
30
- setFromBounds(bounds: Array<number>): void;
31
- /**
32
- * Sets bounding sphere coordiantes by ellipsoid geodetic extend.
33
- * @param {Ellipsoid} ellipsoid - Ellipsoid.
34
- * @param {Extent} extent - Geodetic extent.
35
- */
36
- setFromExtent(ellipsoid: any, extent: any): void;
37
- }
38
- import { Vec3 } from "../math/Vec3.js";
@@ -1,3 +0,0 @@
1
- import { Box } from "./Box";
2
- import { Sphere } from "./Sphere";
3
- export { Box, Sphere };
@@ -1,312 +0,0 @@
1
- /**
2
- * Camera class.
3
- * @class
4
- * @param {Renderer} [renderer] - Renderer uses the camera instance.
5
- * @param {Object} [options] - Camera options:
6
- * @param {Object} [options.name] - Camera name.
7
- * @param {number} [options.viewAngle=38] - Camera angle of view. Default is 30.0
8
- * @param {number} [options.near=1] - Camera near plane distance. Default is 1.0
9
- * @param {number} [options.far=og.math.MAX] - Camera far plane distance. Deafult is og.math.MAX
10
- * @param {Vec3} [options.eye=[0,0,0]] - Camera eye position. Default (0,0,0)
11
- * @param {Vec3} [options.look=[0,0,0]] - Camera look position. Default (0,0,0)
12
- * @param {Vec3} [options.up=[0,1,0]] - Camera eye position. Default (0,1,0)
13
- *
14
- * @fires og.Camera#viewchange
15
- */
16
- export class Camera {
17
- /**
18
- * @param {Renderer} [renderer] - Renderer uses the camera instance.
19
- * @param {Object} [options] - Camera options:
20
- */
21
- constructor(renderer?: any, options?: any);
22
- /**
23
- * Assigned renderer
24
- * @public
25
- * @type {Renderer}
26
- */
27
- public renderer: any;
28
- /**
29
- * Camera events handler
30
- * @public
31
- * @type {Events}
32
- */
33
- public events: Events;
34
- /**
35
- * Camera position.
36
- * @public
37
- * @type {Vec3}
38
- */
39
- public eye: Vec3;
40
- /**
41
- * Camera RTE high position
42
- * @public
43
- * @type {Vec3}
44
- */
45
- public eyeHigh: Vec3;
46
- /**
47
- * Camera RTE low position
48
- * @public
49
- * @type {Vec3}
50
- */
51
- public eyeLow: Vec3;
52
- /**
53
- * Aspect ratio.
54
- * @protected
55
- * @type {Number}
56
- */
57
- protected _aspect: number;
58
- /**
59
- * Camera view angle in degrees
60
- * @protected
61
- * @type {Number}
62
- */
63
- protected _viewAngle: number;
64
- /**
65
- * Camera normal matrix.
66
- * @protected
67
- * @type {Mat3}
68
- */
69
- protected _normalMatrix: Mat3;
70
- /**
71
- * Camera view matrix.
72
- * @protected
73
- * @type {Mat4}
74
- */
75
- protected _viewMatrix: Mat4;
76
- /**
77
- * Camera right vector.
78
- * @protected
79
- * @type {Vec3}
80
- */
81
- protected _u: Vec3;
82
- /**
83
- * Camera up vector.
84
- * @protected
85
- * @type {Vec3}
86
- */
87
- protected _v: Vec3;
88
- /**
89
- * Camera forward vector.
90
- * @protected
91
- * @type {Vec3}
92
- */
93
- protected _n: Vec3;
94
- _pu: Vec3;
95
- _pv: Vec3;
96
- _pn: Vec3;
97
- _peye: Vec3;
98
- isMoved: boolean;
99
- _tanViewAngle_hrad: number;
100
- _tanViewAngle_hradOneByHeight: number;
101
- frustums: Frustum[];
102
- nearFarArr: any[];
103
- frustumColors: any[];
104
- FARTHEST_FRUSTUM_INDEX: number;
105
- _currentFrustum: number;
106
- checkMoveEnd(): void;
107
- /**
108
- * Camera initialization.
109
- * @public
110
- * @param {Renderer} renderer - OpenGlobus renderer object.
111
- * @param {Object} [options] - Camera options:
112
- * @param {number} [options.viewAngle] - Camera angle of view. Default is 30.0
113
- * @param {number} [options.near] - Camera near plane distance. Default is 1.0
114
- * @param {number} [options.far] - Camera far plane distance. Deafult is og.math.MAX
115
- * @param {Vec3} [options.eye] - Camera eye position. Default (0,0,0)
116
- * @param {Vec3} [options.look] - Camera look position. Default (0,0,0)
117
- * @param {Vec3} [options.up] - Camera eye position. Default (0,1,0)
118
- */
119
- public _init(options?: {
120
- viewAngle?: number;
121
- near?: number;
122
- far?: number;
123
- eye?: Vec3;
124
- look?: Vec3;
125
- up?: Vec3;
126
- }): void;
127
- getUp(): Vec3;
128
- getDown(): Vec3;
129
- getRight(): Vec3;
130
- getLeft(): Vec3;
131
- getForward(): Vec3;
132
- getBackward(): Vec3;
133
- /**
134
- * Updates camera view space
135
- * @public
136
- * @virtual
137
- */
138
- public update(): void;
139
- /**
140
- * Refresh camera matrices
141
- * @public
142
- */
143
- public refresh(): void;
144
- /**
145
- * Sets aspect ratio
146
- * @public
147
- * @param {Number} aspect - Camera aspect ratio
148
- */
149
- public setAspectRatio(aspect: number): void;
150
- /**
151
- * Returns aspect ratio
152
- * @public
153
- * @returns {number} - Aspect ratio
154
- */
155
- public getAspectRatio(): number;
156
- /**
157
- * Sets up camera projection
158
- * @public
159
- * @param {nnumber} angle - Camera's view angle
160
- * @param {number} aspect - Screen aspect ration
161
- */
162
- public _setProj(angle: any, aspect: number): void;
163
- _projSizeConst: number;
164
- /**
165
- * Sets camera view angle in degrees
166
- * @public
167
- * @param {number} angle - View angle
168
- */
169
- public setViewAngle(angle: number): void;
170
- /**
171
- * Gets camera view angle in degrees
172
- * @public
173
- * @returns {number} angle -
174
- */
175
- public getViewAngle(): number;
176
- /**
177
- * Sets camera to eye position
178
- * @public
179
- * @param {Vec3} eye - Camera position
180
- * @param {Vec3} look - Look point
181
- * @param {Vec3} up - Camera up vector
182
- * @returns {Camera} - This camera
183
- */
184
- public set(eye: Vec3, look: Vec3, up: Vec3): Camera;
185
- /**
186
- * Sets camera look point
187
- * @public
188
- * @param {Vec3} look - Look point
189
- * @param {Vec3} [up] - Camera up vector otherwise camera current up vector(this._v)
190
- */
191
- public look(look: Vec3, up?: Vec3): void;
192
- /**
193
- * Slides camera to vector d - (du, dv, dn)
194
- * @public
195
- * @param {number} du - delta X
196
- * @param {number} dv - delta Y
197
- * @param {number} dn - delta Z
198
- */
199
- public slide(du: number, dv: number, dn: number): void;
200
- /**
201
- * Roll the camera to the angle in degrees
202
- * @public
203
- * @param {number} angle - Delta roll angle in degrees
204
- */
205
- public roll(angle: number): void;
206
- /**
207
- * Pitch the camera to the angle in degrees
208
- * @public
209
- * @param {number} angle - Delta pitch angle in degrees
210
- */
211
- public pitch(angle: number): void;
212
- /**
213
- * Yaw the camera to the angle in degrees
214
- * @public
215
- * @param {number} angle - Delta yaw angle in degrees
216
- */
217
- public yaw(angle: number): void;
218
- /**
219
- * Returns normal vector direction to to the unprojected screen point from camera eye
220
- * @public
221
- * @param {number} x - Scren X coordinate
222
- * @param {number} y - Scren Y coordinate
223
- * @returns {Vec3} - Direction vector
224
- */
225
- public unproject(x: number, y: number): Vec3;
226
- /**
227
- * Gets projected 3d point to the 2d screen coordiantes
228
- * @public
229
- * @param {Vec3} v - Cartesian 3d coordiantes
230
- * @returns {Vec2} - Screen point coordinates
231
- */
232
- public project(v: Vec3): Vec2;
233
- /**
234
- * Rotates camera around center point
235
- * @public
236
- * @param {number} angle - Rotation angle in radians
237
- * @param {boolean} isArc - If true camera up vector gets from current up vector every frame,
238
- * otherwise up is always input parameter.
239
- * @param {Vec3} center - Point that the camera rotates around
240
- * @param {Vecto3} [up] - Camera up vector
241
- */
242
- public rotateAround(angle: number, isArc: boolean, center: Vec3, up?: any): void;
243
- /**
244
- * Rotates camera around center point by horizontal.
245
- * @public
246
- * @param {number} angle - Rotation angle in radians.
247
- * @param {boolaen} isArc - If true camera up vector gets from current up vector every frame,
248
- * otherwise up is always input parameter.
249
- * @param {Vec3} center - Point that the camera rotates around.
250
- * @param {Vec3} [up] - Camera up vector.
251
- */
252
- public rotateHorizontal(angle: number, isArc: any, center: Vec3, up?: Vec3): void;
253
- /**
254
- * Rotates camera around center point by vecrtical.
255
- * @param {number} angle - Rotation angle in radians.
256
- * @param {Vec3} center - Point that the camera rotates around.
257
- */
258
- rotateVertical(angle: number, center: Vec3): void;
259
- /**
260
- * Gets 3d size factor. Uses in LOD distance calculation.
261
- * @public
262
- * @param {Vec3} p - Far point.
263
- * @param {Vec3} r - Far point.
264
- * @returns {number} - Size factor.
265
- */
266
- public projectedSize(p: Vec3, r: Vec3): number;
267
- /**
268
- * Returns normal matrix.
269
- * @public
270
- * @returns {Mat3} - Normal matrix.
271
- */
272
- public getNormalMatrix(): Mat3;
273
- /**
274
- * Returns model matrix.
275
- * @public
276
- * @returns {Mat4} - View matrix.
277
- */
278
- public getViewMatrix(): Mat4;
279
- setCurrentFrustum(k: any): void;
280
- getCurrentFrustum(): number;
281
- get frustum(): Frustum;
282
- /**
283
- * Returns projection matrix.
284
- * @public
285
- * @returns {Mat4} - Projection matrix.
286
- */
287
- public getProjectionMatrix(): Mat4;
288
- /**
289
- * Returns projection and model matrix product.
290
- * @public
291
- * @return {Mat4} - Projection-view matrix.
292
- */
293
- public getProjectionViewMatrix(): Mat4;
294
- /**
295
- * Returns inverse projection and model matrix product.
296
- * @public
297
- * @returns {Mat4} - Inversed projection-view matrix.
298
- */
299
- public getInverseProjectionViewMatrix(): Mat4;
300
- /**
301
- * Returns inverse projection matrix.
302
- * @public
303
- * @returns {Mat4} - Inversed projection-view matrix.
304
- */
305
- public getInverseProjectionMatrix(): Mat4;
306
- }
307
- import { Events } from "../Events.js";
308
- import { Vec3 } from "../math/Vec3.js";
309
- import { Mat3 } from "../math/Mat3.js";
310
- import { Mat4 } from "../math/Mat4.js";
311
- import { Frustum } from "./Frustum.js";
312
- import { Vec2 } from "../math/Vec2.js";