mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 13:16:11 +01:00
loader
This commit is contained in:
1 parent
078bc9d6cd
commit
6e35c06cfc
4 files changed
+81
-25
No files matched your search
-25
@@ -1,25 +0,0 @@
|
||||
import { alias } from "@blitzkit/core";
|
||||
import { Flex, type FlexProps, Progress } from "@radix-ui/themes";
|
||||
import { useProgress } from "@react-three/drei";
|
||||
|
||||
type TankSandboxLoaderProps = Omit<FlexProps, "id"> & {
|
||||
id: number;
|
||||
};
|
||||
|
||||
export function TankSandboxLoader({ id, ...props }: TankSandboxLoaderProps) {
|
||||
const data = useProgress();
|
||||
|
||||
return (
|
||||
<Flex width="100%" height="100%" align="center" justify="center" {...props}>
|
||||
<img
|
||||
src={alias("api", `/tanks/${id}/icons/big.webp`)}
|
||||
style={{ height: "75%", filter: "blur(1rem)" }}
|
||||
/>
|
||||
<Progress
|
||||
size="3"
|
||||
value={data.progress}
|
||||
style={{ position: "absolute", width: "16rem", maxWidth: "50vw" }}
|
||||
/>
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user