diff --git a/src/App.tsx b/src/App.tsx index 9f1f7b7..9a44633 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -31,7 +31,12 @@ function App() { className="container" onClick={() => container.current?.requestPointerLock()} > - + - {/* */} {/* */} diff --git a/src/components/Player.tsx b/src/components/Player.tsx index d441fcd..120e89c 100644 --- a/src/components/Player.tsx +++ b/src/components/Player.tsx @@ -20,14 +20,17 @@ export interface KeyPressed { sprint: boolean; } -const PLAYER_SPEED = 4.75; -const SHADOW_DRAW_DISTANCE = 30; +const PLAYER_SPEED = 4.75 * 10; +const DRAW_DISTANCE = 50; +const SHADOW_RESOLUTION = 2048; const MOUSE_X_SENSITIVITY = 0.002; const MOUSE_Y_SENSITIVITY = 0.001; const ANIM_SPEED = 0.2; const CAMERA_RADIUS = 2; const CAMERA_HEIGHT = 1.5; +const SHADOW_DRAW_DISTANCE = DRAW_DISTANCE * 1.2; + export function Player(): JSX.Element { const model = useGLTF("/Adventurer.glb"); const anims = useAnimations(model.animations, model.scene); @@ -206,7 +209,7 @@ export function Player(): JSX.Element { 100, model.scene.position.z + 100, ]} - shadow-mapSize={[2048, 2048]} + shadow-mapSize={[SHADOW_RESOLUTION, SHADOW_RESOLUTION]} intensity={6} > + ); }