Skip to content

Commit

Permalink
feat: improve the responsiveness of the app (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReidyT authored Nov 29, 2024
1 parent ff828b0 commit d50539d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/modules/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ const theme = createTheme({

const RootDiv = styled('div')({
flexGrow: 1,
height: '100%',
height: '100vh',
background: '#fafaff',
});

const Root: FC = () => {
Expand Down
4 changes: 3 additions & 1 deletion src/modules/models/Garden.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const COLORS_BY_SEASON = {
};

const SIZE_IN_METERS = 16;
const HEIGHT_IN_METERS = 0.8;
const HEIGHT_IN_METERS = 1;
const RADIUS_IN_METERS = 0.3;

type Props = {
position: Vector3;
Expand All @@ -30,6 +31,7 @@ export const Garden = ({ position }: Props): JSX.Element => {
scale={[SIZE_IN_METERS, HEIGHT_IN_METERS, SIZE_IN_METERS]}
position={position}
material={material}
radius={RADIUS_IN_METERS}
/>
);
};
12 changes: 8 additions & 4 deletions src/modules/scenes/FirstScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ const FirstSceneComponent = (): JSX.Element => {
const { startSimulation, status } = useSimulation();

return (
<Stack sx={{ background: '#fafaff' }} height="100vh" direction="row">
<Stack alignItems="center" flexGrow={4}>
<Stack
sx={{ background: '#fafaff' }}
height="100%"
direction={{ xs: 'column-reverse', md: 'row' }}
justifyContent="center"
>
<Stack justifyContent="center" alignItems="center" flexGrow={4}>
<SimulationInformations />

<Canvas
style={{ height: '400px' }}
style={{ height: '370px', width: '375px' }}
camera={{ position: [10, 1, -15], fov: 60 }}
>
<color attach="background" args={[0xfafaff]} />
{/* Ambient Light for overall illumination */}
<ambientLight intensity={1.5} />
{/* Main Sunlight Simulation */}
Expand Down

0 comments on commit d50539d

Please sign in to comment.