@openglobus/og 0.12.3 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/README.md +0 -2
  2. package/dist/@openglobus/og.esm.js +2 -2
  3. package/dist/@openglobus/og.esm.js.map +1 -1
  4. package/dist/@openglobus/og.umd.js +2 -2
  5. package/dist/@openglobus/og.umd.js.map +1 -1
  6. package/package.json +7 -7
  7. package/src/og/Extent.js +3 -3
  8. package/src/og/Globe.js +277 -275
  9. package/src/og/ImageCanvas.js +3 -3
  10. package/src/og/LonLat.js +9 -9
  11. package/src/og/QueueArray.js +2 -2
  12. package/src/og/Rectangle.js +5 -5
  13. package/src/og/bv/Box.js +1 -1
  14. package/src/og/bv/Sphere.js +2 -2
  15. package/src/og/camera/Camera.js +1 -1
  16. package/src/og/camera/PlanetCamera.js +649 -646
  17. package/src/og/control/LayerSwitcher.js +1 -1
  18. package/src/og/control/MouseNavigation.js +22 -13
  19. package/src/og/control/MouseWheelZoomControl.js +2 -2
  20. package/src/og/control/ScaleControl.js +1 -1
  21. package/src/og/control/TouchNavigation.js +319 -319
  22. package/src/og/control/ZoomControl.js +132 -132
  23. package/src/og/control/visibleExtent/Segment.js +12 -12
  24. package/src/og/ellipsoid/Ellipsoid.js +577 -567
  25. package/src/og/entity/BillboardHandler.js +878 -1051
  26. package/src/og/entity/Entity.js +1 -1
  27. package/src/og/entity/EntityCollection.js +847 -857
  28. package/src/og/entity/GeoObjectHandler.js +2 -2
  29. package/src/og/entity/LabelHandler.js +888 -1040
  30. package/src/og/entity/LabelWorker.js +0 -6
  31. package/src/og/entity/PointCloud.js +495 -495
  32. package/src/og/entity/Polyline.js +2218 -2222
  33. package/src/og/entity/RayHandler.js +1 -1
  34. package/src/og/layer/CanvasTiles.js +6 -3
  35. package/src/og/layer/GeoImage.js +1 -1
  36. package/src/og/layer/KML.js +5 -5
  37. package/src/og/layer/Layer.js +804 -752
  38. package/src/og/layer/Vector.js +997 -1010
  39. package/src/og/layer/XYZ.js +359 -357
  40. package/src/og/math/Line2.js +4 -4
  41. package/src/og/math/Quat.js +2 -2
  42. package/src/og/math/Ray.js +2 -2
  43. package/src/og/math/Vec2.js +524 -524
  44. package/src/og/math/Vec3.js +900 -900
  45. package/src/og/math/Vec4.js +261 -261
  46. package/src/og/math.js +397 -398
  47. package/src/og/quadTree/EntityCollectionNode.js +389 -387
  48. package/src/og/renderer/Renderer.js +14 -20
  49. package/src/og/renderer/RendererEvents.js +1034 -1045
  50. package/src/og/scene/Planet.js +12 -9
  51. package/src/og/scene/RenderNode.js +347 -354
  52. package/src/og/segment/Segment.js +3 -1
  53. package/src/og/segment/SegmentLonLat.js +1 -4
  54. package/src/og/shaders/billboard.js +220 -204
  55. package/src/og/shaders/drawnode.js +603 -603
  56. package/src/og/shaders/label.js +595 -456
  57. package/src/og/shaders/polyline.js +365 -361
  58. package/src/og/terrain/MapboxTerrain.js +1 -1
  59. package/src/og/utils/FontAtlas.js +209 -200
  60. package/src/og/utils/GeoImageCreator.js +4 -5
  61. package/src/og/utils/TextureAtlas.js +4 -4
  62. package/src/og/utils/VectorTileCreator.js +414 -414
  63. package/src/og/utils/shared.js +1 -1
  64. package/src/og/webgl/Handler.js +28 -60
  65. package/src/og/webgl/Multisample.js +260 -260
  66. package/src/og/webgl/Program.js +411 -396
  67. package/types/bv/Box.d.ts +1 -1
  68. package/types/bv/Sphere.d.ts +1 -1
  69. package/types/camera/PlanetCamera.d.ts +3 -3
  70. package/types/control/LayerSwitcher.d.ts +1 -1
  71. package/types/ellipsoid/Ellipsoid.d.ts +9 -2
  72. package/types/entity/BillboardHandler.d.ts +0 -4
  73. package/types/entity/EntityCollection.d.ts +0 -8
  74. package/types/entity/LabelHandler.d.ts +0 -2
  75. package/types/entity/Polyline.d.ts +1 -1
  76. package/types/layer/KML.d.ts +11 -11
  77. package/types/layer/Layer.d.ts +5 -0
  78. package/types/layer/Vector.d.ts +1 -8
  79. package/types/math/Line2.d.ts +4 -4
  80. package/types/math/Ray.d.ts +2 -2
  81. package/types/math/Vec2.d.ts +1 -1
  82. package/types/math/Vec3.d.ts +1 -1
  83. package/types/math/Vec4.d.ts +2 -2
  84. package/types/math.d.ts +1 -1
  85. package/types/renderer/Renderer.d.ts +1 -1
  86. package/types/renderer/RendererEvents.d.ts +1 -1
  87. package/types/shaders/label.d.ts +1 -1
  88. package/types/utils/FontAtlas.d.ts +3 -2
  89. package/types/utils/TextureAtlas.d.ts +3 -3
  90. package/types/utils/VectorTileCreator.d.ts +4 -4
  91. package/types/utils/shared.d.ts +1 -1
  92. package/types/webgl/Handler.d.ts +6 -31
  93. package/types/webgl/Program.d.ts +2 -0
@@ -374,7 +374,7 @@ class RayHandler {
374
374
  var gl = h.gl,
375
375
  ec = this._entityCollection;
376
376
 
377
- gl.polygonOffset(ec.polygonOffsetFactor, ec.polygonOffsetUnits);
377
+ //gl.polygonOffset(ec.polygonOffsetFactor, ec.polygonOffsetUnits);
378
378
 
379
379
  gl.uniform1f(shu.uOpacity, ec._fadingOpacity);
380
380
 
@@ -227,12 +227,15 @@ class CanvasTiles extends Layer {
227
227
  applyMaterial(material) {
228
228
  if (material.isReady) {
229
229
  return [0, 0, 1, 1];
230
- } else {
231
- !material.isLoading && this.loadMaterial(material);
232
-
230
+ } else {
231
+
233
232
  var segment = material.segment;
234
233
  var pn = segment.node,
235
234
  notEmpty = false;
235
+
236
+ if (segment.passReady && !material.isLoading) {
237
+ this.loadMaterial(material);
238
+ }
236
239
 
237
240
  var mId = this._id;
238
241
  var psegm = material;
@@ -212,4 +212,4 @@ class GeoImage extends BaseGeoImage {
212
212
  }
213
213
  }
214
214
 
215
- export { GeoImage };
215
+ export { GeoImage };
@@ -37,7 +37,7 @@ export class KML extends Vector {
37
37
  }
38
38
 
39
39
  /**
40
- * @private
40
+ * @public
41
41
  */
42
42
  _extractCoordonatesFromKml(xmlDoc) {
43
43
  const raw = Array.from(xmlDoc.getElementsByTagName("coordinates"));
@@ -55,7 +55,7 @@ export class KML extends Vector {
55
55
 
56
56
  /**
57
57
  * Creates billboards or polylines from array of lonlat.
58
- * @private
58
+ * @public
59
59
  * @param {Array} coordonates
60
60
  * @param {string} color
61
61
  * @returns {Array<Entity>}
@@ -93,7 +93,7 @@ export class KML extends Vector {
93
93
  }
94
94
 
95
95
  /**
96
- * @private
96
+ * @public
97
97
  * @returns {Document}
98
98
  */
99
99
  _getXmlContent(file) {
@@ -106,7 +106,7 @@ export class KML extends Vector {
106
106
  }
107
107
 
108
108
  /**
109
- * @private
109
+ * @public
110
110
  */
111
111
  _expandExtents(extent1, extent2) {
112
112
  if (!extent1) return extent2;
@@ -151,7 +151,7 @@ export class KML extends Vector {
151
151
  }
152
152
 
153
153
  /**
154
- * @private
154
+ * @public
155
155
  */
156
156
  _getKmlFromUrl(url) {
157
157
  return new Promise((resolve, reject) => {