@pirireis/webglobeplugins 0.9.10 → 0.9.11

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 (166) hide show
  1. package/Math/angle-calculation.js +8 -8
  2. package/Math/arc.js +18 -18
  3. package/Math/bounds/line-bbox.js +80 -78
  4. package/Math/constants.js +3 -3
  5. package/Math/juction/arc-plane.js +23 -23
  6. package/Math/juction/line-sphere.js +11 -11
  7. package/Math/juction/plane-plane.js +11 -11
  8. package/Math/line.js +16 -14
  9. package/Math/methods.js +72 -67
  10. package/Math/plane.js +18 -16
  11. package/Math/quaternion.js +49 -45
  12. package/Math/utils.js +2 -2
  13. package/Math/vec3.js +45 -42
  14. package/algorithms/search-binary.js +4 -4
  15. package/altitude-locator/draw-subset-obj.js +8 -7
  16. package/altitude-locator/plugin.js +113 -97
  17. package/arrowfield/adaptor.js +4 -3
  18. package/arrowfield/index.js +2 -2
  19. package/arrowfield/plugin.js +65 -62
  20. package/bearing-line/index.js +1 -1
  21. package/bearing-line/plugin.js +225 -200
  22. package/circle-line-chain/chain-list-map.js +88 -82
  23. package/circle-line-chain/plugin.js +154 -129
  24. package/circle-line-chain/util.js +1 -1
  25. package/compass-rose/compass-rose-padding-flat.js +126 -104
  26. package/compass-rose/compass-text-writer.js +70 -62
  27. package/compass-rose/index.js +2 -2
  28. package/compassrose/compassrose.js +50 -46
  29. package/compassrose/index.js +1 -1
  30. package/heatwave/index.js +2 -2
  31. package/heatwave/isobar/objectarraylabels.js +48 -44
  32. package/heatwave/isobar/plugin.js +123 -104
  33. package/heatwave/isobar/quadtreecontours.js +92 -76
  34. package/heatwave/plugins/heatwaveglobeshell.js +87 -69
  35. package/index.js +11 -11
  36. package/package.json +1 -1
  37. package/partialrings/buffer-manager.js +64 -32
  38. package/partialrings/index.js +1 -1
  39. package/partialrings/plugin.js +84 -48
  40. package/partialrings/program.js +47 -136
  41. package/pin/pin-object-array.js +86 -83
  42. package/pin/pin-point-totem.js +22 -21
  43. package/point-heat-map/adaptors/timetracksplugin-format-to-this.js +10 -10
  44. package/point-heat-map/plugin-webworker.js +45 -40
  45. package/point-heat-map/point-to-heat-map-flow.js +42 -40
  46. package/point-tracks/key-methods.js +1 -1
  47. package/point-tracks/plugin.js +142 -127
  48. package/programs/arrowfield/index.js +1 -1
  49. package/programs/arrowfield/logic.js +62 -170
  50. package/programs/arrowfield/object.js +35 -33
  51. package/programs/data2legend/density-to-legend.js +21 -45
  52. package/programs/data2legend/point-to-density-texture.js +27 -52
  53. package/programs/float2legendwithratio/index.js +1 -1
  54. package/programs/float2legendwithratio/logic.js +42 -88
  55. package/programs/float2legendwithratio/object.js +46 -43
  56. package/programs/globe-util/is-globe-moved.js +11 -10
  57. package/programs/globeshell/index.js +1 -1
  58. package/programs/globeshell/wiggle/index.js +1 -1
  59. package/programs/globeshell/wiggle/logic.js +98 -191
  60. package/programs/globeshell/wiggle/object.js +35 -33
  61. package/programs/helpers/blender/program.js +19 -36
  62. package/programs/helpers/fadeaway/index.js +1 -1
  63. package/programs/helpers/fadeaway/logic.js +13 -35
  64. package/programs/helpers/fadeaway/object.js +10 -9
  65. package/programs/helpers/index.js +1 -1
  66. package/programs/index.js +8 -8
  67. package/programs/line-on-globe/angled-line.js +32 -91
  68. package/programs/line-on-globe/circle-accurate-3d.js +32 -82
  69. package/programs/line-on-globe/circle-accurate-flat.js +50 -108
  70. package/programs/line-on-globe/circle-accurate.js +33 -103
  71. package/programs/line-on-globe/circle.js +32 -97
  72. package/programs/line-on-globe/degree-padding-around-circle-3d.js +33 -83
  73. package/programs/line-on-globe/lines-color-instanced-flat.js +34 -79
  74. package/programs/line-on-globe/linestrip.js +39 -100
  75. package/programs/line-on-globe/naive-accurate-flexible.js +48 -118
  76. package/programs/line-on-globe/to-the-surface.js +29 -58
  77. package/programs/line-on-globe/util.js +1 -1
  78. package/programs/picking/pickable-renderer.js +33 -117
  79. package/programs/point-on-globe/element-globe-surface-glow.js +38 -78
  80. package/programs/point-on-globe/element-point-glow.js +35 -103
  81. package/programs/point-on-globe/square-pixel-point.js +27 -76
  82. package/programs/programcache.js +13 -13
  83. package/programs/rings/distancering/circleflatprogram.js +21 -63
  84. package/programs/rings/distancering/circlepaddingfreeangleprogram.js +145 -156
  85. package/programs/rings/distancering/circlepaddysharedbuffer.js +197 -121
  86. package/programs/rings/distancering/index.js +4 -4
  87. package/programs/rings/distancering/paddyflatprogram.js +20 -73
  88. package/programs/rings/distancering/paddyflatprogram2d.js +22 -75
  89. package/programs/rings/distancering/paddyflatprogram3d.js +20 -73
  90. package/programs/rings/partial-ring/piece-of-pie.js +35 -137
  91. package/programs/totems/camerauniformblock.js +51 -64
  92. package/programs/totems/canvas-webglobe-info.js +40 -48
  93. package/programs/totems/gpu-selection-uniform-block.js +40 -44
  94. package/programs/totems/index.js +1 -1
  95. package/programs/two-d/pixel-padding-for-compass.js +29 -90
  96. package/programs/util.js +7 -6
  97. package/programs/vectorfields/index.js +1 -1
  98. package/programs/vectorfields/logics/drawrectangleparticles.js +29 -70
  99. package/programs/vectorfields/logics/index.js +3 -3
  100. package/programs/vectorfields/logics/pixelbased.js +35 -91
  101. package/programs/vectorfields/logics/ubo.js +25 -31
  102. package/programs/vectorfields/pingpongbuffermanager.js +34 -30
  103. package/rangerings/index.js +4 -4
  104. package/rangerings/plugin.js +252 -202
  105. package/rangerings/rangeringangletext.js +120 -108
  106. package/rangerings/ring-account.js +69 -52
  107. package/shaders/fragment-toy/firework.js +1 -55
  108. package/shaders/fragment-toy/singularity.js +1 -55
  109. package/timetracks/adaptors-line-strip.js +37 -26
  110. package/timetracks/adaptors.js +61 -47
  111. package/timetracks/index.js +4 -4
  112. package/timetracks/plugin-line-strip.js +63 -59
  113. package/timetracks/plugin.js +69 -65
  114. package/timetracks/program-line-strip.js +103 -296
  115. package/timetracks/program.js +113 -419
  116. package/timetracks/programpoint-line-strip.js +44 -97
  117. package/timetracks/programpoint.js +44 -90
  118. package/util/account/bufferoffsetmanager.js +95 -72
  119. package/util/account/index.js +1 -1
  120. package/util/account/single-attribute-buffer-management/buffer-manager.js +43 -39
  121. package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +94 -64
  122. package/util/account/single-attribute-buffer-management/index.js +3 -3
  123. package/util/account/single-attribute-buffer-management/object-store.js +30 -28
  124. package/util/account/util.js +4 -2
  125. package/util/algorithms/search-binary.js +4 -4
  126. package/util/check/get.js +5 -5
  127. package/util/check/typecheck.js +15 -13
  128. package/util/geometry/index.js +11 -9
  129. package/util/gl-util/buffer/attribute-loader.js +20 -8
  130. package/util/gl-util/buffer/index.js +1 -1
  131. package/util/gl-util/draw-options/methods.js +7 -7
  132. package/util/gl-util/uniform-block/manager.js +67 -55
  133. package/util/heatwavedatamanager/datamanager.js +116 -56
  134. package/util/heatwavedatamanager/index.js +2 -2
  135. package/util/heatwavedatamanager/pointcoordinatesdatacalculator.js +40 -37
  136. package/util/heatwavedatamanager/pointcoordsmeta.js +10 -9
  137. package/util/index.js +6 -6
  138. package/util/interpolation/timetrack/index.js +1 -1
  139. package/util/interpolation/timetrack/timetrack-interpolator.js +29 -27
  140. package/util/interpolation/timetrack/web-worker-str.js +1 -179
  141. package/util/interpolation/timetrack/web-worker.js +4 -4
  142. package/util/jshelpers/data-filler.js +7 -7
  143. package/util/jshelpers/timefilters.js +7 -7
  144. package/util/picking/fence.js +7 -7
  145. package/util/picking/picker-displayer.js +52 -46
  146. package/util/programs/draw-texture-on-canvas.js +21 -39
  147. package/util/programs/shapesonglobe.js +64 -104
  148. package/util/programs/supersampletotextures.js +39 -45
  149. package/util/programs/texturetoglobe.js +48 -98
  150. package/util/shaderfunctions/geometrytransformations.js +27 -322
  151. package/util/shaderfunctions/nodata.js +1 -7
  152. package/util/shaderfunctions/noisefunctions.js +9 -39
  153. package/util/surface-line-data/arcs-to-cuts.js +23 -20
  154. package/util/webglobe/rasteroverlay.js +37 -35
  155. package/util/webglobjectbuilders.js +60 -55
  156. package/util/webglobjectbuilders1.js +49 -48
  157. package/waveparticles/adaptor.js +7 -6
  158. package/waveparticles/index.js +2 -2
  159. package/waveparticles/plugin.js +84 -79
  160. package/wind/imagetovectorfieldandmagnitude.js +15 -15
  161. package/wind/index.js +4 -4
  162. package/wind/plugin.js +251 -453
  163. package/wind/vectorfieldimage.js +5 -5
  164. package/write-text/attached-text-writer.js +48 -46
  165. package/write-text/context-text.js +58 -51
  166. package/write-text/context-text3.js +74 -69
@@ -32,18 +32,18 @@ exports.timeTrackPluginDataToPointHeatInterpolatorAdapter = void 0;
32
32
  * @property {Array<Number>} times
33
33
  * @param {Array<Timetrack>} timeTracks
34
34
  */
35
- const methods_1 = require("../../Math/methods");
36
- const processACut = (array, offset) => {
35
+ var methods_1 = require("../../Math/methods");
36
+ var processACut = function (array, offset) {
37
37
  // first 3 values of array
38
- const v3 = array.slice(offset, offset + 3);
39
- const v4 = (0, methods_1.pixelXYLenghtToUnitVectorWithHeight)(v3);
40
- const time = array[offset + 3];
38
+ var v3 = array.slice(offset, offset + 3);
39
+ var v4 = (0, methods_1.pixelXYLenghtToUnitVectorWithHeight)(v3);
40
+ var time = array[offset + 3];
41
41
  return [v4, time];
42
42
  };
43
- const timeTrackPluginDataToPointHeatInterpolatorAdapter = (timeTrackPluginData) => {
44
- const timeTracks = [];
45
- let offset = 0;
46
- let timeTrack = {
43
+ var timeTrackPluginDataToPointHeatInterpolatorAdapter = function (timeTrackPluginData) {
44
+ var timeTracks = [];
45
+ var offset = 0;
46
+ var timeTrack = {
47
47
  coordinates: [],
48
48
  times: []
49
49
  };
@@ -56,7 +56,7 @@ const timeTrackPluginDataToPointHeatInterpolatorAdapter = (timeTrackPluginData)
56
56
  };
57
57
  offset += 9;
58
58
  }
59
- const point = processACut(timeTrackPluginData, offset);
59
+ var point = processACut(timeTrackPluginData, offset);
60
60
  offset += 9;
61
61
  timeTrack.coordinates.push(point[0]);
62
62
  timeTrack.times.push(point[1]);
@@ -1,13 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PointHeatmapPlugin = void 0;
4
- const point_to_heat_map_flow_1 = require("./point-to-heat-map-flow");
4
+ var point_to_heat_map_flow_1 = require("./point-to-heat-map-flow");
5
5
  // import { webworkerStr } from "../util/interpolation/timetrack/web-worker-str"; // TODO: Delete When this plugin is tested on production
6
- const index_1 = require("../util/interpolation/timetrack/index");
7
- const util_1 = require("../util");
8
- const typecheck_1 = require("../util/check/typecheck");
9
- class PointHeatmapPlugin {
10
- constructor(id, { opacity = 1.0, pointSize = 5.0, onInterpolationComplete = () => { } } = {}) {
6
+ var index_1 = require("../util/interpolation/timetrack/index");
7
+ var util_1 = require("../util");
8
+ var typecheck_1 = require("../util/check/typecheck");
9
+ var PointHeatmapPlugin = /** @class */ (function () {
10
+ function PointHeatmapPlugin(id, _a) {
11
+ var _b = _a === void 0 ? {} : _a, _c = _b.opacity, opacity = _c === void 0 ? 1.0 : _c, _d = _b.pointSize, pointSize = _d === void 0 ? 5.0 : _d, _e = _b.onInterpolationComplete, onInterpolationComplete = _e === void 0 ? function () { } : _e;
12
+ var _this = this;
11
13
  this.id = id;
12
14
  this.globe = null;
13
15
  this.gl = null;
@@ -21,7 +23,7 @@ class PointHeatmapPlugin {
21
23
  // const blob = new Blob([webworkerStr], { type: 'application/javascript' });
22
24
  // this.timeTrackInterpolationWorker = new Worker(URL.createObjectURL(blob), { type: 'module' });
23
25
  this.timeTrackInterpolationWorker = (0, index_1.createWorker)();
24
- this.timeTrackInterpolationWorker.onmessage = (e) => {
26
+ this.timeTrackInterpolationWorker.onmessage = function (e) {
25
27
  if (e.data.error) {
26
28
  throw new Error(e.data.error);
27
29
  }
@@ -29,87 +31,89 @@ class PointHeatmapPlugin {
29
31
  onInterpolationComplete();
30
32
  }
31
33
  if (e.data instanceof Float32Array) {
32
- this.flow.setData(e.data);
33
- this._throttleListener = null;
34
+ _this.flow.setData(e.data);
35
+ _this._throttleListener = null;
34
36
  onInterpolationComplete();
35
37
  }
36
38
  };
37
39
  }
38
40
  // globe interaction
39
- init(globe, gl) {
41
+ PointHeatmapPlugin.prototype.init = function (globe, gl) {
40
42
  this.globe = globe;
41
43
  this.gl = gl;
42
44
  this.flow = new point_to_heat_map_flow_1.PointHeatmapFlow(globe);
43
45
  this.setGeometry();
44
46
  this.resize();
45
- }
46
- setPointSize(pointSize) {
47
+ };
48
+ PointHeatmapPlugin.prototype.setPointSize = function (pointSize) {
47
49
  (0, typecheck_1.constraintFloat)(pointSize, 1);
48
50
  this._pointSize = pointSize;
49
51
  this.globe.DrawRender();
50
- }
52
+ };
51
53
  /**
52
54
  * @param {Array<string>}
53
55
  * @param {string} mode "interpolated" | "discrete"
54
56
  */
55
- setColorRamp(values, thresholds, mode = "interpolated") {
56
- const gl = this.gl;
57
+ PointHeatmapPlugin.prototype.setColorRamp = function (values, thresholds, mode) {
58
+ if (mode === void 0) { mode = "interpolated"; }
59
+ var gl = this.gl;
57
60
  if (this.gl === null) {
58
61
  throw new Error('Plugin not initialized');
59
62
  }
60
63
  ;
61
- const rampData = (0, util_1.getColorRampModed)(values, thresholds, mode);
62
- const texture = (0, util_1.createTexture)(gl, gl.LINEAR, rampData, 256, 1);
64
+ var rampData = (0, util_1.getColorRampModed)(values, thresholds, mode);
65
+ var texture = (0, util_1.createTexture)(gl, gl.LINEAR, rampData, 256, 1);
63
66
  if (this._legendTexture) {
64
67
  this.gl.deleteTexture(this._legendTexture);
65
68
  }
66
69
  this._legendTexture = texture;
67
70
  this.globe.DrawRender();
68
- }
69
- setTime(time) {
71
+ };
72
+ PointHeatmapPlugin.prototype.setTime = function (time) {
73
+ var _this = this;
70
74
  // TODO: WORK ON THIS
71
75
  this._time = time;
72
76
  if (this.isReady() && this._throttleListener === null) {
73
- this._throttleListener = setTimeout(() => {
74
- this.timeTrackInterpolationWorker.postMessage({ time: this._time });
77
+ this._throttleListener = setTimeout(function () {
78
+ _this.timeTrackInterpolationWorker.postMessage({ time: _this._time });
75
79
  }, 0);
76
80
  }
77
- }
78
- setTimetracks(timeTracks) {
81
+ };
82
+ PointHeatmapPlugin.prototype.setTimetracks = function (timeTracks) {
79
83
  this._timeTracksAreSet = true;
80
- this.timeTrackInterpolationWorker.postMessage({ timeTracks });
84
+ this.timeTrackInterpolationWorker.postMessage({ timeTracks: timeTracks });
81
85
  if (this._time !== null) {
82
86
  this.setTime(this._time);
83
87
  }
84
88
  this.globe.DrawRender();
85
- }
86
- setOpacity(opacity) {
89
+ };
90
+ PointHeatmapPlugin.prototype.setOpacity = function (opacity) {
87
91
  (0, typecheck_1.opacityCheck)(opacity);
88
92
  this._opacity = opacity;
89
93
  this.globe.DrawRender();
90
- }
91
- setGeometry() {
92
- const geometry = this.globe.api_GetCurrentGeometry();
93
- this.timeTrackInterpolationWorker.postMessage({ geometry });
94
+ };
95
+ PointHeatmapPlugin.prototype.setGeometry = function () {
96
+ var geometry = this.globe.api_GetCurrentGeometry();
97
+ this.timeTrackInterpolationWorker.postMessage({ geometry: geometry });
94
98
  if (this._time !== null) {
95
99
  this.setTime(this._time);
96
100
  }
97
- }
98
- draw3D() {
101
+ };
102
+ PointHeatmapPlugin.prototype.draw3D = function () {
99
103
  if (this.isReady()) {
100
104
  this.flow.draw(this._legendTexture, this._pointSize, this._opacity);
101
105
  }
102
- }
103
- resize() {
106
+ };
107
+ PointHeatmapPlugin.prototype.resize = function () {
104
108
  this.flow.resize();
105
109
  if (this._time !== null) {
106
110
  this.setTime(this._time);
107
111
  }
108
- }
109
- isReady() {
112
+ };
113
+ PointHeatmapPlugin.prototype.isReady = function () {
110
114
  return (this.gl !== null && this._legendTexture !== null && this._timeTracksAreSet);
111
- }
112
- free() {
115
+ };
116
+ PointHeatmapPlugin.prototype.free = function () {
113
117
  if (this._isFreed)
114
118
  return;
115
119
  this.gl.deleteTexture(this._legendTexture);
@@ -121,6 +125,7 @@ class PointHeatmapPlugin {
121
125
  this._legendTexture = null;
122
126
  this.timeTrackInterpolationWorker.terminate();
123
127
  this.timeTrackInterpolationWorker = null;
124
- }
125
- }
128
+ };
129
+ return PointHeatmapPlugin;
130
+ }());
126
131
  exports.PointHeatmapPlugin = PointHeatmapPlugin;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PointHeatmapFlow = void 0;
4
- const density_to_legend_1 = require("../programs/data2legend/density-to-legend");
5
- const point_to_density_texture_1 = require("../programs/data2legend/point-to-density-texture");
4
+ var density_to_legend_1 = require("../programs/data2legend/density-to-legend");
5
+ var point_to_density_texture_1 = require("../programs/data2legend/point-to-density-texture");
6
6
  // import { textureOnCanvasProgramCache } from "../util/programs/draw-texture-on-canvas";
7
- const gldefaultstates_1 = require("../util/webglobe/gldefaultstates");
8
- class PointHeatmapFlow {
9
- constructor(globe) {
7
+ var gldefaultstates_1 = require("../util/webglobe/gldefaultstates");
8
+ var PointHeatmapFlow = /** @class */ (function () {
9
+ function PointHeatmapFlow(globe) {
10
10
  this.globe = null;
11
11
  this.gl = null;
12
12
  this.program = null;
@@ -17,7 +17,7 @@ class PointHeatmapFlow {
17
17
  this.densityToLegendProgram = density_to_legend_1.densityToLegendProgramCache.get(globe);
18
18
  // this.testTextureProgram = textureOnCanvasProgramCache.get(globe.gl);
19
19
  this._lookInfo = globe.api_GetCurrentLookInfo();
20
- const { gl } = this;
20
+ var gl = this.gl;
21
21
  {
22
22
  this.buffer = gl.createBuffer();
23
23
  this.vao2D = this.pointToDensityProgram.createVAO(this.buffer, 2);
@@ -29,14 +29,15 @@ class PointHeatmapFlow {
29
29
  this._bindTextureToFramebuffer();
30
30
  }
31
31
  }
32
- _bindTextureToFramebuffer() {
33
- const { gl, densityTexture, framebuffer } = this;
32
+ PointHeatmapFlow.prototype._bindTextureToFramebuffer = function () {
33
+ var _a = this, gl = _a.gl, densityTexture = _a.densityTexture, framebuffer = _a.framebuffer;
34
34
  gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
35
35
  gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, densityTexture, 0);
36
36
  gl.bindFramebuffer(gl.FRAMEBUFFER, null);
37
- }
38
- draw(legendTexture, pointSize, opacity = 1.0) {
39
- const { gl, globe, framebuffer } = this;
37
+ };
38
+ PointHeatmapFlow.prototype.draw = function (legendTexture, pointSize, opacity) {
39
+ if (opacity === void 0) { opacity = 1.0; }
40
+ var _a = this, gl = _a.gl, globe = _a.globe, framebuffer = _a.framebuffer;
40
41
  if (this._drawDensityRequired || this._isVisionChanged()) {
41
42
  gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
42
43
  gl.clearColor(0, 0, 0, 0);
@@ -47,34 +48,34 @@ class PointHeatmapFlow {
47
48
  }
48
49
  (0, gldefaultstates_1.defaultblendfunction)(gl);
49
50
  this._drawLegend(legendTexture, opacity);
50
- }
51
- resize() {
52
- const { gl, densityTexture } = this;
51
+ };
52
+ PointHeatmapFlow.prototype.resize = function () {
53
+ var _a = this, gl = _a.gl, densityTexture = _a.densityTexture;
53
54
  gl.deleteTexture(densityTexture);
54
55
  this.densityTexture = this._createDensityTexture();
55
56
  this._bindTextureToFramebuffer();
56
57
  this._drawDensityRequired = true;
57
- }
58
+ };
58
59
  // USER API
59
60
  /**
60
61
  * @param {Float32Array} data
61
62
  * @format [x, y, z, height] x,y,z is normalized 3d cartesian coordinates. Height in kilometers. Set 6378.137 for ground level.
62
63
  */
63
- setData(data) {
64
- const { gl, buffer } = this;
64
+ PointHeatmapFlow.prototype.setData = function (data) {
65
+ var _a = this, gl = _a.gl, buffer = _a.buffer;
65
66
  gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
66
67
  gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);
67
68
  // use program
68
69
  this.dataLength = data.length;
69
70
  this._drawDensityRequired = true;
70
71
  this.globe.DrawRender();
71
- }
72
+ };
72
73
  // implicit Methods
73
- _createDensityTexture() {
74
- const { gl, globe } = this;
75
- const width = Math.floor(globe.api_ScrW());
76
- const height = Math.floor(globe.api_ScrH());
77
- const texture = gl.createTexture();
74
+ PointHeatmapFlow.prototype._createDensityTexture = function () {
75
+ var _a = this, gl = _a.gl, globe = _a.globe;
76
+ var width = Math.floor(globe.api_ScrW());
77
+ var height = Math.floor(globe.api_ScrH());
78
+ var texture = gl.createTexture();
78
79
  gl.bindTexture(gl.TEXTURE_2D, texture);
79
80
  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
80
81
  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
@@ -82,24 +83,24 @@ class PointHeatmapFlow {
82
83
  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
83
84
  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
84
85
  return texture;
85
- }
86
- _drawDensity(pointSize) {
87
- const { gl, globe, pointToDensityProgram, vao2D, vao3D, dataLength } = this;
88
- const is3D = globe.api_GetCurrentGeometry() === 0;
89
- const vao = is3D ? vao3D : vao2D;
90
- const length = dataLength / (is3D ? 3 : 2);
86
+ };
87
+ PointHeatmapFlow.prototype._drawDensity = function (pointSize) {
88
+ var _a = this, gl = _a.gl, globe = _a.globe, pointToDensityProgram = _a.pointToDensityProgram, vao2D = _a.vao2D, vao3D = _a.vao3D, dataLength = _a.dataLength;
89
+ var is3D = globe.api_GetCurrentGeometry() === 0;
90
+ var vao = is3D ? vao3D : vao2D;
91
+ var length = dataLength / (is3D ? 3 : 2);
91
92
  gl.blendEquation(gl.FUNC_ADD);
92
93
  gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE, gl.SRC_ALPHA, gl.ONE);
93
94
  pointToDensityProgram.draw(vao, length, pointSize);
94
95
  this._drawDensityRequired = false;
95
- }
96
- _drawLegend(legendTexture, opacity) {
97
- const { densityToLegendProgram, densityTexture } = this;
96
+ };
97
+ PointHeatmapFlow.prototype._drawLegend = function (legendTexture, opacity) {
98
+ var _a = this, densityToLegendProgram = _a.densityToLegendProgram, densityTexture = _a.densityTexture;
98
99
  densityToLegendProgram.draw(densityTexture, legendTexture, opacity);
99
- }
100
- _isVisionChanged() {
101
- const currentLookInfo = this.globe.api_GetCurrentLookInfo();
102
- const _lookInfo = this._lookInfo;
100
+ };
101
+ PointHeatmapFlow.prototype._isVisionChanged = function () {
102
+ var currentLookInfo = this.globe.api_GetCurrentLookInfo();
103
+ var _lookInfo = this._lookInfo;
103
104
  if (currentLookInfo.CenterLong !== _lookInfo.CenterLong ||
104
105
  currentLookInfo.CenterLat !== _lookInfo.CenterLat ||
105
106
  currentLookInfo.Distance !== _lookInfo.Distance ||
@@ -109,8 +110,8 @@ class PointHeatmapFlow {
109
110
  return true;
110
111
  }
111
112
  return false;
112
- }
113
- free() {
113
+ };
114
+ PointHeatmapFlow.prototype.free = function () {
114
115
  if (this._isFreed)
115
116
  return;
116
117
  this._isFreed = true;
@@ -122,6 +123,7 @@ class PointHeatmapFlow {
122
123
  this.gl.deleteBuffer(this.buffer);
123
124
  this.gl.deleteVertexArray(this.vao2D);
124
125
  this.gl.deleteVertexArray(this.vao3D);
125
- }
126
- }
126
+ };
127
+ return PointHeatmapFlow;
128
+ }());
127
129
  exports.PointHeatmapFlow = PointHeatmapFlow;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.pointKeyMeyhod = void 0;
4
- const pointKeyMeyhod = (trackId, pointID) => `${trackId}-${pointID}`;
4
+ var pointKeyMeyhod = function (trackId, pointID) { return "".concat(trackId, "-").concat(pointID); };
5
5
  exports.pointKeyMeyhod = pointKeyMeyhod;