Skip to content

Commit

Permalink
fix: 모든 persona들이 서로 다른 flip을 사용하도록 한다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed May 6, 2024
1 parent 41c6996 commit 9def751
Show file tree
Hide file tree
Showing 56 changed files with 386 additions and 364 deletions.
9 changes: 5 additions & 4 deletions src/main/kotlin/org/gitanimals/render/domain/PersonaType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ enum class PersonaType(private val weight: Double) {
val movingPoints = getMovingPoints(speed)

makeMove(movingPoints, personaWidth, id, type, duration)
reverseFlipped(movingPoints, flippedWidth, duration)
reverseFlipped(id, movingPoints, flippedWidth, duration)

return this
}
Expand Down Expand Up @@ -1092,11 +1092,12 @@ enum class PersonaType(private val weight: Double) {
}

private fun StringBuilder.reverseFlipped(
id: Long,
movingPoints: List<MovingPoint>,
flippedWith: Double,
duration: String
) {
this.append("@keyframes reverse-flip {")
this.append("@keyframes reverse-flip-$id {")
var beforeMovingPoint = movingPoints.first()
movingPoints.forEach { movingPoint ->
if (beforeMovingPoint.scale != movingPoint.scale) {
Expand All @@ -1112,8 +1113,8 @@ enum class PersonaType(private val weight: Double) {
beforeMovingPoint = movingPoint
}
this.append("}")
.append("#contributions-wrap, #level-tag-wrap, #level-wrap {")
.append("animation-name: reverse-flip;")
.append("#contributions-wrap-$id, #level-tag-wrap-$id, #level-wrap-$id {")
.append("animation-name: reverse-flip-$id;")
.append("animation-duration: $duration;")
.append("animation-iteration-count: 1;")
.append("animation-fill-mode: forwards;")
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/bbibbi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/cat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/cheese-cat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/flamingo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/galchi-cat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/goblin-bag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/goblin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/goose-java.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/goose-js.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/goose-kotlin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/goose-linux.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/goose-node.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main/resources/persona/animal/goose-spring.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9def751

Please sign in to comment.