@gamelearn/arcade-components 3.7.2 → 3.7.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.
|
@@ -57332,38 +57332,42 @@ function useStateMachine(o) {
|
|
|
57332
57332
|
return;
|
|
57333
57333
|
const { clipAction: E } = y.userData.animation;
|
|
57334
57334
|
if (c) {
|
|
57335
|
-
const g = r[f]
|
|
57336
|
-
let p = c, x = cache[c];
|
|
57335
|
+
const g = r[f];
|
|
57336
|
+
let _ = cache[g.talking], p = c, x = cache[c];
|
|
57337
57337
|
if (!_) {
|
|
57338
57338
|
const { animations: C } = await loader.loadAsync(g.talking);
|
|
57339
|
-
C[0].name = "talking", cache[g.talking] = C[0];
|
|
57339
|
+
C[0].name = "talking", _ = cache[g.talking] = C[0];
|
|
57340
57340
|
}
|
|
57341
57341
|
if (!x) {
|
|
57342
57342
|
const { animations: C } = await loader.loadAsync(c);
|
|
57343
57343
|
x = cache[c] = C[0];
|
|
57344
57344
|
}
|
|
57345
|
-
h && (x = mixWithTalkingClip(_, x), p += "_talking"),
|
|
57345
|
+
if (h && (x = mixWithTalkingClip(_, x), p += "_talking"), !y.userData._active || y.userData._active !== p)
|
|
57346
|
+
return y.userData._active = p, E(x, y);
|
|
57346
57347
|
}
|
|
57348
|
+
return null;
|
|
57347
57349
|
}, u = async (f, c) => {
|
|
57348
57350
|
const h = getCurrentVisible(f, e);
|
|
57349
57351
|
if (cache[f] || (cache[f] = {}), !h)
|
|
57350
57352
|
return;
|
|
57351
57353
|
const { clipAction: y, defaultAnim: E } = h.userData.animation;
|
|
57352
57354
|
if (c === "idle")
|
|
57353
|
-
y(E, h);
|
|
57354
|
-
|
|
57355
|
-
const g = r[f], _ = c.split("_")[0], p = g[_]
|
|
57356
|
-
let C = cache[p];
|
|
57355
|
+
return y(E, h);
|
|
57356
|
+
{
|
|
57357
|
+
const g = r[f], _ = c.split("_")[0], p = g[_];
|
|
57358
|
+
let x = cache[g.talking], C = cache[p];
|
|
57357
57359
|
if (!x) {
|
|
57358
57360
|
const { animations: T } = await loader.loadAsync(g.talking);
|
|
57359
|
-
T[0].name = "talking", cache[g.talking] = T[0];
|
|
57361
|
+
T[0].name = "talking", x = cache[g.talking] = T[0];
|
|
57360
57362
|
}
|
|
57361
57363
|
if (!C) {
|
|
57362
57364
|
const { animations: T } = await loader.loadAsync(g[_]);
|
|
57363
57365
|
C = cache[g[_]] = T[0];
|
|
57364
57366
|
}
|
|
57365
|
-
c.includes("talking") && (C = mixWithTalkingClip(x, C)),
|
|
57367
|
+
if (c.includes("talking") && (C = mixWithTalkingClip(x, C)), !h.userData._active || h.userData._active !== c)
|
|
57368
|
+
return h.userData._active = c, y(C, h);
|
|
57366
57369
|
}
|
|
57370
|
+
return null;
|
|
57367
57371
|
};
|
|
57368
57372
|
return { startAnimation: u, startAnimationUrl: l, resetActives: n, unmountActives: a };
|
|
57369
57373
|
}
|