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

Reference · Facts, line drawings and positions

portraitCodefunction

The text that puts a portrait scene in a page, for each way a page is made, as embedCode does for a single body. The bodies' own entry points are loaded only for the bodies in the scene (all of them when there are more than six kinds), and none for the line look.

Import it

import { portraitCode } from "@johnmorrisdotca/wakusei-planets";

Definition

function portraitCode(options: PortraitEmbed, kind?: EmbedKind, settings?: EmbedSettings): string

Parameters

NameTypeDescription
optionsPortraitEmbed

The scene and the width.

kind (optional)"html" | "iframe" | "module" | "react" | "vue" | "angular" | "svelte"

The way the page is made; html by default.

settings (optional)EmbedSettings

The CDN and the demo's address, when they are not the package's own.

Returns

string

The text to paste into the page's source.

Examples

import { portraitCode } from "@johnmorrisdotca/wakusei-planets";

console.log(portraitCode({ scene: "look:painted~jupiter_0_0_0.3_0~io_0_0_0.1_0" }, "vue"));
<script setup lang="ts">
import { onMounted } from "vue";

onMounted(() => {
  void import("@johnmorrisdotca/wakusei-planets/portrait");
  void import("@johnmorrisdotca/wakusei-planets/jupiter");
  void import("@johnmorrisdotca/wakusei-planets/moons-jupiter");
});
</script>

<template>
  <wakusei-portrait scene="look:painted~jupiter_0_0_0.3_0~io_0_0_0.1_0"></wakusei-portrait>
</template>

What it prints (run when this page was built)

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