@pirireis/webglobeplugins 0.9.11 → 0.9.13

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 (179) hide show
  1. package/Math/angle-calculation.js +9 -11
  2. package/Math/arc.js +38 -41
  3. package/Math/bounds/line-bbox.js +79 -83
  4. package/Math/constants.js +4 -9
  5. package/Math/frustum/types.js +1 -2
  6. package/Math/juction/arc-plane.js +33 -36
  7. package/Math/juction/line-sphere.js +15 -18
  8. package/Math/juction/plane-plane.js +20 -23
  9. package/Math/line.js +42 -47
  10. package/Math/methods.js +69 -92
  11. package/Math/plane.js +33 -38
  12. package/Math/quaternion.js +48 -55
  13. package/Math/types.js +1 -2
  14. package/Math/utils.js +2 -4
  15. package/Math/vec3.js +46 -52
  16. package/algorithms/search-binary.js +5 -8
  17. package/altitude-locator/draw-subset-obj.js +8 -11
  18. package/altitude-locator/plugin.js +114 -133
  19. package/altitude-locator/types.js +1 -3
  20. package/arrowfield/adaptor.js +3 -7
  21. package/arrowfield/index.js +3 -10
  22. package/arrowfield/plugin.js +63 -69
  23. package/bearing-line/index.js +2 -8
  24. package/bearing-line/plugin.js +218 -248
  25. package/circle-line-chain/chain-list-map.js +82 -92
  26. package/circle-line-chain/plugin.js +147 -182
  27. package/circle-line-chain/util.js +1 -5
  28. package/compass-rose/compass-rose-padding-flat.js +111 -140
  29. package/compass-rose/compass-text-writer.js +63 -75
  30. package/compass-rose/index.js +3 -7
  31. package/compassrose/compassrose.js +50 -57
  32. package/compassrose/index.js +2 -8
  33. package/heatwave/index.js +3 -10
  34. package/heatwave/isobar/objectarraylabels.js +50 -56
  35. package/heatwave/isobar/plugin.js +111 -170
  36. package/heatwave/isobar/quadtreecontours.js +78 -96
  37. package/heatwave/plugins/heatwaveglobeshell.js +73 -94
  38. package/index.js +12 -58
  39. package/package.json +1 -1
  40. package/partialrings/buffer-manager.js +32 -70
  41. package/partialrings/index.js +2 -41
  42. package/partialrings/plugin.js +55 -98
  43. package/partialrings/program.js +141 -59
  44. package/pin/pin-object-array.js +89 -97
  45. package/pin/pin-point-totem.js +21 -22
  46. package/point-heat-map/adaptors/timetracksplugin-format-to-this.js +11 -14
  47. package/point-heat-map/plugin-webworker.js +45 -53
  48. package/point-heat-map/point-to-heat-map-flow.js +46 -51
  49. package/point-tracks/key-methods.js +2 -5
  50. package/point-tracks/plugin.js +141 -170
  51. package/programs/arrowfield/index.js +2 -7
  52. package/programs/arrowfield/logic.js +172 -67
  53. package/programs/arrowfield/object.js +35 -43
  54. package/programs/data2legend/density-to-legend.js +47 -26
  55. package/programs/data2legend/point-to-density-texture.js +56 -34
  56. package/programs/float2legendwithratio/index.js +2 -8
  57. package/programs/float2legendwithratio/logic.js +88 -45
  58. package/programs/float2legendwithratio/object.js +45 -54
  59. package/programs/globe-util/is-globe-moved.js +10 -13
  60. package/programs/globeshell/index.js +2 -8
  61. package/programs/globeshell/wiggle/index.js +2 -8
  62. package/programs/globeshell/wiggle/logic.js +191 -101
  63. package/programs/globeshell/wiggle/object.js +35 -43
  64. package/programs/helpers/blender/program.js +36 -22
  65. package/programs/helpers/fadeaway/index.js +2 -7
  66. package/programs/helpers/fadeaway/logic.js +36 -17
  67. package/programs/helpers/fadeaway/object.js +11 -18
  68. package/programs/helpers/index.js +2 -8
  69. package/programs/index.js +9 -58
  70. package/programs/line-on-globe/angled-line.js +95 -39
  71. package/programs/line-on-globe/circle-accurate-3d.js +86 -39
  72. package/programs/line-on-globe/circle-accurate-flat.js +116 -64
  73. package/programs/line-on-globe/circle-accurate.js +113 -46
  74. package/programs/line-on-globe/circle.js +106 -44
  75. package/programs/line-on-globe/degree-padding-around-circle-3d.js +89 -42
  76. package/programs/line-on-globe/lines-color-instanced-flat.js +84 -43
  77. package/programs/line-on-globe/linestrip.js +126 -63
  78. package/programs/line-on-globe/naive-accurate-flexible.js +126 -59
  79. package/programs/line-on-globe/to-the-surface.js +62 -35
  80. package/programs/line-on-globe/util.js +2 -5
  81. package/programs/picking/pickable-renderer.js +127 -46
  82. package/programs/point-on-globe/element-globe-surface-glow.js +83 -46
  83. package/programs/point-on-globe/element-point-glow.js +112 -47
  84. package/programs/point-on-globe/square-pixel-point.js +80 -34
  85. package/programs/programcache.js +14 -19
  86. package/programs/rings/distancering/circleflatprogram.js +76 -70
  87. package/programs/rings/distancering/circlepaddingfreeangleprogram.js +168 -194
  88. package/programs/rings/distancering/circlepaddysharedbuffer.js +121 -200
  89. package/programs/rings/distancering/index.js +5 -14
  90. package/programs/rings/distancering/paddyflatprogram.js +87 -70
  91. package/programs/rings/distancering/paddyflatprogram2d.js +89 -72
  92. package/programs/rings/distancering/paddyflatprogram3d.js +87 -70
  93. package/programs/rings/index.js +1 -17
  94. package/programs/rings/partial-ring/piece-of-pie.js +144 -44
  95. package/programs/totems/camerauniformblock.js +65 -56
  96. package/programs/totems/canvas-webglobe-info.js +49 -45
  97. package/programs/totems/gpu-selection-uniform-block.js +45 -45
  98. package/programs/totems/index.js +2 -40
  99. package/programs/two-d/pixel-padding-for-compass.js +94 -36
  100. package/programs/util.js +7 -10
  101. package/programs/vectorfields/index.js +3 -23
  102. package/programs/vectorfields/logics/drawrectangleparticles.js +73 -35
  103. package/programs/vectorfields/logics/index.js +4 -12
  104. package/programs/vectorfields/logics/pixelbased.js +94 -41
  105. package/programs/vectorfields/logics/ubo.js +32 -32
  106. package/programs/vectorfields/pingpongbuffermanager.js +30 -37
  107. package/rangerings/enum.js +2 -5
  108. package/rangerings/index.js +5 -15
  109. package/rangerings/plugin.js +223 -286
  110. package/rangerings/rangeringangletext.js +122 -137
  111. package/rangerings/ring-account.js +53 -75
  112. package/shaders/fragment-toy/firework.js +55 -4
  113. package/shaders/fragment-toy/singularity.js +56 -5
  114. package/timetracks/adaptors-line-strip.js +27 -44
  115. package/timetracks/adaptors.js +48 -67
  116. package/timetracks/index.js +5 -19
  117. package/timetracks/plugin-line-strip.js +65 -79
  118. package/timetracks/plugin.js +71 -85
  119. package/timetracks/program-line-strip.js +297 -107
  120. package/timetracks/program.js +421 -118
  121. package/timetracks/programpoint-line-strip.js +98 -48
  122. package/timetracks/programpoint.js +91 -48
  123. package/util/account/bufferoffsetmanager.js +72 -98
  124. package/util/account/index.js +3 -23
  125. package/util/account/single-attribute-buffer-management/buffer-manager.js +44 -48
  126. package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +68 -98
  127. package/util/account/single-attribute-buffer-management/index.js +4 -9
  128. package/util/account/single-attribute-buffer-management/object-store.js +29 -34
  129. package/util/account/single-attribute-buffer-management/types.js +1 -2
  130. package/util/account/util.js +2 -8
  131. package/util/algorithms/search-binary.js +5 -8
  132. package/util/check/get.js +5 -9
  133. package/util/check/typecheck.js +13 -24
  134. package/util/geometry/index.js +10 -18
  135. package/util/gl-util/buffer/attribute-loader.js +10 -26
  136. package/util/gl-util/buffer/index.js +2 -5
  137. package/util/gl-util/draw-options/methods.js +10 -15
  138. package/util/gl-util/uniform-block/manager.js +69 -72
  139. package/util/heatwavedatamanager/datamanager.js +56 -119
  140. package/util/heatwavedatamanager/index.js +3 -10
  141. package/util/heatwavedatamanager/pointcoordinatesdatacalculator.js +38 -47
  142. package/util/heatwavedatamanager/pointcoordsmeta.js +9 -13
  143. package/util/index.js +13 -57
  144. package/util/interpolation/timetrack/index.js +2 -5
  145. package/util/interpolation/timetrack/timetrack-interpolator.js +30 -36
  146. package/util/interpolation/timetrack/web-worker-str.js +180 -5
  147. package/util/interpolation/timetrack/web-worker.js +4 -6
  148. package/util/jshelpers/data-filler.js +8 -11
  149. package/util/jshelpers/equality.js +1 -3
  150. package/util/jshelpers/index.js +2 -37
  151. package/util/jshelpers/timefilters.js +8 -10
  152. package/util/picking/fence.js +8 -11
  153. package/util/picking/picker-displayer.js +49 -58
  154. package/util/programs/draw-texture-on-canvas.js +41 -26
  155. package/util/programs/index.js +1 -17
  156. package/util/programs/shapesonglobe.js +104 -68
  157. package/util/programs/supersampletotextures.js +45 -43
  158. package/util/programs/texturetoglobe.js +99 -52
  159. package/util/shaderfunctions/geometrytransformations.js +323 -35
  160. package/util/shaderfunctions/index.js +2 -18
  161. package/util/shaderfunctions/nodata.js +8 -5
  162. package/util/shaderfunctions/noisefunctions.js +40 -12
  163. package/util/surface-line-data/arcs-to-cuts.js +20 -23
  164. package/util/webglobe/gldefaultstates.js +1 -4
  165. package/util/webglobe/index.js +2 -18
  166. package/util/webglobe/rasteroverlay.js +36 -41
  167. package/util/webglobjectbuilders.js +70 -93
  168. package/util/webglobjectbuilders1.js +63 -82
  169. package/waveparticles/adaptor.js +7 -10
  170. package/waveparticles/index.js +3 -10
  171. package/waveparticles/plugin.js +82 -90
  172. package/wind/imagetovectorfieldandmagnitude.js +16 -19
  173. package/wind/index.js +5 -14
  174. package/wind/plugin.js +454 -291
  175. package/wind/vectorfieldimage.js +6 -8
  176. package/write-text/attached-text-writer.js +48 -54
  177. package/write-text/context-text.js +52 -63
  178. package/write-text/context-text3.js +71 -80
  179. package/write-text/index.js +1 -5
@@ -1,32 +1,28 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChainListMap = void 0;
4
1
  /**
5
2
  * set and get node data
6
3
  * node indexes;
7
4
  */
8
- var ChainListMap = /** @class */ (function () {
9
- function ChainListMap(keyMethod) {
5
+ export class ChainListMap {
6
+ constructor(keyMethod) {
10
7
  this._chainMap = new Map();
11
8
  this._chainSideProperties = new Map();
12
9
  this._indexMap = new Map(); // hold list index of lastly updated nodes. on add delete goes empty
13
10
  this.keyMethod = keyMethod;
14
11
  }
15
- ChainListMap.prototype.getChain = function (chainKey) {
12
+ getChain(chainKey) {
16
13
  return this._chainMap.get(chainKey);
17
- };
14
+ }
18
15
  /**
19
16
  *
20
17
  * @param {*} node
21
18
  * @param {*} chainKey
22
19
  * @param {string|null} theNodeKeyFront
23
20
  */
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];
21
+ addNode(node, chainKey, theNodeKeyFront = null) {
22
+ const chain = this.getChain(chainKey);
23
+ let frontIndex = null;
24
+ for (let i = 0; i < chain.length; i++) {
25
+ const n_ode = chain[i];
30
26
  if (n_ode.key === node.key) {
31
27
  throw new Error("Chain node already exists");
32
28
  }
@@ -47,15 +43,15 @@ var ChainListMap = /** @class */ (function () {
47
43
  }
48
44
  node.__identity__ = this.keyMethod(chainKey, node.key);
49
45
  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__;
46
+ }
47
+ deleteNodesBelongToAChain(chainKey, nodeKeys) {
48
+ const chain = this._chainMap.get(chainKey);
49
+ const deleteKeys = [];
50
+ const removeSet = new Set(nodeKeys);
51
+ const newChain = [];
52
+ for (let i = 0; i < chain.length - 1; i++) {
53
+ const node = chain[i];
54
+ const dKey = node.__identity__;
59
55
  this._indexMap.delete(dKey);
60
56
  if (removeSet.has(node.key)) {
61
57
  deleteKeys.push(dKey);
@@ -65,7 +61,7 @@ var ChainListMap = /** @class */ (function () {
65
61
  }
66
62
  }
67
63
  { // last item case
68
- var lastItem = chain[chain.length - 1];
64
+ const lastItem = chain[chain.length - 1];
69
65
  this._indexMap.delete(lastItem.__identity__);
70
66
  if (removeSet.has(lastItem.key)) {
71
67
  if (chain.length > 1) {
@@ -80,132 +76,126 @@ var ChainListMap = /** @class */ (function () {
80
76
  }
81
77
  this._chainMap.set(chainKey, newChain);
82
78
  return deleteKeys;
83
- };
84
- ChainListMap.prototype.deleteChainAndReturnChainKeys = function (chainKey) {
85
- var keys = this.getNodeKeysOfChain(chainKey);
79
+ }
80
+ deleteChainAndReturnChainKeys(chainKey) {
81
+ const keys = this.getNodeKeysOfChain(chainKey);
86
82
  this._chainMap.delete(chainKey);
87
- for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
88
- var key = keys_1[_i];
83
+ for (const key of keys)
89
84
  this._indexMap.delete(key);
90
- }
91
85
  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);
86
+ }
87
+ updateNode(node, chainKey) {
88
+ const index = this.getIndexOfNode(chainKey, node.key);
89
+ const chain = this._chainMap.get(chainKey);
96
90
  node.__identity__ = this.keyMethod(chainKey, node.key);
97
91
  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];
92
+ }
93
+ updateNodesProperties(chainKey, nodes) {
94
+ nodes.forEach((node) => {
95
+ const index = this.getIndexOfNode(chainKey, node.key);
96
+ const chainNode = this._chainMap.get(chainKey)[index];
104
97
  if (node.circleProperties) {
105
98
  if (typeof chainNode.circleProperties !== 'object')
106
99
  chainNode.circleProperties = {};
107
- node.circleProperties.forEach(function (value, key, container) { return chainNode.circleProperties[key] = value; });
100
+ node.circleProperties.forEach((value, key, container) => chainNode.circleProperties[key] = value);
108
101
  }
109
102
  if (node.lineProperties) {
110
103
  if (typeof chainNode.lineProperties !== 'object')
111
104
  chainNode.lineProperties = {};
112
- node.lineProperties.forEach(function (value, key, container) { return chainNode.lineProperties[key] = value; });
105
+ node.lineProperties.forEach((value, key, container) => chainNode.lineProperties[key] = value);
113
106
  }
114
107
  });
115
- };
116
- ChainListMap.prototype.updateCoordsinatesOfNode = function (node, chainKey) {
117
- var index = this.getIndexOfNode(chainKey, node.key);
118
- var chain = this._chainMap.get(chainKey);
108
+ }
109
+ updateCoordsinatesOfNode(node, chainKey) {
110
+ const index = this.getIndexOfNode(chainKey, node.key);
111
+ const chain = this._chainMap.get(chainKey);
119
112
  chain[index].long = node.long;
120
113
  chain[index].lat = node.lat;
121
- };
122
- ChainListMap.prototype.setChain = function (chainKey, nodeList) {
123
- var _this = this;
114
+ }
115
+ setChain(chainKey, nodeList) {
124
116
  if (this._chainMap.has(chainKey))
125
117
  this._flushIndexMap();
126
118
  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) {
119
+ nodeList.forEach((v) => v.__identity__ = this.keyMethod(chainKey, v.key));
120
+ }
121
+ setChainProperties(chainKey, properties) {
130
122
  this._chainSideProperties.set(chainKey, properties);
131
- };
123
+ }
132
124
  /**
133
125
  *
134
126
  * @param {string} chainKey
135
127
  * @param {Map} properties
136
128
  * // after this method update text and buffer data of the chain
137
129
  */
138
- ChainListMap.prototype.updateChainProperties = function (chainKey, properties) {
139
- var memoryProperties = this._chainSideProperties.get(chainKey);
140
- properties.forEach(function (value, key, m) {
130
+ updateChainProperties(chainKey, properties) {
131
+ const memoryProperties = this._chainSideProperties.get(chainKey);
132
+ properties.forEach((value, key, m) => {
141
133
  memoryProperties[key] = value;
142
134
  });
143
- };
144
- ChainListMap.prototype.getChainProperties = function (chainKey) {
135
+ }
136
+ getChainProperties(chainKey) {
145
137
  this._chainSideProperties.get(chainKey);
146
- };
138
+ }
147
139
  /**
148
140
  *
149
141
  * @param {*} chainKey
150
142
  * @param {*} callback | (value, index, array) => expexted output
151
143
  */
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);
144
+ calculateBufferPropertiesChain(chainKey, callback, result) {
145
+ const chain = this._chainMap.get(chainKey);
146
+ const props = this._chainSideProperties.get(chainKey);
147
+ for (let i = 0; i < chain.length - 1; i++) {
148
+ const node = callback(chain[i], i, chain, props);
157
149
  if (node !== null)
158
150
  result.push(node);
159
151
  }
160
- };
152
+ }
161
153
  /**
162
154
  * @param {*} chainKey
163
155
  * @param {*} textWriterObjs
164
156
  * @param {*} nodeKeys use nodeKeys on updateCoordinatesOnly
165
157
  */
166
- ChainListMap.prototype.textUpdate = function (chainKey, textWriterObjs, dataPreAdaptor) {
167
- var chain = this._chainMap.get(chainKey);
158
+ textUpdate(chainKey, textWriterObjs, dataPreAdaptor) {
159
+ const chain = this._chainMap.get(chainKey);
168
160
  if (!chain)
169
161
  return;
170
- var data = (dataPreAdaptor) ? chain.map(dataPreAdaptor) : chain;
171
- var properties = this._chainSideProperties.get(chainKey);
172
- textWriterObjs.forEach(function (writer) {
162
+ const data = (dataPreAdaptor) ? chain.map(dataPreAdaptor) : chain;
163
+ const properties = this._chainSideProperties.get(chainKey);
164
+ textWriterObjs.forEach((writer) => {
173
165
  writer.insertTextBulk(data, properties);
174
166
  });
175
- };
176
- ChainListMap.prototype.getAllChainKeysIterator = function () {
167
+ }
168
+ getAllChainKeysIterator() {
177
169
  return this._chainMap.keys();
178
- };
179
- ChainListMap.prototype.getIndexOfNode = function (chainKey, nodeKey) {
180
- var key = this.keyMethod(chainKey, nodeKey);
170
+ }
171
+ getIndexOfNode(chainKey, nodeKey) {
172
+ const key = this.keyMethod(chainKey, nodeKey);
181
173
  if (this._indexMap.has(key))
182
174
  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];
175
+ const chain = this._chainMap.get(chainKey);
176
+ for (let i = 0; i < chain.length; i++) {
177
+ const node = chain[i];
186
178
  this._indexMap.set(key, i);
187
179
  if (node.key === nodeKey) {
188
180
  return i;
189
181
  }
190
182
  }
191
- };
192
- ChainListMap.prototype._flushIndexMap = function () {
183
+ }
184
+ _flushIndexMap() {
193
185
  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];
186
+ }
187
+ _resetIndexChain(chainKey) {
188
+ const chain = this._chainMap.get(chainKey);
189
+ for (let i = 0; i < chain.length; i++) {
190
+ const node = chain[i];
199
191
  this._indexMap.set(this.keyMethod(chainKey, node.key), i);
200
192
  }
201
- };
202
- ChainListMap.prototype.getNodeKeysOfChain = function (chainKey) {
203
- var chain = this._chainMap.get(chainKey);
193
+ }
194
+ getNodeKeysOfChain(chainKey) {
195
+ const chain = this._chainMap.get(chainKey);
204
196
  if (!chain)
205
197
  return [];
206
- var result = chain.map(function (v) { return v.__identity__; });
198
+ const result = chain.map((v) => v.__identity__);
207
199
  return result;
208
- };
209
- return ChainListMap;
210
- }());
211
- exports.ChainListMap = ChainListMap;
200
+ }
201
+ }