Shortcuts für Brush Tools ergänzt

This commit is contained in:
2026-09-13 14:48:37 +02:00
parent 6e2c3a2785
commit 320b0834b9
20 changed files with 223 additions and 40 deletions

View File

@@ -269,6 +269,22 @@ public class EditorApp extends Application {
return; return;
} }
} }
// Tab: Sub-Modus innerhalb des aktiven Tools cyclen
if (e.getCode() == KeyCode.TAB && "world".equals(currentTool)
&& !e.isAltDown() && !e.isControlDown()
&& !(scene.getFocusOwner() instanceof javafx.scene.control.TextInputControl)) {
e.consume();
cycleToolSubMode();
return;
}
// Numpad +/-: Höhenparameter des aktiven Tools anpassen
if ((e.getCode() == KeyCode.ADD || e.getCode() == KeyCode.SUBTRACT)
&& "world".equals(currentTool)
&& !(scene.getFocusOwner() instanceof javafx.scene.control.TextInputControl)) {
e.consume();
adjustHeightParam(e.getCode() == KeyCode.ADD ? +1 : -1);
return;
}
handleKeyPress(e.getCode(), true); handleKeyPress(e.getCode(), true);
}); });
scene.addEventFilter(javafx.scene.input.KeyEvent.KEY_RELEASED, e -> handleKeyPress(e.getCode(), false)); scene.addEventFilter(javafx.scene.input.KeyEvent.KEY_RELEASED, e -> handleKeyPress(e.getCode(), false));
@@ -508,6 +524,12 @@ public class EditorApp extends Application {
terrainController.showToolParameters(toolPanel, input.activeTool); terrainController.showToolParameters(toolPanel, input.activeTool);
} }
// Pinsel-Parameter via Alt/Shift+Scroll geändert → Slider aktualisieren
if (input.brushParamsChanged && "world".equals(currentTool)) {
input.brushParamsChanged = false;
terrainController.refreshCurrentPanel();
}
// Neues JME-Image nach Viewport-Resize übernehmen // Neues JME-Image nach Viewport-Resize übernehmen
javafx.scene.image.WritableImage newImg = input.resizedImage.getAndSet(null); javafx.scene.image.WritableImage newImg = input.resizedImage.getAndSet(null);
if (newImg != null) { if (newImg != null) {
@@ -1007,6 +1029,38 @@ public class EditorApp extends Application {
} }
} }
// ── Höhenparameter per Numpad +/- anpassen ───────────────────────────────
private void adjustHeightParam(int direction) {
de.blight.editor.tool.EditorTool tool = input.activeTool;
if (tool == null) return;
de.blight.editor.tool.ToolParameter hp = tool.getHeightParam();
if (hp == null) return;
double step = input.ctrlHeld ? 10.0 : (input.shiftHeld ? 0.1 : 1.0);
hp.setValue(hp.getValue() + direction * step);
terrainController.refreshCurrentPanel();
}
// ── Sub-Tool / Modus-Cycle (Tab) ─────────────────────────────────────────
private void cycleToolSubMode() {
de.blight.editor.tool.EditorTool tool = input.activeTool;
if (tool == null) return;
// Gras-Kontext: zwischen den drei Gras-Sub-Tools wechseln
if (tool == input.grassTool || tool == input.grassVertexTool || tool == input.terrainGrassTool) {
grassController.cycleSubTool();
return;
}
// Alle anderen Tools: ersten ChoiceToolParameter cyclen
java.util.List<de.blight.editor.tool.ChoiceToolParameter> choices = tool.getChoiceParameters();
if (choices.isEmpty()) return;
de.blight.editor.tool.ChoiceToolParameter param = choices.get(0);
int next = (param.getSelectedIndex() + 1) % param.getChoices().length;
param.setSelectedIndex(next);
terrainController.showToolParameters(toolPanel, tool);
}
// ── Animations-Vorschau-Werkzeug ───────────────────────────────────────── // ── Animations-Vorschau-Werkzeug ─────────────────────────────────────────

View File

@@ -68,6 +68,10 @@ public class SharedInput {
public volatile boolean ctrlHeld; public volatile boolean ctrlHeld;
public volatile boolean altHeld; public volatile boolean altHeld;
// ── Pinsel-Scroll (Alt+Rad = Radius, Shift+Rad = Stärke) ─────────────────
/** Gesetzt von ViewportController wenn Pinselparameter per Scroll geändert wurden; EditorApp liest + resettet. */
public volatile boolean brushParamsChanged = false;
// ── Debug-Toggle: Strg+F8 schaltet Raw-Texture-Modus (kein Lighting) ───── // ── Debug-Toggle: Strg+F8 schaltet Raw-Texture-Modus (kein Lighting) ─────
public volatile boolean debugNoLightToggle; public volatile boolean debugNoLightToggle;

View File

@@ -18,4 +18,13 @@ public abstract class EditorTool {
public List<ChoiceToolParameter> getChoiceParameters() { public List<ChoiceToolParameter> getChoiceParameters() {
return List.of(); return List.of();
} }
/** Pinselradius-Parameter für Alt+Scroll-Shortcut. null wenn kein Radius vorhanden. */
public ToolParameter getBrushRadius() { return null; }
/** Pinselstärke-Parameter für Shift+Scroll-Shortcut. null wenn keine Stärke vorhanden. */
public ToolParameter getBrushStrength() { return null; }
/** Höhen-Parameter für +/−-Stepper (1m/0,1m-Schritte). null wenn nicht vorhanden. */
public ToolParameter getHeightParam() { return null; }
} }

View File

@@ -16,6 +16,9 @@ public class GrassTool extends EditorTool {
@Override @Override
public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); } public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); }
@Override public ToolParameter getBrushRadius() { return brushRadius; }
@Override public ToolParameter getHeightParam() { return grassHeight; }
@Override @Override
public List<ToolParameter> getParameters() { return List.of(brushRadius, grassHeight, density); } public List<ToolParameter> getParameters() { return List.of(brushRadius, grassHeight, density); }
} }

View File

@@ -18,6 +18,9 @@ public class GrassVertexTool extends EditorTool {
@Override @Override
public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); } public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); }
@Override public ToolParameter getBrushRadius() { return brushRadius; }
@Override public ToolParameter getHeightParam() { return bladeHeight; }
@Override @Override
public List<ToolParameter> getParameters() { return List.of(brushRadius, bladeHeight, density, dryness, uniformity, seedDensity); } public List<ToolParameter> getParameters() { return List.of(brushRadius, bladeHeight, density, dryness, uniformity, seedDensity); }
} }

View File

@@ -38,6 +38,10 @@ public class HeightTool extends EditorTool {
return List.of(mode); return List.of(mode);
} }
@Override public ToolParameter getBrushRadius() { return brushRadius; }
@Override public ToolParameter getBrushStrength() { return brushStrength; }
@Override public ToolParameter getHeightParam() { return plateauHeight; }
@Override @Override
public List<ToolParameter> getParameters() { public List<ToolParameter> getParameters() {
return List.of(brushRadius, brushStrength, plateauHeight); return List.of(brushRadius, brushStrength, plateauHeight);

View File

@@ -27,6 +27,8 @@ public class HoleTool extends EditorTool {
return List.of(mode); return List.of(mode);
} }
@Override public ToolParameter getBrushRadius() { return brushRadius; }
@Override @Override
public List<ToolParameter> getParameters() { public List<ToolParameter> getParameters() {
return List.of(brushRadius); return List.of(brushRadius);

View File

@@ -32,6 +32,9 @@ public class SculptMeshTool extends EditorTool {
@Override @Override
public List<ChoiceToolParameter> getChoiceParameters() { return List.of(mode); } public List<ChoiceToolParameter> getChoiceParameters() { return List.of(mode); }
@Override public ToolParameter getBrushRadius() { return brushRadius; }
@Override public ToolParameter getBrushStrength() { return brushStrength; }
@Override @Override
public List<ToolParameter> getParameters() { return List.of(brushRadius, brushStrength); } public List<ToolParameter> getParameters() { return List.of(brushRadius, brushStrength); }
} }

View File

@@ -17,6 +17,8 @@ public class StoneTool extends EditorTool {
@Override public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); } @Override public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); }
@Override public ToolParameter getBrushRadius() { return brushRadius; }
@Override public List<ToolParameter> getParameters() { @Override public List<ToolParameter> getParameters() {
return List.of(brushRadius, minSize, maxSize, density); return List.of(brushRadius, minSize, maxSize, density);
} }

View File

@@ -14,6 +14,9 @@ public class TerrainColorGrassTool extends EditorTool {
@Override public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); } @Override public List<ChoiceToolParameter> getChoiceParameters() { return List.of(); }
@Override public ToolParameter getBrushRadius() { return brushRadius; }
@Override public ToolParameter getHeightParam() { return bladeHeight; }
@Override public List<ToolParameter> getParameters() { @Override public List<ToolParameter> getParameters() {
return List.of(brushRadius, bladeHeight, density, uniformity, seedDensity); return List.of(brushRadius, bladeHeight, density, uniformity, seedDensity);
} }

View File

@@ -25,6 +25,9 @@ public class TextureTool extends EditorTool {
@Override @Override
public List<ChoiceToolParameter> getChoiceParameters() { return List.of(textureIndex); } public List<ChoiceToolParameter> getChoiceParameters() { return List.of(textureIndex); }
@Override public ToolParameter getBrushRadius() { return brushRadius; }
@Override public ToolParameter getBrushStrength() { return brushStrength; }
@Override @Override
public List<ToolParameter> getParameters() { return List.of(brushRadius, brushStrength); } public List<ToolParameter> getParameters() { return List.of(brushRadius, brushStrength); }
} }

View File

@@ -30,6 +30,9 @@ public class UpperHeightTool extends EditorTool {
return List.of(mode); return List.of(mode);
} }
@Override public ToolParameter getBrushRadius() { return brushRadius; }
@Override public ToolParameter getBrushStrength() { return brushStrength; }
@Override @Override
public List<ToolParameter> getParameters() { public List<ToolParameter> getParameters() {
return List.of(brushRadius, brushStrength); return List.of(brushRadius, brushStrength);

View File

@@ -59,6 +59,10 @@ public class VoxelTool extends EditorTool {
return List.of(mode); return List.of(mode);
} }
@Override public ToolParameter getBrushRadius() { return brushRadius; }
@Override public ToolParameter getBrushStrength() { return brushStrength; }
@Override public ToolParameter getHeightParam() { return plateauTarget; }
@Override @Override
public List<ToolParameter> getParameters() { public List<ToolParameter> getParameters() {
return List.of(brushRadius, brushStrength, plateauTarget); return List.of(brushRadius, brushStrength, plateauTarget);

View File

@@ -24,6 +24,10 @@ public class GrassController {
private final BiConsumer<VBox, EditorTool> showToolParams; private final BiConsumer<VBox, EditorTool> showToolParams;
private final Function<Path, String> normalMapLoader; private final Function<Path, String> normalMapLoader;
// Sub-Tool-Cycle: gesetzt in buildPanel(), genutzt von cycleSubTool()
private ToggleButton subTexBtn, subVertBtn, subTerrainBtn;
private Runnable activateTex, activateVert, activateTerrain;
public GrassController(ToolContext ctx, public GrassController(ToolContext ctx,
ImageView viewport, ImageView viewport,
BiConsumer<VBox, EditorTool> showToolParams, BiConsumer<VBox, EditorTool> showToolParams,
@@ -48,21 +52,21 @@ public class GrassController {
title.setStyle("-fx-font-weight: bold; -fx-font-size: 13; -fx-text-fill: #111;"); title.setStyle("-fx-font-weight: bold; -fx-font-size: 13; -fx-text-fill: #111;");
panel.getChildren().addAll(title, new Separator()); panel.getChildren().addAll(title, new Separator());
ToggleButton grassSubTexBtn = new ToggleButton(":: Textur"); subTexBtn = new ToggleButton(":: Textur");
ToggleButton grassSubVertBtn = new ToggleButton("|| Vertex"); subVertBtn = new ToggleButton("|| Vertex");
ToggleButton grassSubTerrainBtn = new ToggleButton("~~ Terrain"); subTerrainBtn = new ToggleButton("~~ Terrain");
grassSubTexBtn.setMaxWidth(Double.MAX_VALUE); subTexBtn.setMaxWidth(Double.MAX_VALUE);
grassSubVertBtn.setMaxWidth(Double.MAX_VALUE); subVertBtn.setMaxWidth(Double.MAX_VALUE);
grassSubTerrainBtn.setMaxWidth(Double.MAX_VALUE); subTerrainBtn.setMaxWidth(Double.MAX_VALUE);
ToggleGroup subGroup = new ToggleGroup(); ToggleGroup subGroup = new ToggleGroup();
grassSubTexBtn.setToggleGroup(subGroup); subTexBtn.setToggleGroup(subGroup);
grassSubVertBtn.setToggleGroup(subGroup); subVertBtn.setToggleGroup(subGroup);
grassSubTerrainBtn.setToggleGroup(subGroup); subTerrainBtn.setToggleGroup(subGroup);
subGroup.selectedToggleProperty().addListener((obs, o, n) -> { if (n == null) subGroup.selectToggle(o); }); subGroup.selectedToggleProperty().addListener((obs, o, n) -> { if (n == null) subGroup.selectToggle(o); });
HBox subRow = new HBox(4, grassSubTexBtn, grassSubVertBtn, grassSubTerrainBtn); HBox subRow = new HBox(4, subTexBtn, subVertBtn, subTerrainBtn);
HBox.setHgrow(grassSubTexBtn, Priority.ALWAYS); HBox.setHgrow(subTexBtn, Priority.ALWAYS);
HBox.setHgrow(grassSubVertBtn, Priority.ALWAYS); HBox.setHgrow(subVertBtn, Priority.ALWAYS);
HBox.setHgrow(grassSubTerrainBtn, Priority.ALWAYS); HBox.setHgrow(subTerrainBtn, Priority.ALWAYS);
panel.getChildren().add(subRow); panel.getChildren().add(subRow);
VBox paramsBox = new VBox(10); VBox paramsBox = new VBox(10);
@@ -126,7 +130,7 @@ public class GrassController {
new Label("Vertrocknet:"), dryPicker); new Label("Vertrocknet:"), dryPicker);
panel.getChildren().add(colorSection); panel.getChildren().add(colorSection);
Runnable activateTex = () -> { activateTex = () -> {
ctx.input().activeLayer = 3; ctx.input().activeLayer = 3;
ctx.input().activeTool = ctx.input().grassTool; ctx.input().activeTool = ctx.input().grassTool;
paramsBox.getChildren().clear(); paramsBox.getChildren().clear();
@@ -136,7 +140,7 @@ public class GrassController {
colorSection.setVisible(true); colorSection.setVisible(true);
colorSection.setManaged(true); colorSection.setManaged(true);
}; };
Runnable activateVert = () -> { activateVert = () -> {
ctx.input().activeLayer = SharedInput.LAYER_GRASS_VERTEX; ctx.input().activeLayer = SharedInput.LAYER_GRASS_VERTEX;
ctx.input().activeTool = ctx.input().grassVertexTool; ctx.input().activeTool = ctx.input().grassVertexTool;
paramsBox.getChildren().clear(); paramsBox.getChildren().clear();
@@ -146,7 +150,7 @@ public class GrassController {
colorSection.setVisible(true); colorSection.setVisible(true);
colorSection.setManaged(true); colorSection.setManaged(true);
}; };
Runnable activateTerrain = () -> { activateTerrain = () -> {
ctx.input().activeLayer = SharedInput.LAYER_TERRAIN_GRASS; ctx.input().activeLayer = SharedInput.LAYER_TERRAIN_GRASS;
ctx.input().activeTool = ctx.input().terrainGrassTool; ctx.input().activeTool = ctx.input().terrainGrassTool;
paramsBox.getChildren().clear(); paramsBox.getChildren().clear();
@@ -157,24 +161,40 @@ public class GrassController {
colorSection.setManaged(false); colorSection.setManaged(false);
}; };
grassSubTexBtn.setOnAction(e -> activateTex.run()); subTexBtn.setOnAction(e -> activateTex.run());
grassSubVertBtn.setOnAction(e -> activateVert.run()); subVertBtn.setOnAction(e -> activateVert.run());
grassSubTerrainBtn.setOnAction(e -> activateTerrain.run()); subTerrainBtn.setOnAction(e -> activateTerrain.run());
if (ctx.input().activeLayer == SharedInput.LAYER_GRASS_VERTEX) { if (ctx.input().activeLayer == SharedInput.LAYER_GRASS_VERTEX) {
grassSubVertBtn.setSelected(true); subVertBtn.setSelected(true);
activateVert.run(); activateVert.run();
} else if (ctx.input().activeLayer == SharedInput.LAYER_TERRAIN_GRASS) { } else if (ctx.input().activeLayer == SharedInput.LAYER_TERRAIN_GRASS) {
grassSubTerrainBtn.setSelected(true); subTerrainBtn.setSelected(true);
activateTerrain.run(); activateTerrain.run();
} else { } else {
grassSubTexBtn.setSelected(true); subTexBtn.setSelected(true);
activateTex.run(); activateTex.run();
} }
return panel; return panel;
} }
/** Wechselt zum nächsten Gras-Sub-Tool: Textur → Vertex → Terrain → Textur … */
public void cycleSubTool() {
if (activateTex == null) return;
SharedInput input = ctx.input();
if (input.activeTool == input.grassTool) {
subVertBtn.setSelected(true);
activateVert.run();
} else if (input.activeTool == input.grassVertexTool) {
subTerrainBtn.setSelected(true);
activateTerrain.run();
} else {
subTexBtn.setSelected(true);
activateTex.run();
}
}
public javafx.scene.Node buildGrassTextureUI() { public javafx.scene.Node buildGrassTextureUI() {
Label title = new Label("Textur-Slots"); Label title = new Label("Textur-Slots");
title.setStyle("-fx-text-fill: #111111; -fx-font-weight: bold;"); title.setStyle("-fx-text-fill: #111111; -fx-font-weight: bold;");

View File

@@ -136,12 +136,65 @@ public class TerrainPanelController {
return names[0]; return names[0];
} }
/**
* Baut eine Höhen-Eingabezeile: [−] [TextField] [+].
* Strg=10m-Schritt, Shift=0,1m-Schritt, sonst 1m.
*/
private VBox buildHeightStepperUI(ToolParameter param) {
Label nameLabel = new Label(param.getName());
nameLabel.setStyle("-fx-text-fill: #111111;");
TextField tf = new TextField(String.format(java.util.Locale.US, "%.2f", param.getValue()));
tf.setStyle("-fx-font-size: 12;");
Runnable commitTf = () -> {
try {
double v = Double.parseDouble(tf.getText().replace(',', '.'));
param.setValue(v);
tf.setText(String.format(java.util.Locale.US, "%.2f", param.getValue()));
} catch (NumberFormatException ignored) {
tf.setText(String.format(java.util.Locale.US, "%.2f", param.getValue()));
}
};
tf.setOnAction(e -> commitTf.run());
tf.focusedProperty().addListener((o, ov, nv) -> { if (!nv) commitTf.run(); });
Button minusBtn = new Button("−");
Button plusBtn = new Button("+");
minusBtn.setMinWidth(32);
plusBtn.setMinWidth(32);
minusBtn.setStyle("-fx-font-size: 13; -fx-font-weight: bold;");
plusBtn.setStyle("-fx-font-size: 13; -fx-font-weight: bold;");
minusBtn.setOnAction(e -> {
double step = input.ctrlHeld ? 10.0 : (input.shiftHeld ? 0.1 : 1.0);
param.setValue(param.getValue() - step);
tf.setText(String.format(java.util.Locale.US, "%.2f", param.getValue()));
});
plusBtn.setOnAction(e -> {
double step = input.ctrlHeld ? 10.0 : (input.shiftHeld ? 0.1 : 1.0);
param.setValue(param.getValue() + step);
tf.setText(String.format(java.util.Locale.US, "%.2f", param.getValue()));
});
HBox row = new HBox(4, minusBtn, tf, plusBtn);
HBox.setHgrow(tf, Priority.ALWAYS);
row.setAlignment(Pos.CENTER_LEFT);
return new VBox(3, nameLabel, row);
}
public static void applyModeButtonStyle(ToggleButton btn, boolean active) { public static void applyModeButtonStyle(ToggleButton btn, boolean active) {
btn.setStyle(active btn.setStyle(active
? "-fx-background-color: #4a90d9; -fx-text-fill: white; -fx-background-radius: 4;" ? "-fx-background-color: #4a90d9; -fx-text-fill: white; -fx-background-radius: 4;"
: "-fx-background-color: #d0d0d0; -fx-text-fill: #333; -fx-background-radius: 4;"); : "-fx-background-color: #d0d0d0; -fx-text-fill: #333; -fx-background-radius: 4;");
} }
public void refreshCurrentPanel() {
if (toolPanelRef != null && input.activeTool != null) {
showToolParameters(toolPanelRef, input.activeTool);
}
}
public void showToolParameters(VBox panel, EditorTool tool) { public void showToolParameters(VBox panel, EditorTool tool) {
toolPanelRef = panel; toolPanelRef = panel;
panel.getChildren().clear(); panel.getChildren().clear();
@@ -237,6 +290,8 @@ public class TerrainPanelController {
} }
} }
ToolParameter heightParam = tool.getHeightParam();
for (ToolParameter param : tool.getParameters()) { for (ToolParameter param : tool.getParameters()) {
Label name = new Label(param.getName()); Label name = new Label(param.getName());
name.setStyle("-fx-text-fill: #111111;"); name.setStyle("-fx-text-fill: #111111;");
@@ -256,23 +311,8 @@ public class TerrainPanelController {
param.setValue(Math.round(newV.doubleValue()))); param.setValue(Math.round(newV.doubleValue())));
panel.getChildren().add(new VBox(3, name, withField(slider, "%.0f"))); panel.getChildren().add(new VBox(3, name, withField(slider, "%.0f")));
} else if (tool instanceof de.blight.editor.tool.VoxelTool vtP } else if (heightParam != null && param == heightParam) {
&& param == vtP.plateauTarget) { panel.getChildren().add(buildHeightStepperUI(param));
// x.5-gestufter Slider: min=0.5, Schritt=1 → 0.5, 1.5, 2.5, …
double initSnap = Math.round(param.getValue() - 0.5) + 0.5;
initSnap = Math.max(0.5, Math.min(49.5, initSnap));
Slider slider = new Slider(0.5, 49.5, initSnap);
slider.setShowTickMarks(true);
slider.setShowTickLabels(true);
slider.setMajorTickUnit(5);
slider.setMinorTickCount(4);
slider.setSnapToTicks(true);
slider.setBlockIncrement(1.0);
slider.valueProperty().addListener((obs, oldV, newV) -> {
double sv = Math.round(newV.doubleValue() - 0.5) + 0.5;
param.setValue(sv);
});
panel.getChildren().add(new VBox(3, name, withField(slider, "%.1f")));
} else { } else {
Slider slider = new Slider(param.getMin(), param.getMax(), param.getValue()); Slider slider = new Slider(param.getMin(), param.getMax(), param.getValue());

View File

@@ -271,7 +271,33 @@ public class ViewportController {
pane.setOnMouseExited(e -> input.mouseScreenX = -1f); pane.setOnMouseExited(e -> input.mouseScreenX = -1f);
viewport.setOnScroll(e -> { viewport.setOnScroll(e -> {
int steps = (int) Math.signum(e.getDeltaY()); // Auf manchen Linux-Desktops wandelt Shift+Scrollen deltaY → deltaX um;
// daher als Fallback deltaX verwenden wenn deltaY == 0.
double rawDelta = e.getDeltaY() != 0 ? e.getDeltaY() : -e.getDeltaX();
int steps = (int) Math.signum(rawDelta);
if (steps == 0) return;
if (e.isAltDown()) {
de.blight.editor.tool.ToolParameter radius = input.activeTool != null ? input.activeTool.getBrushRadius() : null;
if (radius != null) {
// logarithmischer Schritt: 15% des aktuellen Werts, mindestens 1
double step = Math.max(1.0, radius.getValue() * 0.15);
radius.setValue(radius.getValue() + steps * step);
input.brushParamsChanged = true;
}
return;
}
if (e.isShiftDown()) {
de.blight.editor.tool.ToolParameter strength = input.activeTool != null ? input.activeTool.getBrushStrength() : null;
if (strength != null) {
double step = strength.getValue() * 0.15;
if (step == 0) step = (strength.getMax() - strength.getMin()) * 0.01;
strength.setValue(strength.getValue() - steps * step);
input.brushParamsChanged = true;
return;
}
// kein Stärke-Parameter → normales Kamera-Scroll
}
if (e.isControlDown()) { steps *= 10; } if (e.isControlDown()) { steps *= 10; }
input.scrollAccum.addAndGet(steps); input.scrollAccum.addAndGet(steps);
}); });