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

revealDelayfunction

How long to wait, once the 3D view is ready at readyAt, before it takes over from a drawing first seen at shownAt (0 under reduced motion).

Import it

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

Definition

function revealDelay(shownAt: number, readyAt: number, reducedMotion: boolean): number

Parameters

NameTypeDescription
shownAtnumber

When the drawing first came on screen, in milliseconds.

readyAtnumber

When the 3D view became ready, on the same clock.

reducedMotionboolean

True when the reader asked for reduced motion.

Returns

number

The milliseconds to wait before the 3D view takes over.

Examples

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

console.log(revealDelay(0, 300, false), revealDelay(0, 300, true));
900 0

What it prints (run when this page was built)

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