From a40edbffa9a9d97ba40a343c47fc9d9686dbe722 Mon Sep 17 00:00:00 2001 From: Rami Bitar Date: Thu, 17 Sep 2026 23:24:13 -0400 Subject: [PATCH] Add oversized globe background to stats section Co-Authored-By: Claude Fable 5.1 --- components.json | 4 +- components/site/stats-globe.tsx | 48 ++++++++++++ components/site/stats.tsx | 12 ++- components/ui/globe.tsx | 135 ++++++++++++++++++++++++++++++++ package.json | 2 + yarn.lock | 71 +++++++++++++++++ 6 files changed, 268 insertions(+), 4 deletions(-) create mode 100644 components/site/stats-globe.tsx create mode 100644 components/ui/globe.tsx diff --git a/components.json b/components.json index 02e61e0..aed491a 100644 --- a/components.json +++ b/components.json @@ -21,5 +21,7 @@ }, "menuColor": "default", "menuAccent": "subtle", - "registries": {} + "registries": { + "@magicui": "https://magicui.design/r/{name}" + } } diff --git a/components/site/stats-globe.tsx b/components/site/stats-globe.tsx new file mode 100644 index 0000000..3284f50 --- /dev/null +++ b/components/site/stats-globe.tsx @@ -0,0 +1,48 @@ +'use client'; + +import { type COBEOptions } from 'cobe'; + +import { Globe } from '@/components/ui/globe'; + +// Rotation per frame. Default globe is 0.005; lower is slower, 0 stops it. +const GLOBE_SPEED = 0.003; + +const globeConfig: COBEOptions = { + width: 800, + height: 800, + onRender: () => {}, + devicePixelRatio: 2, + phi: 0, + theta: 0.22, + dark: 1, + diffuse: 1.2, + mapSamples: 20000, + mapBrightness: 5, + baseColor: [0.22, 0.22, 0.22], + markerColor: [1, 1, 1], + glowColor: [0.1, 0.1, 0.1], + markers: [ + { location: [37.7749, -122.4194], size: 0.08 }, + { location: [40.7128, -74.006], size: 0.06 }, + { location: [51.5072, -0.1276], size: 0.07 }, + { location: [48.8566, 2.3522], size: 0.05 }, + { location: [1.3521, 103.8198], size: 0.08 }, + { location: [35.6762, 139.6503], size: 0.06 }, + { location: [-33.8688, 151.2093], size: 0.05 }, + { location: [-23.5505, -46.6333], size: 0.06 }, + ], +}; + +export function StatsGlobe() { + return ( +