@pirireis/webglobeplugins 0.9.11 → 0.9.12

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