Skip to main content

Overview

The interactive 3D globe is the centerpiece of the 200 Mates project, displaying mate submissions from around the world. The globe features auto-rotation, zoom controls, country highlighting, and interactive mate markers.
The globe uses WebGL technology and requires a modern browser with hardware acceleration enabled for optimal performance.

Globe Controls

The globe supports multiple interaction methods for navigation and exploration.

Rotation

Auto-Rotation

The globe automatically rotates at a gentle speed (0.4) when not being interacted with, allowing you to see all regions.

Manual Rotation

Click and drag anywhere on the globe to rotate it manually. Auto-rotation pauses during interaction.

Auto-Rotation Behavior

The auto-rotation feature intelligently responds to your interactions:
1

On Mouse/Touch Start

Auto-rotation stops immediately when you click or touch the globe.
2

On Mouse/Touch End

After releasing, auto-rotation resumes after 2 seconds of inactivity (when not zoomed in).
3

On Mouse Leave

If your cursor leaves the globe area, auto-rotation resumes after 1.2 seconds.

Zoom Controls

  • Mouse Wheel: Scroll up to zoom in
  • Trackpad: Pinch to zoom gesture
  • Touch Devices: Pinch with two fingers to zoom
Zoom threshold: Altitude below 2.5 is considered “zoomed in”
  • Mouse Wheel: Scroll down to zoom out
  • Trackpad: Reverse pinch gesture
  • Touch Devices: Spread two fingers apart
When altitude reaches 2.5 or higher, auto-rotation resumes after 0.8 seconds
Zoom State Behavior:When zoomed in (altitude < 2.5):
  • Auto-rotation is disabled
  • You have full manual control
  • Pan controls are disabled to maintain globe focus
When zoomed out (altitude ≥ 2.5):
  • Auto-rotation resumes automatically
  • Overview mode restored

Globe Features

Visual Appearance

The globe renders with carefully chosen visual settings:

Earth Texture

Dark earth texture provides contrast for mate markers and highlighted countries.

Background

Pure black background (#000000) creates an immersive space atmosphere.

Initial View

Globe starts at coordinates (20°N, 20°W) with altitude 2.5 for optimal overview.

Polar Constraints

View angle constrained between 36° and 144° to prevent disorienting perspectives.

Responsive Sizing

The globe automatically adjusts to your screen size:
  • Initial Load: Globe sizes to fit its container
  • Window Resize: Globe dimensions update in real-time
  • Mobile/Desktop: Optimized for all screen sizes

Country Polygons

Countries are represented as 3D polygons with interactive highlighting.

Polygon Colors

1

Selected Country

Color: Gold (#c8a46e)Altitude: 0.02 (raised)When you click a country or it’s selected in the form, it highlights in gold.
2

Countries with Mates

Color: Green (#6A8F60)Altitude: 0.012 (slightly raised)Countries where at least one mate has been submitted appear in green.
3

Other Countries

Color: Near-transparent white (rgba(255,255,255,.04))Altitude: 0 (flat)Countries without submissions remain subtle.

Polygon Interaction

Click to Select

Click any country polygon to:
  • Highlight it in gold
  • Auto-fill the country field in the submission form
  • Pause globe rotation for easier viewing
Polygon styling:
  • Stroke color: Dark gray (#2a2e24) for borders
  • Side color: Transparent black (rgba(0,0,0,.2)) for depth
  • Hover cursor: Changes to pointer over countries

Mate Markers

Each approved mate submission appears as an interactive marker on the globe.

Marker Appearance

Emoji Icon

Mates are represented by the 🧉 emoji (mate cup icon) with a drop shadow for visibility.

Hover Effect

The emoji scales to 135% size when you hover over it, indicating it’s clickable.

Marker Jitter System

To prevent markers from overlapping when multiple mates are submitted from similar locations, the globe implements an intelligent “jitter” algorithm:
  1. Grouping: Markers within 0.1° of each other are grouped together
  2. Distribution: Grouped markers are arranged in a circle pattern
  3. Spacing: Each marker is offset 1.2° from the center in a unique direction
  4. Angle Calculation: Markers are evenly distributed around 360° based on group size
This ensures all markers remain visible and clickable even in dense regions.

Marker Hover Cards

When you hover over a mate marker, a detailed information card appears:

Info Card Contents

Photo: Thumbnail of the mate photo (160px wide, max 120px height)Name: Submitter’s name (or “Anónimo” if none provided)Country: Country name with 🌍 globe emojiYerba Brand: Brand name with 🌿 herb emojiMate ID: Unique identifier with # symbol for reference

Card Positioning

The hover card intelligently positions itself:
1

Space Detection

Card checks available space above the marker (80px margin from top)
2

Above or Below

  • If space available: Card appears above the marker (bottom: 36px)
  • If insufficient space: Card appears below the marker (top: 36px)
3

Animation

Card fades in with scale animation (0.85 to 1.0) over 180ms
Auto-rotation pauses when hovering over markers to allow comfortable viewing of the card.

Click to View Details

Lightbox View

Click any mate marker to open the full lightbox view with complete details, larger photo, and copy-to-clipboard functionality for the mate ID.

Animated Arcs

The globe displays animated connection arcs between consecutive mate submissions.

Arc Animation

Connection Pattern

Arcs connect mates in chronological order, showing how the tradition spreads across the globe.

Visual Style

Dual-color gradient: Green (rgba(106,143,96,.6)) to Gold (rgba(200,164,110,.6))

Arc Properties

  • Altitude Scale: 0.4 (moderate curve height)
  • Stroke Width: 0.5
  • Dash Length: 0.4
  • Dash Gap: 0.2
  • Animation Duration: 2.5 seconds per arc
  • Cycle Rate: New arc every 2.5 seconds
Arcs only display when there are at least 2 approved mates on the map.

Programmatic Camera Movements

The globe performs automatic camera movements during certain actions.

After Submitting a Mate

When you submit a mate with GPS coordinates:
1

Zoom to Location

Camera animates to your submission location (altitude 0.8) over 1.5 seconds
2

Hold at Location

Camera holds at your location for 4 seconds
3

Return to Overview

Camera returns to overview position (lat: 20, lng: -20, altitude: 2.5) over 1.5 seconds
4

Resume Auto-Rotation

Auto-rotation resumes after the animation completes
isProgrammaticMove Flag:During camera animations, the isProgrammaticMove flag is set to true to prevent zoom-state detection from interfering with the animation sequence.

Performance Considerations

Polygon Rendering

60ms debounce prevents excessive re-renders when countries are selected

Marker Updates

Markers only re-render when the list of mate IDs changes

Responsive Updates

Globe dimensions update on window resize events

Animation Cleanup

Timers are properly cleared to prevent memory leaks

Tips for Best Experience

Let the globe auto-rotate for a few seconds to get a sense of the global distribution before interacting.
Look for green-highlighted countries to find regions with active mate communities.
Hover over markers to see quick info without clicking, or click for full lightbox view.
Click countries directly on the globe to quickly fill the form when submitting your own mate.

Submitting Your Mate

Learn how to submit your own mate to appear on the globe

Gallery Features

Explore the gallery and lightbox features for viewing mates

Build docs developers (and LLMs) love