webgpu-computed 0.0.10 → 0.0.11

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webgpu-computed",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "对webgpu的封装,处理了繁琐的前置工作,只关注wgsl本身逻辑",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -204,7 +204,7 @@ ${s.join("")}
204
204
  if (!(n in e)) throw new Error(`传入的数据中,不存在${n}字段`);
205
205
  const i = a[n], u = e[n];
206
206
  let l = [];
207
- w(i) ? l = r(u, i) : $(i) ? l = o(u, i) : Array.isArray(u) && l.push(...u);
207
+ w(i) ? l = r(u, i) : $(i) ? l = o(u, i) : Array.isArray(u) && (l = u);
208
208
  const y = new Float32Array(l), p = t.createBuffer({
209
209
  size: y.byteLength,
210
210
  usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.COPY_SRC | GPUBufferUsage.STORAGE