Log inGet started
World

Joyride Harbor: Drivable Cars, Boats and Aircraft Kit

README.md

modelgen

Builds every vehiclesKit vehicle model (9 kinds x 3 looks) as vertex-coloured triangle soup on torqueCars' meshkit, in the chassis frame (metres, x right, y up, y = 0 ground / waterline, front at -Z). Pure Luau and deterministic, no engine calls: vehiclesKit.modelbake calls it to write the mesh assets; nothing needs it at runtime.

  • Gen.body(kind, look) -> geometry (positions, normals, colors, uvs, indices, normalised to the unit box) with center, size, tris.
  • Gen.parts(kind, look) -> { { name, spin, geom, center = pivot, size, tris } }: each part's geometry sits in a unit box centred on its pivot.
  • Gen.layout(kind): seats, eye, hood, hull box, wheels and per-kind extras, the source of truth modelbake copies into modelData.
  • Gen.LOOKS: per-look resolution and style (lowpoly flat-shaded facets, toy puffed rounder sections with gloss accents, real dense smooth surfaces with panel lines, trim and lamps).
  • Building blocks other generators can reuse: loft (superellipse sections swept along z, open arcs for hulls, angle-aligned colour bands, HOLE for real openings), extrude / slabX / slabY (bevelled convex prisms), rev / solid / torus (revolved parts), wing / blade (aerofoil slabs), sweep (tube around a loop), belt (track loop), seat, plate, finish(b, pivot?).

Colours follow torqueCars meshkit.C: the alpha is the carBody part code (1 paint, .85 glass, .7 metal, .55 gloss, .4 trim/rubber, .25 lamp/glow, .1 tail lamp), so paints from torqueCars.bodies recolour only painted panels. Glass is opaque from outside and open from inside (the shader discards its back faces), which is why the bus passenger windows are cut as real openings: the seats inside show.