refacto: enleve la map

This commit is contained in:
2026-04-16 16:11:20 +02:00
parent 1eed905e8b
commit b26da614f0
10 changed files with 66 additions and 111 deletions
+11 -1
View File
@@ -1,7 +1,17 @@
import { PlayerCamera } from "@/world/player/PlayerCamera";
import { useEffect } from "react";
import { useThree } from "@react-three/fiber";
import { PlayerCamera, PLAYER_EYE_HEIGHT } from "@/world/player/PlayerCamera";
import { PlayerController } from "@/world/player/PlayerController";
const SPAWN_POSITION = { x: 0, y: PLAYER_EYE_HEIGHT, z: 0 };
export function PlayerComponent(): React.JSX.Element {
const camera = useThree((state) => state.camera);
useEffect(() => {
camera.position.set(SPAWN_POSITION.x, SPAWN_POSITION.y, SPAWN_POSITION.z);
}, [camera]);
return (
<>
<PlayerCamera />