Building Editor
Experimental procedural building/city generation editor. Uses a modular architecture with separate world, UI, decal, region, and utility sub-modules. Supports hot-reload during development.
Experimental procedural building/city generation editor. Uses a modular architecture with separate world, UI, decal, region, and utility sub-modules. Supports hot-reload during development.
Key Features
- Modular Architecture - Separate modules for world (
W), UI, decals (D), regions (R), and utilities (UU) - Hot Reload - Full module reload via
M.reload(mode, soft)without restarting editor - Experimental Tools - X-Ray mesh explorer, Solid-Flex, Skeleton viewer
- Configuration Mode - Special
'conf'mode for layout configuration - City Edit Mode - Registered as
editor.editModes.cityEditMode
Sub-Modules
| Module | Path | Purpose |
|---|---|---|
| World | editor/gen/world | World object creation and management |
| UI | editor/gen/ui | ImGui interface rendering |
| Decal | editor/gen/decal | Decal placement and management |
| Region | editor/gen/region | Region/zone definition |
| Utils | editor/gen/utils | Shared utility functions |
Experimental Features
| Feature | Status | Description |
|---|---|---|
| X-Ray | WIP | Mesh explorer visualization |
| Solid-Flex | WIP | Structural flexibility tool |
| Skeleton | WIO | Wire-frame skeleton viewer |
Usage Notes
- This is a work-in-progress experimental tool
- Uses
require("socket")for development features - The
_PRDflag in utils controls production vs development mode - Window registered as
'BAT'(Building/Architecture Tool)
Functions
M.reload(mode, soft)
Hot-reloads all sub-modules. If soft is false, clears world objects first.
mode(any) - Reload mode (e.g.'conf'for configuration mode)soft(boolean) - If true, skips clearing world objects
M.onEditorInitialized()
Registers the city edit mode, windows, and road templates.
M.onEditorGui()
Main per-frame UI rendering (delegated to UI sub-module).
M.onSerialize()
Serialization callback - saves editor state.
Returns: table
M.onDeserialize(data)
Deserialization callback - restores editor state.
data(table)
M.onInput(type, value)
Callback for input events.
type(any)value(any)
M.onUp()
Initializes the building editor in configuration mode - clears selection, enters city edit mode, reloads modules, and shows layout/test windows.
M.onEditorObjectSelectionChanged()
Callback for editor object selection changed event.
See Also
- biomeTool - Procedural vegetation placement
Biome Tool
Advanced editor tool for procedural biome generation on terrain. Manages biome layers with terrain material or lasso-area zones, forest brush placement, exclusion zones, and mask-based vegetation dist
Bulk Rename
Editor tool for batch-renaming scene objects. Supports pattern-based renaming with counters and old-name substitution, collision detection, and preview before applying.