@gamelearn/arcade-components 3.32.6 → 3.32.7

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.
@@ -29754,14 +29754,15 @@ function Panel({ character: l, ttsStarted: e, active: n, visible: t = !0, onLoad
29754
29754
  const g = useCallback(
29755
29755
  (y) => {
29756
29756
  if (l.type === "character") {
29757
- const C = y.getObjectByName("Head_M", !0);
29758
- C ? (C.updateMatrixWorld(!0), box.setFromObject(y), box.getSize(size), C.getWorldPosition(worldPos), o.current.lookAt(worldPos)) : o.current.position.setY(size.y - 1.5 * 1.3), o.current.zoom = 1.5;
29757
+ const w = y.getObjectByName("Head_M", !0);
29758
+ w ? (w.updateMatrixWorld(!0), box.setFromObject(y), box.getSize(size), w.getWorldPosition(worldPos), o.current.lookAt(worldPos)) : o.current.position.setY(size.y - 1.5 * 1.3), o.current.zoom = 1.5;
29759
+ const C = () => {
29760
+ _(!0), s == null || s(), y.removeEventListener("update_bounds", C);
29761
+ };
29762
+ y.addEventListener("update_bounds", C);
29759
29763
  } else
29760
- cameraFitAnyObject(y, o.current), o.current.zoom = 1;
29761
- const w = () => {
29762
- _(!0), s == null || s(), y.removeEventListener("update_bounds", w);
29763
- };
29764
- y.addEventListener("update_bounds", w), o.current.updateProjectionMatrix();
29764
+ cameraFitAnyObject(y, o.current), o.current.zoom = 1, _(!0);
29765
+ o.current.updateProjectionMatrix();
29765
29766
  },
29766
29767
  [l, s]
29767
29768
  );