mirror of
https://github.com/CNCKitchen/stlTexturizer.git
synced 2026-04-07 22:11:32 +00:00
perf: skip boundary falloff computation during active masking
This commit is contained in:
+9
-1
@@ -755,6 +755,12 @@ function setExclusionTool(tool) {
|
|||||||
if (!exclusionTool) {
|
if (!exclusionTool) {
|
||||||
isPainting = false;
|
isPainting = false;
|
||||||
getControls().enabled = true;
|
getControls().enabled = true;
|
||||||
|
// Recompute boundary falloff now that masking is done
|
||||||
|
if (_falloffDirty && currentGeometry) {
|
||||||
|
const activeGeo = (settings.useDisplacement && dispPreviewGeometry)
|
||||||
|
? dispPreviewGeometry : currentGeometry;
|
||||||
|
updateFaceMask(activeGeo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1482,7 +1488,9 @@ function updateFaceMask(geometry) {
|
|||||||
addFaceNormals(geometry);
|
addFaceNormals(geometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_falloffDirty || geometry !== _falloffGeometry) {
|
// Skip expensive falloff recomputation while actively masking;
|
||||||
|
// it will be recalculated when the masking tool is deactivated.
|
||||||
|
if (!exclusionTool && (_falloffDirty || geometry !== _falloffGeometry)) {
|
||||||
computeBoundaryFalloffAttr(geometry, maskArr);
|
computeBoundaryFalloffAttr(geometry, maskArr);
|
||||||
computeBoundaryEdges(geometry, maskArr);
|
computeBoundaryEdges(geometry, maskArr);
|
||||||
_falloffDirty = false;
|
_falloffDirty = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user