refactor: filter players to display only those with valid positions and recent timestamps for improved clarity

This commit is contained in:
MayaTheShy
2026-02-20 04:32:12 -05:00
parent af2c978185
commit 00d31698a1

View File

@@ -1297,9 +1297,11 @@ function Scene({ interactionMode, onInteraction }) {
))} ))}
{/* Players */} {/* Players */}
{players.map((player) => ( {players
<PlayerMarker key={player.playerID} player={player} /> .filter((p) => p.position && Date.now() - (p.timestamp || 0) < 30000)
))} .map((player) => (
<PlayerMarker key={player.playerID} player={player} />
))}
{/* Camera controls */} {/* Camera controls */}
<OrbitControls <OrbitControls