feat: Refactor conveyor collider logic, enhance material spawning, and remove unused colliders component

This commit is contained in:
2025-07-17 17:15:46 +05:30
parent 660e21edcc
commit 1e314bc290
7 changed files with 277 additions and 174 deletions

View File

@@ -15,7 +15,7 @@ import { getUserData } from "../../functions/getUserData";
import { useLoadingProgress, useSocketStore } from "../../store/builder/store";
import { Color } from "three";
import { Physics } from "@react-three/rapier";
import Colliders from "./physics/colliders";
import MaterialSpawner from "./physics/materialSpawner";
export default function Scene({ layout }: { readonly layout: 'Main Layout' | 'Comparison Layout' }) {
const map = useMemo(() => [
@@ -73,11 +73,20 @@ export default function Scene({ layout }: { readonly layout: 'Main Layout' | 'Co
>
<Setup />
<Collaboration />
<Physics gravity={[0, -9.81, 0]} debug >
<Physics gravity={[0, -9.81, 0]} allowedLinearError={20} numSolverIterations={20} debug >
<Builder />
<Simulation />
<Colliders />
<MaterialSpawner
position={[0, 3, 0]}
spawnInterval={1000}
spawnCount={50}
/>
<MaterialSpawner
position={[-21, 3, -8]}
spawnInterval={1000}
spawnCount={50}
/>
</Physics>
<Visualization />
</Canvas>