fix: remove fixed match3d demo

This commit is contained in:
kdletters
2026-05-27 00:57:28 +08:00
parent 6b9c0fb3db
commit 2411eb6513
112 changed files with 15 additions and 293 deletions

View File

@@ -108,12 +108,6 @@ import type {
VisualNovelWorkSummary,
} from '../../../packages/shared/src/contracts/visualNovel';
import { buildCustomWorldPlayableCharacters } from '../../data/characterPresets';
import {
MATCH3D_DEMO_GALLERY_CARD,
MATCH3D_DEMO_PROFILE_ID,
MATCH3D_DEMO_WORK_PROFILE,
isMatch3DDemoProfileId,
} from '../../data/match3dDemoGalleryCard';
import {
buildPublicWorkStagePath,
pushAppHistoryPath,
@@ -198,10 +192,7 @@ import {
JumpHopWorkspaceCreateRequest,
} from '../../services/jump-hop/jumpHopClient';
import { match3dCreationClient } from '../../services/match3d-creation';
import {
createLocalMatch3DRuntimeAdapter,
createServerMatch3DRuntimeAdapter,
} from '../../services/match3d-runtime';
import { createServerMatch3DRuntimeAdapter } from '../../services/match3d-runtime';
import {
deleteMatch3DWork,
getMatch3DWorkDetail,
@@ -4332,9 +4323,6 @@ export function PlatformEntryFlowShellImpl({
}
return '服务端预览';
}, [agentResultPreview]);
const match3dDemoProfile = MATCH3D_DEMO_WORK_PROFILE;
const match3dDemoGalleryCard = MATCH3D_DEMO_GALLERY_CARD;
const featuredGalleryEntries = useMemo(() => {
const bigFishPublicEntries = isBigFishCreationVisible
? bigFishGalleryEntries.map(mapBigFishWorkToPlatformGalleryCard)
@@ -4373,7 +4361,6 @@ export function PlatformEntryFlowShellImpl({
[
...bigFishPublicEntries,
...match3dPublicEntries,
match3dDemoGalleryCard,
...puzzlePublicEntries,
...barkBattlePublicEntries,
...squareHolePublicEntries,
@@ -4398,7 +4385,6 @@ export function PlatformEntryFlowShellImpl({
squareHoleGalleryEntries,
visualNovelGalleryEntries,
woodenFishGalleryEntries,
match3dDemoGalleryCard,
]);
const latestGalleryEntries = useMemo(
() =>
@@ -4409,7 +4395,6 @@ export function PlatformEntryFlowShellImpl({
? bigFishGalleryEntries.map(mapBigFishWorkToPlatformGalleryCard)
: []),
...match3dGalleryEntries.map(mapMatch3DWorkToPublicWorkDetail),
match3dDemoGalleryCard,
...puzzleGalleryEntries.map(mapPuzzleWorkToPlatformGalleryCard),
...barkBattleGalleryEntries.map(mapBarkBattleWorkToPlatformGalleryCard),
...jumpHopGalleryEntries.map(mapJumpHopWorkToPlatformGalleryCard),
@@ -4451,7 +4436,6 @@ export function PlatformEntryFlowShellImpl({
barkBattleGalleryEntries,
barkBattleWorks,
woodenFishGalleryEntries,
match3dDemoGalleryCard,
],
);
const recommendRuntimeEntries = useMemo(() => {
@@ -4459,9 +4443,7 @@ export function PlatformEntryFlowShellImpl({
filterGeneralPublicWorks([
...featuredGalleryEntries,
...latestGalleryEntries,
])
.filter((entry) => !isMatch3DDemoProfileId(entry.profileId))
.forEach((entry) => {
]).forEach((entry) => {
entryMap.set(getPlatformPublicGalleryEntryKey(entry), entry);
});
return Array.from(entryMap.values());
@@ -5005,20 +4987,9 @@ export function PlatformEntryFlowShellImpl({
() => createServerMatch3DRuntimeAdapter(),
[],
);
const match3dDemoRuntimeAdapter = useMemo(
() =>
createLocalMatch3DRuntimeAdapter({
clearCount: 21,
profileId: MATCH3D_DEMO_PROFILE_ID,
}),
[],
);
const resolveMatch3DRuntimeAdapter = useCallback(
(profileId: string | null | undefined) =>
isMatch3DDemoProfileId(profileId)
? match3dDemoRuntimeAdapter
: match3dRuntimeAdapter,
[match3dDemoRuntimeAdapter, match3dRuntimeAdapter],
(_profileId: string | null | undefined) => match3dRuntimeAdapter,
[match3dRuntimeAdapter],
);
const match3dFlow = usePlatformCreationAgentFlowController<
Match3DAgentSessionSnapshot,
@@ -9690,11 +9661,9 @@ export function PlatformEntryFlowShellImpl({
setMatch3DError(null);
try {
const isDemoProfile = isMatch3DDemoProfileId(profile.profileId);
let runtimeProfile: Match3DWorkProfile | Match3DWorkSummary =
isDemoProfile ? match3dDemoProfile : profile;
profile;
if (
!isDemoProfile &&
(!hasMatch3DRuntimeAsset(profile.generatedItemAssets) ||
!hasMatch3DRuntimeBackgroundAsset(profile))
) {
@@ -9775,7 +9744,6 @@ export function PlatformEntryFlowShellImpl({
},
[
isMatch3DBusy,
match3dDemoProfile,
authUi,
match3dFlow,
resolveMatch3DErrorMessage,
@@ -11556,11 +11524,8 @@ export function PlatformEntryFlowShellImpl({
try {
const entries =
match3dGalleryEntries.length > 0
? [...match3dGalleryEntries, match3dDemoProfile]
: await refreshMatch3DGallery().then((items) => [
...items,
match3dDemoProfile,
]);
? match3dGalleryEntries
: await refreshMatch3DGallery();
const matchedEntry = entries.find(
(entry) => entry.profileId === profileId,
);
@@ -11580,7 +11545,6 @@ export function PlatformEntryFlowShellImpl({
},
[
match3dGalleryEntries,
match3dDemoProfile,
openPublicWorkDetail,
refreshMatch3DGallery,
resolveMatch3DErrorMessage,
@@ -14138,11 +14102,8 @@ export function PlatformEntryFlowShellImpl({
const tryOpenMatch3DGalleryEntry = async () => {
const entries =
match3dGalleryEntries.length > 0
? [...match3dGalleryEntries, match3dDemoProfile]
: await refreshMatch3DGallery().then((items) => [
...items,
match3dDemoProfile,
]);
? match3dGalleryEntries
: await refreshMatch3DGallery();
const matchedEntry = entries.find((entry) => {
const detailEntry = mapMatch3DWorkToPublicWorkDetail(entry);
return (
@@ -14559,7 +14520,6 @@ export function PlatformEntryFlowShellImpl({
refreshBigFishGallery,
resolveBigFishErrorMessage,
setBigFishError,
match3dDemoProfile,
],
);