Log inGet started
World

Anvil Crown

Branchmain
Branchesmain
Commit0c3c8404d1

README.md

runnermesh — the storm-runner's geometry

The runner's hull is lofted here in code rather than imported, so every chine, panel break and control surface is a line in this file that can be re-made.

Frame

+Y   nose, the direction of travel
+X   starboard (screen right)
-Z   canopy side (toward the camera)
+Z   belly (away from the camera)

How a shape is described

A part is a stack of ribs — closed loops of the same point count — lofted one to the next. SECTION is the fuselage's cross-section (peaked spine, hard upper chines, flatter belly); AIRFOIL is the wing's. The station tables (STATIONS, WING, WINGLET, FIN, SPINE, CANOPY) say where each rib sits and how big it is.

Pairs of stations at nearly the same coordinate with different scale are the panel breaks: a real step in the surface, which is what takes a hard highlight off a lightning strike instead of a soft gradient.

Everything is flat-shaded — every quad carries its own four vertices and its own face normal. That is what makes a hard-surface read, and it makes the per-quad vertex tint a per-panel tint rather than a smear.

Build:aim(centre) declares the point a surface wraps, and any quad whose normal ends up pointing at it is emitted the other way round. That is what lets a winglet that climbs in Z more than it spans in X, or a fin that stands almost straight up, come out solid instead of inside-out.

UVs

The hull's UVs are an atlas, matching the plating authored in game.airframe.authoring:

BandvWhat
body0.02 – 0.46fuselage — u runs around the section, v runs tail → nose, one row per station
wing0.52 – 0.72wings and winglets — u across the airfoil, v root → tip
misc0.78 – 0.98spine, gun pods, bell, fins, canopy frames, control surfaces

Using it

local RM = require("game.airframe.runnermesh")
RM.meshNames                 -- every mesh this module can build
RM.geometryFor("runner_hull")-- flat-array MeshGeometry, ready for asset.create