From 3317cecbeac8dbcd03c54b636879389f88b5a86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Sowa?= Date: Fri, 17 May 2024 16:36:31 +0200 Subject: [PATCH] feat: add debug to leva --- src/components/GyroscopeExperience.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/GyroscopeExperience.tsx b/src/components/GyroscopeExperience.tsx index 150939e..06a96d4 100644 --- a/src/components/GyroscopeExperience.tsx +++ b/src/components/GyroscopeExperience.tsx @@ -17,9 +17,10 @@ const radians = (deg: number) => (deg * Math.PI) / 180; export const GyroscopeExperience = () => { const [gravity, setGravity] = useState(defaultGravity); - const { gravityMultiplier, cubesCount } = useControls({ + const { gravityMultiplier, cubesCount, debug } = useControls({ gravityMultiplier: 9, cubesCount: 50, + debug: false, }); const cubesRef = @@ -108,7 +109,7 @@ export const GyroscopeExperience = () => { return ( <> - {gravity.toString()} + {debug && gravity.toString()} { shadow-mapSize={2048} /> - +