@viji-dev/core 0.3.28 → 0.3.29

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.
@@ -4870,7 +4870,7 @@ class VijiWorkerRuntime {
4870
4870
  const message = event.data;
4871
4871
  switch (message.type) {
4872
4872
  case "init":
4873
- this.handleInit(message);
4873
+ this.handleInit(message).catch((e) => console.error("[Viji] handleInit failed:", e));
4874
4874
  break;
4875
4875
  case "frame-rate-update":
4876
4876
  this.handleFrameRateUpdate(message);
@@ -4959,7 +4959,7 @@ class VijiWorkerRuntime {
4959
4959
  }
4960
4960
  };
4961
4961
  }
4962
- handleInit(message) {
4962
+ async handleInit(message) {
4963
4963
  try {
4964
4964
  this.canvas = message.data.canvas;
4965
4965
  this.viji.canvas = this.canvas;
@@ -4980,8 +4980,10 @@ class VijiWorkerRuntime {
4980
4980
  };
4981
4981
  this.viji.width = this.canvas.width;
4982
4982
  this.viji.height = this.canvas.height;
4983
- init$1();
4983
+ await init$1();
4984
+ if (message.data.sc) await update(message.data.sc);
4984
4985
  init(this.canvas);
4986
+ if (message.data.rh !== void 0) setRenderHint(message.data.rh);
4985
4987
  this.startRenderLoop();
4986
4988
  this.postMessage("init-response", {
4987
4989
  id: message.id
@@ -27013,4 +27015,4 @@ async function setSceneCode(sceneCode) {
27013
27015
  }
27014
27016
  }
27015
27017
  self.setSceneCode = setSceneCode;
27016
- //# sourceMappingURL=viji.worker-CdHkRwxI.js.map
27018
+ //# sourceMappingURL=viji.worker-CQSJ0SiO.js.map