Wakusei Planets documentation
Wakusei Planets 惑星 — The Sun, planets and moons for the web
The Sun, the planets and their moons as a clean line drawing, a shaded realistic drawing or a painted surface map, with real sizes, tilt and rotation, and the moons where they are at any date and time.
Install
npm install @johnmorrisdotca/wakusei-planets
Start here
Entry points
| Import it | What it is |
|---|---|
@johnmorrisdotca/The <wakusei-body> element · 5 exports | |
@johnmorrisdotca/The <wakusei-portrait> element: many bodies in one scene · 3 exports | |
@johnmorrisdotca/Where the Sun, Moon and planets are for a date, in two scales, with the camera maths · 25 exports | |
@johnmorrisdotca/The <wakusei-space> element: the Earth, Moon, Sun and planets in their places · 12 exports | |
@johnmorrisdotca/Julian dates (and the julian package's functions), calendars, time scales, sidereal time and Mars time · 37 exports | |
@johnmorrisdotca/The 5,080 stars you can see without a telescope: names, positions, proper motion, distance and colour (about 100 kB gzipped) · 9 exports | |
@johnmorrisdotca/Printable colouring sheets for children: the Sun, the planets and the big moons as thick-line pictures with the real colours and three facts, and all the planets in a row at one scale, in English and Japanese · 11 exports | |
@johnmorrisdotca/The bodies nearest to a body on a date, in the sky or in space, and when two bodies come closest: nearest, within, closestApproach and conjunctions · 17 exports | |
@johnmorrisdotca/Ten famous spacecraft (Voyager, New Horizons, Pioneer, Cassini, Galileo, Juno, Parker Solar Probe, Webb): facts, events, and where each is at any date from launch to the end of its record · 14 exports | |
@johnmorrisdotca/The Sun and Moon from a place: position, sunrise and sunset, Moon rise, set and phase, with suncalc 2's names and a better engine · 13 exports | |
@johnmorrisdotca/The same, with suncalc 1's conventions (radians, azimuth from south) · 12 exports | |
@johnmorrisdotca/Every dwarf planet's fitted position table (Ceres and the seven slower ones) and the moon theories for Jupiter's and Saturn's moons, so heliocentric and moonVector are as close as the accuracy guide says · 0 exports | |
@johnmorrisdotca/Ceres's fitted position table, 1900 to 2100 (about 14 kB gzipped) · 0 exports | |
@johnmorrisdotca/The fitted position tables of Orcus, Haumea, Quaoar, Makemake, Gonggong, Eris and Sedna, 1800 to 2200 (about 5 kB gzipped) · 0 exports | |
@johnmorrisdotca/Finer VSOP87B series for Mercury to Neptune, within 2 arc-seconds of Horizons on 60 dates from 1800 to 2200 (about 32 kB gzipped; not in ./tables) · 0 exports | |
@johnmorrisdotca/Io, Europa, Ganymede and Callisto from the theory L1.2 (Lainey, Duriez and Vienne), 1130 to 2760 (about 5 kB gzipped) · 0 exports | |
@johnmorrisdotca/Mimas, Enceladus, Tethys, Dione, Rhea, Titan and Iapetus from the theory TASS1.7 (Vienne and Duriez) (about 7 kB gzipped) · 0 exports | |
@johnmorrisdotca/How a body is drawn with three.js · 5 exports | |
@johnmorrisdotca/Bodies as objects for your own three.js scene · 12 exports | |
@johnmorrisdotca/Every body's shaded look · 0 exports | |
@johnmorrisdotca/The Sun's shaded look · 0 exports | |
@johnmorrisdotca/Mercury's shaded look · 0 exports | |
@johnmorrisdotca/Venus's shaded look · 0 exports | |
@johnmorrisdotca/Mars's shaded look · 0 exports | |
@johnmorrisdotca/Jupiter's shaded look · 0 exports | |
@johnmorrisdotca/Saturn's shaded look · 0 exports | |
@johnmorrisdotca/Uranus's shaded look · 0 exports | |
@johnmorrisdotca/Neptune's shaded look · 0 exports | |
@johnmorrisdotca/Pluto's shaded look · 0 exports | |
@johnmorrisdotca/The dwarf planets: shaded looks (Ceres, Orcus, Haumea, Quaoar, Makemake, Gonggong, Eris, Sedna) · 0 exports | |
@johnmorrisdotca/The Moon's shaded look · 0 exports | |
@johnmorrisdotca/Phobos and Deimos: shaded looks · 0 exports | |
@johnmorrisdotca/The Galilean moons: shaded looks · 0 exports | |
@johnmorrisdotca/Saturn's moons: shaded looks · 0 exports | |
@johnmorrisdotca/Uranus's moons: shaded looks · 0 exports | |
@johnmorrisdotca/Neptune's moons: shaded looks · 0 exports | |
@johnmorrisdotca/Pluto's moons: shaded looks · 0 exports | |
@johnmorrisdotca/The dwarf planets' moons: shaded looks (Vanth, Hiʻiaka, Namaka, Dysnomia) · 0 exports | |
@johnmorrisdotca/The Earth, drawn by chikyu-earth · 0 exports | |
@johnmorrisdotca/Pure coordinate conversions · 15 exports | |
@johnmorrisdotca/Facts, line drawings and positions · 57 exports |
Guides
How-to
- In a plain HTML page, from a CDNAdd a planet to any page with one script tag from jsDelivr or unpkg, and a shaded one the same way.
- With Vite or webpackImport the element in a bundled app, pick only the bodies you need, and keep three.js out of a page of line drawings.
- Put it in your pageSet up a body in the demo, then copy working code for plain HTML, an ES module, React, Vue, Angular, Svelte or an iframe.
- In React, Vue, Svelte and AngularA component for each framework, with the browser-only import done where a server render never reaches it.
- Embed in an iframeShow a body in somebody else's page with one iframe and no script of your own.
- TypeScript and NodeDraw a body as an SVG string on a server, ask where a moon is, and use the types.
- Looks and bodiesThe looks, each body's own entry point, three.js, pictures and the budget that keeps the page light.
- The portrait builderPut any bodies of the solar system in one picture, arrange them, light them, and take the code or a saved picture.
- Moons and timeA planet with its moons where they are on a date and time, and time that runs fast.
- In your own three.js scenePut the real Sun, planets, Pluto and moons into a three.js scene you already have, lit from any direction, with chikyu-earth's space view as the example.
- Coordinate conversionsPure coordinate rotations in degrees, with named frames and AU components.
- The Sun and Moon from a placePosition, sunrise and sunset, Moon rise, set and phase from a latitude and longitude, with suncalc 2's names and a better engine.
- TimeJulian dates, calendars, time scales, sidereal time and Mars time, in a few kilobytes with no dependencies.
- The stars you can see without a telescope5,080 stars to magnitude 6.0 with names, positions, proper motion, distance and colour, about 100 kB gzipped and no dependencies.
- The space viewThe Earth, the Moon, the Sun and the planets in their places for any date, with the Moon's phase and the Earth's day side coming from the real Sun. Two scales, time both ways, a zoom from the Earth out to the whole solar system.
- Riding alongPut the camera on a moving point, a moon, a planet or anything of your own, and look at the body it goes round, straight down or at the horizon, for any body by its radius.
- Famous spacecraftTen famous spacecraft, from Pioneer 10 to the Webb telescope: facts, the events of the voyage, and where each one is on any date, fitted to JPL Horizons. Each craft is a table of its own, 2 to 127 kB gzipped.
- What is nearby, and when bodies come closeThe bodies nearest to a body on a date, by angle in the sky or distance in space, and the moments two bodies come closest, checked against JPL Horizons to seconds of time.
- Zoom and panEvery view in the package zooms and moves with a drag, a pinch, the wheel and the keys, with no controls on the page. The zoom range of each element, why each ends where it does, and how to turn the hands off or add the family's bar.
- Colouring sheets for childrenPrintable colouring sheets of the Sun, the planets and the big moons, with thick lines, the real colours and three facts, on A4 or US Letter, in English and Japanese, and the ready-made PDFs.
- Data filesDownload tables of bodies, orbits and spacecraft.
- Serve it yourselfRun a small JSON service on your own computer.
Explanation
- Why two packagesWhat wakusei-planets does and what chikyu-earth does, which one to install, and how they work alone and together.
- How it worksWhere the numbers come from, how a body is turned toward you and why a page of them stays light.
- ArchitectureHow the facts, the positions, the line drawing, the shaded look and the element fit together, and why the pure side runs anywhere.
- AccuracyHow far the planets' and moons' positions are from JPL Horizons, body by body, and how each was made.