Refactor code structure for improved readability and maintainability

This commit is contained in:
CNCKitchen
2026-03-25 08:03:22 +01:00
parent 0cff3f8d10
commit 475945a799
12 changed files with 33 additions and 12 deletions
+5
View File
@@ -1408,6 +1408,11 @@ function addSmoothNormals(geometry) {
async function toggleDisplacementPreview(enable) {
settings.useDisplacement = enable;
// Exit surface masking mode when the 3D preview is activated
if (enable && exclusionTool) {
setExclusionTool(null);
}
if (!enable) {
// Revert to original geometry with bump-only shading.
if (currentGeometry && previewMaterial) {