Meshs Reference
Module defined in `lua/common/jbeam/sections/meshs.lua`. Processes 3D mesh attachments: physics triangles, props (animated objects), and flexbodies (deformable meshes).
Module defined in lua/common/jbeam/sections/meshs.lua. Processes 3D mesh attachments: physics triangles, props (animated objects), and flexbodies (deformable meshes).
Exports
Functions
M.process(objID, vehicleObj, vehicle)
Processes three mesh types: triangles (physics collision surfaces), props (rigid animated meshes attached to nodes), and flexbodies (soft-body meshes that deform with the node structure). Creates C++ mesh objects via the vehicle object API.
- Parameters:
objID- number - Vehicle object IDvehicleObj- userdata - C++ vehicle objectvehicle- table - Assembled vehicle data withtriangles,props,flexbodiessections
- Returns:
self(module table, for chaining)
Internal Notes
- Triangles: Added via
vehicleObj:addPhysicsTriangle(id1, id2, id3). Degenerate triangles (duplicate node IDs) are skipped. - Props: Created via
vehicleObj:addProp(). Support features:- Node-based positioning (ref, x, y nodes)
- Translation/rotation with
translationWorldToPropAxisfor coordinate conversion - Steering wheel props can be disabled via settings
- Color application via
parseColor(supports RGBA table and hex string#RRGGBBAA) - Mesh material override, deformation groups, break groups
- Rotation order and mode configuration
- Flexbodies: Created via
vehicleObj:addFlexbody(). Support:- Node-based deformation (ref, x, y nodes)
- Position/rotation transforms via
jbeamUtils.getFlexbodyPosRotAfterNodeRotateOffsetMove - Scale, skin, mesh material
- Group-based node assignment
- Props and flexbodies that reference invalid nodes are logged and skipped.
LicensePlatesSkins Reference
Module defined in `lua/common/jbeam/sections/licenseplatesSkins.lua`. Processes license plate and skin setup from active parts data, applying skins to the vehicle object and configuring license plate
Mirror Reference
Module defined in `lua/common/jbeam/sections/mirror.lua`. Processes mirror definitions from JBeam data, creating C++ mirror objects on the vehicle.