fix: stabilize rpg publish and launch

This commit is contained in:
kdletters
2026-05-21 20:20:06 +08:00
parent 224a26d318
commit a9d23a8a44
14 changed files with 614 additions and 82 deletions

View File

@@ -25,6 +25,16 @@ const RpgRuntimeOverlayHost = lazy(async () => {
};
});
function RuntimeLayerLoadingFallback({ label }: { label: string }) {
return (
<div className="pointer-events-none fixed inset-x-0 top-4 z-[24] flex justify-center px-4">
<div className="rounded-full border border-white/10 bg-black/55 px-4 py-2 text-xs text-zinc-200 shadow-[0_12px_30px_rgba(0,0,0,0.32)] backdrop-blur-sm">
{label}
</div>
</div>
);
}
/**
* RPG 运行态总外壳。
* 这里承接运行时主布局、画布舞台、主阶段路由和 overlay host
@@ -167,7 +177,7 @@ export function RpgRuntimeShell({
}}
>
{gameState.worldType ? (
<Suspense fallback={null}>
<Suspense fallback={<RuntimeLayerLoadingFallback label="正在加载场景" />}>
<RpgRuntimeCanvasStage
gameState={gameState}
visibleGameState={visibleGameState}
@@ -275,7 +285,7 @@ export function RpgRuntimeShell({
/>
{gameState.worldType ? (
<Suspense fallback={null}>
<Suspense fallback={<RuntimeLayerLoadingFallback label="正在加载界面" />}>
<RpgRuntimeOverlayHost
gameState={gameState}
isLoading={isLoading}