scribble width

This commit is contained in:
Haoming
2025-09-18 17:52:17 +08:00
parent a0ff66d8a4
commit 19d5544570
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
<div class="forge-range-row" title="adjust with [W] + [Scroll Wheel]"
id="scribbleWidthBlock_forge_mixin">
<div id="widthLabel_forge_mixin" class="forge-toolbar-label">Brush Width</div>
<input type="range" id="scribbleWidth_forge_mixin" class="forge-toolbar-range" min="0" max="100"
<input type="range" id="scribbleWidth_forge_mixin" class="forge-toolbar-range" min="1" max="100"
value="25">
</div>
<div class="forge-range-row"
+5 -1
View File
@@ -324,8 +324,12 @@ class ForgeCanvas {
if (this._held_W) {
// Width
scribbleWidth.value = parseInt(scribbleWidth.value) - Math.sign(e.deltaY) * 5;
scribbleWidth.value = parseInt(scribbleWidth.value) - Math.sign(e.deltaY) * 3;
updateInput(scribbleWidth);
const rect = container.getBoundingClientRect();
const indicatorSize = self.scribbleWidth * 2;
scribbleIndicator.style.left = `${e.clientX - rect.left - indicatorSize}px`;
scribbleIndicator.style.top = `${e.clientY - rect.top - indicatorSize}px`;
scale = false;
}
if (this._held_A) {