@pirireis/webglobeplugins 0.10.6-alpha → 0.10.8-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 +1 -1
- package/programs/vectorfields/logics/drawrectangleparticles.js +1 -4
- package/programs/vectorfields/logics/pixelbased.js +1 -4
- package/programs/vectorfields/logics/ubo-new.js +1 -1
- package/util/heatwavedatamanager/texture-point-sampler.js +1 -2
- package/waveparticles/adaptor.js +1 -1
package/package.json
CHANGED
|
@@ -32,10 +32,7 @@ vec2 lookup_wind(const vec2 uv) { // gerek kalmayabilir. sampler linear methodu
|
|
|
32
32
|
vec2 tr = read_value(vc + vec2(px.x, 0)).rg;
|
|
33
33
|
vec2 bl = read_value(vc + vec2(0, px.y)).rg;
|
|
34
34
|
vec2 br = read_value(vc + px).rg;
|
|
35
|
-
|
|
36
|
-
if (tr.x == 0.0 && tr.y == 0.0){ return vec2(0.0);}
|
|
37
|
-
if (bl.x == 0.0 && bl.y == 0.0){ return vec2(0.0);}
|
|
38
|
-
if (br.x == 0.0 && br.y == 0.0){ return vec2(0.0);}
|
|
35
|
+
|
|
39
36
|
return mix(mix(tl, tr, f.x), mix(bl, br, f.x), f.y);
|
|
40
37
|
}
|
|
41
38
|
|
|
@@ -44,10 +44,7 @@ vec2 lookup_wind(const vec2 uv) { // gerek kalmayabilir. sampler linear methodu
|
|
|
44
44
|
vec2 tr = texture(vector_field, vc + vec2(px.x, 0)).rg;
|
|
45
45
|
vec2 bl = texture(vector_field, vc + vec2(0, px.y)).rg;
|
|
46
46
|
vec2 br = texture(vector_field, vc + px).rg;
|
|
47
|
-
|
|
48
|
-
if (tr.x == 0.0 && tr.y == 0.0){ return vec2(0.0);}
|
|
49
|
-
if (bl.x == 0.0 && bl.y == 0.0){ return vec2(0.0);}
|
|
50
|
-
if (br.x == 0.0 && br.y == 0.0){ return vec2(0.0);}
|
|
47
|
+
|
|
51
48
|
return mix(mix(tl, tr, f.x), mix(bl, br, f.x), f.y);
|
|
52
49
|
}
|
|
53
50
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UBO_BINDING_POINTS } from "./constants";
|
|
2
2
|
import { UniformBlockManager } from "../../../util/gl-util/uniform-block/manager";
|
|
3
|
-
const INITIAL_UBO_DATA = /*@__PURE__*/ new Float32Array([93.17, 0.2, 1.0, 7.0, 1.0, 1.0, 1.0, 0.05, 2000, 2000,
|
|
3
|
+
const INITIAL_UBO_DATA = /*@__PURE__*/ new Float32Array([93.17, 0.2, 1.0, 7.0, 1.0, 1.0, 1.0, 0.05, 2000, 2000, 0]);
|
|
4
4
|
//0.7297389507293701, 0.20000000298023224, 1, 7, 1, 1, 1, 0, 0.05000000074505806, 0, 2200, 656, -9999,
|
|
5
5
|
// {float random_seed;float range;vec2 tail_wing_base_limp;vec3 color;float drop_rate;vec2 draw_texture_size;float escape_value; }
|
|
6
6
|
export const SeaWaveUbo = /*@__PURE__*/ new UniformBlockManager("Seawave_UBO", [
|
|
@@ -59,7 +59,6 @@ export class TexturePointSampler {
|
|
|
59
59
|
pointObject.long = long;
|
|
60
60
|
pointObject.lat = lat;
|
|
61
61
|
if (!this._isInBBox(long, lat)) {
|
|
62
|
-
console.warn("Point is out of bbox, use registerPoint with valid coordinates");
|
|
63
62
|
pointObject.posIndex = -1; // Mark as invalid
|
|
64
63
|
pointObject.callback(null, null, null);
|
|
65
64
|
return false;
|
|
@@ -121,7 +120,7 @@ export class TexturePointSampler {
|
|
|
121
120
|
return;
|
|
122
121
|
}
|
|
123
122
|
const { posIndex, callback } = pointObject;
|
|
124
|
-
if (posIndex === -1) {
|
|
123
|
+
if (posIndex === -1 || !this._isReady || this._ratio < 0 || this._ratio > 1) {
|
|
125
124
|
callback(null, null, null);
|
|
126
125
|
}
|
|
127
126
|
const data0 = this._textures[0][posIndex];
|
package/waveparticles/adaptor.js
CHANGED
|
@@ -2,7 +2,7 @@ function centigradePlus90ToVectorArray(centigradeArray, noDataValue = -9999) {
|
|
|
2
2
|
const vectorArray = new Float32Array(centigradeArray.length * 2);
|
|
3
3
|
for (let i = 0; i < centigradeArray.length; i++) {
|
|
4
4
|
if (centigradeArray[i] === noDataValue) {
|
|
5
|
-
vectorArray.set([
|
|
5
|
+
vectorArray.set([0, 0], i * 2);
|
|
6
6
|
continue;
|
|
7
7
|
}
|
|
8
8
|
const rad = (centigradeArray[i] + 90.0) * Math.PI / 180;
|