Skip to the content

Wakusei Planets惑星

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.

Wakusei is the Japanese word 惑星 for a planet. About the name

Contents

How-to

Embed in an iframe

Show a body in somebody else's page with one iframe and no script of your own.

The embed page draws what its address says and fetches nothing but its own files, so it is safe to put in any page. The example was run in a browser by the package's tests.

The embed frame: Jupiter with its four large moons on their orbits, drawn on a transparent page.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Wakusei Planets in an iframe</title>
  </head>
  <body>
    <iframe
      src="https://johnmorrisdotca.github.io/wakusei-planets/embed.html?body=saturn&look=line"
      title="Saturn"
      width="420"
      height="420"
      loading="lazy"
      style="border: 0"
    ></iframe>
  </body>
</html>

The address takes these choices:

QueryMeaning
bodywhich body, jupiter by default
lookline (the default), realistic or painted; the shaded looks need WebGL and fall back to the line drawing
timenow or an ISO date: the body as the Earth sees it then. A portrait when left out
moons1 draws the planet with its moons on their orbits
turndegrees a second it turns by itself; still by default
tilt, pitch, phase, meridiana portrait's pose, in degrees
zoom, yaw, vtilthow far in the view starts, and the angle and tilt it is turned to. The frame zooms with a drag, a pinch, Ctrl and the wheel, the keys and its + and - buttons, and keeps these in its own address as the reader moves, so the address can be copied. 1 is the whole body; see zoom and pan for the range
scale-todraw to scale with another body

Give the frame a title. The embed page draws only when something changes, and nothing while it is out of sight.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/wakusei-planets 0.24.0.