No model files, no art pipeline — every airframe in Hornet Bay is built in code
There is not a single 3D model file in Hornet Bay. Every aircraft is assembled at load time from boxes, cones and extruded wing shapes in one JavaScript file — and the same code is what exports the print-bay STLs.
Open the repository and look for the art: no .glb, no .obj, no .gltf, and no loader to read one. The libs folder holds exactly one file, three.js itself. The jets, helicopters and airliners come out of js/models.js — about 1,900 lines, roughly 110 KB — and the ships are built the same way in js/ships.js.
How a Hornet gets built
A handful of tiny helpers do the work: box, cone, cyl, and a wing helper that takes a planform outline, extrudes it a fraction of a metre thick and lays it flat. The F/A-18 starts as a 2.0 × 1.7 × 9.5 box for the fuselage, a cone for the radome, a squashed sphere for the canopy, a pair of extruded LEX strakes, and a trapezoid wing mirrored left and right. That is the recipe. Every part is a flat-shaded Lambert material, so the facets show — on purpose.
The livery work is code too. The airline schemes and the Jolly Rogers tail art are painted onto canvases at load time and wrapped on as textures. Nothing is fetched from an image file.
No build step
index.html carries an import map pointing three at ./libs/three.module.js, and the scripts load as plain ES modules. Edit a file, refresh the tab, fly. There is no bundler between you and the airframe.
Same code, on your desk
Because a model is just a function that returns a group of meshes, the print bay can call that function, hide the gear, hook and afterburner groups, and triangulate what is left into an STL — see how the bay opened. The Hornet file comes out at 29 KB, 150 mm long. It also means a bug in the builder is a bug in the print file, which is how the wheels-up fix happened: the exporter forgot that hidden groups hide their children.
In the sim
- One builder function per type, dispatched from buildModel.
- Flat shading everywhere, no image textures for the airframes.
- Control surfaces are real hinge groups, so ailerons and flaps move when you do.
Try this: start a free flight, switch to the external camera and roll the Hornet slowly — watch the flat facets catch the light, and the ailerons answer the stick.
— HB