npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

realtime-globe

v0.1.1

Published

A high-performance, interactive 3D globe component for React, built with Three.js and Globe.gl. Perfect for visualizing real-time data, visitor tracking, or global networks.

Downloads

94

Readme

Realtime Globe 🌍

A high-performance, interactive 3D globe component for React, built with Three.js and Globe.gl. Perfect for visualizing real-time data, visitor tracking, or global networks.

License Version

✨ Features

  • High-Performance Rendering: Built on Three.js and Globe.gl for smooth 60fps animations.
  • Dynamic Themes: Switch between Minimal, Earth Night, and Earth Day modes.
  • Interactive Data: Support for Points, Arcs, Rings, and HTML markers.
  • Smart Zooming: Automatic level-of-detail adjustments and label visibility.
  • Atmospheric Effects: Realistic atmosphere glow and custom backgrounds.
  • Fully Typed: Comprehensive TypeScript definitions included.

📦 Installation

This package requires react, react-dom, and three as peer dependencies.

npm install realtime-globe three
# or
yarn add realtime-globe three
# or
pnpm add realtime-globe three

🚀 Basic Usage

import React from 'react';
import { Globe } from 'realtime-globe';

function App() {
  const points = [
    { 
      lat: 40.7128, 
      lng: -74.0060, 
      size: 0.5, 
      color: '#ff0000', 
      label: 'New York' 
    },
    { 
      lat: 51.5074, 
      lng: -0.1278, 
      size: 0.5, 
      color: '#00ff00', 
      label: 'London' 
    }
  ];

  return (
    <div style={{ height: '100vh', width: '100%' }}>
      <Globe 
        points={points}
        config={{
          theme: 'earth-night',
          enableAtmosphere: true
        }}
        onPointClick={(point) => console.log('Clicked:', point)}
      />
    </div>
  );
}

📖 API Reference

<Globe /> Component

The main component for rendering the 3D globe.

| Prop | Type | Description | |------|------|-------------| | config | GlobeConfig | Configuration object for visual appearance. | | points | DataPoint[] | Array of points to render on the globe surface. | | arcs | ArcData[] | Array of arcs (lines) connecting points. | | rings | RingData[] | Array of animated rings (ripples) at specific coordinates. | | labels | LabelData[] | Text labels to display at coordinates. | | htmlElements | VisitorData[] | Custom HTML markers (useful for avatars/tooltips). | | width | number | Width of the globe container (defaults to 100%). | | height | number | Height of the globe container (defaults to 100%). | | onPointClick | (point, event, coords) => void | Callback when a point is clicked. | | onGlobeReady | () => void | Callback when the globe is fully initialized. |

Configuration (GlobeConfig)

Pass this object to the config prop to customize the globe's appearance.

| Property | Type | Default | Description | |----------|------|---------|-------------| | theme | 'minimal' \| 'earth-night' \| 'earth-day' \| 'earth-blue' | 'minimal' | Preset visual themes. | | enableAutoRotate | boolean | false | Whether the globe should rotate automatically. | | autoRotateSpeed | number | 0.5 | Speed of auto-rotation. | | enableAtmosphere | boolean | true | Show atmospheric glow. | | atmosphereColor | string | '#3a228a' | Color of the atmosphere. | | backgroundColor | string | '#000011' | Background color of the scene. | | globeImageUrl | string | null | Custom texture URL for the globe surface. | | bumpImageUrl | string | null | Custom bump map URL for topography. |

Data Types

DataPoint

interface DataPoint {
  lat: number;
  lng: number;
  color?: string;
  size?: number;
  altitude?: number;
  label?: string;
  customData?: any;
}

ArcData

interface ArcData {
  startLat: number;
  startLng: number;
  endLat: number;
  endLng: number;
  color?: string | string[];
  altitude?: number;
  strokeWidth?: number;
  dashLength?: number;
  animationTime?: number;
}

🛠️ Local Development

To run the example dashboard included in this repository:

  1. Clone the repository

    git clone https://github.com/yourusername/realtimeglobe.git
    cd realtimeglobe
  2. Install dependencies

    npm install
  3. Start the development server

    npm run dev

📄 License

MIT