heatmap Reference
Module defined in `lua/common/utils/heatmap.lua`. Generates SVG heatmap visualizations of vehicle paths on the game map, including road overlay.
Module defined in lua/common/utils/heatmap.lua. Generates SVG heatmap visualizations of vehicle paths on the game map, including road overlay.
Exports
Functions
M.init(_filename)
Initialize the heatmap with an output filename.
- Parameters:
_filename- string - SVG output file path
M.update()
Record current frame's vehicle position to the heatmap. Called every frame.
M.save()
Write the accumulated heatmap data to the SVG file.
M.destroy()
Clean up heatmap resources.
Internal Notes
- Uses EzSVG library for SVG generation
transformPointflips/transforms coordinates for file outputdrawRoadsoverlays road network onto the heatmap- Designed to run continuously, sampling position each frame
utils/ - Utility Modules
General-purpose utility modules for debugging, profiling, networking, graphics, and data processing.
httpJsonServer Reference
Module defined in `lua/common/utils/httpJsonServer.lua`. Simple HTTP server for implementing quick REST APIs within BeamNG. Handles JSON request/response.