refactor: filter players to display only those with valid positions and recent timestamps for improved clarity
This commit is contained in:
@@ -1297,9 +1297,11 @@ function Scene({ interactionMode, onInteraction }) {
|
||||
))}
|
||||
|
||||
{/* Players */}
|
||||
{players.map((player) => (
|
||||
<PlayerMarker key={player.playerID} player={player} />
|
||||
))}
|
||||
{players
|
||||
.filter((p) => p.position && Date.now() - (p.timestamp || 0) < 30000)
|
||||
.map((player) => (
|
||||
<PlayerMarker key={player.playerID} player={player} />
|
||||
))}
|
||||
|
||||
{/* Camera controls */}
|
||||
<OrbitControls
|
||||
|
||||
Reference in New Issue
Block a user