Skip to content

Commit

Permalink
new documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ceceppa committed Sep 5, 2024
1 parent d8a7e70 commit 057f2d5
Show file tree
Hide file tree
Showing 724 changed files with 65,628 additions and 32,937 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ node_modules
docs/*.import
docs/**/.import
.godot/
docs.old
docs/public/
39 changes: 20 additions & 19 deletions addons/anima/ui/AnimationPicker/AnimationPicker.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
[ext_resource type="Texture2D" uid="uid://ca72ljjcye5v1" path="res://addons/anima/resources/anima-preview.png" id="2_pk6n6"]
[ext_resource type="PackedScene" uid="uid://0luo7c2dwb4l" path="res://addons/anima/ui/AnimationPicker/CTASecondaryButton.tscn" id="3_qvnfb"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0ikkc"]
bg_color = Color(1, 1, 1, 1)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4yg3m"]
content_margin_left = 12.0
content_margin_right = 12.0
Expand All @@ -20,9 +23,6 @@ content_margin_left = 12.0
content_margin_right = 12.0
bg_color = Color(0.14902, 0.27451, 0.32549, 1)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0ikkc"]
bg_color = Color(1, 1, 1, 1)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0op83"]
bg_color = Color(0.215686, 0.215686, 0.215686, 1)
corner_radius_bottom_right = 8
Expand Down Expand Up @@ -55,10 +55,11 @@ layout_mode = 2
size_flags_vertical = 3
theme_override_colors/font_hovered_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 18
theme_override_styles/panel = SubResource("StyleBoxFlat_0ikkc")
theme_override_styles/tab_selected = SubResource("StyleBoxFlat_4yg3m")
theme_override_styles/tab_hovered = SubResource("StyleBoxFlat_0tlf5")
theme_override_styles/tab_unselected = SubResource("StyleBoxFlat_5ixaa")
theme_override_styles/panel = SubResource("StyleBoxFlat_0ikkc")
current_tab = 0

[node name="Animations" type="HBoxContainer" parent="TabContainer"]
layout_mode = 2
Expand Down Expand Up @@ -218,20 +219,20 @@ auto_brace_completion_highlight_matching = true
[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"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18802" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18802" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18812" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18812" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18822" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18822" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18834" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18834" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18846" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18846" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18876" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18876" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18904" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18904" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18914" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18914" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18926" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18926" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18938" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18938" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18948" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18948" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18958" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18958" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18968" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18968" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18972" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18972" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18992" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18992" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18585" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18585" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18595" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18595" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18605" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18605" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18617" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18617" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18629" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18629" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18659" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18659" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18687" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18687" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18697" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18697" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18709" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18709" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18721" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18721" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18731" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18731" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18741" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18741" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18751" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18751" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18755" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18755" method="_on_toggled"]
[connection signal="toggled" from="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18775" to="TabContainer/Animations/VBoxContainer/ScrollContainer/ListContainer/@Button@18775" method="_on_toggled"]
[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"]
2 changes: 0 additions & 2 deletions addons/anima/ui/EventItem.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ layout_mode = 2
size_flags_horizontal = 3
item_count = 3
popup/item_0/text = "Forward"
popup/item_0/id = 0
popup/item_1/text = "Backwards"
popup/item_1/id = 1
popup/item_2/text = "Loop"
Expand Down Expand Up @@ -132,7 +131,6 @@ layout_mode = 2
size_flags_horizontal = 3
item_count = 3
popup/item_0/text = "Forward"
popup/item_0/id = 0
popup/item_1/text = "Backward"
popup/item_1/id = 1
popup/item_2/text = "In circle"
Expand Down
2 changes: 1 addition & 1 deletion demos/3d/3DBoxes.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=10 format=3 uid="uid://de2dm72yugi4a"]

[ext_resource type="Script" path="res://demos/3d/3DBoxes.gd" id="1"]
[ext_resource type="ArrayMesh" uid="uid://dsobcrphe0r56" path="res://demos/resources/ring.obj" id="2"]
[ext_resource type="ArrayMesh" uid="uid://cqyqrhn8dc6bq" path="res://demos/resources/ring.obj" id="2"]
[ext_resource type="PackedScene" path="res://demos/components/ShowAllDemos.tscn" id="3"]
[ext_resource type="PackedScene" uid="uid://cjhef5i5fkw3d" path="res://tests/Box.tscn" id="4"]

Expand Down
2 changes: 1 addition & 1 deletion demos/AnimationsPreview.gd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func create_new_header(text: String) -> PanelContainer:

label.set_text(text.replace('_', ' ').capitalize())
container.add_child(label)

var style := StyleBoxFlat.new()
style.bg_color = Color('#404553')
style.content_margin_top = 12
Expand Down
17 changes: 5 additions & 12 deletions demos/nodes/Popup.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ script = ExtResource("2")

[node name="Panel" type="Panel" parent="Popup"]
custom_minimum_size = Vector2(600, 400)
offset_left = 276.0
offset_top = 124.0
offset_right = 876.0
offset_bottom = 524.0
layout_mode = 2

[node name="MarginContainer" type="MarginContainer" parent="Popup/Panel"]
anchors_preset = 15
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 12.0
Expand All @@ -28,25 +25,21 @@ offset_right = -12.0
offset_bottom = -12.0

[node name="Label" type="Label" parent="Popup/Panel/MarginContainer"]
offset_right = 576.0
offset_bottom = 376.0
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 7
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
autowrap_mode = 3

[node name="CenterContainer" type="CenterContainer" parent="Popup/Panel"]
anchors_preset = -1
layout_mode = 0
anchor_top = 0.745
anchor_right = 1.0
anchor_bottom = 0.869
offset_bottom = 40.0

[node name="Button" type="Button" parent="Popup/Panel/CenterContainer"]
offset_left = 261.0
offset_top = 29.0
offset_right = 339.0
offset_bottom = 60.0
layout_mode = 2
mouse_default_cursor_shape = 2
text = "Close Me"

Expand Down
2 changes: 0 additions & 2 deletions demos/nodes/SequenceCallback.gd
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,3 @@ func _on_button_completed(index: int) -> void:

anima.play()
_check_sprites[index - 1].play()


2 changes: 1 addition & 1 deletion demos/nodes/SequenceCallback.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=3 uid="uid://8u1vktammhcn"]

[ext_resource type="Script" path="res://demos/nodes/SequenceCallback.gd" id="2"]
[ext_resource type="Texture2D" uid="uid://bo50sbgp0cq1b" path="res://demos/resources/check.png" id="3"]
[ext_resource type="Texture2D" uid="uid://c366xnjxgfihg" path="res://demos/resources/check.png" id="3"]
[ext_resource type="PackedScene" path="res://demos/components/ShowAllDemos.tscn" id="4"]

[node name="Node" type="VBoxContainer"]
Expand Down
20 changes: 0 additions & 20 deletions docs/.gitignore

This file was deleted.

3 changes: 3 additions & 0 deletions docs/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/lotusdocs"]
path = themes/lotusdocs
url = https://github.com/colinwilson/lotusdocs
File renamed without changes.
41 changes: 0 additions & 41 deletions docs/README.md

This file was deleted.

5 changes: 5 additions & 0 deletions docs/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++
Binary file added docs/assets/images/activate-anima.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/asset-library.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added docs/assets/images/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/assets/images/social/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
11 changes: 11 additions & 0 deletions docs/assets/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"*": [
"../../../../Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/[email protected]/package/dist/cjs/*",
"../../../../Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/[email protected]+incompatible/js/*"
]
}
}
}
3 changes: 0 additions & 3 deletions docs/babel.config.js

This file was deleted.

8 changes: 8 additions & 0 deletions docs/content/docs/anima/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
weight: 200
title: "Anima Addon"
description: "Anima addon structure and usage"
icon: "folder"
draft: false
---

Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
sidebar_position: 3
weight: 500
title: "Anima.Group"
description: "Anima.Group class reference"
draft: false
---
import AnimaDeclaration from './_anima-declaration.mdx';

# Anima.Group

This class is used to animate all the direct child of the node specified.

Expand All @@ -20,20 +21,7 @@ Anima.Group(group: Node, items_delay: float, animation_type: int = GROUP.FROM_TO
| animation_type | [ANIMA.GRID](#animation-type) | ANIMA.GROUP.FROM_TOP | The order to which animate the elements |
| index | int | 0 | The starting index of the animation |

## Animation type

The animation type parameter is used to define how to animate the nodes inside the group or create staggered animations.

| Option | Description |
|---|---|
| FROM_TOP | Animates the group items from top to down |
| FROM_BOTTOM | Animates the group items from bottom to top |
| FROM_CENTER | Animated the items from the center of the group to the top and bottom at the same time. |
| TOGETHER | Animates all the items at the same time. `items_delay` is ignored |
| ODDS_ONLY | Animates the group odd items only, starting from the top |
| EVEN_ONLY | Animates the even items only, starting from the top |
| RANDOM | Randomize the group starting point |
| FROM_INDEX | The item index to start the animation |
{{% animation-type %}}

## Staggered Animation

Expand Down Expand Up @@ -73,4 +61,4 @@ So this is equivalent to:
2. Wait 1 second
3. Fade in **Button1** and **Button7**

<AnimaDeclaration />
{{% anima-declaration class="Grid" init="Vector2(2, 2), 0.1" distance="1" %}}
31 changes: 31 additions & 0 deletions docs/content/docs/anima/anima-node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
weight: 200
title: "Anima.Node"
description: "Anima.Node class reference"
draft: false
---

This class is used to animate a single node.

## Syntax

```gdscript
Anima.Node(node: Node, delay = null) -> AnimaDeclaration
```

| param | type | Description |
|---|---|---|
| node | Node | The node to animate |
|delay | float | The delay before starting the animation |

## Example

```gdscript
(
Anima.Node($Label)
.anima_fade_in()
.play_with_delay(0.5)
)
```

{{% anima-declaration class="Node" init="self" %}}
35 changes: 35 additions & 0 deletions docs/content/docs/anima/anima-nodes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
weight: 250
title: "Anima.Nodes"
description: "Anima.Nodes class reference"
draft: false
---

The `Anima.MultiNode` class allows you to animate multiple independent nodes simultaneously. This provides a flexible way to create custom animation groups beyond the built-in `Anima.Group` and `Anima.Grid` classes.

**Key Distinction:**

Unlike `Anima.Group` and `Anima.Grid`, which target the children of a node, `Anima.MultiNode` directly animates the specified nodes themselves. This enables you to define your own "group" of nodes for animation, regardless of their hierarchical relationship.

## Syntax

```gdscript
Anima.Nodes(node: Array[Node], items_delay: int = 0) -> AnimaDeclaration
```

| param | type | Description |
|---|---|---|
| node | Nodes | An array of nodes to animate |
|delay | float | The incremental delay to apply for each node in the group |

## Example

```gdscript
(
Anima.Nodes([self, $Label, $Sprite], 0.1)
.anima_fade_in()
.play()
)
```

{{% anima-declaration class="Nodes" init="[self, $Label, $Sprite]" %}}
10 changes: 10 additions & 0 deletions docs/content/docs/anima/anima-tween.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
weight: 550
title: "AnimaTween"
description: "Anima.Nodes class reference"
draft: false
---

This is the class that handles the tweening of the nodes.

[anima_tween.gd](https://github.com/ceceppa/anima/blob/main/addons/anima/core/anima_tween.gd)
Loading

0 comments on commit 057f2d5

Please sign in to comment.