Skip to the content

Uchusen Rockets宇宙船

Rockets drawn from sourced sizes: line drawings and painted 3D views you drop into a page, take apart and turn round, and a typed model that checks whether a rocket really goes together.

Uchusen is the Japanese word 宇宙船 for spaceship. About the name

Contents

Reference · Rockets, variants, parts and the fit check

lampFactorfunction

How bright a lamp is now, from 0 to 1. Position lights stay on. The white flash and the red beacon pulse, and both hold steady when motion is reduced. Work lights (floods, pools, docking and work lamps) are on only for all.

Import it

import { lampFactor } from "@johnmorrisdotca/uchusen-rockets";

Definition

function lampFactor(duty: LampDuty, mode: "off" | "running" | "all", reduced: boolean, seconds: number): number

Parameters

NameTypeDescription
dutyLampDuty

What the lamp is.

mode"all" | "off" | "running"

The Lights choice.

reducedboolean

Whether the reader asked for reduced motion.

secondsnumber

Seconds since the view started.

Returns

number

The brightness, 0 to 1. Engine glow is always 1 here: the Engines switch applies that itself.

Examples

import { lampFactor } from "@johnmorrisdotca/uchusen-rockets";

console.log(lampFactor("flash", "all", false, 0), lampFactor("flash", "all", true, 0));
1 0.45

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/uchusen-rockets 0.14.0.