@@ -267,9 +267,29 @@ enum class PersonaType(
267267 .toString()
268268 },
269269
270- LITTLE_CHICK (weight = 0.9 , personaEvolution = PersonaEvolution (weight = 0.3 , type = PersonaEvolutionType .LITTLE_CHICK )) {
270+ LITTLE_CHICK (weight = 0.9 , haveAnimation = true , personaEvolution = PersonaEvolution (weight = 0.3 , type = PersonaEvolutionType .LITTLE_CHICK )) {
271271 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
272+ val emotion = buildEmotionAnimation(
273+ idPrefix = " little-chick" ,
274+ animationId = animationId,
275+ totalDuration = 180.0 ,
276+ emotionDuration = 3.0 ,
277+ emotionSvgs = listOf (
278+ littleChickErrorEmotionSvg,
279+ littleChickHappyEmotionSvg,
280+ littleChickIdleFollowEmotionSvg,
281+ littleChickNotificationEmotionSvg,
282+ littleChickThinkingEmotionSvg,
283+ littleChickTypingEmotionSvg,
284+ ),
285+ emotionYOffsets = listOf (1.0 , 1.0 , 1.0 , 1.0 , 1.0 , 1.0 ),
286+ minGap = 1.0 ,
287+ maxGap = 1.0 ,
288+ )
289+
272290 val littleChick = littleChickSvg.replace(" *{act}" , act(animationId))
291+ .replace(" *{emotion-style}" , emotion.css)
292+ .replace(" *{emotions}" , emotion.content)
273293 .replace(" *{id}" , animationId.toString())
274294 .replace(" *{leg-iteration-count}" , " 360" )
275295 .replace(" *{level}" , level.toSvg(14.0 , 2.0 ))
@@ -1690,9 +1710,29 @@ enum class PersonaType(
16901710 StringBuilder ().moveRandomly(" mole" , id, 40 , " 180s" , 5 , 14.0 )
16911711 .toString()
16921712 },
1693- RABBIT (weight = 0.9 ) {
1713+ RABBIT (weight = 0.9 , haveAnimation = true ) {
16941714 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
1715+ val emotion = buildEmotionAnimation(
1716+ idPrefix = " rabbit" ,
1717+ animationId = animationId,
1718+ totalDuration = 180.0 ,
1719+ emotionDuration = 3.0 ,
1720+ emotionSvgs = listOf (
1721+ rabbitErrorEmotionSvg,
1722+ rabbitHappyEmotionSvg,
1723+ rabbitIdleFollowEmotionSvg,
1724+ rabbitNotificationEmotionSvg,
1725+ rabbitThinkingEmotionSvg,
1726+ rabbitTypingEmotionSvg,
1727+ ),
1728+ emotionYOffsets = listOf (1.0 , 1.0 , 1.0 , 1.0 , 1.0 , 1.0 ),
1729+ minGap = 1.0 ,
1730+ maxGap = 1.0 ,
1731+ )
1732+
16951733 return rabbitSvg.replace(" *{act}" , act(animationId))
1734+ .replace(" *{emotion-style}" , emotion.css)
1735+ .replace(" *{emotions}" , emotion.content)
16961736 .replace(" *{id}" , animationId.toString())
16971737 .replace(" *{level}" , level.toSvg(14.0 , 2.0 ))
16981738 .replace(
@@ -2459,9 +2499,29 @@ enum class PersonaType(
24592499 .toString()
24602500 },
24612501
2462- CAPYBARA_CARROT (0.6 ) {
2502+ CAPYBARA_CARROT (0.6 , haveAnimation = true ) {
24632503 override fun loadSvg (name : String , animationId : Long , level : Long , mode : Mode ): String {
2504+ val emotion = buildEmotionAnimation(
2505+ idPrefix = " capybara-carrot" ,
2506+ animationId = animationId,
2507+ totalDuration = 180.0 ,
2508+ emotionDuration = 3.0 ,
2509+ emotionSvgs = listOf (
2510+ capybaraCarrotErrorEmotionSvg,
2511+ capybaraCarrotHappyEmotionSvg,
2512+ capybaraCarrotIdleFollowEmotionSvg,
2513+ capybaraCarrotNotificationEmotionSvg,
2514+ capybaraCarrotThinkingEmotionSvg,
2515+ capybaraCarrotTypingEmotionSvg,
2516+ ),
2517+ emotionYOffsets = listOf (0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ),
2518+ minGap = 1.0 ,
2519+ maxGap = 1.0 ,
2520+ )
2521+
24642522 return capybaraCarrotSvg.replace(" *{act}" , act(animationId))
2523+ .replace(" *{emotion-style}" , emotion.css)
2524+ .replace(" *{emotions}" , emotion.content)
24652525 .replace(" *{id}" , animationId.toString())
24662526 .replace(" *{leg-iteration-count}" , " 360" )
24672527 .replace(" *{level}" , level.toSvg(14.0 , 2.0 ))
0 commit comments