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