Reference · Build a mesh and a drawing
buildfunction
A rocket from a description. Throws FitError when it does not go together.
Import it
import { build } from "@johnmorrisdotca/uchusen-rockets/build";
Definition
function build(description: Description, options?: { detail?: DetailLevel; beside?: boolean | readonly Description[]; named?: boolean; scale?: number; docked?: string; }): Built
Parameters
| Name | Type | Description |
|---|---|---|
description | Description | The rocket, its variant and any other part in a slot. |
options (optional) | { detail?: DetailLevel; beside?: boolean | readonly Description[]; named?: boolean; scale?: number; docked?: string; } |
|
Returns
Built
The built rocket. It throws a FitError when the description does not go together.
Examples
import { build } from "@johnmorrisdotca/uchusen-rockets/build";
const rocket = build({ rocket: "falcon-heavy" });
console.log(rocket.report.label, rocket.glb().bytes.length > 1000);Falcon Heavy trueWhat it prints (run when this page was built)