Github Globe

A 3D interactive globe visualization with customizable arcs, points, and animation options inspired from Github.

API

Prop NameTypeDefaultDescription
globeConfigobject{}Configuration options for the globe, including colors, atmosphere, rotation speed, and lighting.
dataPosition[][]Array of positions representing arcs and points on the globe, with latitude, longitude, color, etc.
classstring""Additional CSS classes for custom styling.

globeConfig Properties

PropertyTypeDefaultDescription
pointSizenumber1Size of individual points on the globe.
globeColorstring"#1d072e"Color of the globe surface.
showAtmospherebooleantrueWhether to display atmosphere around the globe.
atmosphereColorstring"#ffffff"Color of the atmosphere around the globe.
atmosphereAltitudenumber0.1Altitude of the atmosphere layer.
emissivestring"#000000"Emissive color for the globe material.
emissiveIntensitynumber0.1Intensity of the emissive color.
shininessnumber0.9Shininess of the globe material.
polygonColorstringrgba(255,255,255,0.7)Color of polygon boundaries on the globe.
arcTimenumber2000Duration for arcs animation.
arcLengthnumber0.9Length of arcs on the globe.
ringsnumber1Number of rings to display per point.
maxRingsnumber3Maximum rings around each point.
initialPositionobject{ lat: 0, lng: 0 }Initial latitude and longitude for the globe's position.
autoRotatebooleanfalseAutomatically rotate the globe.
autoRotateSpeednumber0.8Speed of auto-rotation when enabled.

data Structure (Position)

FieldTypeDescription
ordernumberOrder of the point or arc for sequencing.
startLatnumberStarting latitude for an arc.
startLngnumberStarting longitude for an arc.
endLatnumberEnding latitude for an arc.
endLngnumberEnding longitude for an arc.
arcAltnumberAltitude of the arc (determines arc height).
colorstringColor of the arc or point in hex or RGB format.

Component Code

You can copy and paste the following code to create this component:

GithubGlobe.vue

Features

  • 3D Interactive Globe: A Three.js-based globe with interactive controls and orbit support.
  • Customizable Globe & Atmosphere: Allows configuration of globe color, atmosphere visibility, and colors.
  • Arcs & Points Visualization: Display arcs and points on the globe, simulating connections and locations.
  • Auto-Rotate and Zoom: Supports auto-rotation, zoom, and customizable controls for a dynamic experience.
  • Responsive Design: Adapts to container size and maintains performance with WebGL rendering.

Credits

  • Built with Three.js and Three Globe libraries, designed for global data visualizations and dynamic effects.
  • Ported from Aceternity UI.