@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
@@ -5,27 +5,28 @@ exports.ChainListMap = void 0;
5
5
  * set and get node data
6
6
  * node indexes;
7
7
  */
8
- class ChainListMap {
9
- constructor(keyMethod) {
8
+ var ChainListMap = /** @class */ (function () {
9
+ function ChainListMap(keyMethod) {
10
10
  this._chainMap = new Map();
11
11
  this._chainSideProperties = new Map();
12
12
  this._indexMap = new Map(); // hold list index of lastly updated nodes. on add delete goes empty
13
13
  this.keyMethod = keyMethod;
14
14
  }
15
- getChain(chainKey) {
15
+ ChainListMap.prototype.getChain = function (chainKey) {
16
16
  return this._chainMap.get(chainKey);
17
- }
17
+ };
18
18
  /**
19
19
  *
20
20
  * @param {*} node
21
21
  * @param {*} chainKey
22
22
  * @param {string|null} theNodeKeyFront
23
23
  */
24
- addNode(node, chainKey, theNodeKeyFront = null) {
25
- const chain = this.getChain(chainKey);
26
- let frontIndex = null;
27
- for (let i = 0; i < chain.length; i++) {
28
- const n_ode = chain[i];
24
+ ChainListMap.prototype.addNode = function (node, chainKey, theNodeKeyFront) {
25
+ if (theNodeKeyFront === void 0) { theNodeKeyFront = null; }
26
+ var chain = this.getChain(chainKey);
27
+ var frontIndex = null;
28
+ for (var i = 0; i < chain.length; i++) {
29
+ var n_ode = chain[i];
29
30
  if (n_ode.key === node.key) {
30
31
  throw new Error("Chain node already exists");
31
32
  }
@@ -46,15 +47,15 @@ class ChainListMap {
46
47
  }
47
48
  node.__identity__ = this.keyMethod(chainKey, node.key);
48
49
  this._resetIndexChain(chainKey);
49
- }
50
- deleteNodesBelongToAChain(chainKey, nodeKeys) {
51
- const chain = this._chainMap.get(chainKey);
52
- const deleteKeys = [];
53
- const removeSet = new Set(nodeKeys);
54
- const newChain = [];
55
- for (let i = 0; i < chain.length - 1; i++) {
56
- const node = chain[i];
57
- const dKey = node.__identity__;
50
+ };
51
+ ChainListMap.prototype.deleteNodesBelongToAChain = function (chainKey, nodeKeys) {
52
+ var chain = this._chainMap.get(chainKey);
53
+ var deleteKeys = [];
54
+ var removeSet = new Set(nodeKeys);
55
+ var newChain = [];
56
+ for (var i = 0; i < chain.length - 1; i++) {
57
+ var node = chain[i];
58
+ var dKey = node.__identity__;
58
59
  this._indexMap.delete(dKey);
59
60
  if (removeSet.has(node.key)) {
60
61
  deleteKeys.push(dKey);
@@ -64,7 +65,7 @@ class ChainListMap {
64
65
  }
65
66
  }
66
67
  { // last item case
67
- const lastItem = chain[chain.length - 1];
68
+ var lastItem = chain[chain.length - 1];
68
69
  this._indexMap.delete(lastItem.__identity__);
69
70
  if (removeSet.has(lastItem.key)) {
70
71
  if (chain.length > 1) {
@@ -79,127 +80,132 @@ class ChainListMap {
79
80
  }
80
81
  this._chainMap.set(chainKey, newChain);
81
82
  return deleteKeys;
82
- }
83
- deleteChainAndReturnChainKeys(chainKey) {
84
- const keys = this.getNodeKeysOfChain(chainKey);
83
+ };
84
+ ChainListMap.prototype.deleteChainAndReturnChainKeys = function (chainKey) {
85
+ var keys = this.getNodeKeysOfChain(chainKey);
85
86
  this._chainMap.delete(chainKey);
86
- for (const key of keys)
87
+ for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
88
+ var key = keys_1[_i];
87
89
  this._indexMap.delete(key);
90
+ }
88
91
  return keys;
89
- }
90
- updateNode(node, chainKey) {
91
- const index = this.getIndexOfNode(chainKey, node.key);
92
- const chain = this._chainMap.get(chainKey);
92
+ };
93
+ ChainListMap.prototype.updateNode = function (node, chainKey) {
94
+ var index = this.getIndexOfNode(chainKey, node.key);
95
+ var chain = this._chainMap.get(chainKey);
93
96
  node.__identity__ = this.keyMethod(chainKey, node.key);
94
97
  chain[index] = node;
95
- }
96
- updateNodesProperties(chainKey, nodes) {
97
- nodes.forEach((node) => {
98
- const index = this.getIndexOfNode(chainKey, node.key);
99
- const chainNode = this._chainMap.get(chainKey)[index];
98
+ };
99
+ ChainListMap.prototype.updateNodesProperties = function (chainKey, nodes) {
100
+ var _this = this;
101
+ nodes.forEach(function (node) {
102
+ var index = _this.getIndexOfNode(chainKey, node.key);
103
+ var chainNode = _this._chainMap.get(chainKey)[index];
100
104
  if (node.circleProperties) {
101
105
  if (typeof chainNode.circleProperties !== 'object')
102
106
  chainNode.circleProperties = {};
103
- node.circleProperties.forEach((value, key, container) => chainNode.circleProperties[key] = value);
107
+ node.circleProperties.forEach(function (value, key, container) { return chainNode.circleProperties[key] = value; });
104
108
  }
105
109
  if (node.lineProperties) {
106
110
  if (typeof chainNode.lineProperties !== 'object')
107
111
  chainNode.lineProperties = {};
108
- node.lineProperties.forEach((value, key, container) => chainNode.lineProperties[key] = value);
112
+ node.lineProperties.forEach(function (value, key, container) { return chainNode.lineProperties[key] = value; });
109
113
  }
110
114
  });
111
- }
112
- updateCoordsinatesOfNode(node, chainKey) {
113
- const index = this.getIndexOfNode(chainKey, node.key);
114
- const chain = this._chainMap.get(chainKey);
115
+ };
116
+ ChainListMap.prototype.updateCoordsinatesOfNode = function (node, chainKey) {
117
+ var index = this.getIndexOfNode(chainKey, node.key);
118
+ var chain = this._chainMap.get(chainKey);
115
119
  chain[index].long = node.long;
116
120
  chain[index].lat = node.lat;
117
- }
118
- setChain(chainKey, nodeList) {
121
+ };
122
+ ChainListMap.prototype.setChain = function (chainKey, nodeList) {
123
+ var _this = this;
119
124
  if (this._chainMap.has(chainKey))
120
125
  this._flushIndexMap();
121
126
  this._chainMap.set(chainKey, nodeList);
122
- nodeList.forEach((v) => v.__identity__ = this.keyMethod(chainKey, v.key));
123
- }
124
- setChainProperties(chainKey, properties) {
127
+ nodeList.forEach(function (v) { return v.__identity__ = _this.keyMethod(chainKey, v.key); });
128
+ };
129
+ ChainListMap.prototype.setChainProperties = function (chainKey, properties) {
125
130
  this._chainSideProperties.set(chainKey, properties);
126
- }
131
+ };
127
132
  /**
128
133
  *
129
134
  * @param {string} chainKey
130
135
  * @param {Map} properties
131
136
  * // after this method update text and buffer data of the chain
132
137
  */
133
- updateChainProperties(chainKey, properties) {
134
- const memoryProperties = this._chainSideProperties.get(chainKey);
135
- properties.forEach((value, key, m) => {
138
+ ChainListMap.prototype.updateChainProperties = function (chainKey, properties) {
139
+ var memoryProperties = this._chainSideProperties.get(chainKey);
140
+ properties.forEach(function (value, key, m) {
136
141
  memoryProperties[key] = value;
137
142
  });
138
- }
139
- getChainProperties(chainKey) {
143
+ };
144
+ ChainListMap.prototype.getChainProperties = function (chainKey) {
140
145
  this._chainSideProperties.get(chainKey);
141
- }
146
+ };
142
147
  /**
143
148
  *
144
149
  * @param {*} chainKey
145
150
  * @param {*} callback | (value, index, array) => expexted output
146
151
  */
147
- calculateBufferPropertiesChain(chainKey, callback, result) {
148
- const chain = this._chainMap.get(chainKey);
149
- const props = this._chainSideProperties.get(chainKey);
150
- for (let i = 0; i < chain.length - 1; i++) {
151
- const node = callback(chain[i], i, chain, props);
152
+ ChainListMap.prototype.calculateBufferPropertiesChain = function (chainKey, callback, result) {
153
+ var chain = this._chainMap.get(chainKey);
154
+ var props = this._chainSideProperties.get(chainKey);
155
+ for (var i = 0; i < chain.length - 1; i++) {
156
+ var node = callback(chain[i], i, chain, props);
152
157
  if (node !== null)
153
158
  result.push(node);
154
159
  }
155
- }
160
+ };
156
161
  /**
157
162
  * @param {*} chainKey
158
163
  * @param {*} textWriterObjs
159
164
  * @param {*} nodeKeys use nodeKeys on updateCoordinatesOnly
160
165
  */
161
- textUpdate(chainKey, textWriterObjs, dataPreAdaptor) {
162
- const chain = this._chainMap.get(chainKey);
166
+ ChainListMap.prototype.textUpdate = function (chainKey, textWriterObjs, dataPreAdaptor) {
167
+ var chain = this._chainMap.get(chainKey);
163
168
  if (!chain)
164
169
  return;
165
- const data = (dataPreAdaptor) ? chain.map(dataPreAdaptor) : chain;
166
- const properties = this._chainSideProperties.get(chainKey);
167
- textWriterObjs.forEach((writer) => {
170
+ var data = (dataPreAdaptor) ? chain.map(dataPreAdaptor) : chain;
171
+ var properties = this._chainSideProperties.get(chainKey);
172
+ textWriterObjs.forEach(function (writer) {
168
173
  writer.insertTextBulk(data, properties);
169
174
  });
170
- }
171
- getAllChainKeysIterator() {
175
+ };
176
+ ChainListMap.prototype.getAllChainKeysIterator = function () {
172
177
  return this._chainMap.keys();
173
- }
174
- getIndexOfNode(chainKey, nodeKey) {
175
- const key = this.keyMethod(chainKey, nodeKey);
178
+ };
179
+ ChainListMap.prototype.getIndexOfNode = function (chainKey, nodeKey) {
180
+ var key = this.keyMethod(chainKey, nodeKey);
176
181
  if (this._indexMap.has(key))
177
182
  return this._indexMap.get(key);
178
- const chain = this._chainMap.get(chainKey);
179
- for (let i = 0; i < chain.length; i++) {
180
- const node = chain[i];
183
+ var chain = this._chainMap.get(chainKey);
184
+ for (var i = 0; i < chain.length; i++) {
185
+ var node = chain[i];
181
186
  this._indexMap.set(key, i);
182
187
  if (node.key === nodeKey) {
183
188
  return i;
184
189
  }
185
190
  }
186
- }
187
- _flushIndexMap() {
191
+ };
192
+ ChainListMap.prototype._flushIndexMap = function () {
188
193
  this._indexMap.clear();
189
- }
190
- _resetIndexChain(chainKey) {
191
- const chain = this._chainMap.get(chainKey);
192
- for (let i = 0; i < chain.length; i++) {
193
- const node = chain[i];
194
+ };
195
+ ChainListMap.prototype._resetIndexChain = function (chainKey) {
196
+ var chain = this._chainMap.get(chainKey);
197
+ for (var i = 0; i < chain.length; i++) {
198
+ var node = chain[i];
194
199
  this._indexMap.set(this.keyMethod(chainKey, node.key), i);
195
200
  }
196
- }
197
- getNodeKeysOfChain(chainKey) {
198
- const chain = this._chainMap.get(chainKey);
201
+ };
202
+ ChainListMap.prototype.getNodeKeysOfChain = function (chainKey) {
203
+ var chain = this._chainMap.get(chainKey);
199
204
  if (!chain)
200
205
  return [];
201
- const result = chain.map((v) => v.__identity__);
206
+ var result = chain.map(function (v) { return v.__identity__; });
202
207
  return result;
203
- }
204
- }
208
+ };
209
+ return ChainListMap;
210
+ }());
205
211
  exports.ChainListMap = ChainListMap;