fix: stabilize rpg publish and launch
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user