Interactive Globe (alonepro/interactive-globe)
The Interactive Globe block provides a real-time, 3D canvas-rendered globe powered by WebGL (via cobe (opens in a new tab)). It allows charities, relief foundations, and international NGOs to visualize their worldwide footprint, active project chapters, and relief sites.
Key Features
- Smooth 3D Rotation: Auto-spins smoothly with user drag-and-drop interactivity.
- Location Pins (Markers): Pinpoint latitude and longitude coordinates with illuminated beacon dots.
- High-DPI Canvas Rendering: Crisp presentation across Retina and high-density mobile screens.
- Low Performance Overhead: Lightweight WebGL shader implementation designed to minimize CPU and battery impact.
Adding Location Markers
- In the block inspector, locate the Markers panel.
- Click Add Marker.
- Provide the location parameters:
- Latitude (
lat): Float coordinate between-90and90(e.g.40.7128). - Longitude (
lng): Float coordinate between-180and180(e.g.-74.0060). - Label: Location or project name (e.g.
Nairobi Community Health Center).
- Latitude (
- Markers render as glowing pinpoint nodes orbiting with the globe geometry.
Block Inspector Settings
| Setting | Type | Default | Description |
|---|---|---|---|
autoRotate | Toggle | true | Automatically spin the globe when idle. |
rotateSpeed | Number | 0.003 | Angular velocity coefficient for auto-rotation. |
enableDrag | Toggle | true | Allow visitors to click/touch and drag to rotate the view. |
mapBrightness | Number | 6 | Surface landmass luminesce and dot intensity. |
markers | Array | [] | List of geographic coordinate pins. |
Technical & Hosting Notes
- WebGL Compatibility: Requires browser WebGL support (standard in all modern browsers).
- Content Security Policy (CSP): If your hosting provider or security plugin enforces strict CSP headers, ensure
canvasrendering and WebGL shaders are not blocked. - Static Fallback: For environments without WebGL or low-power devices, consider wrapping the block inside a parent container with an evocative background fallback image.