starmap
v0.1.0-beta.0

A star universe you can query.

Describe your systems as a typed object. Get back indexes, routes and orbital positions over time — then draw the whole thing as SVG. Two libraries, and neither one of them wants to be your game engine.

galaxy.ts
import { createGalaxy, findRoute } from '@industrieh/starmap'
import { renderGalaxy } from '@industrieh/starmap-render'

const galaxy = createGalaxy({
  systems: [
    { id: 'sol', name: 'Sol', x: 0, y: 0, star: { class: 'G', radius: 18 } },
    { id: 'alpha', name: 'Alpha', x: 400, y: 300, star: { radius: 14 } },
  ],
  lanes: [{ from: 'sol', to: 'alpha' }],
})

findRoute(galaxy, 'sol', 'alpha') // ['sol', 'alpha']
renderGalaxy(galaxy)              // '<svg …>'

No dependencies

Neither library pulls anything in. Read the lockfile.

No DOM, no framework

The renderer returns a string. Where it goes is yours.

Typed all the way

Every export carries an explicit signature, checked in CI.

The two libraries

They ship separately on purpose. Take the model alone if you draw your own; take both if you want pixels without writing an SVG by hand.

@industrieh/starmap
v0.1.0-beta.0
Describe, validate and query a star universe.
@industrieh/starmap-render
v0.1.0-beta.0
Turn a universe into SVG. Strings, not components.