fix: position perf panel beside debug gui
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user