@galacean/effects-helper 2.0.0-alpha.16 → 2.0.0-alpha.18

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.
@@ -49,7 +49,7 @@ export async function serializeTextures(textureOptions) {
49
49
  filesPending.push(job());
50
50
  }
51
51
  else {
52
- throw new Error(`tex ${i} image should be HTMLImage or HTMLCanvas`);
52
+ throw new Error(`tex ${i} image should be HTMLImage or HTMLCanvas.`);
53
53
  }
54
54
  }
55
55
  await Promise.all(cubesPending);
@@ -7,7 +7,7 @@ export async function loadMipmaps(textureOptions, dataIndex) {
7
7
  if (imageLike instanceof HTMLImageElement) {
8
8
  return getImageFileContent(imageLike);
9
9
  }
10
- return Promise.reject(new Error('Invalid image format'));
10
+ return Promise.reject(new Error('Invalid image format.'));
11
11
  })));
12
12
  const newMipmaps = await Promise.all(jobs);
13
13
  const images = [];
@@ -39,7 +39,7 @@ export async function getImageFileContent(image) {
39
39
  resolve(blob.arrayBuffer());
40
40
  }
41
41
  else {
42
- reject(new Error('no canvas blob'));
42
+ reject(new Error('Failed to create a blob from the canvas. This may occur if the canvas is empty or not properly configured.'));
43
43
  }
44
44
  }, 'image/png', 1);
45
45
  });
@@ -110,7 +110,7 @@ export function concatArrayBuffers(buffers, pointers, overwrite) {
110
110
  const content = pointer[1];
111
111
  const buffer = buffers[content[0]];
112
112
  if (!buffer) {
113
- throw new Error(`buffer index ${content[0]} not found`);
113
+ throw new Error(`Buffer index ${content[0]} not found.`);
114
114
  }
115
115
  const originStart = content[1] || 0;
116
116
  const byteLength = content[2] || (buffer.byteLength - originStart);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-helper",
3
- "version": "2.0.0-alpha.16",
3
+ "version": "2.0.0-alpha.18",
4
4
  "description": "Galacean Effects runtime helper for the web",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "registry": "https://registry.npmjs.org"
29
29
  },
30
30
  "devDependencies": {
31
- "@galacean/effects": "2.0.0-alpha.16"
31
+ "@galacean/effects": "2.0.0-alpha.18"
32
32
  },
33
33
  "scripts": {
34
34
  "prebuild": "pnpm clean",