mirror of
https://github.com/gittrahan/support-fins.git
synced 2026-10-18 18:03:27 -05:00
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:
1 parent
2785cc054d
commit
d3d606f9b8
1 file changed
+3
-3
+3
-3
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user