From 589bb314169b94d4c79cafab054a4af4445f82df Mon Sep 17 00:00:00 2001 From: "DESKTOP-I1T6TF3\\Q" <2291969160@qq.com> Date: Thu, 4 Jun 2026 15:13:03 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"feat(loading):=20slow=20down=20teaser?= =?UTF-8?q?=20typing=20speed=20to=2065ms=20and=20change=20fallback=20text?= =?UTF-8?q?=20to=20"=20=E8=AF=B7=E7=AD=89=E5=BE=85\"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 05d9060dc225d9a5c49d10116e6da91a2098f6fd. --- components/PlayCanvas.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/components/PlayCanvas.tsx b/components/PlayCanvas.tsx index b49d5dd..7127a17 100644 --- a/components/PlayCanvas.tsx +++ b/components/PlayCanvas.tsx @@ -35,11 +35,11 @@ const AUDIO_WAIT_TIMEOUT_MS = 2500; function useTypewriter( text: string, resetKey: string, - opts: { targetDurationMs?: number; waitForAudio: boolean; defaultCharMs?: number } = { + opts: { targetDurationMs?: number; waitForAudio: boolean } = { waitForAudio: false, }, ): { shown: string; done: boolean; skip: () => void } { - const { targetDurationMs, waitForAudio, defaultCharMs } = opts; + const { targetDurationMs, waitForAudio } = opts; const [displayed, setDisplayed] = useState(""); const [prevKey, setPrevKey] = useState(resetKey); const timer = useRef | null>(null); @@ -71,7 +71,7 @@ function useTypewriter( const speed = targetDurationMs && text.length > 0 ? Math.max(MIN_CHAR_MS, targetDurationMs / text.length) - : (defaultCharMs ?? DEFAULT_CHAR_MS); + : DEFAULT_CHAR_MS; let i = 0; timer.current = setInterval(() => { @@ -86,7 +86,7 @@ function useTypewriter( if (timer.current) clearInterval(timer.current); timer.current = null; }; - }, [resetKey, text, targetDurationMs, waitForAudio, defaultCharMs]); + }, [resetKey, text, targetDurationMs, waitForAudio]); const skip = useCallback(() => { if (timer.current) { @@ -211,7 +211,6 @@ export function PlayCanvas({ const { shown: typedTeaser, done: teaserDone } = useTypewriter(teaserText ?? "", "teaser_reset", { waitForAudio: false, - defaultCharMs: 65, }); const [pulseActive, setPulseActive] = useState(false); @@ -527,7 +526,7 @@ export function PlayCanvas({

- 请 · 等 · 待 + 正 · 在 · 绘 · 制 · 第 · 一 · 幕

)}