@pirireis/webglobeplugins 0.6.43-a → 0.6.45-a
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/package.json
CHANGED
|
@@ -122,6 +122,8 @@ export default class {
|
|
|
122
122
|
gl.bindTexture(gl.TEXTURE_2D, texture0);
|
|
123
123
|
gl.uniform1i(u_float_texture0, 0);
|
|
124
124
|
heatParametersBlockManager.bind();
|
|
125
|
+
// clear output texture
|
|
126
|
+
gl.clearColor(0, 0, 0, 0);
|
|
125
127
|
gl.drawArrays(gl.TRIANGLE_FAN, 0, 4);
|
|
126
128
|
gl.bindVertexArray(null);
|
|
127
129
|
heatParametersBlockManager.unbind();
|
|
@@ -233,6 +233,7 @@ export default class {
|
|
|
233
233
|
gl.uniform1i(u_texture, 0);
|
|
234
234
|
shellBlockDataManager.bind();
|
|
235
235
|
if (drawLines) gl.drawElements(gl.LINES, _drawCount, gl.UNSIGNED_SHORT, 0);
|
|
236
|
+
gl.clearColor(0, 0, 0, 0);
|
|
236
237
|
gl.drawElements(gl.TRIANGLES, _drawCount, gl.UNSIGNED_SHORT, 0);
|
|
237
238
|
shellBlockDataManager.unbind();
|
|
238
239
|
gl.bindVertexArray(null);
|
package/rangerings/plugin.js
CHANGED
|
@@ -247,12 +247,6 @@ class RangeRings {
|
|
|
247
247
|
* @method removeCenters @param { Array < { centerID } >} centerIDs
|
|
248
248
|
*/
|
|
249
249
|
removeCenters(centerIDs) {
|
|
250
|
-
// Algorithm
|
|
251
|
-
/**
|
|
252
|
-
* 1. ask centerRingAccount for existing rings
|
|
253
|
-
* 2. delete from buffer orchestators
|
|
254
|
-
* 3. delete from centerRingAccount
|
|
255
|
-
*/
|
|
256
250
|
const { globe,
|
|
257
251
|
bufferOrchestrator, bufferManagersCompMap,
|
|
258
252
|
paddingBufferOrchestrator, bufferManagersCompMapPadding,
|
|
@@ -262,9 +256,9 @@ class RangeRings {
|
|
|
262
256
|
if (existingKeys.length) {
|
|
263
257
|
bufferOrchestrator.deleteBulk(existingKeys, bufferManagersCompMap);
|
|
264
258
|
this._textWritersMap.forEach((textWriter) => textWriter.deleteTextBulk(existingKeys));
|
|
259
|
+
|
|
265
260
|
}
|
|
266
261
|
}
|
|
267
|
-
|
|
268
262
|
for (const centerID of centerIDs) {
|
|
269
263
|
const paddingKeys = _ringAccount.ringBigPaddingKeys(centerID);
|
|
270
264
|
if (paddingKeys.length) {
|
|
@@ -272,9 +266,7 @@ class RangeRings {
|
|
|
272
266
|
}
|
|
273
267
|
}
|
|
274
268
|
this.textPlugin?.removeCenters(centerIDs);
|
|
275
|
-
|
|
276
|
-
// this.__contextTextWriterUpdate(centerIDs, null);
|
|
277
|
-
|
|
269
|
+
this._ringAccount.removeCenters(centerIDs);
|
|
278
270
|
globe.DrawRender();
|
|
279
271
|
}
|
|
280
272
|
|
|
@@ -13,7 +13,7 @@ const ringBigPaddingKeyMethod = (centerID, ringID, angle) => `${centerID}_${ring
|
|
|
13
13
|
*/
|
|
14
14
|
class RingAccount {
|
|
15
15
|
constructor() {
|
|
16
|
-
this.
|
|
16
|
+
this._centralMap = new Map(); // key, new MAP(x,y, rings:[])
|
|
17
17
|
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -25,7 +25,7 @@ class RingAccount {
|
|
|
25
25
|
centralItem.rings.forEach((ring) => {
|
|
26
26
|
ring.__identity__ = ringKeyMethod(centralItem.centerID, ring.ringID);
|
|
27
27
|
});
|
|
28
|
-
this.
|
|
28
|
+
this._centralMap.set(centralItem.centerID, {
|
|
29
29
|
...centralItem,
|
|
30
30
|
rgba: new Float32Array(centralItem.rgba),
|
|
31
31
|
|
|
@@ -34,7 +34,7 @@ class RingAccount {
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
getCenter(centerID) {
|
|
37
|
-
return this.
|
|
37
|
+
return this._centralMap.get(centerID);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
updateCentersCoordinate(items) {
|
|
@@ -101,6 +101,12 @@ class RingAccount {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
|
|
104
|
+
removeCenters(centerIDs) {
|
|
105
|
+
const centralMap = this._centralMap;
|
|
106
|
+
centerIDs.forEach((centerID) => {
|
|
107
|
+
centralMap.delete(centerID);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
104
110
|
|
|
105
111
|
textUpdate(centerID, textWriterObjs, dataPreAdaptor = null) {
|
|
106
112
|
const center = this.getCenter(centerID);
|
|
@@ -113,7 +119,7 @@ class RingAccount {
|
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
updateAllText(textWriterObjs, dataPreAdaptor = null) {
|
|
116
|
-
this.
|
|
122
|
+
this._centralMap.forEach((center) => {
|
|
117
123
|
this.textUpdate(center.centerID, textWriterObjs, dataPreAdaptor);
|
|
118
124
|
});
|
|
119
125
|
}
|