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

@earthos/globe

v0.1.0

Published

EarthOS globe renderer: shader Earth, atmosphere, camera, 100k points pipeline

Downloads

224

Readme

@earthos/globe

The React Three Fiber globe renderer for EarthOS: shader Earth, atmosphere, orbit camera, and the GPU point pipeline that draws 100k moving objects in one draw call.

This is the rendering layer beneath the EarthOS SDK. EarthCanvas assembles the R3F <Canvas>, the shader globe, the orbit camera, and the plugin layer host around one EarthEngine; plugins mount their own layers into it. Everything time-driven pulls from the engine inside useFrame, so React never rerenders per frame. Scene units are kilometers (1 unit = 1 km) with the origin at Earth's center.

Install

pnpm add @earthos/globe

Peer dependencies, each of which must be deduped to a single instance: react (^19), three (>=0.170), @react-three/fiber (^9), and @react-three/drei.

Usage

import { EarthCanvas } from '@earthos/globe';

<EarthCanvas
  textures={{ day: '/earth-day.jpg', night: '/earth-night.jpg', clouds: '/clouds.png' }}
  stars
  moon
  idleCinematicAfterS={20}
/>;

EarthCanvas must render client-side only (the SDK wraps it in next/dynamic with SSR disabled). Pass your own engine prop to share an EarthEngine, or let it create one.

What's inside

  • EarthCanvas, GlobeScene, GlobeCamera: the assembled canvas, the shader globe scene (day/night/specular, clouds, atmosphere rim, stars, real sun and moon positions), and the floating-origin orbit camera with a min-altitude clamp, fly-to, entity follow, and a dynamic near plane.
  • ExtrapolatedPointsLayer: the 100k-point pipeline. Feed it worker BatchView batches of interleaved position and velocity; the vertex shader Taylor-extrapolates p0 + v0 * dt - 0.5 * mu * p0 / |p0|^3 * dt^2 per frame, so the per-frame cost is one uniform write and one draw call. Earth-horizon occlusion runs in the shader.
  • pickExtrapolated, pickToleranceRad, rayToLocal: CPU picking that runs the exact same extrapolation the GPU draws, so hits match pixels.
  • EarthFixedGroup, useEarthFixed: the GMST-rotating Earth-fixed frame. Portal ground-locked content in, authored in swizzled-ECEF local coordinates (see geodeticToScene in @earthos/gis).
  • trackersOf, registerTracker, localPointToWorld: the follow-camera tracker registry that lets a moving layer answer "where is entity X right now" in world space.
  • createGlobeMaterial, createAtmosphereMaterial, loadTexture, useOptionalTexture: the raw shader materials and non-suspending texture loading.

Most apps reach these through the SDK's <Earth/> rather than directly. See docs/RENDERING.md and docs/ARCHITECTURE.md for the render pipeline, and docs/PLUGIN_GUIDE.md for building layers on ExtrapolatedPointsLayer.

Part of EarthOS. MIT licensed.