mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-30 05:14:06 +01:00
feat: instant model loading
This commit is contained in:
1 parent
db4c207708
commit
11e75e48ce
2 files changed
+45
-24
No files matched your search
@@ -1,16 +1,17 @@
|
||||
import { Flex, Progress } from '@radix-ui/themes';
|
||||
import { Flex, FlexProps, Progress } from '@radix-ui/themes';
|
||||
import { useProgress } from '@react-three/drei';
|
||||
import { tankIcon } from '../../../../../../core/blitzkit/tankIcon';
|
||||
|
||||
export function TankSandboxLoader({ id }: { id: number }) {
|
||||
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">
|
||||
<img
|
||||
src={tankIcon(id)}
|
||||
style={{ height: '60%', filter: 'blur(4px) grayscale(1)' }}
|
||||
/>
|
||||
<Flex width="100%" height="100%" align="center" justify="center" {...props}>
|
||||
<img src={tankIcon(id)} style={{ height: '60%', filter: 'blur(4px)' }} />
|
||||
<Progress
|
||||
size="3"
|
||||
value={data.progress}
|
||||
|
||||
Reference in new issue
Block a user