From 7065cb9c09c6d5450d588291e8f8f74249399b61 Mon Sep 17 00:00:00 2001 From: devxb Date: Fri, 12 Apr 2024 21:05:16 +0900 Subject: [PATCH 1/4] =?UTF-8?q?refactor:=20=EC=9B=80=EC=A7=81=EC=9E=84?= =?UTF-8?q?=EC=9D=84=20=EC=9E=90=EC=97=B0=EC=8A=A4=EB=9F=BD=EA=B2=8C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gitanimals/render/domain/PersonaType.kt | 37 +++-- src/test/resources/persona/goose/test.svg | 157 +++++++----------- 2 files changed, 76 insertions(+), 118 deletions(-) diff --git a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt index 84a6cbb..34c5864 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt @@ -955,18 +955,18 @@ enum class PersonaType(private val weight: Double) { ): StringBuilder { var currentY = Random.nextInt(10, 90) var currentX = Random.nextInt(10, 90) - val startAngle = (Random.nextDouble() * 10).toInt() + var currentAngle = (Random.nextDouble() * 10).toInt() var scale = Random.nextInt(0, 2) - 1 if (scale == 0) { scale++ } this.append("@keyframes move-$id {") .append("0% {") - .append("-webkit-transform:translate($currentY%, $currentX%) rotate(${startAngle}deg) scaleX($scale);") - .append("-ms-transform:translate($currentY%, $currentX%) rotate(${startAngle}deg) scaleX($scale);") - .append("-o-transform:translate($currentY%, $currentX%) rotate(${startAngle}deg) scaleX($scale);") - .append("-moz-transform:translate($currentY%, $currentX%) rotate(${startAngle}deg) scaleX($scale);") - .append("transform:translate($currentY%, $currentX%) rotate(${startAngle}deg) scaleX($scale);") + .append("-webkit-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($scale);") + .append("-ms-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($scale);") + .append("-o-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($scale);") + .append("-moz-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($scale);") + .append("transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($scale);") .append("}") var animationPercentage = 0.0 while (animationPercentage < 100) { @@ -976,7 +976,7 @@ enum class PersonaType(private val weight: Double) { Random.nextInt(max(10, min(79, currentY - speed)), min(80, currentY + speed)) val nextX = Random.nextInt(max(10, min(79, currentX - speed)), min(80, currentX + speed)) - val angle = (atan2( + val nextAngle = (atan2( currentY.toDouble() - nextY.toDouble(), currentX.toDouble() - nextX.toDouble() )).toInt() @@ -984,22 +984,23 @@ enum class PersonaType(private val weight: Double) { true -> 1 false -> -1 } - this.append("${min(100.0, beforeAnimationPercentage + 0.0001)}% {") - .append("-webkit-transform: translate(${scale * (currentX + width)}, $currentY) scaleX($scale);") - .append("-ms-transform: translate(${scale * (currentX + width)}, $currentY) scaleX($scale);") - .append("-o-transform: translate(${scale * (currentX + width)}, $currentY) scaleX($scale);") - .append("-moz-transform: translate(${scale * (currentX + width)}, $currentY) scaleX($scale);") - .append("transform: translate(${scale * (currentX + width)}, $currentY) scaleX($scale);") + this.append("${min(100.0, beforeAnimationPercentage + 0.2)}% {") + .append("-webkit-transform: translate($currentX%, ${currentY}%) rotate(${currentAngle}deg) scaleX($scale);") + .append("-ms-transform: translate($currentX%, $currentY%) rotate(${currentAngle}deg) scaleX($scale);") + .append("-o-transform: translate($currentX%, $currentY%) rotate(${currentAngle}deg) scaleX($scale);") + .append("-moz-transform: translate($currentX%, $currentY%) rotate(${currentAngle}deg) scaleX($scale);") + .append("transform: translate(${currentX}%, $currentY%) rotate(${currentAngle}deg) scaleX($scale);") .append("}") .append("${min(100.0, animationPercentage)}% {") - .append("-webkit-transform:translate($nextY%, $nextX%) rotate(${angle}deg) scaleX($scale);") - .append("-ms-transform:translate($nextY%, $nextX%) rotate(${angle}deg) scaleX($scale);") - .append("-o-transform:translate($nextY%, $nextX%) rotate(${angle}deg) scaleX($scale);") - .append("-moz-transform:translate($nextY%, $nextX%) rotate(${angle}deg) scaleX($scale);") - .append("transform:translate($nextY%, $nextX%) rotate(${angle}deg) scaleX($scale);") + .append("-webkit-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($scale);") + .append("-ms-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($scale);") + .append("-o-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($scale);") + .append("-moz-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($scale);") + .append("transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($scale);") .append("}") currentY = nextY currentX = nextX + currentAngle = nextAngle } this.append("}") .append("#$type-$id {") diff --git a/src/test/resources/persona/goose/test.svg b/src/test/resources/persona/goose/test.svg index 44db000..a05b4a5 100644 --- a/src/test/resources/persona/goose/test.svg +++ b/src/test/resources/persona/goose/test.svg @@ -1,123 +1,80 @@ - + - - - - - - + + + + + + - + - - - + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + From 7145799eb4fb7db70f7c67d50de232bac6f79b2d Mon Sep 17 00:00:00 2001 From: devxb Date: Fri, 12 Apr 2024 21:26:55 +0900 Subject: [PATCH 2/4] =?UTF-8?q?refactor:=20=EC=9B=80=EC=A7=81=EC=9E=84?= =?UTF-8?q?=EC=9D=84=20=EC=9E=90=EC=97=B0=EC=8A=A4=EB=9F=BD=EA=B2=8C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gitanimals/render/app/AnimationFacade.kt | 8 +- .../render/controller/AnimationController.kt | 4 +- .../gitanimals/render/domain/AnimationMode.kt | 10 ++ .../gitanimals/render/domain/PersonaType.kt | 137 +++++++++--------- .../org/gitanimals/render/domain/User.kt | 6 +- .../gitanimals/render/domain/UserService.kt | 6 +- 6 files changed, 95 insertions(+), 76 deletions(-) create mode 100644 src/main/kotlin/org/gitanimals/render/domain/AnimationMode.kt diff --git a/src/main/kotlin/org/gitanimals/render/app/AnimationFacade.kt b/src/main/kotlin/org/gitanimals/render/app/AnimationFacade.kt index 6079885..2945b41 100644 --- a/src/main/kotlin/org/gitanimals/render/app/AnimationFacade.kt +++ b/src/main/kotlin/org/gitanimals/render/app/AnimationFacade.kt @@ -1,6 +1,7 @@ package org.gitanimals.render.app import jakarta.annotation.PostConstruct +import org.gitanimals.render.domain.AnimationMode import org.gitanimals.render.domain.User import org.gitanimals.render.domain.UserService import org.gitanimals.render.domain.event.Visited @@ -17,10 +18,11 @@ class AnimationFacade( private lateinit var registerNewUserOrchestrator: Orchestrator - fun getSvgAnimationByUsername(username: String): String { + fun getSvgAnimation(username: String, mode: String): String { + val animationMode = AnimationMode.valueOf(mode.uppercase()) return when (userService.existsByName(username)) { true -> { - val svgAnimation = userService.getSvgAnimationByUsername(username) + val svgAnimation = userService.getSvgAnimationByUsername(username, animationMode) sagaManager.startSync(Visited(username)) svgAnimation } @@ -28,7 +30,7 @@ class AnimationFacade( false -> { registerNewUserOrchestrator.sagaSync(10000, username) - userService.getSvgAnimationByUsername(username) + userService.getSvgAnimationByUsername(username, animationMode) } } } diff --git a/src/main/kotlin/org/gitanimals/render/controller/AnimationController.kt b/src/main/kotlin/org/gitanimals/render/controller/AnimationController.kt index 56afc4e..72665bc 100644 --- a/src/main/kotlin/org/gitanimals/render/controller/AnimationController.kt +++ b/src/main/kotlin/org/gitanimals/render/controller/AnimationController.kt @@ -5,6 +5,7 @@ import org.gitanimals.render.app.AnimationFacade import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RequestParam import org.springframework.web.bind.annotation.RestController @RestController @@ -16,10 +17,11 @@ class AnimationController( @GetMapping(value = ["/{username}"], produces = ["image/svg+xml"]) fun getSvgAnimation( @PathVariable("username") username: String, + @RequestParam(name = "mode", defaultValue = "FARM") mode: String, response: HttpServletResponse ): String { response.noCache() - return animationFacade.getSvgAnimationByUsername(username) + return animationFacade.getSvgAnimation(username, mode) } fun HttpServletResponse.noCache(): HttpServletResponse { diff --git a/src/main/kotlin/org/gitanimals/render/domain/AnimationMode.kt b/src/main/kotlin/org/gitanimals/render/domain/AnimationMode.kt new file mode 100644 index 0000000..8bd76b1 --- /dev/null +++ b/src/main/kotlin/org/gitanimals/render/domain/AnimationMode.kt @@ -0,0 +1,10 @@ +package org.gitanimals.render.domain + +enum class AnimationMode( + private val func: (User) -> String, +) { + + FARM({ it.createFarmAnimation() }), + ; + fun createAnimation(user: User): String = func.invoke(user) +} diff --git a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt index 34c5864..6a881f4 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt @@ -25,7 +25,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 15) + .moveRandomly("goose", id, 20, "180s", 6) .toString() }, @@ -48,7 +48,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 15) + .moveRandomly("goose", id, 20, "180s", 6) .toString() }, @@ -71,7 +71,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 25) + .moveRandomly("goose", id, 20, "180s", 6) .toString() }, @@ -94,7 +94,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 25) + .moveRandomly("goose", id, 20, "180s", 6) .toString() }, @@ -117,7 +117,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 27) + .moveRandomly("goose", id, 20, "180s", 6) .toString() }, @@ -140,7 +140,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 28) + .moveRandomly("goose", id, 20, "180s", 6) .toString() }, @@ -163,7 +163,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 26) + .moveRandomly("goose", id, 20, "180s", 6) .toString() }, @@ -186,7 +186,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 25) + .moveRandomly("goose", id, 20, "180s", 6) .toString() }, @@ -209,7 +209,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 30) + .moveRandomly("goose", id, 20, "180s", 6) .toString() }, @@ -232,7 +232,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("little-chick", id, 40, "180s", 10) + .moveRandomly("little-chick", id, 40, "180s", 2) .toString() }, @@ -255,7 +255,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("little-chick", id, 40, "180s", 10) + .moveRandomly("little-chick", id, 40, "180s", 2) .toString() }, @@ -278,7 +278,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("little-chick", id, 40, "180s", 13) + .moveRandomly("little-chick", id, 40, "180s", 2) .toString() }, @@ -301,7 +301,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("little-chick", id, 40, "180s", 13) + .moveRandomly("little-chick", id, 40, "180s", 2) .toString() }, @@ -324,7 +324,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("little-chick", id, 40, "180s", 13) + .moveRandomly("little-chick", id, 40, "180s", 2) .toString() }, @@ -347,7 +347,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("little-chick", id, 40, "180s", 13) + .moveRandomly("little-chick", id, 40, "180s", 2) .toString() }, @@ -370,7 +370,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("little-chick", id, 40, "180s", 13) + .moveRandomly("little-chick", id, 40, "180s", 2) .toString() }, @@ -393,7 +393,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("little-chick", id, 40, "180s", 13) + .moveRandomly("little-chick", id, 40, "180s", 2) .toString() }, @@ -416,7 +416,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("little-chick", id, 40, "180s", 17) + .moveRandomly("little-chick", id, 40, "180s", 2) .toString() }, @@ -435,7 +435,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("penguin", id, 10, "180s", 15) + StringBuilder().moveRandomly("penguin", id, 10, "180s", 6) .toString() }, @@ -454,7 +454,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("penguin", id, 10, "180s", 15) + StringBuilder().moveRandomly("penguin", id, 10, "180s", 6) .toString() }, @@ -473,7 +473,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("penguin", id, 10, "180s", 25) + StringBuilder().moveRandomly("penguin", id, 10, "180s", 10) .toString() }, @@ -492,7 +492,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("penguin", id, 10, "180s", 25) + StringBuilder().moveRandomly("penguin", id, 10, "180s", 10) .toString() }, @@ -511,7 +511,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("penguin", id, 10, "180s", 25) + StringBuilder().moveRandomly("penguin", id, 10, "180s", 10) .toString() }, @@ -530,7 +530,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("penguin", id, 10, "180s", 25) + StringBuilder().moveRandomly("penguin", id, 10, "180s", 10) .toString() }, @@ -549,7 +549,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("penguin", id, 10, "180s", 25) + StringBuilder().moveRandomly("penguin", id, 10, "180s", 10) .toString() }, @@ -568,7 +568,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("penguin", id, 10, "180s", 25) + StringBuilder().moveRandomly("penguin", id, 10, "180s", 10) .toString() }, @@ -587,7 +587,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("penguin", id, 10, "180s", 25) + StringBuilder().moveRandomly("penguin", id, 10, "180s", 10) .toString() }, @@ -605,7 +605,7 @@ enum class PersonaType(private val weight: Double) { ) } - override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 15) + override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 10) .toString() }, @@ -623,7 +623,7 @@ enum class PersonaType(private val weight: Double) { ) } - override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 15) + override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 10) .toString() }, @@ -641,7 +641,7 @@ enum class PersonaType(private val weight: Double) { ) } - override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 15) + override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 10) .toString() }, @@ -659,7 +659,7 @@ enum class PersonaType(private val weight: Double) { ) } - override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 15) + override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 10) .toString() }, @@ -677,7 +677,7 @@ enum class PersonaType(private val weight: Double) { ) } - override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 15) + override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 10) .toString() }, @@ -695,7 +695,7 @@ enum class PersonaType(private val weight: Double) { ) } - override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 15) + override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 10) .toString() }, @@ -713,7 +713,7 @@ enum class PersonaType(private val weight: Double) { ) } - override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 15) + override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 10) .toString() }, @@ -731,7 +731,7 @@ enum class PersonaType(private val weight: Double) { ) } - override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 15) + override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 10) .toString() }, @@ -749,7 +749,7 @@ enum class PersonaType(private val weight: Double) { ) } - override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 15) + override fun act(id: Long): String = StringBuilder().moveRandomly("fig", id, 5, "180s", 10) .toString() }, @@ -767,7 +767,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 15) + StringBuilder().moveRandomly("slime", id, 15, "180s", 2) .toString() }, @@ -785,7 +785,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 15) + StringBuilder().moveRandomly("slime", id, 15, "180s", 2) .toString() }, @@ -803,7 +803,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 15) + StringBuilder().moveRandomly("slime", id, 15, "180s", 2) .toString() }, @@ -821,7 +821,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 15) + StringBuilder().moveRandomly("slime", id, 15, "180s", 2) .toString() }, @@ -839,7 +839,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 15) + StringBuilder().moveRandomly("slime", id, 15, "180s", 2) .toString() }, @@ -857,7 +857,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 15) + StringBuilder().moveRandomly("slime", id, 15, "180s", 2) .toString() }, @@ -875,7 +875,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 15) + StringBuilder().moveRandomly("slime", id, 15, "180s", 2) .toString() }, @@ -893,7 +893,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 15) + StringBuilder().moveRandomly("slime", id, 15, "180s", 2) .toString() }, @@ -911,7 +911,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 15) + StringBuilder().moveRandomly("slime", id, 15, "180s", 2) .toString() }, ; @@ -956,17 +956,17 @@ enum class PersonaType(private val weight: Double) { var currentY = Random.nextInt(10, 90) var currentX = Random.nextInt(10, 90) var currentAngle = (Random.nextDouble() * 10).toInt() - var scale = Random.nextInt(0, 2) - 1 - if (scale == 0) { - scale++ + var currentScale = Random.nextInt(0, 2) - 1 + if (currentScale == 0) { + currentScale++ } this.append("@keyframes move-$id {") .append("0% {") - .append("-webkit-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($scale);") - .append("-ms-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($scale);") - .append("-o-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($scale);") - .append("-moz-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($scale);") - .append("transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($scale);") + .append("-webkit-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($currentScale);") + .append("-ms-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($currentScale);") + .append("-o-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($currentScale);") + .append("-moz-transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($currentScale);") + .append("transform:translate($currentY%, $currentX%) rotate(${currentAngle}deg) scaleX($currentScale);") .append("}") var animationPercentage = 0.0 while (animationPercentage < 100) { @@ -980,27 +980,30 @@ enum class PersonaType(private val weight: Double) { currentY.toDouble() - nextY.toDouble(), currentX.toDouble() - nextX.toDouble() )).toInt() - scale = when (nextX > currentX) { + val nextScale = when (nextX > currentX) { true -> 1 false -> -1 } - this.append("${min(100.0, beforeAnimationPercentage + 0.2)}% {") - .append("-webkit-transform: translate($currentX%, ${currentY}%) rotate(${currentAngle}deg) scaleX($scale);") - .append("-ms-transform: translate($currentX%, $currentY%) rotate(${currentAngle}deg) scaleX($scale);") - .append("-o-transform: translate($currentX%, $currentY%) rotate(${currentAngle}deg) scaleX($scale);") - .append("-moz-transform: translate($currentX%, $currentY%) rotate(${currentAngle}deg) scaleX($scale);") - .append("transform: translate(${currentX}%, $currentY%) rotate(${currentAngle}deg) scaleX($scale);") - .append("}") - .append("${min(100.0, animationPercentage)}% {") - .append("-webkit-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($scale);") - .append("-ms-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($scale);") - .append("-o-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($scale);") - .append("-moz-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($scale);") - .append("transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($scale);") + if (nextScale != currentScale) { + this.append("${min(100.0, beforeAnimationPercentage + 0.01)}% {") + .append("-webkit-transform: translate(${currentX - (width * nextScale)}%, ${currentY}%) rotate(${currentAngle}deg) scaleX($nextScale);") + .append("-ms-transform: translate(${currentX - (width * nextScale)}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") + .append("-o-transform: translate(${currentX - (width * nextScale)}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") + .append("-moz-transform: translate(${currentX - (width * nextScale)}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") + .append("transform: translate(${{currentX - (width * nextScale)}}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") + .append("}") + } + this.append("${min(100.0, animationPercentage)}% {") + .append("-webkit-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($nextScale);") + .append("-ms-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($nextScale);") + .append("-o-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($nextScale);") + .append("-moz-transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($nextScale);") + .append("transform:translate($nextX%, $nextY%) rotate(${nextAngle}deg) scaleX($nextScale);") .append("}") currentY = nextY currentX = nextX currentAngle = nextAngle + currentScale = nextScale } this.append("}") .append("#$type-$id {") diff --git a/src/main/kotlin/org/gitanimals/render/domain/User.kt b/src/main/kotlin/org/gitanimals/render/domain/User.kt index 38a0719..98f3d91 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/User.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/User.kt @@ -101,8 +101,8 @@ class User( visit += 1 } - fun createSvgAnimation(): String { - val builder = StringBuilder().openSvg() + fun createFarmAnimation(): String { + val builder = StringBuilder().openFarm() .append(field.fillBackground()) personas.asSequence() @@ -119,7 +119,7 @@ class User( return totalCount } - private fun StringBuilder.openSvg(): StringBuilder = + private fun StringBuilder.openFarm(): StringBuilder = this.append("") private fun StringBuilder.closeSvg(): String = this.append("").toString() diff --git a/src/main/kotlin/org/gitanimals/render/domain/UserService.kt b/src/main/kotlin/org/gitanimals/render/domain/UserService.kt index 5c9d155..3a10793 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/UserService.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/UserService.kt @@ -13,8 +13,10 @@ class UserService( fun existsByName(name: String): Boolean = userRepository.existsByName(name) - fun getSvgAnimationByUsername(username: String): String = - getUserByName(username).createSvgAnimation() + fun getSvgAnimationByUsername(username: String, mode: AnimationMode): String { + val user = getUserByName(username) + return mode.createAnimation(user) + } @Retryable(retryFor = [OptimisticLockingFailureException::class], maxAttempts = 10) @Transactional From 94d6898538998120dc4f01465a05f04f62947225 Mon Sep 17 00:00:00 2001 From: devxb Date: Fri, 12 Apr 2024 21:30:30 +0900 Subject: [PATCH 3/4] =?UTF-8?q?refactor:=20=EC=98=A4=EB=A6=AC=EC=9D=98=20?= =?UTF-8?q?=EC=9B=80=EC=A7=81=EC=9E=84=EC=9D=84=20=EC=9E=90=EC=97=B0?= =?UTF-8?q?=EC=8A=A4=EB=9F=BD=EA=B2=8C=20=EC=88=98=EC=A0=95=ED=95=9C?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gitanimals/render/domain/PersonaType.kt | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt index 6a881f4..581ebf0 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt @@ -25,7 +25,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 6) + .moveRandomly("goose", id, 20, "180s", 7) .toString() }, @@ -48,7 +48,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 6) + .moveRandomly("goose", id, 20, "180s", 7) .toString() }, @@ -71,7 +71,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 6) + .moveRandomly("goose", id, 20, "180s", 7) .toString() }, @@ -94,7 +94,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 6) + .moveRandomly("goose", id, 20, "180s", 7) .toString() }, @@ -117,7 +117,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 6) + .moveRandomly("goose", id, 20, "180s", 7) .toString() }, @@ -140,7 +140,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 6) + .moveRandomly("goose", id, 20, "180s", 7) .toString() }, @@ -163,7 +163,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 6) + .moveRandomly("goose", id, 20, "180s", 7) .toString() }, @@ -186,7 +186,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 6) + .moveRandomly("goose", id, 20, "180s", 7) .toString() }, @@ -209,7 +209,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = StringBuilder() - .moveRandomly("goose", id, 20, "180s", 6) + .moveRandomly("goose", id, 20, "180s", 7) .toString() }, @@ -767,7 +767,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 2) + StringBuilder().moveRandomly("slime", id, 15, "180s", 5) .toString() }, @@ -785,7 +785,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 2) + StringBuilder().moveRandomly("slime", id, 15, "180s", 5) .toString() }, @@ -803,7 +803,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 2) + StringBuilder().moveRandomly("slime", id, 15, "180s", 5) .toString() }, @@ -821,7 +821,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 2) + StringBuilder().moveRandomly("slime", id, 15, "180s", 5) .toString() }, @@ -839,7 +839,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 2) + StringBuilder().moveRandomly("slime", id, 15, "180s", 5) .toString() }, @@ -857,7 +857,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 2) + StringBuilder().moveRandomly("slime", id, 15, "180s", 5) .toString() }, @@ -875,7 +875,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 2) + StringBuilder().moveRandomly("slime", id, 15, "180s", 5) .toString() }, @@ -893,7 +893,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 2) + StringBuilder().moveRandomly("slime", id, 15, "180s", 5) .toString() }, @@ -911,7 +911,7 @@ enum class PersonaType(private val weight: Double) { } override fun act(id: Long): String = - StringBuilder().moveRandomly("slime", id, 15, "180s", 2) + StringBuilder().moveRandomly("slime", id, 15, "180s", 5) .toString() }, ; From 8b5db3a65ecda0b66f2bd8ab2f6f37f2196f22bf Mon Sep 17 00:00:00 2001 From: devxb Date: Fri, 12 Apr 2024 22:10:33 +0900 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20line=20mode=EB=A5=BC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gitanimals/render/domain/AnimationMode.kt | 1 + .../gitanimals/render/domain/PersonaType.kt | 16 +- .../org/gitanimals/render/domain/User.kt | 13 + .../resources/persona/animal/goose-java.svg | 8 +- .../resources/persona/animal/goose-js.svg | 6 +- .../resources/persona/animal/goose-kotlin.svg | 520 +++++++++--------- .../resources/persona/animal/goose-linux.svg | 8 +- .../resources/persona/animal/goose-node.svg | 8 +- .../resources/persona/animal/goose-spring.svg | 8 +- .../persona/animal/goose-sunglasses.svg | 7 +- .../resources/persona/animal/goose-swift.svg | 8 +- src/main/resources/persona/animal/goose.svg | 299 +++++----- .../persona/animal/little-chick-java.svg | 4 +- .../persona/animal/little-chick-js.svg | 4 +- .../persona/animal/little-chick-kotlin.svg | 4 +- .../persona/animal/little-chick-linux.svg | 4 +- .../persona/animal/little-chick-node.svg | 4 +- .../persona/animal/little-chick-spring.svg | 4 +- .../animal/little-chick-sunglasses.svg | 298 +++++----- .../persona/animal/little-chick-swift.svg | 4 +- .../resources/persona/animal/little-chick.svg | 4 +- .../resources/persona/animal/penguin-java.svg | 489 ++++++++-------- .../resources/persona/animal/penguin-js.svg | 8 +- .../persona/animal/penguin-kotlin.svg | 468 ++++++++-------- .../persona/animal/penguin-linux.svg | 410 +++++++------- .../resources/persona/animal/penguin-node.svg | 375 +++++++------ .../persona/animal/penguin-spring.svg | 442 ++++++++------- .../persona/animal/penguin-sunglasses.svg | 312 ++++++----- .../persona/animal/penguin-swift.svg | 419 +++++++------- src/main/resources/persona/animal/penguin.svg | 253 +++++---- .../resources/persona/animal/pig-java.svg | 518 +++++++++-------- src/main/resources/persona/animal/pig-js.svg | 311 ++++++----- .../resources/persona/animal/pig-kotlin.svg | 387 +++++++------ .../resources/persona/animal/pig-linux.svg | 380 +++++++------ .../resources/persona/animal/pig-node.svg | 345 ++++++------ .../resources/persona/animal/pig-spring.svg | 411 +++++++------- .../persona/animal/pig-sunglasses.svg | 308 ++++++----- .../resources/persona/animal/pig-swift.svg | 394 +++++++------ src/main/resources/persona/animal/pig.svg | 267 ++++----- .../resources/persona/animal/slime-blue.svg | 205 ++++--- .../resources/persona/animal/slime-green.svg | 205 ++++--- .../persona/animal/slime-red-java.svg | 388 +++++++------ .../resources/persona/animal/slime-red-js.svg | 241 ++++---- .../persona/animal/slime-red-kotlin.svg | 328 ++++++----- .../persona/animal/slime-red-linux.svg | 284 +++++----- .../persona/animal/slime-red-node.svg | 274 ++++----- .../persona/animal/slime-red-swift.svg | 319 ++++++----- .../resources/persona/animal/slime-red.svg | 205 ++++--- 48 files changed, 5278 insertions(+), 4900 deletions(-) diff --git a/src/main/kotlin/org/gitanimals/render/domain/AnimationMode.kt b/src/main/kotlin/org/gitanimals/render/domain/AnimationMode.kt index 8bd76b1..c2367e5 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/AnimationMode.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/AnimationMode.kt @@ -5,6 +5,7 @@ enum class AnimationMode( ) { FARM({ it.createFarmAnimation() }), + LINE({ it.createLineAnimation() }), ; fun createAnimation(user: User): String = func.invoke(user) } diff --git a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt index 581ebf0..f7d55bd 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt @@ -951,9 +951,9 @@ enum class PersonaType(private val weight: Double) { id: Long, speed: Int, duration: String, - width: Long, + personaWidth: Long, ): StringBuilder { - var currentY = Random.nextInt(10, 90) + var currentY = Random.nextInt(10, 70) var currentX = Random.nextInt(10, 90) var currentAngle = (Random.nextDouble() * 10).toInt() var currentScale = Random.nextInt(0, 2) - 1 @@ -973,7 +973,7 @@ enum class PersonaType(private val weight: Double) { val beforeAnimationPercentage = animationPercentage animationPercentage += Random.nextInt(2, 6) val nextY = - Random.nextInt(max(10, min(79, currentY - speed)), min(80, currentY + speed)) + Random.nextInt(max(0, min(79, currentY - speed)), min(70, currentY + speed)) val nextX = Random.nextInt(max(10, min(79, currentX - speed)), min(80, currentX + speed)) val nextAngle = (atan2( @@ -986,11 +986,11 @@ enum class PersonaType(private val weight: Double) { } if (nextScale != currentScale) { this.append("${min(100.0, beforeAnimationPercentage + 0.01)}% {") - .append("-webkit-transform: translate(${currentX - (width * nextScale)}%, ${currentY}%) rotate(${currentAngle}deg) scaleX($nextScale);") - .append("-ms-transform: translate(${currentX - (width * nextScale)}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") - .append("-o-transform: translate(${currentX - (width * nextScale)}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") - .append("-moz-transform: translate(${currentX - (width * nextScale)}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") - .append("transform: translate(${{currentX - (width * nextScale)}}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") + .append("-webkit-transform: translate(${currentX - (personaWidth * nextScale)}%, ${currentY}%) rotate(${currentAngle}deg) scaleX($nextScale);") + .append("-ms-transform: translate(${currentX - (personaWidth * nextScale)}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") + .append("-o-transform: translate(${currentX - (personaWidth * nextScale)}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") + .append("-moz-transform: translate(${currentX - (personaWidth * nextScale)}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") + .append("transform: translate(${{currentX - (personaWidth * nextScale)}}%, $currentY%) rotate(${currentAngle}deg) scaleX($nextScale);") .append("}") } this.append("${min(100.0, animationPercentage)}% {") diff --git a/src/main/kotlin/org/gitanimals/render/domain/User.kt b/src/main/kotlin/org/gitanimals/render/domain/User.kt index 98f3d91..0de2833 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/User.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/User.kt @@ -101,6 +101,19 @@ class User( visit += 1 } + fun createLineAnimation(): String { + val builder = StringBuilder().openLine() + + val persona = personas.first() + builder.append(persona.toSvg()) + + return builder.closeSvg() + } + + private fun StringBuilder.openLine(): StringBuilder { + return this.append("") + } + fun createFarmAnimation(): String { val builder = StringBuilder().openFarm() .append(field.fillBackground()) diff --git a/src/main/resources/persona/animal/goose-java.svg b/src/main/resources/persona/animal/goose-java.svg index 09ef687..99ef06e 100644 --- a/src/main/resources/persona/animal/goose-java.svg +++ b/src/main/resources/persona/animal/goose-java.svg @@ -1,6 +1,4 @@ - - diff --git a/src/main/resources/persona/animal/goose-js.svg b/src/main/resources/persona/animal/goose-js.svg index 5448fbb..9f3adc3 100644 --- a/src/main/resources/persona/animal/goose-js.svg +++ b/src/main/resources/persona/animal/goose-js.svg @@ -1,5 +1,3 @@ - - + @@ -199,5 +197,5 @@ + - diff --git a/src/main/resources/persona/animal/goose-kotlin.svg b/src/main/resources/persona/animal/goose-kotlin.svg index 4c9bca8..14fce5f 100644 --- a/src/main/resources/persona/animal/goose-kotlin.svg +++ b/src/main/resources/persona/animal/goose-kotlin.svg @@ -1,271 +1,269 @@ - - - + + + + + + + + + *{level} + - - - - - - - *{level} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/goose-linux.svg b/src/main/resources/persona/animal/goose-linux.svg index a2fb959..d4f764d 100644 --- a/src/main/resources/persona/animal/goose-linux.svg +++ b/src/main/resources/persona/animal/goose-linux.svg @@ -1,6 +1,4 @@ - - diff --git a/src/main/resources/persona/animal/goose-node.svg b/src/main/resources/persona/animal/goose-node.svg index 4b66529..87ca8d9 100644 --- a/src/main/resources/persona/animal/goose-node.svg +++ b/src/main/resources/persona/animal/goose-node.svg @@ -1,6 +1,4 @@ - - diff --git a/src/main/resources/persona/animal/goose-spring.svg b/src/main/resources/persona/animal/goose-spring.svg index eb51b88..c624112 100644 --- a/src/main/resources/persona/animal/goose-spring.svg +++ b/src/main/resources/persona/animal/goose-spring.svg @@ -1,6 +1,4 @@ - - diff --git a/src/main/resources/persona/animal/goose-sunglasses.svg b/src/main/resources/persona/animal/goose-sunglasses.svg index 87a37cd..56d0856 100644 --- a/src/main/resources/persona/animal/goose-sunglasses.svg +++ b/src/main/resources/persona/animal/goose-sunglasses.svg @@ -1,5 +1,4 @@ - - diff --git a/src/main/resources/persona/animal/goose-swift.svg b/src/main/resources/persona/animal/goose-swift.svg index 561d89f..b14a16e 100644 --- a/src/main/resources/persona/animal/goose-swift.svg +++ b/src/main/resources/persona/animal/goose-swift.svg @@ -1,6 +1,4 @@ - - diff --git a/src/main/resources/persona/animal/goose.svg b/src/main/resources/persona/animal/goose.svg index cc2c298..40a0f7d 100644 --- a/src/main/resources/persona/animal/goose.svg +++ b/src/main/resources/persona/animal/goose.svg @@ -1,159 +1,158 @@ - - - - - - - - - - - *{level} - + + + + + + + + + *{level} + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/little-chick-java.svg b/src/main/resources/persona/animal/little-chick-java.svg index 7e24019..aa14328 100644 --- a/src/main/resources/persona/animal/little-chick-java.svg +++ b/src/main/resources/persona/animal/little-chick-java.svg @@ -1,5 +1,4 @@ - - - diff --git a/src/main/resources/persona/animal/little-chick-js.svg b/src/main/resources/persona/animal/little-chick-js.svg index e0b9e7f..0a375bc 100644 --- a/src/main/resources/persona/animal/little-chick-js.svg +++ b/src/main/resources/persona/animal/little-chick-js.svg @@ -1,5 +1,4 @@ - - - diff --git a/src/main/resources/persona/animal/little-chick-kotlin.svg b/src/main/resources/persona/animal/little-chick-kotlin.svg index 2b83e92..07160e9 100644 --- a/src/main/resources/persona/animal/little-chick-kotlin.svg +++ b/src/main/resources/persona/animal/little-chick-kotlin.svg @@ -1,5 +1,4 @@ - - - diff --git a/src/main/resources/persona/animal/little-chick-linux.svg b/src/main/resources/persona/animal/little-chick-linux.svg index 84d626c..9dd4d23 100644 --- a/src/main/resources/persona/animal/little-chick-linux.svg +++ b/src/main/resources/persona/animal/little-chick-linux.svg @@ -1,5 +1,4 @@ - - - diff --git a/src/main/resources/persona/animal/little-chick-node.svg b/src/main/resources/persona/animal/little-chick-node.svg index bf05b24..edc72a8 100644 --- a/src/main/resources/persona/animal/little-chick-node.svg +++ b/src/main/resources/persona/animal/little-chick-node.svg @@ -1,5 +1,4 @@ - - - diff --git a/src/main/resources/persona/animal/little-chick-spring.svg b/src/main/resources/persona/animal/little-chick-spring.svg index bf545e9..9101ee6 100644 --- a/src/main/resources/persona/animal/little-chick-spring.svg +++ b/src/main/resources/persona/animal/little-chick-spring.svg @@ -1,5 +1,4 @@ - - - diff --git a/src/main/resources/persona/animal/little-chick-sunglasses.svg b/src/main/resources/persona/animal/little-chick-sunglasses.svg index ab8d6ac..fd762e5 100644 --- a/src/main/resources/persona/animal/little-chick-sunglasses.svg +++ b/src/main/resources/persona/animal/little-chick-sunglasses.svg @@ -1,156 +1,168 @@ - - - - - - - - - - - *{level} - - + + + + + + + + + *{level} + + - - - - - - + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/little-chick-swift.svg b/src/main/resources/persona/animal/little-chick-swift.svg index 7f4dc31..def84f0 100644 --- a/src/main/resources/persona/animal/little-chick-swift.svg +++ b/src/main/resources/persona/animal/little-chick-swift.svg @@ -1,5 +1,4 @@ - - - diff --git a/src/main/resources/persona/animal/little-chick.svg b/src/main/resources/persona/animal/little-chick.svg index 59d5898..152fbd4 100644 --- a/src/main/resources/persona/animal/little-chick.svg +++ b/src/main/resources/persona/animal/little-chick.svg @@ -1,5 +1,4 @@ - - - diff --git a/src/main/resources/persona/animal/penguin-java.svg b/src/main/resources/persona/animal/penguin-java.svg index 542da42..92cad65 100644 --- a/src/main/resources/persona/animal/penguin-java.svg +++ b/src/main/resources/persona/animal/penguin-java.svg @@ -1,231 +1,288 @@ - - - - - - - - - - - + + + + + + + + + - - - - - - - *{level} - + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + diff --git a/src/main/resources/persona/animal/penguin-js.svg b/src/main/resources/persona/animal/penguin-js.svg index 8d7812c..b2741df 100644 --- a/src/main/resources/persona/animal/penguin-js.svg +++ b/src/main/resources/persona/animal/penguin-js.svg @@ -1,6 +1,4 @@ - - + diff --git a/src/main/resources/persona/animal/penguin-kotlin.svg b/src/main/resources/persona/animal/penguin-kotlin.svg index 4dd85c2..a6052cf 100644 --- a/src/main/resources/persona/animal/penguin-kotlin.svg +++ b/src/main/resources/persona/animal/penguin-kotlin.svg @@ -1,250 +1,248 @@ - - - - - - - - - - - + + + + + + + + + - - - - - - - *{level} - + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + diff --git a/src/main/resources/persona/animal/penguin-linux.svg b/src/main/resources/persona/animal/penguin-linux.svg index 08386f8..02bcdf2 100644 --- a/src/main/resources/persona/animal/penguin-linux.svg +++ b/src/main/resources/persona/animal/penguin-linux.svg @@ -1,221 +1,219 @@ - - - - - - - - - - - + + + + + + + + + - - - - - - - *{level} - + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + diff --git a/src/main/resources/persona/animal/penguin-node.svg b/src/main/resources/persona/animal/penguin-node.svg index 1ad6d1d..bb74399 100644 --- a/src/main/resources/persona/animal/penguin-node.svg +++ b/src/main/resources/persona/animal/penguin-node.svg @@ -1,193 +1,212 @@ - - - - - - - - - - - + + + + + + + + + - - - - - - - *{level} - + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + diff --git a/src/main/resources/persona/animal/penguin-spring.svg b/src/main/resources/persona/animal/penguin-spring.svg index 18a8c01..2495966 100644 --- a/src/main/resources/persona/animal/penguin-spring.svg +++ b/src/main/resources/persona/animal/penguin-spring.svg @@ -1,237 +1,235 @@ - - - - - - - - - - - + + + + + + + + + - - - - - - - *{level} - + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + diff --git a/src/main/resources/persona/animal/penguin-sunglasses.svg b/src/main/resources/persona/animal/penguin-sunglasses.svg index c41746b..60bea96 100644 --- a/src/main/resources/persona/animal/penguin-sunglasses.svg +++ b/src/main/resources/persona/animal/penguin-sunglasses.svg @@ -1,170 +1,168 @@ - - - - - - - - - - - + + + + + + + + + - - - - - - - *{level} - + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/penguin-swift.svg b/src/main/resources/persona/animal/penguin-swift.svg index d0e73ff..e4724e0 100644 --- a/src/main/resources/persona/animal/penguin-swift.svg +++ b/src/main/resources/persona/animal/penguin-swift.svg @@ -1,208 +1,241 @@ - - - - - - - - - - - + + + + + + + + + - - - - - - - *{level} - + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + diff --git a/src/main/resources/persona/animal/penguin.svg b/src/main/resources/persona/animal/penguin.svg index a7c32e6..48458ac 100644 --- a/src/main/resources/persona/animal/penguin.svg +++ b/src/main/resources/persona/animal/penguin.svg @@ -1,140 +1,137 @@ - - - - - - - - - - - - - - - - - - - *{level} - + + + + + + + + + - - - - - - - - + + + + + + + *{level} + - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/pig-java.svg b/src/main/resources/persona/animal/pig-java.svg index 5da9bdf..9abe647 100644 --- a/src/main/resources/persona/animal/pig-java.svg +++ b/src/main/resources/persona/animal/pig-java.svg @@ -1,273 +1,271 @@ - - - - - - - - - - - - - - - - - - - *{level} - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + *{level} + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/pig-js.svg b/src/main/resources/persona/animal/pig-js.svg index e4c2891..06a557b 100644 --- a/src/main/resources/persona/animal/pig-js.svg +++ b/src/main/resources/persona/animal/pig-js.svg @@ -1,165 +1,172 @@ - - - - - - - - - - - - - - - - - - - *{level} - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + *{level} + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/pig-kotlin.svg b/src/main/resources/persona/animal/pig-kotlin.svg index 27ba214..493ba75 100644 --- a/src/main/resources/persona/animal/pig-kotlin.svg +++ b/src/main/resources/persona/animal/pig-kotlin.svg @@ -1,183 +1,230 @@ - - - - - - - - - - - - - - - - - - - *{level} - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + *{level} + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/pig-linux.svg b/src/main/resources/persona/animal/pig-linux.svg index f3d6d8f..2abe1c6 100644 --- a/src/main/resources/persona/animal/pig-linux.svg +++ b/src/main/resources/persona/animal/pig-linux.svg @@ -1,204 +1,202 @@ - - - - - - - - - - - - - - - - - - - *{level} - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + *{level} + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/pig-node.svg b/src/main/resources/persona/animal/pig-node.svg index dc93f92..0d90428 100644 --- a/src/main/resources/persona/animal/pig-node.svg +++ b/src/main/resources/persona/animal/pig-node.svg @@ -1,176 +1,195 @@ - - - - - - - - - - - - - - - - - - - *{level} - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + *{level} + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/pig-spring.svg b/src/main/resources/persona/animal/pig-spring.svg index f8a9ccf..3e0ebf8 100644 --- a/src/main/resources/persona/animal/pig-spring.svg +++ b/src/main/resources/persona/animal/pig-spring.svg @@ -1,220 +1,217 @@ - - - - - - - - - - - - - - - - - - - *{level} - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + *{level} + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/pig-sunglasses.svg b/src/main/resources/persona/animal/pig-sunglasses.svg index 82b4c31..638ce3b 100644 --- a/src/main/resources/persona/animal/pig-sunglasses.svg +++ b/src/main/resources/persona/animal/pig-sunglasses.svg @@ -1,168 +1,166 @@ - - - - - - - - - - - + + + + + + + + + - - - - - - - *{level} - + + + + + + + *{level} + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/pig-swift.svg b/src/main/resources/persona/animal/pig-swift.svg index b33528d..9a31643 100644 --- a/src/main/resources/persona/animal/pig-swift.svg +++ b/src/main/resources/persona/animal/pig-swift.svg @@ -1,193 +1,227 @@ - - - - - - - - - - - - - - - - - - - *{level} - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + *{level} + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/pig.svg b/src/main/resources/persona/animal/pig.svg index 1ce4b37..5892324 100644 --- a/src/main/resources/persona/animal/pig.svg +++ b/src/main/resources/persona/animal/pig.svg @@ -1,141 +1,150 @@ - - - - - - - - - - - - - - - - - - - *{level} - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + *{level} + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/slime-blue.svg b/src/main/resources/persona/animal/slime-blue.svg index a8996f9..cfdd060 100644 --- a/src/main/resources/persona/animal/slime-blue.svg +++ b/src/main/resources/persona/animal/slime-blue.svg @@ -1,112 +1,111 @@ - - - - - - - - - - *{level} - + + + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/slime-green.svg b/src/main/resources/persona/animal/slime-green.svg index a3d097f..3eec3ef 100644 --- a/src/main/resources/persona/animal/slime-green.svg +++ b/src/main/resources/persona/animal/slime-green.svg @@ -1,112 +1,111 @@ - - - - - - - - - - *{level} - + + + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/slime-red-java.svg b/src/main/resources/persona/animal/slime-red-java.svg index e2f390c..f9ada6f 100644 --- a/src/main/resources/persona/animal/slime-red-java.svg +++ b/src/main/resources/persona/animal/slime-red-java.svg @@ -1,174 +1,232 @@ - - - - - - - - - - *{level} - + + + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/slime-red-js.svg b/src/main/resources/persona/animal/slime-red-js.svg index 68a212f..79ade6a 100644 --- a/src/main/resources/persona/animal/slime-red-js.svg +++ b/src/main/resources/persona/animal/slime-red-js.svg @@ -1,125 +1,134 @@ - - - - - - - - - - *{level} - + + + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/slime-red-kotlin.svg b/src/main/resources/persona/animal/slime-red-kotlin.svg index cf1fe36..1ef89cf 100644 --- a/src/main/resources/persona/animal/slime-red-kotlin.svg +++ b/src/main/resources/persona/animal/slime-red-kotlin.svg @@ -1,154 +1,192 @@ - - - - - - - - - - *{level} - + + + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/slime-red-linux.svg b/src/main/resources/persona/animal/slime-red-linux.svg index 969c33c..b4fd032 100644 --- a/src/main/resources/persona/animal/slime-red-linux.svg +++ b/src/main/resources/persona/animal/slime-red-linux.svg @@ -1,139 +1,163 @@ - - - - - - - - - - *{level} - + + + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/slime-red-node.svg b/src/main/resources/persona/animal/slime-red-node.svg index 71f3011..3da0e56 100644 --- a/src/main/resources/persona/animal/slime-red-node.svg +++ b/src/main/resources/persona/animal/slime-red-node.svg @@ -1,136 +1,156 @@ - - - - - - - - - - *{level} - + + + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/slime-red-swift.svg b/src/main/resources/persona/animal/slime-red-swift.svg index f6db8b9..bd86607 100644 --- a/src/main/resources/persona/animal/slime-red-swift.svg +++ b/src/main/resources/persona/animal/slime-red-swift.svg @@ -1,151 +1,186 @@ - - - - - - - - - - *{level} - + + + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/persona/animal/slime-red.svg b/src/main/resources/persona/animal/slime-red.svg index 5bc25d5..8e6d6f2 100644 --- a/src/main/resources/persona/animal/slime-red.svg +++ b/src/main/resources/persona/animal/slime-red.svg @@ -1,112 +1,111 @@ - - - - - - - - - - *{level} - + + + + + + + + + *{level} + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +