diff --git a/client/src/components/Map3D.jsx b/client/src/components/Map3D.jsx index 2753860..d5167be 100644 --- a/client/src/components/Map3D.jsx +++ b/client/src/components/Map3D.jsx @@ -506,9 +506,58 @@ function MiningArea({ area, turtle, isSelected, onClick }) { ); } +// Player marker component +function PlayerMarker({ player }) { + const meshRef = useRef(); + + // Bobbing animation + useFrame((state) => { + if (meshRef.current) { + meshRef.current.position.y = player.position.y + Math.sin(state.clock.elapsedTime * 2) * 0.1; + } + }); + + return ( + + {/* Player head (Steve-like) */} + + + + + + {/* Body */} + + + + + + {/* Glow effect */} + + + {/* Label */} + + Player {player.playerID} + + + ); +} + // Main scene component function Scene() { const turtles = useTurtleStore((state) => state.getTurtleArray()); + const players = useTurtleStore((state) => Object.values(state.players || {})); const selectedTurtleId = useTurtleStore((state) => state.selectedTurtleId); const selectTurtle = useTurtleStore((state) => state.selectTurtle); const worldBlocks = useTurtleStore((state) => state.worldBlocks || []);