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

frameForfunction

The nearest camera that holds the whole of min to max in a picture aspect wide for 1 tall, from angle.

Import it

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

Definition

function frameFor(min: Vec3, max: Vec3, angle: Angle, aspect: number, margin?: number): Framing

Parameters

NameTypeDescription
minVec3

The lowest corner of the box to hold.

maxVec3

The highest corner.

angleAngle

The angle to look from.

aspectnumber

The picture's width over its height.

margin (optional)number

Room left round the box, as a multiple. Defaults to 1.08.

Returns

Framing

The camera that holds the whole box.

Examples

import { frameFor, VIEWS } from "@johnmorrisdotca/uchusen-rockets";

const framing = frameFor([-4.5, 0, -4.5], [4.5, 124, 4.5], VIEWS.front, 480 / 640);
console.log(framing.target, framing.distance.toFixed(0));
[ 0, 62, 0 ] 321

What it prints (run when this page was built)

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