@pirireis/webglobeplugins 0.6.36-a → 0.6.38-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
|
@@ -34,9 +34,9 @@ void main() {
|
|
|
34
34
|
if ( gap > 37000000.0) { return; }
|
|
35
35
|
float z_alpha;
|
|
36
36
|
if ( z_alpha_on == 1 ){
|
|
37
|
-
z_alpha = pow(z_level
|
|
38
|
-
|
|
39
|
-
if( z_alpha
|
|
37
|
+
z_alpha = pow(2.0,z_level+1.0) / ( 10000000.0 / gap);
|
|
38
|
+
z_alpha = smoothstep(0.1,0.9, z_alpha);
|
|
39
|
+
if( z_alpha < 0.01) {return;}
|
|
40
40
|
} else {
|
|
41
41
|
z_alpha = 1.0;
|
|
42
42
|
}
|
|
@@ -149,3 +149,5 @@ const LinesColorInstancedFlatCache = Object.freeze({
|
|
|
149
149
|
});
|
|
150
150
|
|
|
151
151
|
export { LinesColorInstancedFlatCache, Z_ALPHA_MODE };
|
|
152
|
+
|
|
153
|
+
|
package/rangerings/plugin.js
CHANGED
|
@@ -265,7 +265,7 @@ class RangeRings {
|
|
|
265
265
|
if (typeof opacity !== "number" || opacity < 0 || opacity > 1) throw new Error("Invalid opacity value");
|
|
266
266
|
this._opacity = opacity;
|
|
267
267
|
this.textPlugin?.setOpacity(opacity);
|
|
268
|
-
this._textWritersMap((writer) => writer.setOpacity(opacity));
|
|
268
|
+
this._textWritersMap.forEach((writer) => writer.setOpacity(opacity));
|
|
269
269
|
this.globe.DrawRender();
|
|
270
270
|
}
|
|
271
271
|
|
|
@@ -376,7 +376,7 @@ class RangeRings {
|
|
|
376
376
|
...["centerCoords3d", "radius3d", "rgba", "circleDashAngle", "dashOpacity"].map(key => obj(this.bufferManagersCompMap.get(key)))
|
|
377
377
|
);
|
|
378
378
|
|
|
379
|
-
this.
|
|
379
|
+
this._oneDegree2DPaddingVao = this._padding2dProgram.createVAO(
|
|
380
380
|
{ buffer: this.bufferManagersCompMap.get("centerCoords2dflat").bufferManager.buffer, size: 2, stride: 0, offset: 0 },
|
|
381
381
|
{ buffer: this.bufferManagersCompMap.get("centerCoords2dflatForPadding").bufferManager.buffer, size: 2, stride: 0, offset: 0 },
|
|
382
382
|
{ buffer: this.bufferManagersCompMap.get("rgbaMercator").bufferManager.buffer, size: 4, stride: 0, offset: 0 },
|
|
@@ -549,7 +549,7 @@ class RangeRings {
|
|
|
549
549
|
const {
|
|
550
550
|
globe, gl,
|
|
551
551
|
_circleProgram2D, _circleProgram3D, _padding2dProgram, _padding3dProgram, _bigPadding3dFlatProgram,
|
|
552
|
-
_circle2DVao, _circle3DVao,
|
|
552
|
+
_circle2DVao, _circle3DVao, _oneDegree2DPaddingVao, _padding3dOneDegreeVao, _bigPadding3dFlatVAO,
|
|
553
553
|
bufferOrchestrator, paddingBufferOrchestrator,
|
|
554
554
|
_opacity, _oneDegreePadding, _zAlphaOnDegreePadding } = this;
|
|
555
555
|
gl.disable(gl.DEPTH_TEST);
|
|
@@ -561,7 +561,7 @@ class RangeRings {
|
|
|
561
561
|
} else {
|
|
562
562
|
_circleProgram2D.draw(_circle2DVao, bufferOrchestrator.length, CIRCLE_FLAT_EDGE_COUNT, _opacity);
|
|
563
563
|
// _padding2dProgram.draw(bigPaddingVAO, paddingBufferOrchestrator.length, _opacity);
|
|
564
|
-
if (_oneDegreePadding) _padding2dProgram.draw(
|
|
564
|
+
if (_oneDegreePadding) _padding2dProgram.draw(_oneDegree2DPaddingVao, bufferOrchestrator.length * CIRCLE_FLAT_EDGE_COUNT, _opacity, _zAlphaOnDegreePadding);
|
|
565
565
|
}
|
|
566
566
|
_bigPadding3dFlatProgram.draw(_bigPadding3dFlatVAO, paddingBufferOrchestrator.length, _opacity);
|
|
567
567
|
this._textWritersMap.forEach((textWriter) => textWriter.draw());
|
|
@@ -576,7 +576,7 @@ class RangeRings {
|
|
|
576
576
|
// delete vaos
|
|
577
577
|
this.gl.deleteVertexArray(this._circle2DVao);
|
|
578
578
|
this.gl.deleteVertexArray(this._circle3DVao);
|
|
579
|
-
this.gl.deleteVertexArray(this.
|
|
579
|
+
this.gl.deleteVertexArray(this._oneDegree2DPaddingVao);
|
|
580
580
|
this.gl.deleteVertexArray(this._padding3dOneDegreeVao);
|
|
581
581
|
this.gl.deleteVertexArray(this._bigPadding3dFlatVAO);
|
|
582
582
|
// delete programs
|
|
@@ -26,14 +26,9 @@ class RingAccount {
|
|
|
26
26
|
ring.__identity__ = ringKeyMethod(centralItem.centerID, ring.ringID);
|
|
27
27
|
});
|
|
28
28
|
this._centeralMap.set(centralItem.centerID, {
|
|
29
|
-
|
|
30
|
-
long: centralItem.long,
|
|
31
|
-
lat: centralItem.lat,
|
|
32
|
-
rings: centralItem.rings,
|
|
29
|
+
...centralItem,
|
|
33
30
|
rgba: new Float32Array(centralItem.rgba),
|
|
34
|
-
|
|
35
|
-
textHide: centralItem.textHide,
|
|
36
|
-
stepAngle: centralItem.stepAngle,
|
|
31
|
+
|
|
37
32
|
});
|
|
38
33
|
}
|
|
39
34
|
|
|
@@ -455,12 +455,12 @@ ${shaderfunctions.pixelXYToCartesian3DPoint}
|
|
|
455
455
|
${shaderfunctions.pixelXYToCartesian2DPoint}
|
|
456
456
|
|
|
457
457
|
void main() {
|
|
458
|
-
if ( a_color.x < .0 || a_color.y < .0 || a_color.z < .0) {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
458
|
+
// if ( a_color.x < .0 || a_color.y < .0 || a_color.z < .0) {
|
|
459
|
+
// v_time = -1000000000.0;
|
|
460
|
+
// v_track_end_time = -1000000000.0;
|
|
461
|
+
// v_track_start_time = -1000000001.0;
|
|
462
|
+
// return;
|
|
463
|
+
// }
|
|
464
464
|
v_time = a_time;
|
|
465
465
|
v_color = a_color;
|
|
466
466
|
v_track_start_time = a_track_start_time;
|
|
@@ -470,7 +470,7 @@ void main() {
|
|
|
470
470
|
gl_Position = uProjectionMatrix * uModelViewMatrix * vec4(pos - uTranslate, 1.0);
|
|
471
471
|
} else {
|
|
472
472
|
vec2 xy = pixelXYToCartesian2DPoint(a_position.xy, uTranslate.xy, u_mapWH, u_scrWH);
|
|
473
|
-
gl_Position = uProjectionMatrix * vec4(xy.x, xy.y, 0.0, 1.0);
|
|
473
|
+
gl_Position = uProjectionMatrix * vec4(xy.x, xy.y, 0.0, 1.0);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
`;
|