@@ -65,7 +65,7 @@ const drawEllipse5 = (context: CanvasRenderingContext2D, time: number, width: nu
6565const drawEllipse6 = ( context : CanvasRenderingContext2D , time : number , width : number , height : number ) => {
6666 const angle = ( time * Math . PI ) / 4 ;
6767
68- const ellipseHeight = height / 3.1 + 3 * Math . cos ( ( time % 2 ) * Math . PI ) ;
68+ const ellipseHeight = Math . max ( height / 3.1 + 3 * Math . cos ( ( time % 2 ) * Math . PI ) , 1 ) ;
6969 context . beginPath ( ) ;
7070 setGradient ( context , angle , width , height ) ;
7171 context . ellipse ( width / 2 , height / 2 , width / 2.4 , ellipseHeight , angle , 0 , 2 * Math . PI ) ;
@@ -76,6 +76,7 @@ const drawBlinking = (context: CanvasRenderingContext2D, time: number, width: nu
7676 const intensityRadian = ( time % 1 ) * 6 * Math . PI ;
7777
7878 let r = time % 2 < 1 ? width / 15 : width / 30 + 2 * Math . cos ( intensityRadian ) ;
79+ r = Math . max ( r , 1 ) ;
7980 let gradient = context . createRadialGradient ( width / 2 , height / 2 , 0 , width / 2 , height / 2 , r ) ;
8081 gradient . addColorStop ( 0 , "rgba(255, 255, 255, 0.5)" ) ;
8182 gradient . addColorStop ( 1 , "rgba(255, 255, 255, 0)" ) ;
@@ -86,6 +87,7 @@ const drawBlinking = (context: CanvasRenderingContext2D, time: number, width: nu
8687 context . fill ( ) ;
8788
8889 r = time % 2 < 1 ? width / 7.5 : width / 15 + 4 * Math . cos ( intensityRadian ) ;
90+ r = Math . max ( r , 1 ) ;
8991 gradient = context . createRadialGradient ( width / 2 , height / 2 , 0 , width / 2 , height / 2 , r ) ;
9092 gradient . addColorStop ( 0 , "rgba(255, 255, 255, 0.5)" ) ;
9193 gradient . addColorStop ( 1 , "rgba(255, 255, 255, 0)" ) ;
0 commit comments