mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat(editor): winding canyon generator with seeded sine-wave path
- Canyon Generator: carves a winding canyon across the entire tile using layered sine waves for natural serpentine shape - Configurable width, depth, and seed for different canyon shapes - Quadratic falloff at edges for smooth cliff walls - Random seed button for quick shape exploration - Fill with Water mode for instant river canyon
This commit is contained in:
parent
7971fd7989
commit
f3846919a4
3 changed files with 62 additions and 0 deletions
|
|
@ -603,6 +603,21 @@ void EditorUI::renderBrushPanel(EditorApp& app) {
|
|||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1), "No stamp copied");
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Canyon Generator")) {
|
||||
static float canyonWidth = 15.0f, canyonDepth = 20.0f;
|
||||
static int canyonSeed = 1;
|
||||
ImGui::SliderFloat("Width##canyon", &canyonWidth, 5.0f, 50.0f);
|
||||
ImGui::SliderFloat("Depth##canyon", &canyonDepth, 5.0f, 60.0f);
|
||||
ImGui::InputInt("Seed##canyon", &canyonSeed);
|
||||
ImGui::SameLine();
|
||||
if (ImGui::SmallButton("Rnd##cs")) canyonSeed = std::rand();
|
||||
if (ImGui::Button("Create Canyon", ImVec2(-1, 0))) {
|
||||
app.getTerrainEditor().createCanyon(canyonWidth, canyonDepth, static_cast<uint32_t>(canyonSeed));
|
||||
app.showToast("Canyon carved");
|
||||
}
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1), "Winding canyon across tile. Fill with water for river.");
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Island Generator")) {
|
||||
static float islandHeight = 30.0f, islandDrop = 20.0f;
|
||||
ImGui::SliderFloat("Center Height##island", &islandHeight, 5.0f, 100.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue