🚀 Auto-deploy: melhoria no snap e medição AR em 23/05/2026 23:26:57

This commit is contained in:
2026-05-23 23:26:57 +00:00
parent c93e56640d
commit b7cd422068
6 changed files with 35 additions and 49 deletions
+14 -20
View File
@@ -161,25 +161,19 @@ function GLBModel({ sceneModel, isActive }: { sceneModel: SceneModel; isActive:
originalColors.current.set(mat, mat.color.clone());
}
if (renderMode === 'edges' && !measureMode) {
mat.visible = false;
const isEdgesOrMeasure = renderMode === 'edges' || measureMode;
mat.visible = true;
const targetOpacity = isEdgesOrMeasure ? 0.25 : opacity;
mat.transparent = targetOpacity < 1;
mat.opacity = targetOpacity;
mat.wireframe = false;
if (hasRejected) {
mat.color.setHSL(0, 0.7, 0.5);
} else if (allApproved) {
mat.color.setHSL(0.38, 0.7, 0.45);
} else {
mat.visible = true;
const targetOpacity = measureMode ? 0.25 : opacity;
mat.transparent = targetOpacity < 1;
mat.opacity = targetOpacity;
mat.wireframe = renderMode === 'wireframe';
if (renderMode === 'wireframe') {
mat.wireframeLinewidth = wireframeThickness;
mat.color.set(wireframeColor);
} else if (hasRejected) {
mat.color.setHSL(0, 0.7, 0.5);
} else if (allApproved) {
mat.color.setHSL(0.38, 0.7, 0.45);
} else {
// Tint with the per-model color (subtle)
mat.color.set(sceneModel.color);
}
// Tint with the per-model color (subtle)
mat.color.set(sceneModel.color);
}
mat.needsUpdate = true;
}
@@ -188,8 +182,8 @@ function GLBModel({ sceneModel, isActive }: { sceneModel: SceneModel; isActive:
if ((renderMode === 'edges' || measureMode) && child.geometry) {
const edgesGeo = new THREE.EdgesGeometry(child.geometry, edgeThresholdAngle);
const lineMat = new THREE.LineBasicMaterial({
color: measureMode ? '#00f3ff' : wireframeColor,
linewidth: measureMode ? 2 : wireframeThickness,
color: (renderMode === 'edges' || measureMode) ? '#00f3ff' : wireframeColor,
linewidth: (renderMode === 'edges' || measureMode) ? 2 : wireframeThickness,
});
const lineSegments = new THREE.LineSegments(edgesGeo, lineMat);
lineSegments.userData.__edgeLine = true;