@gamelearn/arcade-components 3.6.2 → 3.6.3

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.
@@ -57301,7 +57301,6 @@ function useStateMachine(o) {
57301
57301
  f && delete f.userData._active;
57302
57302
  });
57303
57303
  }, u = async (l, f) => {
57304
- var E;
57305
57304
  const d = getCurrentVisible(l, e);
57306
57305
  if (cache[l] || (cache[l] = {}), !d)
57307
57306
  return;
@@ -57309,30 +57308,26 @@ function useStateMachine(o) {
57309
57308
  if (f === "idle")
57310
57309
  h(y, d);
57311
57310
  else {
57312
- const g = r[l], _ = (E = cache[l]) == null ? void 0 : E[f], p = cache[l].talking, x = (C) => {
57313
- (!d.userData._active || d.userData._active !== f) && (d.userData._active = f, d.userData.animation.clipAction(C, d));
57311
+ const E = r[l], g = cache[l].talking, _ = (p) => {
57312
+ (!d.userData._active || d.userData._active !== f) && (d.userData._active = f, d.userData.animation.clipAction(p, d));
57314
57313
  };
57315
- if (!p) {
57316
- const { animations: C } = await loader.loadAsync(g.talking);
57317
- C[0].name = "talking", cache[l].talking = C[0];
57318
- }
57319
- if (_)
57320
- _ && x(_);
57321
- else {
57322
- if (f.includes("talking")) {
57323
- const C = f.split("_")[0];
57324
- let T = cache[l][C];
57325
- if (!T) {
57326
- const { animations: S } = await loader.loadAsync(g[C]);
57327
- S[0].name = C, T = cache[l][C] = S[0];
57328
- }
57329
- cache[l][f] = mixWithTalkingClip(cache[l].talking, T);
57330
- } else {
57331
- const { animations: C } = await loader.loadAsync(g[f]);
57332
- cache[l][f] = C[0];
57333
- }
57334
- x(cache[l][f]);
57314
+ if (!g) {
57315
+ const { animations: p } = await loader.loadAsync(E.talking);
57316
+ p[0].name = "talking", cache[l].talking = p[0];
57317
+ }
57318
+ if (f.includes("talking")) {
57319
+ const p = f.split("_")[0];
57320
+ let x = cache[l][p];
57321
+ if (!x) {
57322
+ const { animations: C } = await loader.loadAsync(E[p]);
57323
+ C[0].name = p, x = cache[l][p] = C[0];
57324
+ }
57325
+ cache[l][f] = mixWithTalkingClip(cache[l].talking, x);
57326
+ } else {
57327
+ const { animations: p } = await loader.loadAsync(E[f]);
57328
+ cache[l][f] = p[0];
57335
57329
  }
57330
+ _(cache[l][f]);
57336
57331
  }
57337
57332
  };
57338
57333
  return { startAnimation: u, resetActives: n, unmountActives: a };