@gamelearn/arcade-components 3.32.5 → 3.32.6

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.
@@ -61409,7 +61409,7 @@ function DialogComponent({
61409
61409
  }
61410
61410
  const activeCache = ProgressManager.request("AssetLoader").cache, assetLoader = new AssetLoader(void 0, activeCache);
61411
61411
  function Animation({ animation: l, loopTimes: e, onAnimationFinish: n, onAnimationSave: t, resource: s, makeDefault: o }) {
61412
- const [d, h] = useState(!1), f = useThree((p) => p.scene), u = useRef(1);
61412
+ const [d, h] = useState(!1), f = useThree((p) => p.scene), u = useRef(0);
61413
61413
  return useEffect(() => {
61414
61414
  h(!1);
61415
61415
  }, [s.uid, l == null ? void 0 : l.url]), useEffect(() => {
@@ -61423,16 +61423,19 @@ function Animation({ animation: l, loopTimes: e, onAnimationFinish: n, onAnimati
61423
61423
  const x = _.getAction(l.url);
61424
61424
  x.setLoop(LoopRepeat, 1 / 0), x.reset();
61425
61425
  function S() {
61426
- u.current += 1, u.current >= e && (_.mix("idle"), n(), _.removeEventListener("loop", S));
61426
+ u.current += 1, u.current >= e && g();
61427
61427
  }
61428
- _.mix(l == null ? void 0 : l.url).then((g) => {
61429
- g && (u.current = 1, _.addEventListener("loop", S));
61428
+ function g() {
61429
+ _.mix("idle"), n(), _.removeEventListener("loop", S);
61430
+ }
61431
+ _.mix(l == null ? void 0 : l.url).then((v) => {
61432
+ v && (u.current = 1, u.current >= e ? g() : _.addEventListener("loop", S));
61430
61433
  }), h(!0);
61431
61434
  };
61432
- _.getAction(l == null ? void 0 : l.url) ? T() : assetLoader.load(
61435
+ _.getAction(l == null ? void 0 : l.url) ? (_.setTime(0), T()) : assetLoader.load(
61433
61436
  l == null ? void 0 : l.url,
61434
61437
  (x) => {
61435
- _.register(l == null ? void 0 : l.url, x.animations[0]), T();
61438
+ _.register(l == null ? void 0 : l.url, x.animations[0]), _.setTime(0), T();
61436
61439
  },
61437
61440
  void 0,
61438
61441
  (x) => {