@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
@@ -1,12 +1,125 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var util_1 = require("../../util");
4
- var programcache_1 = require("../programcache");
5
- var totems_1 = require("../totems");
6
- var arrowVertexShader = "#version 300 es\n#define R 6378.137\n#define PI 3.1415926535897932384626433832795\n#define POLE 20037508.34\n#define POLE_BY_PI 6366198.2\n#define HALF_PI 1.5707963267948966192313216916398\n\nuniform sampler2D rotation; // rotation of arrow\n\nout vec4 v_color;\n\nlayout(std140) uniform CameraBlock {\n mat4 u_view;\n mat4 u_projection;\n vec3 u_translate;\n bool u_is3D;\n vec2 u_mapWH;\n vec2 u_scrWH;\n float u_zlevel;\n};\n\nlayout(std140) uniform ArrowBlock {\n vec4 u_color;\n vec2 u_bbox_offset_rad;\n vec2 u_bbox_size_rad;\n vec2 u_resolution;\n float u_length_ratio;\n float u_width_ratio;\n float u_height;\n float u_no_data_value;\n};\n\nvec2 f_texCoord(){\n float fID = float(gl_InstanceID);\n float x = mod( fID, u_resolution.x ) / ( u_resolution.x - 1.0);\n float y = 1.0 - floor( fID / u_resolution.x ) / ( u_resolution.y - 1.0);\n return vec2(x, y);\n}\n\nvec2 f_radCoord(vec2 texCoord){\n float x = (texCoord.x * u_bbox_size_rad.x ) + u_bbox_offset_rad.x;\n float y = (texCoord.y * u_bbox_size_rad.y ) + u_bbox_offset_rad.y;\n return vec2(x, y);\n}\n\nvec3 f_onSphere(vec2 radCoord){\n float x = sin(radCoord.y) * cos(radCoord.x);\n float y = sin(radCoord.y) * sin(radCoord.x);\n float z = cos(radCoord.y);\n return vec3(x, y, z) * (R + u_height);\n}\n\n\nvec2 f_onFlat(vec2 radCoord){\n float mercX = radCoord.x * POLE_BY_PI;\n float mercY = log(tan(HALF_PI - radCoord.y * 0.5)) * POLE_BY_PI;\n float normX = ( mercX - u_translate.x ) / u_mapWH.x;\n float normY = ( mercY - u_translate.y ) / u_mapWH.y;\n return vec2(normX, normY);\n}\n\nvoid main() {\n // escape if no data\n vec2 texCoord = f_texCoord();\n vec2 geoCoord = vec2( texCoord.x , 1.0 - texCoord.y );\n\n\n float angle = texture(rotation, texCoord).r;\n\n if ( angle == u_no_data_value ) {\n gl_Position = vec4(-2.0, -2.0, 0.0, 1.0);\n return;\n }\n vec2 arrowLimb;\n if (0.0 == mod(float(gl_VertexID), 2.0)) {\n arrowLimb = vec2(0.0, 0.0);\n } else if (gl_VertexID == 1) {\n // tail\n arrowLimb = vec2( cos(angle), sin(angle)) * u_length_ratio / (170.0 );\n } else if (gl_VertexID == 3) {\n // right wing\n arrowLimb = vec2( cos(angle + 0.45), sin(angle + 0.45)) * u_width_ratio / (170.0 );\n } else if (gl_VertexID == 5) {\n // left wing\n arrowLimb = vec2( cos(angle - 0.45), sin(angle - 0.45)) * u_width_ratio / (170.0 );\n }\n\n\n vec2 radCoord = f_radCoord(geoCoord + arrowLimb);\n if ( u_is3D ) {\n vec3 spherePos = f_onSphere(radCoord);\n gl_Position = u_projection * u_view * vec4(spherePos - u_translate, 1.0);\n } else {\n vec2 flatPos = f_onFlat(radCoord);\n gl_Position = u_projection * vec4(\n flatPos.x * u_scrWH.x, \n (1.0 - flatPos.y) * u_scrWH.y,\n 0.0, 1.0\n );\n }\n\n\n v_color = u_color;\n gl_PointSize = 4.0;\n}\n";
7
- var arrowFragmentShader = "#version 300 es\nprecision highp float;\nin vec4 v_color;\nout vec4 outColor;\n\nvoid main() {\n outColor = v_color;\n}\n";
8
- var ArrowFieldLogic = /** @class */ (function () {
9
- function ArrowFieldLogic() {
3
+ const util_1 = require("../../util");
4
+ const programcache_1 = require("../programcache");
5
+ const totems_1 = require("../totems");
6
+ const arrowVertexShader = `#version 300 es
7
+ #define R 6378.137
8
+ #define PI 3.1415926535897932384626433832795
9
+ #define POLE 20037508.34
10
+ #define POLE_BY_PI 6366198.2
11
+ #define HALF_PI 1.5707963267948966192313216916398
12
+
13
+ uniform sampler2D rotation; // rotation of arrow
14
+
15
+ out vec4 v_color;
16
+
17
+ layout(std140) uniform CameraBlock {
18
+ mat4 u_view;
19
+ mat4 u_projection;
20
+ vec3 u_translate;
21
+ bool u_is3D;
22
+ vec2 u_mapWH;
23
+ vec2 u_scrWH;
24
+ float u_zlevel;
25
+ };
26
+
27
+ layout(std140) uniform ArrowBlock {
28
+ vec4 u_color;
29
+ vec2 u_bbox_offset_rad;
30
+ vec2 u_bbox_size_rad;
31
+ vec2 u_resolution;
32
+ float u_length_ratio;
33
+ float u_width_ratio;
34
+ float u_height;
35
+ float u_no_data_value;
36
+ };
37
+
38
+ vec2 f_texCoord(){
39
+ float fID = float(gl_InstanceID);
40
+ float x = mod( fID, u_resolution.x ) / ( u_resolution.x - 1.0);
41
+ float y = 1.0 - floor( fID / u_resolution.x ) / ( u_resolution.y - 1.0);
42
+ return vec2(x, y);
43
+ }
44
+
45
+ vec2 f_radCoord(vec2 texCoord){
46
+ float x = (texCoord.x * u_bbox_size_rad.x ) + u_bbox_offset_rad.x;
47
+ float y = (texCoord.y * u_bbox_size_rad.y ) + u_bbox_offset_rad.y;
48
+ return vec2(x, y);
49
+ }
50
+
51
+ vec3 f_onSphere(vec2 radCoord){
52
+ float x = sin(radCoord.y) * cos(radCoord.x);
53
+ float y = sin(radCoord.y) * sin(radCoord.x);
54
+ float z = cos(radCoord.y);
55
+ return vec3(x, y, z) * (R + u_height);
56
+ }
57
+
58
+
59
+ vec2 f_onFlat(vec2 radCoord){
60
+ float mercX = radCoord.x * POLE_BY_PI;
61
+ float mercY = log(tan(HALF_PI - radCoord.y * 0.5)) * POLE_BY_PI;
62
+ float normX = ( mercX - u_translate.x ) / u_mapWH.x;
63
+ float normY = ( mercY - u_translate.y ) / u_mapWH.y;
64
+ return vec2(normX, normY);
65
+ }
66
+
67
+ void main() {
68
+ // escape if no data
69
+ vec2 texCoord = f_texCoord();
70
+ vec2 geoCoord = vec2( texCoord.x , 1.0 - texCoord.y );
71
+
72
+
73
+ float angle = texture(rotation, texCoord).r;
74
+
75
+ if ( angle == u_no_data_value ) {
76
+ gl_Position = vec4(-2.0, -2.0, 0.0, 1.0);
77
+ return;
78
+ }
79
+ vec2 arrowLimb;
80
+ if (0.0 == mod(float(gl_VertexID), 2.0)) {
81
+ arrowLimb = vec2(0.0, 0.0);
82
+ } else if (gl_VertexID == 1) {
83
+ // tail
84
+ arrowLimb = vec2( cos(angle), sin(angle)) * u_length_ratio / (170.0 );
85
+ } else if (gl_VertexID == 3) {
86
+ // right wing
87
+ arrowLimb = vec2( cos(angle + 0.45), sin(angle + 0.45)) * u_width_ratio / (170.0 );
88
+ } else if (gl_VertexID == 5) {
89
+ // left wing
90
+ arrowLimb = vec2( cos(angle - 0.45), sin(angle - 0.45)) * u_width_ratio / (170.0 );
91
+ }
92
+
93
+
94
+ vec2 radCoord = f_radCoord(geoCoord + arrowLimb);
95
+ if ( u_is3D ) {
96
+ vec3 spherePos = f_onSphere(radCoord);
97
+ gl_Position = u_projection * u_view * vec4(spherePos - u_translate, 1.0);
98
+ } else {
99
+ vec2 flatPos = f_onFlat(radCoord);
100
+ gl_Position = u_projection * vec4(
101
+ flatPos.x * u_scrWH.x,
102
+ (1.0 - flatPos.y) * u_scrWH.y,
103
+ 0.0, 1.0
104
+ );
105
+ }
106
+
107
+
108
+ v_color = u_color;
109
+ gl_PointSize = 4.0;
110
+ }
111
+ `;
112
+ const arrowFragmentShader = `#version 300 es
113
+ precision highp float;
114
+ in vec4 v_color;
115
+ out vec4 outColor;
116
+
117
+ void main() {
118
+ outColor = v_color;
119
+ }
120
+ `;
121
+ class ArrowFieldLogic {
122
+ constructor() {
10
123
  this.gl = null;
11
124
  this.globe = null;
12
125
  this.cameraUniformBlockTotem = null;
@@ -14,34 +127,34 @@ var ArrowFieldLogic = /** @class */ (function () {
14
127
  this.cameraBlockBindingPoint = 0;
15
128
  this.arrayBlockBindingPoint = 1;
16
129
  }
17
- ArrowFieldLogic.prototype.init = function (globe, gl) {
130
+ init(globe, gl) {
18
131
  this.gl = gl;
19
132
  this.globe = globe;
20
133
  this.cameraUniformBlockTotem = programcache_1.globeProgramCache.getProgram(globe, totems_1.CameraUniformBlockTotem);
21
134
  this.program = this._createProgram();
22
- };
23
- ArrowFieldLogic.prototype._createProgram = function () {
24
- var gl = this.gl;
25
- var program = (0, util_1.createProgram)(gl, arrowVertexShader, arrowFragmentShader);
26
- var cameraBlockIndex = gl.getUniformBlockIndex(program, "CameraBlock");
135
+ }
136
+ _createProgram() {
137
+ const gl = this.gl;
138
+ const program = (0, util_1.createProgram)(gl, arrowVertexShader, arrowFragmentShader);
139
+ const cameraBlockIndex = gl.getUniformBlockIndex(program, "CameraBlock");
27
140
  gl.uniformBlockBinding(program, cameraBlockIndex, this.cameraBlockBindingPoint);
28
- var arrowBlockIndex = gl.getUniformBlockIndex(program, "ArrowBlock");
141
+ const arrowBlockIndex = gl.getUniformBlockIndex(program, "ArrowBlock");
29
142
  gl.uniformBlockBinding(program, arrowBlockIndex, this.arrayBlockBindingPoint);
30
143
  this.textureLocations = {
31
144
  rotationLocation: gl.getUniformLocation(program, "rotation"),
32
145
  };
33
146
  return program;
34
- };
35
- ArrowFieldLogic.prototype.getArrowBlockBufferManager = function () {
147
+ }
148
+ getArrowBlockBufferManager() {
36
149
  return new ArrowBlockBufferManager(this.gl, this.arrayBlockBindingPoint);
37
- };
150
+ }
38
151
  // initial load type is static.
39
152
  // after that, it is dynamic.
40
- ArrowFieldLogic.prototype.getTextureManager = function (width, height) {
153
+ getTextureManager(width, height) {
41
154
  return new TextureManager(this.gl, width, height, this.textureLocations);
42
- };
43
- ArrowFieldLogic.prototype.draw = function (arrowBlockManager, textureManager, instanceCount) {
44
- var _a = this, gl = _a.gl, cameraBlockBindingPoint = _a.cameraBlockBindingPoint, cameraUniformBlockTotem = _a.cameraUniformBlockTotem;
155
+ }
156
+ draw(arrowBlockManager, textureManager, instanceCount) {
157
+ const { gl, cameraBlockBindingPoint, cameraUniformBlockTotem } = this;
45
158
  gl.useProgram(this.program);
46
159
  arrowBlockManager.bind();
47
160
  textureManager.activate();
@@ -50,17 +163,16 @@ var ArrowFieldLogic = /** @class */ (function () {
50
163
  // gl.drawArraysInstanced(gl.POINTS, 0, 4, instanceCount);
51
164
  cameraUniformBlockTotem.unbind(cameraBlockBindingPoint);
52
165
  arrowBlockManager.unbind();
53
- };
54
- ArrowFieldLogic.prototype.free = function () {
55
- var _a = this, gl = _a.gl, program = _a.program;
166
+ }
167
+ free() {
168
+ const { gl, program } = this;
56
169
  gl.deleteProgram(program);
57
170
  programcache_1.globeProgramCache.releaseProgram(this.globe, totems_1.CameraUniformBlockTotem);
58
- };
59
- return ArrowFieldLogic;
60
- }());
171
+ }
172
+ }
61
173
  exports.default = ArrowFieldLogic;
62
- var ArrowBlockBufferManager = /** @class */ (function () {
63
- function ArrowBlockBufferManager(gl, bindingPoint) {
174
+ class ArrowBlockBufferManager {
175
+ constructor(gl, bindingPoint) {
64
176
  this.gl = gl;
65
177
  this.bindingPoint = bindingPoint;
66
178
  this.ubo = gl.createBuffer();
@@ -69,9 +181,8 @@ var ArrowBlockBufferManager = /** @class */ (function () {
69
181
  gl.bufferData(gl.UNIFORM_BUFFER, 56, gl.DYNAMIC_DRAW);
70
182
  gl.bindBuffer(gl.UNIFORM_BUFFER, null);
71
183
  }
72
- ArrowBlockBufferManager.prototype.update = function (_a) {
73
- var _b = _a === void 0 ? {} : _a, _c = _b.color, color = _c === void 0 ? null : _c, _d = _b.bboxOffsetRad, bboxOffsetRad = _d === void 0 ? null : _d, _e = _b.bboxSizeRad, bboxSizeRad = _e === void 0 ? null : _e, _f = _b.resolution, resolution = _f === void 0 ? null : _f, _g = _b.tailLengthRatio, tailLengthRatio = _g === void 0 ? null : _g, _h = _b.wingLengthRatio, wingLengthRatio = _h === void 0 ? null : _h, _j = _b.height, height = _j === void 0 ? null : _j, _k = _b.opacity, opacity = _k === void 0 ? null : _k, _l = _b.noDataValue, noDataValue = _l === void 0 ? null : _l;
74
- var _m = this, gl = _m.gl, ubo = _m.ubo;
184
+ update({ color = null, bboxOffsetRad = null, bboxSizeRad = null, resolution = null, tailLengthRatio = null, wingLengthRatio = null, height = null, opacity = null, noDataValue = null, } = {}) {
185
+ const { gl, ubo } = this;
75
186
  gl.bindBuffer(gl.UNIFORM_BUFFER, ubo);
76
187
  if (color !== null)
77
188
  gl.bufferSubData(gl.UNIFORM_BUFFER, 0, new Float32Array(color));
@@ -92,58 +203,55 @@ var ArrowBlockBufferManager = /** @class */ (function () {
92
203
  if (noDataValue !== null)
93
204
  gl.bufferSubData(gl.UNIFORM_BUFFER, 52, new Float32Array([noDataValue]));
94
205
  gl.bindBuffer(gl.UNIFORM_BUFFER, null);
95
- };
96
- ArrowBlockBufferManager.prototype.bind = function () {
97
- var _a = this, gl = _a.gl, ubo = _a.ubo, bindingPoint = _a.bindingPoint;
206
+ }
207
+ bind() {
208
+ const { gl, ubo, bindingPoint } = this;
98
209
  gl.bindBufferBase(gl.UNIFORM_BUFFER, bindingPoint, ubo);
99
- };
100
- ArrowBlockBufferManager.prototype.unbind = function () {
101
- var _a = this, gl = _a.gl, bindingPoint = _a.bindingPoint;
210
+ }
211
+ unbind() {
212
+ const { gl, bindingPoint } = this;
102
213
  gl.bindBufferBase(gl.UNIFORM_BUFFER, bindingPoint, null);
103
- };
104
- ArrowBlockBufferManager.prototype.free = function () {
105
- var _a = this, gl = _a.gl, ubo = _a.ubo;
214
+ }
215
+ free() {
216
+ const { gl, ubo } = this;
106
217
  gl.deleteBuffer(ubo);
107
- };
108
- return ArrowBlockBufferManager;
109
- }());
110
- var TextureManager = /** @class */ (function () {
111
- function TextureManager(gl, width, height, _a) {
112
- var rotationLocation = _a.rotationLocation;
218
+ }
219
+ }
220
+ class TextureManager {
221
+ constructor(gl, width, height, { rotationLocation }) {
113
222
  this.gl = gl;
114
223
  this.width = width;
115
224
  this.height = height;
116
225
  this.rotationLocation = rotationLocation;
117
226
  this.rotationTexture = this._createFloatTexture();
118
227
  }
119
- TextureManager.prototype._createFloatTexture = function () {
120
- var _a = this, gl = _a.gl, width = _a.width, height = _a.height;
121
- var texture = gl.createTexture();
228
+ _createFloatTexture() {
229
+ const { gl, width, height } = this;
230
+ const texture = gl.createTexture();
122
231
  gl.bindTexture(gl.TEXTURE_2D, texture);
123
232
  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
124
233
  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
125
234
  gl.texImage2D(gl.TEXTURE_2D, 0, gl.R32F, width, height, 0, gl.RED, gl.FLOAT, null);
126
235
  gl.bindTexture(gl.TEXTURE_2D, null);
127
236
  return texture;
128
- };
129
- TextureManager.prototype.setData = function (rotation) {
130
- var _a = this, gl = _a.gl, rotationTexture = _a.rotationTexture, width = _a.width, height = _a.height;
237
+ }
238
+ setData(rotation) {
239
+ const { gl, rotationTexture, width, height } = this;
131
240
  // gl flip y axis
132
241
  gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
133
242
  gl.bindTexture(gl.TEXTURE_2D, rotationTexture);
134
243
  gl.texImage2D(gl.TEXTURE_2D, 0, gl.R32F, width, height, 0, gl.RED, gl.FLOAT, rotation);
135
244
  gl.bindTexture(gl.TEXTURE_2D, null);
136
245
  gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);
137
- };
138
- TextureManager.prototype.activate = function () {
139
- var _a = this, gl = _a.gl, rotationTexture = _a.rotationTexture;
246
+ }
247
+ activate() {
248
+ const { gl, rotationTexture } = this;
140
249
  gl.activeTexture(gl.TEXTURE0);
141
250
  gl.bindTexture(gl.TEXTURE_2D, rotationTexture);
142
251
  gl.uniform1i(this.rotationLocation, 0);
143
- };
144
- TextureManager.prototype.free = function () {
145
- var _a = this, gl = _a.gl, rotationTexture = _a.rotationTexture;
252
+ }
253
+ free() {
254
+ const { gl, rotationTexture } = this;
146
255
  gl.deleteTexture(rotationTexture);
147
- };
148
- return TextureManager;
149
- }());
256
+ }
257
+ }
@@ -6,12 +6,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  return (mod && mod.__esModule) ? mod : { "default": mod };
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- var logic_1 = __importDefault(require("./logic"));
10
- var programcache_1 = require("../programcache");
11
- var util_1 = require("../util");
12
- var ArrowField = /** @class */ (function () {
13
- function ArrowField(gl, globe, _a) {
14
- var _b = _a === void 0 ? {} : _a, _c = _b.minLon, minLon = _c === void 0 ? -180 : _c, _d = _b.maxLon, maxLon = _d === void 0 ? 180 : _d, _e = _b.minLat, minLat = _e === void 0 ? -90 : _e, _f = _b.maxLat, maxLat = _f === void 0 ? 90 : _f, _g = _b.height, height = _g === void 0 ? 0 : _g, _h = _b.opacity, opacity = _h === void 0 ? 1 : _h, _j = _b.color, color = _j === void 0 ? [0.04, 0.2, 0.8] : _j, _k = _b.targetWidth, targetWidth = _k === void 0 ? 100 : _k, _l = _b.targetHeight, targetHeight = _l === void 0 ? 100 : _l, _m = _b.dataWidth, dataWidth = _m === void 0 ? null : _m, _o = _b.dataHeight, dataHeight = _o === void 0 ? null : _o, _p = _b.tailLengthRatio, tailLengthRatio = _p === void 0 ? 1 : _p, _q = _b.wingLengthRatio, wingLengthRatio = _q === void 0 ? 0.5 : _q, _r = _b.noDataValue, noDataValue = _r === void 0 ? null : _r;
9
+ const logic_1 = __importDefault(require("./logic"));
10
+ const programcache_1 = require("../programcache");
11
+ const util_1 = require("../util");
12
+ class ArrowField {
13
+ constructor(gl, globe, { minLon = -180, maxLon = 180, minLat = -90, maxLat = 90, height = 0, opacity = 1, color = [0.04, 0.2, 0.8], targetWidth = 100, targetHeight = 100, dataWidth = null, dataHeight = null, tailLengthRatio = 1, wingLengthRatio = 0.5, noDataValue = null,
14
+ // maxMagnitude = null
15
+ } = {}) {
15
16
  this.gl = gl;
16
17
  this.globe = globe;
17
18
  this.program = programcache_1.globeProgramCache.getProgram(globe, logic_1.default);
@@ -19,50 +20,47 @@ var ArrowField = /** @class */ (function () {
19
20
  this.instanceCount = targetWidth * targetHeight;
20
21
  this.arrowBlockManager.update({ resolution: [targetWidth, targetHeight] });
21
22
  this.textureManager = this.program.getTextureManager(dataWidth, dataHeight);
22
- this.setBBox({ minLon: minLon, maxLon: maxLon, minLat: minLat, maxLat: maxLat });
23
- this.update({ height: height, opacity: opacity, color: color, tailLengthRatio: tailLengthRatio, wingLengthRatio: wingLengthRatio, noDataValue: noDataValue });
23
+ this.setBBox({ minLon, maxLon, minLat, maxLat });
24
+ this.update({ height, opacity, color, tailLengthRatio, wingLengthRatio, noDataValue });
24
25
  }
25
- ArrowField.prototype.setBBox = function (_a) {
26
- var _b = _a === void 0 ? {} : _a, _c = _b.minLon, minLon = _c === void 0 ? -180 : _c, _d = _b.maxLon, maxLon = _d === void 0 ? 180 : _d, _e = _b.minLat, minLat = _e === void 0 ? -90 : _e, _f = _b.maxLat, maxLat = _f === void 0 ? 90 : _f;
27
- this.bbox = { minLon: minLon, maxLon: maxLon, minLat: minLat, maxLat: maxLat };
28
- var _g = (0, util_1.longlatbbox2normalbbox)(this.bbox), bboxSizeRad = _g.bboxSizeRad, bboxOffsetRad = _g.bboxOffsetRad;
29
- this.arrowBlockManager.update({ bboxSizeRad: bboxSizeRad, bboxOffsetRad: bboxOffsetRad });
26
+ setBBox({ minLon = -180, maxLon = 180, minLat = -90, maxLat = 90 } = {}) {
27
+ this.bbox = { minLon, maxLon, minLat, maxLat };
28
+ const { bboxSizeRad, bboxOffsetRad } = (0, util_1.longlatbbox2normalbbox)(this.bbox);
29
+ this.arrowBlockManager.update({ bboxSizeRad, bboxOffsetRad });
30
30
  this.globe.DrawRender();
31
- };
32
- ArrowField.prototype.update = function (_a) {
33
- var _b = _a === void 0 ? {} : _a, height = _b.height, opacity = _b.opacity, color = _b.color, resolution = _b.resolution, tailLengthRatio = _b.tailLengthRatio, wingLengthRatio = _b.wingLengthRatio, noDataValue = _b.noDataValue;
31
+ }
32
+ update({ height, opacity, color, resolution, tailLengthRatio, wingLengthRatio, noDataValue } = {}) {
34
33
  if (resolution) {
35
34
  this.instanceCount = resolution[0] * resolution[1];
36
35
  }
37
36
  this.arrowBlockManager.update({
38
- color: color,
39
- resolution: resolution,
40
- height: height,
41
- opacity: opacity,
42
- tailLengthRatio: tailLengthRatio,
43
- wingLengthRatio: wingLengthRatio,
44
- noDataValue: noDataValue,
37
+ color,
38
+ resolution,
39
+ height,
40
+ opacity,
41
+ tailLengthRatio,
42
+ wingLengthRatio,
43
+ noDataValue,
45
44
  });
46
45
  this.globe.DrawRender();
47
- };
48
- ArrowField.prototype.setTargetResolution = function (width, height) {
46
+ }
47
+ setTargetResolution(width, height) {
49
48
  this.instanceCount = width * height;
50
49
  this.arrowBlockManager.update({ resolution: [width, height] });
51
50
  this.globe.DrawRender();
52
- };
53
- ArrowField.prototype.draw = function () {
54
- var _a = this, program = _a.program, arrowBlockManager = _a.arrowBlockManager, textureManager = _a.textureManager, instanceCount = _a.instanceCount;
51
+ }
52
+ draw() {
53
+ const { program, arrowBlockManager, textureManager, instanceCount } = this;
55
54
  program.draw(arrowBlockManager, textureManager, instanceCount);
56
- };
57
- ArrowField.prototype.setData = function (rotation) {
55
+ }
56
+ setData(rotation) {
58
57
  this.textureManager.setData(rotation);
59
58
  this.globe.DrawRender();
60
- };
61
- ArrowField.prototype.free = function () {
59
+ }
60
+ free() {
62
61
  this.arrowBlockManager.free();
63
62
  this.textureManager.free();
64
63
  programcache_1.globeProgramCache.releaseProgram(this.gl, logic_1.default);
65
- };
66
- return ArrowField;
67
- }());
64
+ }
65
+ }
68
66
  exports.default = ArrowField;
@@ -1,16 +1,41 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.densityToLegendProgramCache = void 0;
4
- var util_1 = require("../../util/");
5
- var programcache_1 = require("../programcache");
6
- var vs = "#version 300 es\nprecision highp float;\n\nuniform sampler2D u_density_texture;\nin vec2 a_position;\n\nout vec2 v_texcoord;\n\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n v_texcoord = a_position * 0.5 + 0.5;\n}";
7
- var fs = "#version 300 es\nprecision highp float;\n\nuniform sampler2D u_legend_texture;\nuniform sampler2D u_density_texture;\n\nuniform float u_opacity;\nin vec2 v_texcoord;\nout vec4 fragColor;\n\nvoid main() {\n float density = texture(u_density_texture, v_texcoord).r;\n fragColor = texture(u_legend_texture, vec2(density, 0.5));\n fragColor.a *= u_opacity * sqrt(density);\n}";
8
- var DensityToLegendProgram = /** @class */ (function () {
9
- function DensityToLegendProgram(globe) {
4
+ const util_1 = require("../../util/");
5
+ const programcache_1 = require("../programcache");
6
+ const vs = `#version 300 es
7
+ precision highp float;
8
+
9
+ uniform sampler2D u_density_texture;
10
+ in vec2 a_position;
11
+
12
+ out vec2 v_texcoord;
13
+
14
+ void main() {
15
+ gl_Position = vec4(a_position, 0.0, 1.0);
16
+ v_texcoord = a_position * 0.5 + 0.5;
17
+ }`;
18
+ const fs = `#version 300 es
19
+ precision highp float;
20
+
21
+ uniform sampler2D u_legend_texture;
22
+ uniform sampler2D u_density_texture;
23
+
24
+ uniform float u_opacity;
25
+ in vec2 v_texcoord;
26
+ out vec4 fragColor;
27
+
28
+ void main() {
29
+ float density = texture(u_density_texture, v_texcoord).r;
30
+ fragColor = texture(u_legend_texture, vec2(density, 0.5));
31
+ fragColor.a *= u_opacity * sqrt(density);
32
+ }`;
33
+ class DensityToLegendProgram {
34
+ constructor(globe) {
10
35
  this.globe = globe;
11
36
  this.gl = globe.gl;
12
37
  this.program = (0, util_1.createProgram)(globe.gl, vs, fs);
13
- var _a = this, gl = _a.gl, program = _a.program;
38
+ const { gl, program } = this;
14
39
  this.uniforms = {
15
40
  densityTexture: gl.getUniformLocation(program, "u_density_texture"),
16
41
  legendTexture: gl.getUniformLocation(program, "u_legend_texture"),
@@ -21,9 +46,9 @@ var DensityToLegendProgram = /** @class */ (function () {
21
46
  }
22
47
  {
23
48
  this.vao = gl.createVertexArray();
24
- var a_positionLocation = gl.getAttribLocation(program, "a_position");
49
+ const a_positionLocation = gl.getAttribLocation(program, "a_position");
25
50
  gl.bindVertexArray(this.vao);
26
- var buffer = gl.createBuffer();
51
+ const buffer = gl.createBuffer();
27
52
  gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
28
53
  gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
29
54
  -1, -1,
@@ -39,14 +64,14 @@ var DensityToLegendProgram = /** @class */ (function () {
39
64
  }
40
65
  {
41
66
  this._lastOpacity = 1;
42
- var currentProgram = gl.getParameter(gl.CURRENT_PROGRAM);
67
+ const currentProgram = gl.getParameter(gl.CURRENT_PROGRAM);
43
68
  gl.useProgram(program);
44
69
  gl.uniform1f(this.uniforms.opacity, this._lastOpacity);
45
70
  gl.useProgram(currentProgram);
46
71
  }
47
72
  }
48
- DensityToLegendProgram.prototype.draw = function (densityTexture, legendTexture, opacity) {
49
- var _a = this, gl = _a.gl, program = _a.program, uniforms = _a.uniforms;
73
+ draw(densityTexture, legendTexture, opacity) {
74
+ const { gl, program, uniforms } = this;
50
75
  gl.useProgram(program);
51
76
  gl.bindVertexArray(this.vao);
52
77
  gl.activeTexture(gl.TEXTURE1);
@@ -61,17 +86,16 @@ var DensityToLegendProgram = /** @class */ (function () {
61
86
  }
62
87
  gl.drawArrays(gl.TRIANGLE_FAN, 0, 4);
63
88
  gl.bindVertexArray(null);
64
- };
65
- DensityToLegendProgram.prototype.free = function () {
66
- var gl = this.gl;
89
+ }
90
+ free() {
91
+ const gl = this.gl;
67
92
  gl.deleteVertexArray(this.vao);
68
93
  gl.deleteBuffer(this._buffer);
69
94
  gl.deleteProgram(this.program);
70
- };
71
- return DensityToLegendProgram;
72
- }());
73
- var densityToLegendProgramCache = {
74
- get: function (globe) { return programcache_1.noRegisterGlobeProgramCache.getProgram(globe, DensityToLegendProgram); },
75
- release: function (globe) { return programcache_1.noRegisterGlobeProgramCache.releaseProgram(globe, DensityToLegendProgram); }
95
+ }
96
+ }
97
+ const densityToLegendProgramCache = {
98
+ get: (globe) => programcache_1.noRegisterGlobeProgramCache.getProgram(globe, DensityToLegendProgram),
99
+ release: (globe) => programcache_1.noRegisterGlobeProgramCache.releaseProgram(globe, DensityToLegendProgram)
76
100
  };
77
101
  exports.densityToLegendProgramCache = densityToLegendProgramCache;
@@ -1,19 +1,46 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.pointToDensityTextureCache = void 0;
4
- var util_1 = require("../../util/");
5
- var programcache_1 = require("../programcache");
6
- var camerauniformblock_1 = require("../totems/camerauniformblock");
7
- var geometrytransformations_1 = require("../../util/shaderfunctions/geometrytransformations");
8
- var vs = "#version 300 es\nprecision highp float;\n\n".concat(camerauniformblock_1.CameraUniformBlockString, "\n").concat(geometrytransformations_1.mercatorXYToGLPosition, "\n").concat(geometrytransformations_1.cartesian3DToGLPosition, "\n\nin vec3 position;\nuniform float pointSize;\n\nvoid main() {\n if (is3D) {\n gl_Position = cartesian3DToGLPosition(position);\n } else {\n gl_Position = mercatorXYToGLPosition(position.xy);\n }\n gl_PointSize = pointSize;\n}\n");
9
- var fs = "#version 300 es\nprecision highp float;\nout vec4 fragColor;\n\nvoid main() {\n float r = length(gl_PointCoord - 0.5) * 2.0;\n if (r > 1.0) discard;\n // float density = smoothstep(0.1, 1.0, 1.0 - r);\n fragColor = vec4((15.0/16.0)*sqrt(1.0-sqrt(r)));\n}";
10
- var PointHeatmapProgram = /** @class */ (function () {
11
- function PointHeatmapProgram(globe) {
4
+ const util_1 = require("../../util/");
5
+ const programcache_1 = require("../programcache");
6
+ const camerauniformblock_1 = require("../totems/camerauniformblock");
7
+ const geometrytransformations_1 = require("../../util/shaderfunctions/geometrytransformations");
8
+ const vs = `#version 300 es
9
+ precision highp float;
10
+
11
+ ${camerauniformblock_1.CameraUniformBlockString}
12
+ ${geometrytransformations_1.mercatorXYToGLPosition}
13
+ ${geometrytransformations_1.cartesian3DToGLPosition}
14
+
15
+ in vec3 position;
16
+ uniform float pointSize;
17
+
18
+ void main() {
19
+ if (is3D) {
20
+ gl_Position = cartesian3DToGLPosition(position);
21
+ } else {
22
+ gl_Position = mercatorXYToGLPosition(position.xy);
23
+ }
24
+ gl_PointSize = pointSize;
25
+ }
26
+ `;
27
+ const fs = `#version 300 es
28
+ precision highp float;
29
+ out vec4 fragColor;
30
+
31
+ void main() {
32
+ float r = length(gl_PointCoord - 0.5) * 2.0;
33
+ if (r > 1.0) discard;
34
+ // float density = smoothstep(0.1, 1.0, 1.0 - r);
35
+ fragColor = vec4((15.0/16.0)*sqrt(1.0-sqrt(r)));
36
+ }`;
37
+ class PointHeatmapProgram {
38
+ constructor(globe) {
12
39
  this.globe = globe;
13
40
  this.gl = globe.gl;
14
41
  this._isFreed = false;
15
42
  this.program = (0, util_1.createProgram)(globe.gl, vs, fs);
16
- var _a = this, gl = _a.gl, program = _a.program;
43
+ const { gl, program } = this;
17
44
  this.uniforms = {
18
45
  pointSize: gl.getUniformLocation(this.program, "pointSize"),
19
46
  };
@@ -23,30 +50,29 @@ var PointHeatmapProgram = /** @class */ (function () {
23
50
  { // arrange camera uniform block
24
51
  this.cameraBlockBingingPoint = 0;
25
52
  this.cameraBlockTotem = camerauniformblock_1.CameraUniformBlockTotemCache.get(globe);
26
- var cameraBlockIndex = gl.getUniformBlockIndex(program, "CameraUniformBlock");
53
+ const cameraBlockIndex = gl.getUniformBlockIndex(program, "CameraUniformBlock");
27
54
  gl.uniformBlockBinding(program, cameraBlockIndex, this.cameraBlockBingingPoint);
28
55
  }
29
56
  { // last values
30
57
  this._lastPointSize = 0;
31
- var currentProgram = gl.getParameter(gl.CURRENT_PROGRAM);
58
+ const currentProgram = gl.getParameter(gl.CURRENT_PROGRAM);
32
59
  gl.useProgram(program);
33
60
  gl.uniform1f(this.uniforms.pointSize, this._lastPointSize);
34
61
  gl.useProgram(currentProgram);
35
62
  }
36
63
  }
37
- PointHeatmapProgram.prototype.createVAO = function (positionBuffer, vectorSize) {
38
- var gl = this.gl;
39
- var vao = gl.createVertexArray();
64
+ createVAO(positionBuffer, vectorSize) {
65
+ const gl = this.gl;
66
+ const vao = gl.createVertexArray();
40
67
  gl.bindVertexArray(vao);
41
68
  gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);
42
69
  gl.enableVertexAttribArray(0);
43
70
  gl.vertexAttribPointer(0, vectorSize, gl.FLOAT, false, 0, 0);
44
71
  gl.bindVertexArray(null);
45
72
  return vao;
46
- };
47
- PointHeatmapProgram.prototype.draw = function (vao, length, pointSize) {
48
- if (pointSize === void 0) { pointSize = 5.0; }
49
- var gl = this.gl;
73
+ }
74
+ draw(vao, length, pointSize = 5.0) {
75
+ const gl = this.gl;
50
76
  gl.useProgram(this.program);
51
77
  if (pointSize !== this._lastPointSize) {
52
78
  gl.uniform1f(this.uniforms.pointSize, pointSize);
@@ -57,19 +83,18 @@ var PointHeatmapProgram = /** @class */ (function () {
57
83
  gl.drawArrays(gl.POINTS, 0, length);
58
84
  this.cameraBlockTotem.unbind(this.cameraBlockBingingPoint);
59
85
  gl.bindVertexArray(null);
60
- };
61
- PointHeatmapProgram.prototype.free = function () {
86
+ }
87
+ free() {
62
88
  if (this._isFreed)
63
89
  return;
64
- var _a = this, gl = _a.gl, globe = _a.globe;
90
+ const { gl, globe } = this;
65
91
  camerauniformblock_1.CameraUniformBlockTotemCache.release(globe);
66
92
  gl.deleteProgram(this.program);
67
93
  this._isFreed = true;
68
- };
69
- return PointHeatmapProgram;
70
- }());
71
- var pointToDensityTextureCache = {
72
- get: function (globe) { return programcache_1.noRegisterGlobeProgramCache.getProgram(globe, PointHeatmapProgram); },
73
- release: function (globe) { return programcache_1.noRegisterGlobeProgramCache.releaseProgram(globe, PointHeatmapProgram); }
94
+ }
95
+ }
96
+ const pointToDensityTextureCache = {
97
+ get: (globe) => programcache_1.noRegisterGlobeProgramCache.getProgram(globe, PointHeatmapProgram),
98
+ release: (globe) => programcache_1.noRegisterGlobeProgramCache.releaseProgram(globe, PointHeatmapProgram)
74
99
  };
75
100
  exports.pointToDensityTextureCache = pointToDensityTextureCache;
@@ -4,5 +4,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Float2LegendWithRatio = void 0;
7
- var object_1 = __importDefault(require("./object"));
7
+ const object_1 = __importDefault(require("./object"));
8
8
  exports.Float2LegendWithRatio = object_1.default;