Scaling Reference
Module defined in `lua/common/jbeam/scaling.lua`. Applies `scale*` prefixed properties to their corresponding base values by multiplication.
Module defined in lua/common/jbeam/scaling.lua. Applies scale* prefixed properties to their corresponding base values by multiplication.
Exports
Functions
M.process(vehicle)
Walks all dict-type sections in vehicle data. For any numeric property whose key starts with "scale" (detected via byte comparison), multiplies the corresponding base property (key without the "scale" prefix) by the scale value, then removes the scale key.
- Parameters:
vehicle- table - Assembled vehicle data
- Returns:
self(module table, for chaining)
Internal Notes
- Example:
{ beamSpring = 1000, scalebeamSpring = 2.0 }→{ beamSpring = 2000 }. - Uses an iterative stack-based traversal (not recursive function calls) for performance.
- Skips sections listed in
jbeamUtils.ignoreSections(maxIDs,options). - The
"scale"prefix is detected by checking bytes 1-5 equal tos,c,a,l,eand byte 6 exists. - Runs after
jbeamGroups.processin the pipeline.
Optimization Reference
Module defined in `lua/common/jbeam/optimization.lua`. Assigns continuous IDs (CIDs) to vehicle data entries, optimizes beam ordering, cleans up runtime-unnecessary data, and dereferences object point
SectionMerger Reference
Module defined in `lua/common/jbeam/sectionMerger.lua`. Merges duplicate/aliased JBeam sections together for backward compatibility (e.g. `triggers2` → `triggers`).