mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 20:59:57 +01:00
Switched from Mapbox to a custom globe visualization using 'cobe' library. Removed all Mapbox-related code, dependencies, and environmental variables. Introduced a WebSocket-based system to display live visitor data on the globe.
9 lines
350 B
TypeScript
9 lines
350 B
TypeScript
export default defineNuxtPlugin(() => {
|
|
const event = useRequestEvent()
|
|
|
|
useState('location', () => ({
|
|
latitude: event?.context.cf?.latitude || Math.random() * 180 - 90, // default to random latitude (only in dev)
|
|
longitude: event?.context.cf?.longitude || Math.random() * 360 - 180, // default to random longitude (only in dev)
|
|
}))
|
|
})
|