26 lines
838 B
Python
26 lines
838 B
Python
|
|
|
|
def get_environment_preset(lat, long):
|
|
"""
|
|
Determines the A-Frame environment preset based on latitude and longitude.
|
|
You can adjust the logic to suit your needs.
|
|
"""
|
|
# Example logic: adjust these thresholds as needed
|
|
if lat >= 60 or lat <= -60:
|
|
return 'snow' # Polar regions: snow environment
|
|
elif lat >= 30 or lat <= -30:
|
|
return 'forest' # Mid-latitudes: forest environment
|
|
elif long >= 100:
|
|
return 'goldmine' # Arbitrary example: for far east longitudes, a 'goldmine' preset
|
|
else:
|
|
return 'desert' # Default to desert for lower latitudes and moderate longitudes
|
|
|
|
|
|
def get_environment_by_lat(lat):
|
|
if lat > 60 or lat < -60:
|
|
return 'yeti'
|
|
elif 30 < lat < 60 or -30 > lat > -60:
|
|
return 'forest'
|
|
else:
|
|
return 'desert'
|