@pirireis/webglobeplugins 0.10.9-alpha → 0.10.10-alpha
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,7 @@ export class TexturePointSampler {
|
|
|
122
122
|
const { posIndex, callback } = pointObject;
|
|
123
123
|
if (posIndex === -1 || !this._isReady || this._ratio < 0 || this._ratio > 1) {
|
|
124
124
|
callback(null, null, null);
|
|
125
|
+
return;
|
|
125
126
|
}
|
|
126
127
|
const data0 = this._textures[0][posIndex];
|
|
127
128
|
if (this._textureCount === 1) {
|
package/waveparticles/plugin.js
CHANGED
|
@@ -16,7 +16,7 @@ const { PingPongBufferManager, WaveParticalUboManager } = vectorfield;
|
|
|
16
16
|
*/
|
|
17
17
|
const MAX_PIXELS_ON_DIMENSION = 2200;
|
|
18
18
|
export default class Plugin {
|
|
19
|
-
constructor(id, { dataWidth, dataHeight, fadeOpacity = 0.83, opacity = 0.75, minLon = -180, minLat = -90, maxLon = 180, maxLat = 90,
|
|
19
|
+
constructor(id, { dataWidth, dataHeight, fadeOpacity = 0.83, opacity = 0.75, minLon = -180, minLat = -90, maxLon = 180, maxLat = 90, patricleCount = 8000, flipY = true, drawTextureMaxPixelOnDimension = MAX_PIXELS_ON_DIMENSION } = {}) {
|
|
20
20
|
this.id = id;
|
|
21
21
|
this.globe = null;
|
|
22
22
|
this.gl = null;
|
|
@@ -34,7 +34,6 @@ export default class Plugin {
|
|
|
34
34
|
this._particleCount = patricleCount;
|
|
35
35
|
this._dataWidth = dataWidth;
|
|
36
36
|
this._dataHeight = dataHeight;
|
|
37
|
-
this._escapeValue = escapeValue;
|
|
38
37
|
this._drawTextureMaxPixelOnDimension = drawTextureMaxPixelOnDimension;
|
|
39
38
|
this._globeshellparameters = {
|
|
40
39
|
minLon,
|
|
@@ -61,7 +60,6 @@ export default class Plugin {
|
|
|
61
60
|
this._frameBuffer = gl.createFramebuffer();
|
|
62
61
|
this.setBBox(this._globeshellparameters);
|
|
63
62
|
this.setOpacity(this._opacity);
|
|
64
|
-
this.setEscapeValue(this._escapeValue);
|
|
65
63
|
this.____drawIndex = 0;
|
|
66
64
|
}
|
|
67
65
|
draw3D() {
|
|
@@ -167,14 +165,6 @@ export default class Plugin {
|
|
|
167
165
|
this.waveUbo.updateSingle("drop_rate", new Float32Array([value]));
|
|
168
166
|
;
|
|
169
167
|
}
|
|
170
|
-
setEscapeValue(value) {
|
|
171
|
-
if (typeof value !== 'number') {
|
|
172
|
-
console.error("escape value must be a number");
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
this._escapeValue = value;
|
|
176
|
-
this.waveUbo.updateSingle("escape_value", value);
|
|
177
|
-
}
|
|
178
168
|
setDrawTextureMaxPixelOnDimension(value) {
|
|
179
169
|
this._drawTextureMaxPixelOnDimension = value;
|
|
180
170
|
this._drawTextureResolution = this._drawTextureSizeFromBbox(this._globeshellparameters);
|