@pirireis/webglobeplugins 0.10.3-alpha → 0.10.4-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
|
@@ -12,7 +12,7 @@ export const SeaWaveUbo = /*@__PURE__*/ new UniformBlockManager("Seawave_UBO", [
|
|
|
12
12
|
{ name: "drop_rate", type: "float", value: INITIAL_UBO_DATA.slice(7, 8) },
|
|
13
13
|
{ name: "color", type: "vec3", value: INITIAL_UBO_DATA.slice(4, 7) },
|
|
14
14
|
], UBO_BINDING_POINTS.SEAWAVE);
|
|
15
|
-
window
|
|
15
|
+
// window add properties
|
|
16
16
|
// const shaderUboSource = `
|
|
17
17
|
// layout(std140) uniform UBO {
|
|
18
18
|
// float random_seed;
|
package/waveparticles/adaptor.js
CHANGED
|
@@ -10,7 +10,6 @@ function centigradePlus90ToVectorArray(centigradeArray, noDataValue = -9999) {
|
|
|
10
10
|
const y = Math.sin(rad);
|
|
11
11
|
vectorArray.set([x, y], i * 2);
|
|
12
12
|
}
|
|
13
|
-
console.log('centigradePlus90ToVectorArray', vectorArray);
|
|
14
13
|
return vectorArray;
|
|
15
14
|
}
|
|
16
15
|
export { centigradePlus90ToVectorArray };
|
package/waveparticles/plugin.js
CHANGED
|
@@ -77,16 +77,6 @@ export default class Plugin {
|
|
|
77
77
|
gl.bindTexture(gl.TEXTURE_2D, null);
|
|
78
78
|
return texture;
|
|
79
79
|
}
|
|
80
|
-
displayUBO() {
|
|
81
|
-
const { gl } = this;
|
|
82
|
-
//read this.waveUbo.ubo content and pring
|
|
83
|
-
const float32array = new Float32Array(SeaWaveUbo.size / Float32Array.BYTES_PER_ELEMENT);
|
|
84
|
-
console.log("WaveUbo initial data size:", SeaWaveUbo.size / Float32Array.BYTES_PER_ELEMENT);
|
|
85
|
-
gl.bindBuffer(gl.UNIFORM_BUFFER, this.waveUbo.ubo);
|
|
86
|
-
gl.getBufferSubData(gl.UNIFORM_BUFFER, 0, float32array);
|
|
87
|
-
gl.bindBuffer(gl.UNIFORM_BUFFER, null);
|
|
88
|
-
console.log("WaveUbo initial data:", float32array);
|
|
89
|
-
}
|
|
90
80
|
_step() {
|
|
91
81
|
this._stepIndex = (this._stepIndex + 1) % this._fullCycleStepCount;
|
|
92
82
|
}
|