mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: reenable mixer
This commit is contained in:
1 parent
96a8f225fc
commit
f5aa2ff9de
12 files changed
+72
-37
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { useProgress } from "@react-three/drei";
|
||||
import { useRef } from "react";
|
||||
|
||||
export function useStableProgress() {
|
||||
const { loaded, total } = useProgress();
|
||||
const progress = useRef(0);
|
||||
|
||||
progress.current = Math.max(
|
||||
progress.current,
|
||||
total === 0 ? 0 : (loaded / total) * 100
|
||||
);
|
||||
|
||||
return progress.current;
|
||||
}
|
||||
Reference in new issue
Block a user