feat: Refactor conveyor collider logic, enhance material spawning, and remove unused colliders component
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user