fix: position perf panel beside debug gui

This commit is contained in:
Tom Boullay
2026-04-29 11:56:46 +02:00
parent 5627373752
commit 2a3b088294
+7 -1
View File
@@ -3,6 +3,9 @@ import { Debug } from "@/utils/debug/Debug";
const Perf = lazy(() => import("r3f-perf").then((m) => ({ default: m.Perf })));
const DEBUG_GUI_WIDTH = 245;
const DEBUG_PANEL_GAP = 20;
export function DebugPerf(): React.JSX.Element | null {
const debug = Debug.getInstance();
@@ -12,7 +15,10 @@ export function DebugPerf(): React.JSX.Element | null {
return (
<Suspense fallback={null}>
<Perf position="top-right" />
<Perf
position="top-right"
style={{ right: DEBUG_GUI_WIDTH + DEBUG_PANEL_GAP }}
/>
</Suspense>
);
}