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