@gamelearn/arcade-components 3.16.2 → 3.16.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.
|
@@ -61195,11 +61195,13 @@ function AnimationComponent({ animation: l, loopTimes: e, resource: n, enableInt
|
|
|
61195
61195
|
const b = t;
|
|
61196
61196
|
b || o({ type: "success" });
|
|
61197
61197
|
const S = _.userData.animator, E = () => {
|
|
61198
|
-
S.getAction(l.url).setLoop(LoopRepeat, 1 / 0), p.current =
|
|
61198
|
+
S.getAction(l.url).setLoop(LoopRepeat, 1 / 0), p.current = 1;
|
|
61199
61199
|
function v() {
|
|
61200
|
-
p.current
|
|
61200
|
+
p.current >= e && (S.mix("idle"), b && o({ type: "success" }), S.removeEventListener("loop", v)), p.current += 1;
|
|
61201
61201
|
}
|
|
61202
|
-
S.mix(l.url)
|
|
61202
|
+
S.mix(l.url).then((R) => {
|
|
61203
|
+
R && S.addEventListener("loop", v);
|
|
61204
|
+
}), f(!0);
|
|
61203
61205
|
};
|
|
61204
61206
|
S.getAction(l.url) ? E() : u.load(l.url, (g) => {
|
|
61205
61207
|
S.register(l.url, g.animations[0]), E();
|