@@ -21,7 +21,7 @@ const ctx = temp;
2121
2222const toggle = document . getElementById ( "toggle" ) ;
2323if ( toggle === null ) throw new Error ( "no toggle" ) ;
24- toggle . onclick = ( ) => debug = ! debug ;
24+ toggle . onclick = ( ) => ( debug = ! debug ) ;
2525
2626const point = ( x : number , y : number , ia : number , il : number , oa : number , ol : number ) : Point => {
2727 return {
@@ -142,6 +142,16 @@ const testPrepShapesC = (percentage: number) => {
142142 drawShape ( ctx , debug , interpolateBetweenLoop ( percentage , ...prepShapes ( a , b ) ) ) ;
143143} ;
144144
145+ const testPrepShapesD = ( percentage : number ) => {
146+ const a = blob ( "d" , 8 , 0.15 , { x : 0.45 , y : 0.65 } ) ;
147+ const b : Shape = [
148+ point ( 0.525 , 0.725 , 0 , 0 , 0 , 0 ) ,
149+ point ( 0.525 , 0.725 , 0 , 0 , 0 , 0 ) ,
150+ point ( 0.525 , 0.725 , 0 , 0 , 0 , 0 ) ,
151+ ] ;
152+ drawShape ( ctx , debug , interpolateBetweenLoop ( percentage , ...prepShapes ( a , b ) ) ) ;
153+ } ;
154+
145155const blob = ( seed : string , count : number , scale : number , offset : Coord ) : Shape => {
146156 const rgen = rand ( seed ) ;
147157 const shape = genBlob ( count , ( ) => 0.3 + 0.2 * rgen ( ) ) ;
@@ -170,6 +180,7 @@ const blob = (seed: string, count: number, scale: number, offset: Coord): Shape
170180 testPrepShapesA ( percentage ) ;
171181 testPrepShapesB ( percentage ) ;
172182 testPrepShapesC ( percentage ) ;
183+ testPrepShapesD ( percentage ) ;
173184
174185 percentage += animationSpeed / 1000 ;
175186 percentage = mod ( percentage , 1 ) ;
0 commit comments