RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

cdefDebugDraw ReferencecdefGpuMesh ReferencecdefImgui ReferencecdefMath Referencecdefs ReferencecontrolSystems Referencecsvlib ReferencedelayLine Referencedequeue ReferencedevUtils ReferenceEvent Referenceextensions Referencefilters Referencegraphpath Referenceguihooks ReferenceinputFilters ReferenceinterpolatedMap Referenceintrospection ReferencejbeamWriter Referencejson-ast Referencejson ReferencejsonDebug ReferencejsonPrettyEncoderCustom Referencekdtreebox2d Referencekdtreebox3d Referencekdtreepoint3d Referencelpack ReferenceluaBinding ReferenceluaCore ReferenceluaProfiler Referencemathlib Referenceparticles Referencequadtree Referencesettings ReferencetcpServer ReferencetimeEvents Referenceutils Reference
calltracer ReferencedateUtils ReferencedebugDraw Referencefilterchain Referenceutils/ - Utility Modulesheatmap ReferencehttpJsonServer ReferenceinteractiveShell ReferencelanguageMap Referenceperf Referencepixellib ReferencesimpleHttpServer ReferencetorqueScriptParser ReferencewsUtils Reference

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API Referencecommonutils

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
  • transformPoint flips/transforms coordinates for file output
  • drawRoads overlays 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.

On this page

ExportsFunctionsM.init(_filename)M.update()M.save()M.destroy()Internal Notes