@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.
- package/Math/angle-calculation.js +8 -8
- package/Math/arc.js +18 -18
- package/Math/bounds/line-bbox.js +80 -78
- package/Math/constants.js +3 -3
- package/Math/juction/arc-plane.js +23 -23
- package/Math/juction/line-sphere.js +11 -11
- package/Math/juction/plane-plane.js +11 -11
- package/Math/line.js +16 -14
- package/Math/methods.js +72 -67
- package/Math/plane.js +18 -16
- package/Math/quaternion.js +49 -45
- package/Math/utils.js +2 -2
- package/Math/vec3.js +45 -42
- package/algorithms/search-binary.js +4 -4
- package/altitude-locator/draw-subset-obj.js +8 -7
- package/altitude-locator/plugin.js +113 -97
- package/arrowfield/adaptor.js +4 -3
- package/arrowfield/index.js +2 -2
- package/arrowfield/plugin.js +65 -62
- package/bearing-line/index.js +1 -1
- package/bearing-line/plugin.js +225 -200
- package/circle-line-chain/chain-list-map.js +88 -82
- package/circle-line-chain/plugin.js +154 -129
- package/circle-line-chain/util.js +1 -1
- package/compass-rose/compass-rose-padding-flat.js +126 -104
- package/compass-rose/compass-text-writer.js +70 -62
- package/compass-rose/index.js +2 -2
- package/compassrose/compassrose.js +50 -46
- package/compassrose/index.js +1 -1
- package/heatwave/index.js +2 -2
- package/heatwave/isobar/objectarraylabels.js +48 -44
- package/heatwave/isobar/plugin.js +123 -104
- package/heatwave/isobar/quadtreecontours.js +92 -76
- package/heatwave/plugins/heatwaveglobeshell.js +87 -69
- package/index.js +11 -11
- package/package.json +1 -1
- package/partialrings/buffer-manager.js +64 -32
- package/partialrings/index.js +1 -1
- package/partialrings/plugin.js +84 -48
- package/partialrings/program.js +47 -136
- package/pin/pin-object-array.js +86 -83
- package/pin/pin-point-totem.js +22 -21
- package/point-heat-map/adaptors/timetracksplugin-format-to-this.js +10 -10
- package/point-heat-map/plugin-webworker.js +45 -40
- package/point-heat-map/point-to-heat-map-flow.js +42 -40
- package/point-tracks/key-methods.js +1 -1
- package/point-tracks/plugin.js +142 -127
- package/programs/arrowfield/index.js +1 -1
- package/programs/arrowfield/logic.js +62 -170
- package/programs/arrowfield/object.js +35 -33
- package/programs/data2legend/density-to-legend.js +21 -45
- package/programs/data2legend/point-to-density-texture.js +27 -52
- package/programs/float2legendwithratio/index.js +1 -1
- package/programs/float2legendwithratio/logic.js +42 -88
- package/programs/float2legendwithratio/object.js +46 -43
- package/programs/globe-util/is-globe-moved.js +11 -10
- package/programs/globeshell/index.js +1 -1
- package/programs/globeshell/wiggle/index.js +1 -1
- package/programs/globeshell/wiggle/logic.js +98 -191
- package/programs/globeshell/wiggle/object.js +35 -33
- package/programs/helpers/blender/program.js +19 -36
- package/programs/helpers/fadeaway/index.js +1 -1
- package/programs/helpers/fadeaway/logic.js +13 -35
- package/programs/helpers/fadeaway/object.js +10 -9
- package/programs/helpers/index.js +1 -1
- package/programs/index.js +8 -8
- package/programs/line-on-globe/angled-line.js +32 -91
- package/programs/line-on-globe/circle-accurate-3d.js +32 -82
- package/programs/line-on-globe/circle-accurate-flat.js +50 -108
- package/programs/line-on-globe/circle-accurate.js +33 -103
- package/programs/line-on-globe/circle.js +32 -97
- package/programs/line-on-globe/degree-padding-around-circle-3d.js +33 -83
- package/programs/line-on-globe/lines-color-instanced-flat.js +34 -79
- package/programs/line-on-globe/linestrip.js +39 -100
- package/programs/line-on-globe/naive-accurate-flexible.js +48 -118
- package/programs/line-on-globe/to-the-surface.js +29 -58
- package/programs/line-on-globe/util.js +1 -1
- package/programs/picking/pickable-renderer.js +33 -117
- package/programs/point-on-globe/element-globe-surface-glow.js +38 -78
- package/programs/point-on-globe/element-point-glow.js +35 -103
- package/programs/point-on-globe/square-pixel-point.js +27 -76
- package/programs/programcache.js +13 -13
- package/programs/rings/distancering/circleflatprogram.js +21 -63
- package/programs/rings/distancering/circlepaddingfreeangleprogram.js +145 -156
- package/programs/rings/distancering/circlepaddysharedbuffer.js +197 -121
- package/programs/rings/distancering/index.js +4 -4
- package/programs/rings/distancering/paddyflatprogram.js +20 -73
- package/programs/rings/distancering/paddyflatprogram2d.js +22 -75
- package/programs/rings/distancering/paddyflatprogram3d.js +20 -73
- package/programs/rings/partial-ring/piece-of-pie.js +35 -137
- package/programs/totems/camerauniformblock.js +51 -64
- package/programs/totems/canvas-webglobe-info.js +40 -48
- package/programs/totems/gpu-selection-uniform-block.js +40 -44
- package/programs/totems/index.js +1 -1
- package/programs/two-d/pixel-padding-for-compass.js +29 -90
- package/programs/util.js +7 -6
- package/programs/vectorfields/index.js +1 -1
- package/programs/vectorfields/logics/drawrectangleparticles.js +29 -70
- package/programs/vectorfields/logics/index.js +3 -3
- package/programs/vectorfields/logics/pixelbased.js +35 -91
- package/programs/vectorfields/logics/ubo.js +25 -31
- package/programs/vectorfields/pingpongbuffermanager.js +34 -30
- package/rangerings/index.js +4 -4
- package/rangerings/plugin.js +252 -202
- package/rangerings/rangeringangletext.js +120 -108
- package/rangerings/ring-account.js +69 -52
- package/shaders/fragment-toy/firework.js +1 -55
- package/shaders/fragment-toy/singularity.js +1 -55
- package/timetracks/adaptors-line-strip.js +37 -26
- package/timetracks/adaptors.js +61 -47
- package/timetracks/index.js +4 -4
- package/timetracks/plugin-line-strip.js +63 -59
- package/timetracks/plugin.js +69 -65
- package/timetracks/program-line-strip.js +103 -296
- package/timetracks/program.js +113 -419
- package/timetracks/programpoint-line-strip.js +44 -97
- package/timetracks/programpoint.js +44 -90
- package/util/account/bufferoffsetmanager.js +95 -72
- package/util/account/index.js +1 -1
- package/util/account/single-attribute-buffer-management/buffer-manager.js +43 -39
- package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +94 -64
- package/util/account/single-attribute-buffer-management/index.js +3 -3
- package/util/account/single-attribute-buffer-management/object-store.js +30 -28
- package/util/account/util.js +4 -2
- package/util/algorithms/search-binary.js +4 -4
- package/util/check/get.js +5 -5
- package/util/check/typecheck.js +15 -13
- package/util/geometry/index.js +11 -9
- package/util/gl-util/buffer/attribute-loader.js +20 -8
- package/util/gl-util/buffer/index.js +1 -1
- package/util/gl-util/draw-options/methods.js +7 -7
- package/util/gl-util/uniform-block/manager.js +67 -55
- package/util/heatwavedatamanager/datamanager.js +116 -56
- package/util/heatwavedatamanager/index.js +2 -2
- package/util/heatwavedatamanager/pointcoordinatesdatacalculator.js +40 -37
- package/util/heatwavedatamanager/pointcoordsmeta.js +10 -9
- package/util/index.js +6 -6
- package/util/interpolation/timetrack/index.js +1 -1
- package/util/interpolation/timetrack/timetrack-interpolator.js +29 -27
- package/util/interpolation/timetrack/web-worker-str.js +1 -179
- package/util/interpolation/timetrack/web-worker.js +4 -4
- package/util/jshelpers/data-filler.js +7 -7
- package/util/jshelpers/timefilters.js +7 -7
- package/util/picking/fence.js +7 -7
- package/util/picking/picker-displayer.js +52 -46
- package/util/programs/draw-texture-on-canvas.js +21 -39
- package/util/programs/shapesonglobe.js +64 -104
- package/util/programs/supersampletotextures.js +39 -45
- package/util/programs/texturetoglobe.js +48 -98
- package/util/shaderfunctions/geometrytransformations.js +27 -322
- package/util/shaderfunctions/nodata.js +1 -7
- package/util/shaderfunctions/noisefunctions.js +9 -39
- package/util/surface-line-data/arcs-to-cuts.js +23 -20
- package/util/webglobe/rasteroverlay.js +37 -35
- package/util/webglobjectbuilders.js +60 -55
- package/util/webglobjectbuilders1.js +49 -48
- package/waveparticles/adaptor.js +7 -6
- package/waveparticles/index.js +2 -2
- package/waveparticles/plugin.js +84 -79
- package/wind/imagetovectorfieldandmagnitude.js +15 -15
- package/wind/index.js +4 -4
- package/wind/plugin.js +251 -453
- package/wind/vectorfieldimage.js +5 -5
- package/write-text/attached-text-writer.js +48 -46
- package/write-text/context-text.js +58 -51
- 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
|
-
|
|
9
|
-
|
|
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
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
for (
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
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
|
-
|
|
83
|
+
};
|
|
84
|
+
ChainListMap.prototype.deleteChainAndReturnChainKeys = function (chainKey) {
|
|
85
|
+
var keys = this.getNodeKeysOfChain(chainKey);
|
|
85
86
|
this._chainMap.delete(chainKey);
|
|
86
|
-
for (
|
|
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
|
-
|
|
92
|
-
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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)
|
|
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)
|
|
112
|
+
node.lineProperties.forEach(function (value, key, container) { return chainNode.lineProperties[key] = value; });
|
|
109
113
|
}
|
|
110
114
|
});
|
|
111
|
-
}
|
|
112
|
-
updateCoordsinatesOfNode(node, chainKey) {
|
|
113
|
-
|
|
114
|
-
|
|
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)
|
|
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
|
-
|
|
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
|
-
|
|
149
|
-
|
|
150
|
-
for (
|
|
151
|
-
|
|
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
|
-
|
|
166
|
+
ChainListMap.prototype.textUpdate = function (chainKey, textWriterObjs, dataPreAdaptor) {
|
|
167
|
+
var chain = this._chainMap.get(chainKey);
|
|
163
168
|
if (!chain)
|
|
164
169
|
return;
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
|
|
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
|
-
|
|
179
|
-
for (
|
|
180
|
-
|
|
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
|
-
|
|
192
|
-
for (
|
|
193
|
-
|
|
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
|
-
|
|
201
|
+
};
|
|
202
|
+
ChainListMap.prototype.getNodeKeysOfChain = function (chainKey) {
|
|
203
|
+
var chain = this._chainMap.get(chainKey);
|
|
199
204
|
if (!chain)
|
|
200
205
|
return [];
|
|
201
|
-
|
|
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;
|