Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion player3/src/components/globe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -147,7 +154,7 @@ function GlobeInternal() {
const { tracks } = useContext(ServerContext);
return (
<div id={"splash"}>
<Canvas dpr={1}>
<Canvas dpr={1} frameloop="demand">
<MyScene />
</Canvas>
<div className="html3d">
Expand Down
Loading