22using System . Collections . Generic ;
33using System . IO ;
44using QRCoder ;
5+ using SixLabors . ImageSharp ;
6+ using SixLabors . ImageSharp . Drawing ;
57
68namespace Danmakux
79{
@@ -396,30 +398,91 @@ static void Main(string[] args)
396398 {
397399 p . x = 0 ;
398400 p . alpha = 1 ;
399- p . y = - 150 ;
401+ p . y = - 75 ;
400402 p . rotateX = 0 ;
401403 p . rotateY = 0 ;
402404 p . rotateZ = 0 ;
403-
405+ p . scale = 1.0f ;
404406 } , ( motion , p , noChar , noStroke ) =>
405407 {
406408 motion . Apply ( strokeOffset * noStroke ) ;
407409
408410 motion . Apply ( 0.3f , new TextProperty
409411 {
410- y = 0
412+ y = 100 ,
413+ scale = 1.2f
411414 } , "cubic-bezier(0,.6,.2,1)" ) ;
412415 } ) ;
413416 }
414417
418+
419+
420+ var seg1 = new LinearLineSegment (
421+ new PointF ( 500 , - 700 ) , new PointF ( 700 , 700 ) ,
422+ new PointF ( - 200 , 700 ) ) ;
423+ var seg2 = new LinearLineSegment (
424+ new PointF ( 500 , - 700 ) , new PointF ( - 700 , - 700 ) ,
425+ new PointF ( - 700 , 700 ) , new PointF ( - 200 , 700 ) ) ;
426+ ClipHelper . ClipChar ( helper , seg1 , "残" , "攒" ) ;
427+ ClipHelper . ClipChar ( helper , seg2 , "残" , "撰" ) ;
428+
415429 helper . DefParent ( "s6" , null , new TextProperty ( )
416430 {
417431 x = 50 ,
418432 y = 50 ,
419- duration = 0 .4f,
433+ duration = 4 .4f,
420434 scale = 1.0f
421435 } ) ;
436+ {
437+ const int charDistance = 50 ;
438+ const int rotateDiff = 25 ;
439+ const float strokeOffset = 0.002f ;
440+ const float charOffset = 0f ;
441+
442+ TextProperty prop = new TextProperty ( ) ;
443+ prop . duration = 14 ;
444+ prop . scale = 1.0f ;
445+ prop . fillColor = "0xeeeeee" ;
446+ prop . alpha = 1.0f ;
447+ helper . AddText ( "攒" , "s6" , "s6" , prop , ( p , noChar , noStroke ) =>
448+ {
449+ p . x = 0 ;
450+ p . alpha = 0 ;
451+ p . y = 100 ;
452+ p . scale = 1.0f ;
453+
454+ } , ( motion , p , noChar , noStroke ) =>
455+ {
456+ motion . Apply ( .4f ) ;
457+ motion . Apply ( strokeOffset * noStroke , new TextProperty
458+ {
459+ alpha = 1
460+ } ) ;
422461
462+ motion . Apply ( 1f , new TextProperty
463+ {
464+ y = - 100
465+ } , "cubic-bezier(0,1,0,1)" , true ) ;
466+
467+ motion . Apply ( 10 , isBackup : true ) ;
468+
469+ motion . Apply ( 1f , new TextProperty
470+ {
471+ x = 300
472+ } , "cubic-bezier(0,.5,0,1)" ) ;
473+
474+ motion . ForceSetBackup ( true ) ;
475+ } ) ;
476+ }
477+
478+
479+ helper . DefParent ( "s7" , null , new TextProperty ( )
480+ {
481+ x = 50 ,
482+ y = 50 ,
483+ duration = 4.4f ,
484+ scale = 1.0f
485+ } ) ;
423486 {
424487 const int charDistance = 50 ;
425488 const int rotateDiff = 25 ;
@@ -431,25 +494,28 @@ static void Main(string[] args)
431494 prop . scale = 1.0f ;
432495 prop . fillColor = "0xeeeeee" ;
433496 prop . alpha = 1.0f ;
434- helper . AddText ( "残 " , "s6 " , "s6 " , prop , ( p , noChar , noStroke ) =>
497+ helper . AddText ( "撰 " , "s7 " , "s7 " , prop , ( p , noChar , noStroke ) =>
435498 {
436499 p . x = 0 ;
437- p . alpha = 1 ;
438- p . y = - 150 ;
439- p . rotateX = 0 ;
440- p . rotateY = 0 ;
441- p . rotateZ = 0 ;
500+ p . alpha = 0 ;
501+ p . y = 100 ;
442502 p . scale = 1.0f ;
443503
444504 } , ( motion , p , noChar , noStroke ) =>
445505 {
446- motion . Apply ( strokeOffset * noStroke ) ;
506+ motion . Apply ( .4f ) ;
507+ motion . Apply ( strokeOffset * noStroke , new TextProperty
508+ {
509+ alpha = 1
510+ } ) ;
447511
448- motion . Apply ( 0.3f , new TextProperty
512+ motion . Apply ( 1f , new TextProperty
449513 {
450- y = 0 ,
451- scale = 2.0f
452- } , "cubic-bezier(0,.6,.2,1)" ) ;
514+ y = 200 ,
515+ alpha = 0
516+ } , "cubic-bezier(0,.3,0,1)" ) ;
517+
518+ motion . ForceSetBackup ( true ) ;
453519 } ) ;
454520 }
455521
0 commit comments