feat(editor): terrain terrace/step generator for layered landscapes

- Terrace tool: quantizes terrain heights into N flat shelves
  (like rice paddies, cliff shelves, or stepped pyramids)
- Configurable step count (2-20)
- Finds actual height range and divides evenly
- Auto-stitches chunk edges after terracing
- Useful for creating tiered arenas, agricultural zones, or
  stylized Meso-American terrain
This commit is contained in:
Kelsi 2026-05-05 07:43:10 -07:00
parent f3846919a4
commit 9be32a6634
3 changed files with 45 additions and 0 deletions

View file

@ -603,6 +603,16 @@ void EditorUI::renderBrushPanel(EditorApp& app) {
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1), "No stamp copied");
}
if (ImGui::CollapsingHeader("Terrace / Steps")) {
static int terraceSteps = 6;
ImGui::SliderInt("Steps##terrace", &terraceSteps, 2, 20);
if (ImGui::Button("Apply Terracing", ImVec2(-1, 0))) {
app.getTerrainEditor().terraceHeights(terraceSteps);
app.showToast("Terrain terraced");
}
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1), "Quantizes heights into flat shelves");
}
if (ImGui::CollapsingHeader("Canyon Generator")) {
static float canyonWidth = 15.0f, canyonDepth = 20.0f;
static int canyonSeed = 1;