Skip to content

Commit

Permalink
fix: floor component children
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-mason committed Apr 14, 2024
1 parent dc6f8a1 commit bf2e2cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-three-jolt-addons/src/components/Floor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ export type FloorProps = {
} & ThreeElements['mesh'];

export const Floor = (props: FloorProps) => {
const { size = 20, position = [0, 0, 0], rotation = [0, 0, 0], ...rest } = props;
const { size = 20, position = [0, 0, 0], rotation = [0, 0, 0], children, ...rest } = props;

return (
<RigidBody position={position} rotation={rotation} type="static">
<mesh receiveShadow scale-y={1} {...rest}>
<boxGeometry args={[size, 0.5, size]} />
{children}
</mesh>
</RigidBody>
);
Expand Down

0 comments on commit bf2e2cc

Please sign in to comment.