Celestialengine
The universe, at your site.
Install / Use
/learn @karno/CelestialengineREADME
celestialengine🪐
The universe, at your site.
This component introduces a planetarium to your React webpage.
demo: https://celestian.io/engine
Prerequisites
- React
- Three.js
- react-three-fiber
- react-three-postprocessing
Installation
npm install celestialengine
you probably also need to install these libraries:
npm install react three @react-three/fiber @react-three/postprocessing
How to use
1. Prepare star data
Before installing components into your page, you have to download & extract star data.
cdinto thepublicfolder- Execute
npx get-star-db
2. Install components into your page
<CelestialEngineProvider
metadataSource="./dat_hp_meta.json"
initialProps={{ vMag: 5.0 }}
>
<CelestialCanvas useEngine={true} />
</CelestialEngineProvider>
3. Control the properties
import { deg, useCelestialEngine } from "celestialengine";
import { useEffect } from "react";
...
const { setProps } = useCelestialEngine();
useEffect(() => {
setProps((p) => ({
...p,
controllable: true,
selectable: true,
vMag: 7.0,
altitude: deg(60),
}))
}, []);
see properties.ts and contexts/contextProperties.ts.
How does it work?
celestialengine renders the starry skies on the Canvas via ThreeJS and react-three-fiber.
This module includes:
- star renderer, it can render over one-hundred thousand stars (although depends on the performance of the client).
- constellation lines and navigation lines, it is a handy hint to find stars.
- astrometric calculations, render the actual sky corresponding to the actual location, time, and observation az/alt.
Redux compatibility?
Remove <CelestialEngine> and manage CelestialEngineProps in your redux store, then seed the CelestialEngineProps to <CelestialCanvas>.
Related Skills
bluebubbles
327.7kUse when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration). Calls go through the generic message tool with channel="bluebubbles".
node-connect
327.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
slack
327.7kUse when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
frontend-design
80.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
