mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
fix: auto clear
This commit is contained in:
1 parent
ece0791a08
commit
633090f967
2 files changed
+11
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import { useFrame } from '@react-three/fiber';
|
||||
|
||||
export function AutoClear() {
|
||||
useFrame(({ gl }) => {
|
||||
gl.clear();
|
||||
}, 0);
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -25,6 +25,7 @@ import { TankopediaDisplay } from '../../../../../../stores/tankopediaPersistent
|
||||
import { Controls } from '../Control';
|
||||
import { Lighting } from '../Lighting';
|
||||
import { SceneProps } from '../SceneProps';
|
||||
import { AutoClear } from './AutoClear';
|
||||
import { ModelLoader } from './components/ModelLoader';
|
||||
import { TankModel } from './components/TankModel';
|
||||
|
||||
@@ -178,6 +179,7 @@ export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
|
||||
|
||||
<ShotDisplay />
|
||||
<ArmorPlateDisplay />
|
||||
<AutoClear />
|
||||
|
||||
{/* idk why the shot display doesn't work without suspense here lol */}
|
||||
<Suspense fallback={<ModelLoader />}>
|
||||
|
||||
Reference in new issue
Block a user