mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat(editor): crater generator for lakes, arenas, impact sites
- Crater Generator in Sculpt panel: creates a bowl-shaped depression with configurable radius, depth, and raised rim height - Parabolic bowl interior with sinusoidal rim and smooth outer falloff - Perfect for creating lakes (fill with Water mode), arenas, or impact craters for volcanic zones - One click at cursor position, uses brush position for center
This commit is contained in:
parent
496f97f9db
commit
1502c2ed85
3 changed files with 57 additions and 0 deletions
|
|
@ -551,6 +551,19 @@ void EditorUI::renderBrushPanel(EditorApp& app) {
|
|||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1), "No stamp copied");
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Crater Generator")) {
|
||||
static float craterRadius = 30.0f, craterDepth = 10.0f, craterRim = 3.0f;
|
||||
ImGui::SliderFloat("Radius##crater", &craterRadius, 5.0f, 100.0f);
|
||||
ImGui::SliderFloat("Depth##crater", &craterDepth, 2.0f, 50.0f);
|
||||
ImGui::SliderFloat("Rim Height##crater", &craterRim, 0.0f, 15.0f);
|
||||
auto& brush5 = app.getTerrainEditor().brush();
|
||||
if (ImGui::Button("Create Crater at Cursor", ImVec2(-1, 0)) && brush5.isActive()) {
|
||||
app.getTerrainEditor().createCrater(brush5.getPosition(), craterRadius, craterDepth, craterRim);
|
||||
app.showToast("Crater created");
|
||||
}
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1), "Bowl with raised rim. Fill with water for a lake.");
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Flatten Platform")) {
|
||||
auto& brush3 = app.getTerrainEditor().brush();
|
||||
if (ImGui::Button("Create Flat Platform at Cursor", ImVec2(-1, 0)) && brush3.isActive()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue