@openheart/tavio-renderer 2.3.23-with-wasm → 2.3.24-with-wasm

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/build/esm/index.js +13 -5
  2. package/package.json +1 -1
@@ -39300,12 +39300,11 @@ class TavioMesh extends EventEmitter {
39300
39300
  break;
39301
39301
  }
39302
39302
  ++currentProperty;
39303
- if (currentProperty === chunkHeader[currentChunk].propertyCount - 1) {
39303
+ if (currentProperty === chunkHeader[currentChunk].propertyCount) {
39304
+ ++currentChunk;
39304
39305
  this.worker.postMessage({
39305
39306
  properties: mainProperties
39306
39307
  });
39307
- } else if (currentProperty === chunkHeader[currentChunk].propertyCount) {
39308
- ++currentChunk;
39309
39308
  this.worker.postMessage({
39310
39309
  shProperty: mainProperties.shN
39311
39310
  });
@@ -39386,6 +39385,15 @@ class TavioMesh extends EventEmitter {
39386
39385
  currentData = new Uint8Array(byte);
39387
39386
  this.emit("getcontentbytelength", { byte });
39388
39387
  });
39388
+ const runOnRead = async (readLength) => {
39389
+ try {
39390
+ await onRead(readLength);
39391
+ } catch (error2) {
39392
+ inProgress = false;
39393
+ progressCallback = null;
39394
+ reject(error2);
39395
+ }
39396
+ };
39389
39397
  loader.on("read", async (data) => {
39390
39398
  if (currentLength === 0) {
39391
39399
  onFirstRead(data);
@@ -39396,12 +39404,12 @@ class TavioMesh extends EventEmitter {
39396
39404
  if (inProgress === true) {
39397
39405
  progressCallback = /* @__PURE__ */ ((readLength) => {
39398
39406
  return () => {
39399
- onRead(readLength);
39407
+ runOnRead(readLength);
39400
39408
  };
39401
39409
  })(currentLength);
39402
39410
  } else {
39403
39411
  inProgress = true;
39404
- await onRead(currentLength);
39412
+ await runOnRead(currentLength);
39405
39413
  }
39406
39414
  });
39407
39415
  loader.on("load", (data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openheart/tavio-renderer",
3
- "version": "2.3.23-with-wasm",
3
+ "version": "2.3.24-with-wasm",
4
4
  "author": "OpenHeart Inc.",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Rendering Engine for Tavio Format 3D data",