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