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

entangled-worlds-orbiters-shared

v6.0.3

Published

Shared library for entangled worlds orbiters - contains core world rendering, moons system, and UI components

Readme

Entangled Worlds Orbiters Shared Library

A shared library containing core components for 3D world rendering, moons system, and UI components used across Entangled Worlds applications.

Features

  • World System: Core world rendering with textured spheres, normal materials, GLB models, and cloud shells
  • Moons System: Orbital moon generation and management
  • Loaders: Texture and GLB loading utilities
  • Core Rendering: Lighting, Fresnel effects, and material utilities
  • Configuration: Texture and configuration management system

Installation

npm install entangled-worlds-orbiters-shared

Test locally

In entangled-worlds-orbiters-shared/:

npm install
npm run build   # consumers run dist/: build again after every change
npm link

In the consuming app (entangled-worlds/ or orbiters/):

npm link entangled-worlds-orbiters-shared

Usage

// Import specific modules
import { WorldManager } from 'entangled-worlds-orbiters-shared/world';
import { MoonsManager } from 'entangled-worlds-orbiters-shared/moons';

// Or import everything
import * as EntangledWorlds from 'entangled-worlds-orbiters-shared';

Modules

World System

  • WorldManager - Main world orchestration
  • worldTexture - Textured sphere generation
  • worldNormal - Normal material spheres
  • worldGLB - GLB model loading
  • cloudShell - Cloud rendering system

Moons System

  • MoonsManager - Moons orchestration
  • moonsGeneration - Moon generation logic

Loaders

  • glbLoader - GLB loading utilities
  • bodyTextureLoader - Texture loading

Core

  • lights - Lighting setup
  • lightFresnel - Fresnel glow effects

Utils

  • materials - Material utilities
  • dispose - Memory management

Configuration

  • textureConfig - Texture configuration system

Star (entangled-worlds-orbiters-shared/star)

  • createStar, StarManager - The host star of a world: single, binary or trinary, emissive, shader-only glow (two draw calls for any multiplicity; lights nothing)
  • DEFAULT_STAR_PARAMS, normalizeStarParams - Author params (temperature, radius, luminosity, activity, multiplicity, separation, seed, placement) + validator for stored params
  • starParamsFromStellarData - Catalogue host-star data (Teff, radius, mass, luminosity, spectral type, star count or a "(AB)b" name suffix) → params
  • blackbodyColor, spectralClass, starLayout, starPositions - Pure colour / layout / orbit helpers
  • getFocus (on createStar / StarManager), framingDistance, defaultStarPlacement - Camera focus on the system barycentre and the default placement (over the camera's shoulder, so worlds open on their day side)
  • The star lights the scene: StarManager key + camera-side fill lights, setLighting, lightingFromLegacy, DEFAULT_AMBIENT (pair with setHemisphereEnabled(scene, false) from ./core; moons emissiveLift, GLB emissiveIntensity for night sides)
  • Real binaries (close pair from component masses, a distant companion for wide pairs) and an optional debris disc; mainSequenceTemperature / Radius / Luminosity helpers
  • Perf + look harness: npm run bench:star (see bench/star/results/REPORT.md)

Capabilities → moved

The capability registry (createCapabilityRegistry, validate / assertValid, the error taxonomy) moved to its own package, plantasia.space-orchidea/capabilities (removed here in 3.0.0).

Studio session (entangled-worlds-orbiters-shared/studio)

  • createHistory - Snapshot undo/redo with injected snapshot/restore
  • createAutosaveSession - Debounced autosave state machine (dirty / in flight / queued / host ack)
  • createPatchStore, makeHeaderBroadcast - Header mirror for a UI that mounts after the controller
  • createStatusChannel - Status-line seam ("Saving…", "Saved")
  • isTrustedHostOrigin, isEmbedded, postToHost - Host-frame transport

Note head programs (entangled-worlds-orbiters-shared/faust)

  • buildVoiceProgram, buildHeadPrograms - Compose a rack's note head into FAUST source, keyed by shape
  • exportHead - Compose, compile, shrink, size and stamp a head's programs; the compiler and the shrink tool are handed in
  • recipesFingerprint, readRecipes, readHeadShape, programsNamespace - The recipes file a build publishes, and the checks a release step makes on it
  • largestFunction, shrinkWasm - The size check and the shrink step

Keyboard shortcuts (entangled-worlds-orbiters-shared/shortcuts)

  • ShortcutAction - One catalogue entry: id, label (+ names by language), defaultKeys (named as a US keyboard names them, event.code; a press matches by the character it types, by its place only where it types no US character, so keys work on any keyboard), scope
  • matchShortcut(event, bindings) - Which action a press is, or null: modifiers, a field being typed in and surface claims decided in one place
  • Key strings: Shift+KeyR, Mod+KeyZ (Ctrl or ⌘), Shift?+KeyQ (Shift may be held); parseChord, chordsOverlap
  • resolveBindings(catalogue, overrides), findClashes - Defaults plus a person's overrides ([{ id, keys }] as their settings store them, keys: [] unbinds), and the clash check
  • claimKeys, isKeyClaimed - A surface (an on-screen keyboard) takes letters away from the shortcuts while it is up
  • createShortcutSource({ readCatalogue, readAccount }) - The catalogue (every app's actions and default keys, served by the backend: this package holds none) and a person's own keys, read at start and again when the page comes back to the front; actions(...sectionIds), bindings(actions), subscribe
  • parseCatalogue, sectionActions, findSection, shortcutApps, localName - Reading a served catalogue and its names in a language

Uploads (entangled-worlds-orbiters-shared/uploads)

  • uploadViaSignedUrl - The API's signed-URL upload: /spaces/upload-init → PUT → /spaces/upload-complete, over the app's own authenticated JSON caller
  • putToSignedUrl - The storage PUT alone, with progress and abort

Runtime base configuration (env)

This package is built statically. At runtime, it can use a public base URL to turn relative asset paths into absolute URLs. If you don’t provide a base, it will use same-origin root-relative paths (e.g., /default/...).

You have two ways to provide it:

  1. Environment variables (no code needed):

If your bundler/framework defines import.meta.env.VITE_PUBLIC_HERBARIUM_BASE (Vite) or you set window.VITE_PUBLIC_HERBARIUM_BASE (before the library runs), the library will pick it up automatically.

  1. Programmatic override (recommended for portability):
import { setPublicBase, loadTextureConfig } from 'entangled-worlds-orbiters-shared/config';

// Call this early at app startup (optional if you use envs/window)
setPublicBase(
	(typeof import.meta !== 'undefined' && import.meta.env && import.meta.env.VITE_PUBLIC_HERBARIUM_BASE) ||
	(typeof process !== 'undefined' && process.env && process.env.NEXT_PUBLIC_HERBARIUM_BASE)
);

// Optionally preload a remote config file
// await loadTextureConfig('https://your-cdn/config/textures.json');

Is setPublicBase required?

  • Not required. If you don’t provide any base (via env/window/programmatic), the library will use same-origin root-relative URLs.
  • Also not required if you provide VITE_PUBLIC_HERBARIUM_BASE via env (Vite) or set window.VITE_PUBLIC_HERBARIUM_BASE before using the library.
  • Use setPublicBase when you want to:
    • Override the base at runtime (e.g., switch between staging/production dynamically)
    • Avoid build-time coupling to a specific bundler env key
    • Ensure the base is set in environments where env injection isn’t available

Defaults:

  • If nothing is provided, it falls back to same-origin root-relative paths.

Effects:

  • All URLs returned by config/textureConfig helpers are absolute.
  • Moons generation resolves relative paths against the configured base.
  • Cloud shell textures passed to world.makeSphere are resolved to absolute URLs.

Peer Dependencies

This library requires Three.js as a peer dependency:

npm install three

License

MIT © Plantasia Space.