feat: update residence learning flows

Commit non-media application and asset changes while leaving audio, video, and environment files out of version control.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhongyidianandClaude Opus 4.7 committed 2026-05-13 10:15:26 +08:00
1 parent 68ba22a33f
commit 6d40e19346
184 files changed
+7663 -2203

No files matched your search

+10 -2
View File
@@ -14,6 +14,7 @@ import { cn, getBackgroundImage, getStaticImage } from '@/lib/utils'
import { downloadDataUrlImage } from '@/lib/utils/sensitiveWords'
import { useZhanglepingStore, saveZhanglepingStore } from '@/store/zhanglepingStore'
import { useSceneHintController } from './useSceneHintController'
import { usePuzzleAnimation } from '@/contexts/PuzzleAnimationContext'
const starName = 'zhangleping'
@@ -80,6 +81,8 @@ const ZhanglepingReflectionScene5 = () => {
hasDrawArtwork,
} = useZhanglepingStore()
const { triggerPuzzleAnimation } = usePuzzleAnimation()
// 根据 store 中碎片是否已解锁决定初始子场景
const fragmentAlreadyUnlocked = getVisitedReflectionCursors(scene).includes(1)
const [subScene, setSubScene] = useState<1 | 2 | 3>(fragmentAlreadyUnlocked ? 3 : 1)
@@ -164,9 +167,10 @@ const ZhanglepingReflectionScene5 = () => {
const handleCloseFragmentOverlay = useCallback(() => {
setShowFragmentOverlay(false)
setAllPlaced(true)
triggerPuzzleAnimation(14)
// 短暂展示插入碎片后效果,然后进入画板场景
setTimeout(() => setSubScene(3), 800)
}, [])
}, [triggerPuzzleAnimation])
const handleDownloadArtwork = useCallback(async () => {
if (!hasSubmittedArtwork) return
@@ -201,7 +205,11 @@ const ZhanglepingReflectionScene5 = () => {
className="absolute right-5 top-5 z-10"
src={getStaticImage('components/返回')}
button
onClick={() => navigate(`/${moduleName}/${starName}/reflection`)}
onClick={() =>
navigate(`/${moduleName}/${starName}/reflection`, {
state: { fromReflectionSubpage: true },
})
}
/>
)}