@@ -862,22 +862,27 @@ addCanvas(1.8, (ctx, width, height, animate) => {
862
862
863
863
const animation = statefulAnimationGenerator (
864
864
canvasPointGenerator ,
865
- ( points : Point [ ] ) => points as any ,
865
+ ( points : Point [ ] ) => points as any ,
866
866
( ) => { } ,
867
867
) ( Date . now ) ;
868
868
869
- wigglePreset ( animation , {
870
- extraPoints : 2 ,
871
- randomness : 2 ,
872
- seed : Math . random ( ) ,
873
- size,
874
- } , { } , {
875
- speed : 2 ,
876
- } ) ;
869
+ wigglePreset (
870
+ animation ,
871
+ {
872
+ extraPoints : 2 ,
873
+ randomness : 2 ,
874
+ seed : Math . random ( ) ,
875
+ size,
876
+ } ,
877
+ { } ,
878
+ {
879
+ speed : 2 ,
880
+ } ,
881
+ ) ;
877
882
878
883
const pointHistory : Point [ ] [ ] = [ ] ;
879
884
let renderCount = 0 ;
880
- animate ( ( frameTime ) => {
885
+ animate ( ( ) => {
881
886
renderCount ++ ;
882
887
const points = animation . renderPoints ( ) ;
883
888
@@ -889,14 +894,18 @@ addCanvas(1.8, (ctx, width, height, animate) => {
889
894
}
890
895
891
896
for ( let i = 0 ; i < pointHistory . length ; i ++ ) {
892
- tempStyles ( ctx , ( ) => {
893
- ctx . fillStyle = colors . secondary ;
894
- ctx . globalAlpha = i / pointHistory . length ;
895
- } , ( ) => {
896
- forPoints ( pointHistory [ i ] , ( { curr} ) => {
897
- drawPoint ( ctx , curr , i / pointHistory . length ) ;
898
- } ) ;
899
- } )
897
+ tempStyles (
898
+ ctx ,
899
+ ( ) => {
900
+ ctx . fillStyle = colors . secondary ;
901
+ ctx . globalAlpha = i / pointHistory . length ;
902
+ } ,
903
+ ( ) => {
904
+ forPoints ( pointHistory [ i ] , ( { curr} ) => {
905
+ drawPoint ( ctx , curr , i / pointHistory . length ) ;
906
+ } ) ;
907
+ } ,
908
+ ) ;
900
909
}
901
910
902
911
drawClosed ( ctx , points , true ) ;
0 commit comments