Reference · Build a mesh and a drawing
Glbtype
A binary glTF file: its bytes and how many triangles it holds. Save the bytes as a .glb file or hand them to any glTF viewer.
Import it
import type { Glb } from "@johnmorrisdotca/uchusen-rockets/build";
Definition
interface Glb {
bytes: Uint8Array;
triangles: number;
}
Members
| Name | Type | Description |
|---|---|---|
bytes | Uint8Array<ArrayBufferLike> | |
triangles | number |
Examples
import { build } from "@johnmorrisdotca/uchusen-rockets/build";
const glb = build({ rocket: "starship", variant: "v3" }).glb();
console.log(glb.bytes.length > 1000, glb.triangles > 0);true trueWhat it prints (run when this page was built)