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

tiltTurnfunction

The turn (degrees round, degrees up or down) for a reading, measured from rest (how the device was held when tilting began). angle is the screen's orientation (0, 90, 180 or 270), so leaning a phone held sideways still turns the view the way it looks. Null for an empty reading.

Import it

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

Definition

function tiltTurn(reading: Reading, rest: Reading, angle?: number): { azimuth: number; polar: number; } | null

Parameters

NameTypeDescription
readingReading

The current reading.

restReading

The reading when tilting began.

angle (optional)number

The screen's orientation: 0, 90, 180 or 270. Defaults to 0.

Returns

{ azimuth: number; polar: number; } | null

The turn in degrees round (azimuth) and up or down (polar), or null for an empty reading.

Examples

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

console.log(tiltTurn({ beta: 30, gamma: 10 }, { beta: 20, gamma: 0 }), tiltTurn({ beta: null, gamma: null }, { beta: 0, gamma: 0 }));
{ azimuth: 6, polar: -3 } null

What it prints (run when this page was built)

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