API Referencecommonutils
Heatmap Generator
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
See Also
- utils/ - Utility Modules - Directory overview
- calltracer Reference - Related reference
- dateUtils Reference - Related reference
- debugDraw Reference - Related reference
- Common Libraries Overview - Guide