JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q22194F
  • License MIT

Generate astronomy themed scalable vector graphics (SVG) images easily.

Package Exports

  • astronomy-svg
  • astronomy-svg/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (astronomy-svg) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

astronomy-svg

astronomy-svg is a lightweight tool to generate astronomy-themed Scalable Vector Graphics (SVG) images easily. Perfect for web developers, educators, astronomers, and space enthusiasts who want beautiful, customizable visuals of space elements without needing to design from scratch.


🚀 See It in Action!

These tiles were generated using the astronomy-svg library.

👉 Check out the live demo here

View Demo


🪐 Features

  • Visual representation of astronomical data from any location on Earth
  • Simple API to generate SVG tiles
  • Lightweight
  • Embeddable in websites, apps, presentations, and documents
  • 🔭 Includes Pluto!

Quickstart

🌐 Using the Browser-Ready Minified Script

<script type="text/javascript" src="astronomy-svg.min.js"></script>
// latitude, longitude
let astronomySVG = AstronomySVG.initialize(56.2, 18.1)
// 100px, isRectangular=false.
astronomySVG.drawSunAltitudePath(100, false);

🌟 Installation (npm)

npm install astronomy-svg

Using the JavaScript ES Module

import { AstronomySVG } from "astronomy-svg";
// latitude, longitude
let astronomySVG = AstronomySVG.initialize(56.2, 18.1)
// 100px, isRectangular=false.
astronomySVG.drawSunAltitudePath(100, false);

📄 License

This project is licensed under the MIT License — feel free to use, modify, and share it.
Please make sure to retain the original license and attribution when reusing or modifying the code.
See the LICENSE file for full details.