RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
Client CanvasCaustics PostFXChromatic Lens PostFXClient CoreDepth of Field PostFXEdge AA PostFXPostFx Flash EffectPostFx Fog EffectsPostFx FXAA Anti-AliasingGamma PostFXPostFx Glow EffectShadow Maps InitClient LightingPostFx Light Ray EffectAdvanced Lighting - Light VisualizationPostFx Masked Screen BlurMotion Blur PostFXObjects Required for StartupClient Parse ArgsClient PostFX ManagerRender ManagerAdvanced Lighting - ShadersBasic Lighting - Shadow FilterAdvanced Lighting - Shadow VisualizationPostFx SMAA Anti-AliasingPostFx SSAO (Screen-Space Ambient Occlusion)PostFx Turbulence EffectPostFx Utilities

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 ReferenceGE ExtensionsClient

Client Canvas

Manages the main game canvas (render window) creation and cursor visibility.

Manages the main game canvas (render window) creation and cursor visibility.


Module Overview

PropertyValue
Sourcelua/ge/client/canvas.lua
ReturnsModule table M
Dependenciescore_settings_graphic, scenetree

Module State

FieldTypeDescription
M.canvasCreatedbooleanGuards against duplicate canvas creation

Public Functions

FunctionArgsReturnsDescription
M.createCanvaswindowPlacementGuiCanvas or nilCreates or finds the Canvas object, runs auto-detect graphics if enabled
M.initializeCanvas-GuiCanvas or nilOne-time canvas initialization; calls createCanvas, sets canvasCreated flag
M.showCursor--Unlocks mouse and shows cursor on the Canvas
M.hideCursor--Locks mouse and hides cursor on the Canvas

Scene Objects Created

Object NameTypePurpose
CanvasGuiCanvasMain render window / GUI canvas

Usage Examples

-- Initialize the canvas during startup
local canvas_module = require("client/canvas")
canvas_module.initializeCanvas()

-- Show/hide cursor for menu vs gameplay
canvas_module.showCursor()   -- Menu mode
canvas_module.hideCursor()   -- Gameplay mode

Console Variables

VariableUsage
$forceFullscreenWhen set, clears display output device preference
$pref::Video::autoDetectTriggers automatic graphics quality detection

Notes

  • initializeCanvas can only be called once; subsequent calls log an error and return nil.
  • Called by core.initializeCore() during engine startup.
  • If canvas creation fails, the engine calls quit().

See Also

  • client/core - Calls initializeCanvas during core init
  • client/init - High-level client initialization

Statistic Milestones

Generates milestones based on `gameplay_statistic` metrics: distance driven, playtime, rollovers, and airtime.

Caustics PostFX

Underwater caustic light patterns projected onto submerged surfaces.

On this page

Module OverviewModule StatePublic FunctionsScene Objects CreatedUsage ExamplesConsole VariablesNotesSee Also