Skip to content

Commit

Permalink
color sand debug
Browse files Browse the repository at this point in the history
  • Loading branch information
DJ-Laser committed Jan 11, 2025
1 parent 43ec128 commit ba1a86c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Canvas } from "@react-three/fiber";
import { interactionGroups, Physics, RigidBody } from "@react-three/rapier";
import { PropsWithChildren, Suspense, useRef } from "react";
import { Color } from "three";
import { STATIC_GROUP } from "./collisionGroups";
import { Car } from "./components/Car";
import { Cones } from "./components/Cones";
Expand All @@ -12,9 +13,7 @@ function AppWrapper({ children }: PropsWithChildren) {
<div id="canvas-container" className="w-full h-full">
<Suspense fallback="Loading... ._.">
<Canvas shadows="soft">
<Physics debug numAdditionalFrictionIterations={6}>
{children}
</Physics>
<Physics numAdditionalFrictionIterations={6}>{children}</Physics>
</Canvas>
</Suspense>
</div>
Expand Down Expand Up @@ -50,7 +49,7 @@ function App() {
>
<mesh position={[75, 0, 0]} receiveShadow>
<boxGeometry args={[300, 2, 150]} />
<meshStandardMaterial />
<meshStandardMaterial color={new Color(0.3, 0.3, 0.3)} />
</mesh>
</RigidBody>
<Ramp position={[30, -2, 0]} />
Expand Down
3 changes: 1 addition & 2 deletions src/components/Ramp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
RigidBody,
RigidBodyProps,
} from "@react-three/rapier";
import { Color } from "three";
import { STATIC_GROUP } from "../collisionGroups";
import "./models/TrapezoidGeometry";

Expand All @@ -17,7 +16,7 @@ export function Ramp(props: RigidBodyProps) {
>
<mesh castShadow receiveShadow>
<trapezoidGeometry args={[28.5, 8.3, 3.6, 20]} />
<meshStandardMaterial color={new Color(0.4, 0.4, 0.4)} />
<meshStandardMaterial />
</mesh>
</RigidBody>
);
Expand Down

0 comments on commit ba1a86c

Please sign in to comment.