Skip to content

Commit

Permalink
fix animations
Browse files Browse the repository at this point in the history
  • Loading branch information
ceceppa committed Oct 13, 2023
1 parent 698487b commit 93523b1
Show file tree
Hide file tree
Showing 35 changed files with 65 additions and 62 deletions.
2 changes: 1 addition & 1 deletion addons/anima/animations/back_entrances/back_in_down.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var KEYFRAMES := {
0: {
"translate:y": "-:size:y - 60",
"translate:y": -1200,
"scale": Vector3(0.7, 0.7, 0.7),
"opacity": 0,
},
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/back_entrances/back_in_left.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var KEYFRAMES := {
0: {
"translate:x": "-:size:x - 60",
"translate:x": -2000,
"scale": Vector3(0.7, 0.7, 0.7),
"opacity": 0.7,
},
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/back_entrances/back_in_right.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var KEYFRAMES := {
0: {
"translate:x": ":size:x + 60",
"translate:x": 2000,
"scale": Vector3(0.7, 0.7, 0.7),
"opacity": 0.7,
},
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/back_entrances/back_in_up.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var KEYFRAMES := {
0: {
"translate:y": ":size:y + 60",
"translate:y": 1200,
"scale": Vector3(0.7, 0.7, 0.7),
"opacity": 0.7,
},
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/back_exits/back_out_down.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var KEYFRAMES := {
"opacity": 0.7
},
100: {
"translate:y": ":size:y * 2",
"translate:y": 700,
"scale": Vector2(0.7, 0.7),
"opacity": 0.7
}
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/back_exits/back_out_left.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var KEYFRAMES := {
"opacity": 0.7
},
100: {
"translate:x": "-:size:x * 2",
"translate:x": -2000,
"scale": Vector2(0.7, 0.7),
"opacity": 0.7
}
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/back_exits/back_out_right.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var KEYFRAMES := {
"opacity": 0.7
},
100: {
"translate:x": ":size:x * 2",
"translate:x": 2000,
"scale": Vector2(0.7, 0.7),
"opacity": 0.7
}
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/back_exits/back_out_up.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var KEYFRAMES := {
"opacity": 0.7
},
100: {
"translate:y": "-:size:y * 2",
"translate:y": -700,
"scale": Vector2(0.7, 0.7),
"opacity": 0.7
}
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/bouncing_exits/bounce_out_down.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var KEYFRAMES := {
},
100: {
"opacity": 0,
"translate:y": "..:size:y + ..:position:y",
"translate:y": 2000,
"scale:y": 3
}
}
2 changes: 1 addition & 1 deletion addons/anima/animations/bouncing_exits/bounce_out_up.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var KEYFRAMES := {
},
100: {
"opacity": 0,
"translate:y": "-..:size:y - ..:position:y",
"translate:y": -2000,
"scale:y": 3
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var KEYFRAMES := {
0: {
"opacity": 0,
"translate:y": ":size:y + ..:size:y"
"translate:y": "(:size:y + ..:size:y) * 2"
},
100: {
"opacity": 1,
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/fading_entrances/fade_in_up_big.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var KEYFRAMES := {
0: {
"opacity": 0,
"translate:y": ":size:y + ..:size:y"
"translate:y": "-(:size:y + ..:size:y) * 2"
},
100: {
"opacity": 1,
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/fading_exits/fade_out_down_big.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var KEYFRAMES := {
100: {
"opacity": 0,
"translate:y": "-:size:y - ..:size:y"
"translate:y": "(:size:y + ..:size:y) * 2"
},
0: {
"opacity": 1,
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/fading_exits/fade_out_up_big.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var KEYFRAMES := {
100: {
"opacity": 0,
"translate:y": "-:size:y - ..:size:y"
"translate:y": "-(:size:y + ..:size:y) * 2"
},
0: {
"opacity": 1,
Expand Down
6 changes: 3 additions & 3 deletions addons/anima/animations/lightspeed/light_speed_in_left.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ var KEYFRAMES := {
0: {
"translate:x": "-:size:x",
"opacity": 0,
"skew:x": 30,
"skew:x": 0.52,
},
60: {
"skew:x": -20,
"skew:x": -0.34,
"opacity": 1,
},
80: {
"skew:x": 5,
"skew:x": 0.087,
},
100: {
"translate:x": 0,
Expand Down
6 changes: 3 additions & 3 deletions addons/anima/animations/lightspeed/light_speed_in_right.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ var KEYFRAMES := {
0: {
"translate:x": ":size:x",
"opacity": 0,
"skew:x": -30,
"skew:x": deg_to_rad(-30),
},
60: {
"skew:x": 20,
"skew:x": deg_to_rad(20),
"opacity": 1,
},
80: {
"skew:x": -5,
"skew:x": deg_to_rad(-5),
},
100: {
"translate:x": 0,
Expand Down
3 changes: 2 additions & 1 deletion addons/anima/animations/lightspeed/light_speed_out_left.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ var KEYFRAMES := {
},
100: {
"translate:x": "-:size:x",
"skew:x": -30,
"skew:x": deg_to_rad(-30),
"opacity": 0
},
"easing": ANIMA.EASING.EASE_IN
}
3 changes: 2 additions & 1 deletion addons/anima/animations/lightspeed/light_speed_out_right.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ var KEYFRAMES := {
},
100: {
"translate:x": ":size:x",
"skew:x": 30,
"skew:x": deg_to_rad(30),
"opacity": 0
},
"easing": ANIMA.EASING.EASE_IN
}
2 changes: 1 addition & 1 deletion addons/anima/animations/rotating_entrances/rotate_in.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var KEYFRAMES := {
0: {
rotation = -200,
rotation = deg_to_rad(-200),
opacity = 0,
},
100: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var KEYFRAMES := {
0: {
rotation = -45,
rotation = deg_to_rad(-45),
opacity = 0,
},
100: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var KEYFRAMES := {
0: {
rotation = 45,
rotation = deg_to_rad(45),
opacity = 0,
},
100: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var KEYFRAMES := {
0: {
rotation = 45,
rotation = deg_to_rad(45),
opacity = 0,
},
100: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var KEYFRAMES := {
0: {
rotation = -90,
rotation = deg_to_rad(-90),
opacity = 0,
},
100: {
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/rotating_exits/rotate_out.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var KEYFRAMES := {
opacity = 1,
},
100: {
rotation = 200,
rotation = deg_to_rad(200),
opacity = 0,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var KEYFRAMES := {
opacity = 1,
},
100: {
rotation = 45,
rotation = deg_to_rad(45),
opacity = 0,
},
"pivot": ANIMA.PIVOT.BOTTOM_LEFT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var KEYFRAMES := {
opacity = 1,
},
100: {
rotation = -45,
rotation = deg_to_rad(-45),
opacity = 0,
},
"pivot": ANIMA.PIVOT.BOTTOM_RIGHT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var KEYFRAMES := {
opacity = 1,
},
100: {
rotation = -45,
rotation = deg_to_rad(-45),
opacity = 0,
},
"pivot": ANIMA.PIVOT.BOTTOM_LEFT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var KEYFRAMES := {
opacity = 1,
},
100: {
rotation = 90,
rotation = deg_to_rad(90),
opacity = 0,
},
"pivot": ANIMA.PIVOT.BOTTOM_RIGHT
Expand Down
11 changes: 8 additions & 3 deletions addons/anima/animations/specials/hinge.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@ var KEYFRAMES := {
rotation = 0,
},
[20, 60]: {
rotation = 80,
rotation = deg_to_rad(80),
easing = ANIMA.EASING.EASE_IN_OUT,
},
[40, 80]: {
rotation = 60,
rotation = deg_to_rad(60),
opacity = 1,
easing = ANIMA.EASING.EASE_IN_OUT,
},
81: {
"translate:y": 0,
},
100: {
"translate:y": 700,
opacity = 0
"opacity": 0
},
"easing": ANIMA.EASING.EASE_IN_OUT,
"pivot": ANIMA.PIVOT.TOP_LEFT
Expand Down
12 changes: 7 additions & 5 deletions addons/anima/animations/specials/jack_in_the_box.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ var KEYFRAMES := {
0: {
opacity = 0,
scale = Vector3(0.1, 0.1, 0.1),
rotation = 30,
rotation = deg_to_rad(30),
},
50: {
rotation = -10,
rotation = deg_to_rad(-10),
},
70: {
rotation = 3,
rotation = deg_to_rad(3),
},
100: {
opacity = 1,
scale = Vector3.ONE
}
scale = Vector3.ONE,
rotation = 0
},
"pivot": ANIMA.PIVOT.BOTTOM_CENTER
}
2 changes: 1 addition & 1 deletion addons/anima/animations/specials/roll_in.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var KEYFRAMES := {
0: {
"opacity": 0,
"translate:x": "-:size:x",
"rotation": -120,
"rotation": deg_to_rad(-120),
},
100: {
"opacity": 1,
Expand Down
2 changes: 1 addition & 1 deletion addons/anima/animations/specials/roll_out.gd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var KEYFRAMES := {
100: {
"opacity": 0,
"translate:x": ":size:x",
"rotation": 120
"rotation": deg_to_rad(120)
}
}

6 changes: 3 additions & 3 deletions addons/anima/ui/AnimationPicker/AnimationPicker.gd
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ func _ready():
is_first_header = false

_anima = Anima.begin(self)
_on_item_rect_changed()

ActiveDemoNode = SpriteDemo
ActiveDemoNode.show()
# LabelDemo.modulate.a = 0
LabelDemo.modulate.a = 0
_on_item_rect_changed()

func _create_new_header(animation: String) -> Button:
var button: Button = HEADER_BUTTON.instantiate()
Expand Down Expand Up @@ -105,4 +105,4 @@ func _on_animation_speed_text_submitted(new_text):
func _on_item_rect_changed():
if SpriteDemo:
SpriteDemo.position = LabelDemo.position
SpriteDemo.offset = (SpriteDemo.get_rect().size / 2) - (SpriteDemo.get_rect().size - LabelDemo.get_rect().size) / 2
SpriteDemo.position += (SpriteDemo.get_rect().size / 2) - (SpriteDemo.get_rect().size - LabelDemo.get_rect().size) / 2
23 changes: 11 additions & 12 deletions addons/anima/ui/AnimationPicker/AnimationPicker.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ text = "Anima"

[node name="SpriteDemo" type="Sprite2D" parent="TabContainer/Animations/Control/ControlContainer"]
modulate = Color(0, 0, 0, 1)
position = Vector2(152.5, 66)
texture = ExtResource("2_pk6n6")

[node name="Panel" type="PanelContainer" parent="TabContainer/Animations/Control"]
Expand Down Expand Up @@ -218,20 +217,20 @@ layout_mode = 2
[connection signal="item_rect_changed" from="." to="." method="_on_item_rect_changed"]
[connection signal="text_submitted" from="TabContainer/Animations/Control/Panel/MarginContainer/HBoxContainer/AnimationSpeed" to="." method="_on_animation_speed_text_submitted"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/HeaderButton" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/HeaderButton" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22194" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22194" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22199" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22199" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22188" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22188" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22193" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22193" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22198" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22198" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22204" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22204" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22210" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22210" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22216" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22216" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22231" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22231" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22245" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22245" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22225" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22225" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22239" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22239" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22244" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22244" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22250" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22250" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22256" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22256" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22262" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22262" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22267" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22267" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22272" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22272" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22277" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22277" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22279" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22279" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22289" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22289" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22261" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22261" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22266" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22266" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22271" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22271" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22273" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22273" method="_on_toggled" flags=18]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22283" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@22283" method="_on_toggled" flags=18]
[connection signal="pressed" from="TabContainer/Animations/VBoxContainer/MarginContainer/HBoxContainer/UseAnimation" to="." method="_on_use_animation_pressed"]
[connection signal="pressed" from="TabContainer/Animations/VBoxContainer/MarginContainer/HBoxContainer/CloseButton" to="." method="_on_close_button_pressed"]
Loading

0 comments on commit 93523b1

Please sign in to comment.