File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 196196 // Fade out everything after split
197197 if ( splitT > 1 ) {
198198 const fade = Math . max ( 0 , 1 - ( splitT - 1 ) * 1.5 ) ;
199- topHalf . material . opacity = fade * .5 ;
200- botHalf . material . opacity = fade * .5 ;
199+ clickedPill . children . forEach ( m => { if ( m . material ) m . material . opacity = fade * .5 } ) ;
201200 sparkMat . opacity = fade * .3 ;
202- innerGlow . intensity = innerGlow . intensity * fade ;
201+ innerGlow . intensity = Math . max ( 0 , innerGlow . intensity * fade ) ;
203202 if ( fade <= 0 ) { clickedPill . visible = false ; return }
204203 }
205204 requestAnimationFrame ( splitAnim ) ;
Original file line number Diff line number Diff line change @@ -623,10 +623,9 @@ let cx=0,cy=0;
623623 // Fade out everything after split
624624 if(splitT>1){
625625 const fade=Math.max(0,1-(splitT-1)*1.5);
626- topHalf.material.opacity=fade*.5;
627- botHalf.material.opacity=fade*.5;
626+ clickedPill.children.forEach(m=>{if(m.material)m.material.opacity=fade*.5});
628627 sparkMat.opacity=fade*.3;
629- innerGlow.intensity=innerGlow.intensity*fade;
628+ innerGlow.intensity=Math.max(0, innerGlow.intensity*fade) ;
630629 if(fade<=0){clickedPill.visible=false;return}
631630 }
632631 requestAnimationFrame(splitAnim);
You can’t perform that action at this time.
0 commit comments