From a879cbd081246d2c4f17c1ff44a340bbe330b990 Mon Sep 17 00:00:00 2001 From: sumi-0011 Date: Tue, 21 Apr 2026 15:40:15 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20CAPYBARA=5FCARROT,=20LITTLE=5FCHICK,=20?= =?UTF-8?q?LITTLE=5FCHICK=5FSUNGLASSES=EC=97=90=20emotion=20animation=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .../kotlin/org/gitanimals/core/PersonaType.kt | 60 ++++++++- src/main/kotlin/org/gitanimals/core/Svgs.kt | 36 ++++++ .../persona/animal/capybara-carrot.svg | 4 + .../animal/emotion/capybara-carrot/error.svg | 118 ++++++++++++++++++ .../animal/emotion/capybara-carrot/happy.svg | 118 ++++++++++++++++++ .../emotion/capybara-carrot/idle-follow.svg | 71 +++++++++++ .../emotion/capybara-carrot/notification.svg | 94 ++++++++++++++ .../emotion/capybara-carrot/thinking.svg | 78 ++++++++++++ .../animal/emotion/capybara-carrot/typing.svg | 85 +++++++++++++ .../emotion/little-chick/idle-follow.svg | 70 +++++++++++ .../animal/emotion/little-chick/thinking.svg | 59 +++++++++ .../animal/emotion/little-chick/typing.svg | 62 +++++++++ .../animal/little-chick-sunglasses.svg | 5 +- .../resources/persona/animal/little-chick.svg | 5 +- 14 files changed, 860 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/persona/animal/emotion/capybara-carrot/error.svg create mode 100644 src/main/resources/persona/animal/emotion/capybara-carrot/happy.svg create mode 100644 src/main/resources/persona/animal/emotion/capybara-carrot/idle-follow.svg create mode 100644 src/main/resources/persona/animal/emotion/capybara-carrot/notification.svg create mode 100644 src/main/resources/persona/animal/emotion/capybara-carrot/thinking.svg create mode 100644 src/main/resources/persona/animal/emotion/capybara-carrot/typing.svg create mode 100644 src/main/resources/persona/animal/emotion/little-chick/idle-follow.svg create mode 100644 src/main/resources/persona/animal/emotion/little-chick/thinking.svg create mode 100644 src/main/resources/persona/animal/emotion/little-chick/typing.svg diff --git a/src/main/kotlin/org/gitanimals/core/PersonaType.kt b/src/main/kotlin/org/gitanimals/core/PersonaType.kt index 973cf932..f747560a 100644 --- a/src/main/kotlin/org/gitanimals/core/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/core/PersonaType.kt @@ -267,9 +267,26 @@ enum class PersonaType( .toString() }, - LITTLE_CHICK(weight = 0.9, personaEvolution = PersonaEvolution(weight = 0.3, type = PersonaEvolutionType.LITTLE_CHICK)) { + LITTLE_CHICK(weight = 0.9, haveAnimation = true, personaEvolution = PersonaEvolution(weight = 0.3, type = PersonaEvolutionType.LITTLE_CHICK)) { override fun loadSvg(name: String, animationId: Long, level: Long, mode: Mode): String { + val emotion = buildEmotionAnimation( + idPrefix = "little-chick", + animationId = animationId, + totalDuration = 180.0, + emotionDuration = 3.0, + emotionSvgs = listOf( + littleChickIdleFollowEmotionSvg, + littleChickThinkingEmotionSvg, + littleChickTypingEmotionSvg, + ), + emotionYOffsets = listOf(0.0, 0.0, 0.0), + minGap = 1.0, + maxGap = 1.0, + ) + val littleChick = littleChickSvg.replace("*{act}", act(animationId)) + .replace("*{emotion-style}", emotion.css) + .replace("*{emotions}", emotion.content) .replace("*{id}", animationId.toString()) .replace("*{leg-iteration-count}", "360") .replace("*{level}", level.toSvg(14.0, 2.0)) @@ -293,9 +310,26 @@ enum class PersonaType( .toString() }, - LITTLE_CHICK_SUNGLASSES(weight = 0.4, personaEvolution = PersonaEvolution(weight = 0.4, type = PersonaEvolutionType.LITTLE_CHICK)) { + LITTLE_CHICK_SUNGLASSES(weight = 0.4, haveAnimation = true, personaEvolution = PersonaEvolution(weight = 0.4, type = PersonaEvolutionType.LITTLE_CHICK)) { override fun loadSvg(name: String, animationId: Long, level: Long, mode: Mode): String { + val emotion = buildEmotionAnimation( + idPrefix = "little-chick", + animationId = animationId, + totalDuration = 180.0, + emotionDuration = 3.0, + emotionSvgs = listOf( + littleChickIdleFollowEmotionSvg, + littleChickThinkingEmotionSvg, + littleChickTypingEmotionSvg, + ), + emotionYOffsets = listOf(0.0, 0.0, 0.0), + minGap = 1.0, + maxGap = 1.0, + ) + val littleChick = littleChickSunglassesSvg.replace("*{act}", act(animationId)) + .replace("*{emotion-style}", emotion.css) + .replace("*{emotions}", emotion.content) .replace("*{id}", animationId.toString()) .replace("*{leg-iteration-count}", "360") .replace("*{level}", level.toSvg(14.0, 2.0)) @@ -2459,9 +2493,29 @@ enum class PersonaType( .toString() }, - CAPYBARA_CARROT(0.6) { + CAPYBARA_CARROT(0.6, haveAnimation = true) { override fun loadSvg(name: String, animationId: Long, level: Long, mode: Mode): String { + val emotion = buildEmotionAnimation( + idPrefix = "capybara-carrot", + animationId = animationId, + totalDuration = 180.0, + emotionDuration = 3.0, + emotionSvgs = listOf( + capybaraCarrotErrorEmotionSvg, + capybaraCarrotHappyEmotionSvg, + capybaraCarrotIdleFollowEmotionSvg, + capybaraCarrotNotificationEmotionSvg, + capybaraCarrotThinkingEmotionSvg, + capybaraCarrotTypingEmotionSvg, + ), + emotionYOffsets = listOf(0.0, 0.0, 0.0, 0.0, 0.0, 0.0), + minGap = 1.0, + maxGap = 1.0, + ) + return capybaraCarrotSvg.replace("*{act}", act(animationId)) + .replace("*{emotion-style}", emotion.css) + .replace("*{emotions}", emotion.content) .replace("*{id}", animationId.toString()) .replace("*{leg-iteration-count}", "360") .replace("*{level}", level.toSvg(14.0, 2.0)) diff --git a/src/main/kotlin/org/gitanimals/core/Svgs.kt b/src/main/kotlin/org/gitanimals/core/Svgs.kt index 1d051753..c3d746cc 100644 --- a/src/main/kotlin/org/gitanimals/core/Svgs.kt +++ b/src/main/kotlin/org/gitanimals/core/Svgs.kt @@ -114,6 +114,18 @@ val littleChickLinuxSvg: String = ClassPathResource("persona/animal/little-chick val littleChickSpringSvg: String = ClassPathResource("persona/animal/little-chick-spring.svg") .getContentAsString(Charset.defaultCharset()) +val littleChickIdleFollowEmotionSvg: String = + ClassPathResource("persona/animal/emotion/little-chick/idle-follow.svg") + .getContentAsString(Charset.defaultCharset()) + +val littleChickThinkingEmotionSvg: String = + ClassPathResource("persona/animal/emotion/little-chick/thinking.svg") + .getContentAsString(Charset.defaultCharset()) + +val littleChickTypingEmotionSvg: String = + ClassPathResource("persona/animal/emotion/little-chick/typing.svg") + .getContentAsString(Charset.defaultCharset()) + val penguinSvg: String = ClassPathResource("persona/animal/penguin.svg") .getContentAsString(Charset.defaultCharset()) @@ -377,6 +389,30 @@ val capybaraCarrotSvg: String = ClassPathResource("persona/animal/capybara-carro val capybaraSwimSvg: String = ClassPathResource("persona/animal/capybara-swim.svg") .getContentAsString(Charset.defaultCharset()) +val capybaraCarrotErrorEmotionSvg: String = + ClassPathResource("persona/animal/emotion/capybara-carrot/error.svg") + .getContentAsString(Charset.defaultCharset()) + +val capybaraCarrotHappyEmotionSvg: String = + ClassPathResource("persona/animal/emotion/capybara-carrot/happy.svg") + .getContentAsString(Charset.defaultCharset()) + +val capybaraCarrotIdleFollowEmotionSvg: String = + ClassPathResource("persona/animal/emotion/capybara-carrot/idle-follow.svg") + .getContentAsString(Charset.defaultCharset()) + +val capybaraCarrotNotificationEmotionSvg: String = + ClassPathResource("persona/animal/emotion/capybara-carrot/notification.svg") + .getContentAsString(Charset.defaultCharset()) + +val capybaraCarrotThinkingEmotionSvg: String = + ClassPathResource("persona/animal/emotion/capybara-carrot/thinking.svg") + .getContentAsString(Charset.defaultCharset()) + +val capybaraCarrotTypingEmotionSvg: String = + ClassPathResource("persona/animal/emotion/capybara-carrot/typing.svg") + .getContentAsString(Charset.defaultCharset()) + val littleChickEggOnHatSvg: String = ClassPathResource("persona/animal/evolution/little-chick-egg-on-hat.svg") .getContentAsString(Charset.defaultCharset()) diff --git a/src/main/resources/persona/animal/capybara-carrot.svg b/src/main/resources/persona/animal/capybara-carrot.svg index c622c607..603f12e3 100644 --- a/src/main/resources/persona/animal/capybara-carrot.svg +++ b/src/main/resources/persona/animal/capybara-carrot.svg @@ -1,5 +1,6 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/emotion/capybara-carrot/happy.svg b/src/main/resources/persona/animal/emotion/capybara-carrot/happy.svg new file mode 100644 index 00000000..00d00ee2 --- /dev/null +++ b/src/main/resources/persona/animal/emotion/capybara-carrot/happy.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/emotion/capybara-carrot/idle-follow.svg b/src/main/resources/persona/animal/emotion/capybara-carrot/idle-follow.svg new file mode 100644 index 00000000..b9366da1 --- /dev/null +++ b/src/main/resources/persona/animal/emotion/capybara-carrot/idle-follow.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/emotion/capybara-carrot/notification.svg b/src/main/resources/persona/animal/emotion/capybara-carrot/notification.svg new file mode 100644 index 00000000..2ac5588f --- /dev/null +++ b/src/main/resources/persona/animal/emotion/capybara-carrot/notification.svg @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/emotion/capybara-carrot/thinking.svg b/src/main/resources/persona/animal/emotion/capybara-carrot/thinking.svg new file mode 100644 index 00000000..105ad33b --- /dev/null +++ b/src/main/resources/persona/animal/emotion/capybara-carrot/thinking.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/emotion/capybara-carrot/typing.svg b/src/main/resources/persona/animal/emotion/capybara-carrot/typing.svg new file mode 100644 index 00000000..f391fde6 --- /dev/null +++ b/src/main/resources/persona/animal/emotion/capybara-carrot/typing.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/emotion/little-chick/idle-follow.svg b/src/main/resources/persona/animal/emotion/little-chick/idle-follow.svg new file mode 100644 index 00000000..6793c941 --- /dev/null +++ b/src/main/resources/persona/animal/emotion/little-chick/idle-follow.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/emotion/little-chick/thinking.svg b/src/main/resources/persona/animal/emotion/little-chick/thinking.svg new file mode 100644 index 00000000..5579c0ad --- /dev/null +++ b/src/main/resources/persona/animal/emotion/little-chick/thinking.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/emotion/little-chick/typing.svg b/src/main/resources/persona/animal/emotion/little-chick/typing.svg new file mode 100644 index 00000000..5a43363c --- /dev/null +++ b/src/main/resources/persona/animal/emotion/little-chick/typing.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/little-chick-sunglasses.svg b/src/main/resources/persona/animal/little-chick-sunglasses.svg index 78fecf61..22a9e4e8 100644 --- a/src/main/resources/persona/animal/little-chick-sunglasses.svg +++ b/src/main/resources/persona/animal/little-chick-sunglasses.svg @@ -1,6 +1,6 @@