Add ExpandedMapScreen and integrate it into navigation; enhance CacheCardItem and GameSettingsScreen with improved UI elements

This commit is contained in:
bobbert committed 2026-04-07 14:38:18 +01:00
1 parent 60cf6baad2
commit d34bb650f4
15 files changed
+426 -126

No files matched your search

+7 -1
View File
@@ -1,5 +1,11 @@
import * as geolib from 'geolib';
// Convert raw Magnetometer {x, y} reading to a 0-360° heading
const toHeading = ({x, y}) => {
const angle = Math.atan2(y, x) * (180 / Math.PI);
return angle < 0 ? angle + 360 : angle;
};
const isWithinRadius = (playerCoords, cacheCoords, radius) => {
const distance = geolib.getDistance(playerCoords, cacheCoords);
return distance <= radius;
@@ -14,5 +20,5 @@ const isLookingAtCache = (playerHeading, playerCoords, cacheCoords, tolerance =
return diff <= tolerance || diff >= 360 - tolerance;
};
export { isWithinRadius, isLookingAtCache };
export { toHeading, isWithinRadius, isLookingAtCache };