Tune section toolbar icons and gizmo thickness
This commit is contained in:
@@ -53,6 +53,7 @@ const defaultSettings = {
|
||||
sectionAxisY: "#35ff4f",
|
||||
sectionAxisZ: "#285bff",
|
||||
sectionGizmoDiameter: 1,
|
||||
sectionGizmoThickness: 1,
|
||||
sectionPlaneFill: "#606060",
|
||||
sectionPlaneAlpha: 0.32,
|
||||
sectionPlaneEdge: "#0d0d0d",
|
||||
@@ -121,6 +122,7 @@ const applySettings = (s) => {
|
||||
root.style.setProperty("--section-axis-y", s.sectionAxisY);
|
||||
root.style.setProperty("--section-axis-z", s.sectionAxisZ);
|
||||
root.style.setProperty("--section-gizmo-diameter", s.sectionGizmoDiameter);
|
||||
root.style.setProperty("--section-gizmo-thickness", s.sectionGizmoThickness);
|
||||
root.style.setProperty("--section-plane-fill", s.sectionPlaneFill);
|
||||
root.style.setProperty("--section-plane-alpha", s.sectionPlaneAlpha);
|
||||
root.style.setProperty("--section-plane-edge", s.sectionPlaneEdge);
|
||||
@@ -384,6 +386,18 @@ export function createSettingsMenu({ panel, controls = {}, onChange = null, onSh
|
||||
setVal("sectionGizmoDiameter", Math.max(0.5, Math.min(1.8, Number(val) / 100)));
|
||||
},
|
||||
});
|
||||
addSettingsSlider({
|
||||
parent: sectionCut,
|
||||
label: "Толщина гизмо",
|
||||
value: Math.round(Math.max(0.5, Math.min(2.5, Number(state.sectionGizmoThickness ?? 1))) * 100),
|
||||
min: 50,
|
||||
max: 250,
|
||||
step: 5,
|
||||
formatValue: (val) => `${Math.round(val)}%`,
|
||||
onChange: (val) => {
|
||||
setVal("sectionGizmoThickness", Math.max(0.5, Math.min(2.5, Number(val) / 100)));
|
||||
},
|
||||
});
|
||||
addColor(sectionCut, "Плоскость", "sectionPlaneFill");
|
||||
addSettingsSlider({
|
||||
parent: sectionCut,
|
||||
|
||||
Reference in New Issue
Block a user