diff --git a/player3/src/components/globe.tsx b/player3/src/components/globe.tsx index 51bdb777..f7e71cdb 100644 --- a/player3/src/components/globe.tsx +++ b/player3/src/components/globe.tsx @@ -80,6 +80,13 @@ function MyScene() { ); }, [tracks]); + const invalidate = useThree((state) => state.invalidate) + + useEffect(() => { + const id = setInterval(() => invalidate(), 1000 / 30) // 30 FPS + return () => clearInterval(id) + }, []) + useThree((state) => { // these debug functions can randomly take ~100ms // on raspberry pi (less on more powerful machines), @@ -147,7 +154,7 @@ function GlobeInternal() { const { tracks } = useContext(ServerContext); return (