Colors Reference
Module defined in `lua/common/jbeam/sections/colors.lua`. Applies vehicle color configuration from legacy color format to the 3D vehicle object.
Module defined in lua/common/jbeam/sections/colors.lua. Applies vehicle color configuration from legacy color format to the 3D vehicle object.
Exports
Functions
M.process(vehicleObj, vehicleConfig, vehicle)
Sets the vehicle's base color and two palette colors from vehicleConfig.colors. Converts RGBA arrays to ColorF linear values and assigns to vehicleObj.color, vehicleObj.colorPalette0, vehicleObj.colorPalette1.
- Parameters:
vehicleObj- userdata - C++ vehicle objectvehicleConfig- table - Vehicle config withcolorsarray of{r, g, b, a}arraysvehicle- table - Assembled vehicle data (unused)
- Returns:
self(module table, for chaining)
Internal Notes
- Legacy color format:
vehicleConfig.colors = {{r,g,b,a}, {r,g,b,a}, {r,g,b,a}}. - Uses
ColorF(...):asLinear4F()for gamma-to-linear conversion. - This is the older color system; newer vehicles use the paints system instead.
Camera Reference
Module defined in `lua/common/jbeam/sections/camera.lua`. Processes camera definitions from JBeam data, handling onboard, relative, and onboard2 camera types with retrocompatibility upgrades.
Events Reference
Module defined in `lua/common/jbeam/sections/events.lua`. Processes event definitions and physics triggers from JBeam data, creating trigger objects on the vehicle's C++ object.