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

FlightClockclass

The clock of one timeline: where it is and whether it runs. It only moves when told to, once a frame by whoever draws, so a timeline out of sight stands still.

Import it

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

Definition

class FlightClock
new FlightClock(flight: Flight): FlightClock

Parameters

NameTypeDescription
flightFlight

The flight whose clock this is.

Members

NameTypeDescription
flightFlight
positionnumber
playingboolean
endedboolean
play(): void
pause(): void
seek(position: number): void
advance(seconds: number): void

Moves on by seconds of the screen's time, and stops at the end.

Examples

import { FlightClock, flightOf } from "@johnmorrisdotca/uchusen-rockets";

const flight = flightOf("falcon-9", "block-5");
if (flight) {
  const clock = new FlightClock(flight);
  clock.play();
  clock.advance(2.4);
  console.log(clock.position, clock.ended);
}
1 false

What it prints (run when this page was built)

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