@gamelearn/arcade-components 3.8.12 → 3.9.1
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.
|
@@ -27133,7 +27133,7 @@ function ConversationalProComponent({
|
|
|
27133
27133
|
progress: E
|
|
27134
27134
|
}) {
|
|
27135
27135
|
var Ke, mt, ct;
|
|
27136
|
-
const g = (E == null ? void 0 : E.line) || 0, [_, p] = useState(!1), [x, C] = useState(!0), [T, S] = useState(!!h), [A, R] = useState(!1), [P, w] = useState(g), [O, k] = useState(!1), [L] = f, { start: F, stop: G } = useTimeout(), H = ((Ke = u == null ? void 0 : u.img) == null ? void 0 : Ke.url) || null, W = t[P], { voiceOver: ee, decision: q } = W;
|
|
27136
|
+
const g = t.length - 1 <= (E == null ? void 0 : E.line) ? t.length - 1 : (E == null ? void 0 : E.line) || 0, [_, p] = useState(!1), [x, C] = useState(!0), [T, S] = useState(!!h), [A, R] = useState(!1), [P, w] = useState(g), [O, k] = useState(!1), [L] = f, { start: F, stop: G } = useTimeout(), H = ((Ke = u == null ? void 0 : u.img) == null ? void 0 : Ke.url) || null, W = t[P], { voiceOver: ee, decision: q } = W;
|
|
27137
27137
|
let { flex: z } = W, B = [];
|
|
27138
27138
|
const I = !!n, U = ee || W.type === "conversationalNarration", V = q || W.type === "conversationalDecision", X = W.type === "conversationalCamera", [Q, J] = useState([]), ie = useMemo(() => Q[Q.length - 1], [Q]), ne = useCallback(() => {
|
|
27139
27139
|
const he = n.find((ve) => ve.fromId === ie) || n.find((ve) => ve.toId === ie), pe = t.find((ve) => ve.id === (he == null ? void 0 : he.fromId));
|
|
@@ -57408,7 +57408,7 @@ function DialogComponent({
|
|
|
57408
57408
|
progress: h
|
|
57409
57409
|
}) {
|
|
57410
57410
|
var Wr;
|
|
57411
|
-
const y = (h == null ? void 0 : h.line) || 0, [E, g] = useState(y), [_, p] = useState(!!u), [x, C] = useState(!1), [T, S] = useState(!1), A = useThree((ze) => ze.scene), R = useThree((ze) => ze.camera), { start: P, stop: w } = useTimeout(), O = useRef([]), k = useMemo(() => R.clone(), []), L = useRef({ pos: [0, 0, 0], child: null }), F = r[E], G = r[E - 1], H = useRef(!1), W = !!n, { voiceOver: ee, decision: q } = F || {}, z = useRef({}), B = (Wr = F == null ? void 0 : F.slots) == null ? void 0 : Wr.find((ze) => ze.talking), I = useRef(!1), { startAnimation: U, startAnimationUrl: V, resetActives: X, preloadTalking: Q, unmountActives: J } = useStateMachine(r), ie = useRef(), ne = Object.keys((F == null ? void 0 : F.audio) || {}).length, Z = Object.keys((F == null ? void 0 : F.voice) || {}).length, se = ee || (F == null ? void 0 : F.type) === "conversationalNarration", oe = q || (F == null ? void 0 : F.type) === "conversationalDecision", de = (F == null ? void 0 : F.type) === "conversationalCamera", fe = _ && !oe && !de, [ce, xe] = useState({
|
|
57411
|
+
const y = r.length - 1 <= (h == null ? void 0 : h.line) ? r.length - 1 : (h == null ? void 0 : h.line) || 0, [E, g] = useState(y), [_, p] = useState(!!u), [x, C] = useState(!1), [T, S] = useState(!1), A = useThree((ze) => ze.scene), R = useThree((ze) => ze.camera), { start: P, stop: w } = useTimeout(), O = useRef([]), k = useMemo(() => R.clone(), []), L = useRef({ pos: [0, 0, 0], child: null }), F = r[E], G = r[E - 1], H = useRef(!1), W = !!n, { voiceOver: ee, decision: q } = F || {}, z = useRef({}), B = (Wr = F == null ? void 0 : F.slots) == null ? void 0 : Wr.find((ze) => ze.talking), I = useRef(!1), { startAnimation: U, startAnimationUrl: V, resetActives: X, preloadTalking: Q, unmountActives: J } = useStateMachine(r), ie = useRef(), ne = Object.keys((F == null ? void 0 : F.audio) || {}).length, Z = Object.keys((F == null ? void 0 : F.voice) || {}).length, se = ee || (F == null ? void 0 : F.type) === "conversationalNarration", oe = q || (F == null ? void 0 : F.type) === "conversationalDecision", de = (F == null ? void 0 : F.type) === "conversationalCamera", fe = _ && !oe && !de, [ce, xe] = useState({
|
|
57412
57412
|
text: "",
|
|
57413
57413
|
name: "",
|
|
57414
57414
|
inScene: !1,
|
|
@@ -57566,7 +57566,7 @@ function DialogComponent({
|
|
|
57566
57566
|
} else
|
|
57567
57567
|
e({ type: "saveNode" });
|
|
57568
57568
|
},
|
|
57569
|
-
[n, E, r, e, F.id, W]
|
|
57569
|
+
[n, E, r, e, F == null ? void 0 : F.id, W]
|
|
57570
57570
|
), Ce = useCallback(
|
|
57571
57571
|
(ze, Ie) => {
|
|
57572
57572
|
if (z.current = { ...B }, Be([...Ve, F.id]), S(!1), Ft(), W)
|