ring fade: review fix -- fade the rings only; the axis guide line's opacity is never reset by the gizmo, so scaling it compounded every frame and left the line gone for the session

This commit is contained in:
matthewtrahan authored and Matthew Trahan committed 2026-10-18 15:36:14 -05:00
1 parent 2785cc054d
commit d3d606f9b8
1 file changed
+3 -3
+3 -3
View File
@@ -19,10 +19,10 @@ export function initRingFade(gizmo) {
g.updateMatrixWorld = (force) => {
own(force);
if (fade >= 1) return;
// the rings only: the axis guide line (helper.rotate) is never reset there, so
// scaling it in place would compound every frame and leave it gone
const mats = new Set();
for (const group of [g.gizmo.rotate, g.helper.rotate]) {
group.traverse((o) => { if (o.material) mats.add(o.material); });
}
g.gizmo.rotate.traverse((o) => { if (o.material) mats.add(o.material); });
for (const m of mats) m.opacity *= fade;
};
}