Drag Race Editor - Lanes
Manages drag racing lanes within strips. Each lane has waypoints, a boundary, color, ordering, and naming. Provides CRUD, ImGui UI, and 3D preview with axis-aligned box rendering.
Manages drag racing lanes within strips. Each lane has waypoints, a boundary, color, ordering, and naming. Provides CRUD, ImGui UI, and 3D preview with axis-aligned box rendering.
Public API
| Function | Signature | Description |
|---|---|---|
M.loadAllLanes() | Loads all lanes via dragSaveSystem.getAllLanes() | |
M.getAllLanes() | → table | Returns all loaded lanes |
M.getSelectedLaneIndex() | → number | Current selection index |
M.setSelectedLaneIndex(idx) | Set selection index | |
M.getSelectedLane() | → table/nil | Returns selected lane |
M.selectLane(idx) | Select a lane by index | |
M.addLane() | Creates a new default lane | |
M.removeSelectedLane() | Removes selected lane | |
M.saveLane(lane) | → bool | Saves lane to .lane.json file |
M.drawLanesSection() | Renders lane list with Add/Remove/Save buttons | |
M.drawLaneDetails() | Renders lane inspector (ID, names, color, order, waypoints, boundary) | |
M.drawTransformsPreview() | Debug-draws lane name in 3D viewport | |
M.drawAxisBox(corner, x, y, z, clr) | Helper: draws a colored axis-aligned box with triangle faces |
Lane Structure
{
id = "new_lane_1",
name = "New Lane",
shortName = "Lane 1",
longName = "Lane 1",
color = "blue", -- "blue"|"red"|"green"|"yellow"|"purple"|"orange"
laneOrder = 1,
waypointIds = {},
boundaryId = "",
metadata = { created = "...", modified = "..." }
}Detail Panel
| Field | Widget | Description |
|---|---|---|
| ID | Text input | Unique lane identifier |
| Name | Text input | Lane display name |
| Short Name | Text input | Abbreviated name |
| Long Name | Text input | Full descriptive name |
| Color | Searchable combo | Lane color (6 options) |
| Lane Order | Int input | Ordering within strip |
| Waypoints | Count + Add button | Number of waypoint IDs |
| Boundary ID | Text input | Reference to boundary file |
Axis Box Helper
-- Draws a solid colored box from corner along three axis vectors
M.drawAxisBox(corner, xVec, yVec, zVec, ColorF(1, 0, 0, 0.5))Renders all 6 faces as double-sided triangles with edge lines.
Notes
- Lane files saved as
<laneId>.lane.jsonin the level's drag path - Uses
state.getSearch()for searchable combo boxes - Tooltip on hover shows ID, short/long name, and order
See Also
- Drag Race Editor Constants - Related reference
- Drag Race Editor - Drag Settings - Related reference
- Drag Race Editor - Facilities - Related reference
- World Editor Guide - Guide
Drag Race Editor - Facilities
Manages drag racing facilities (venues containing strips). Provides CRUD operations, ImGui list/detail rendering, and 3D preview drawing.
Drag Race Editor - State
Centralized state management module for the Drag Race Editor. Provides getters/setters for all editor state including selections, undo/redo stacks, file paths, transforms, and error handling.