-
Notifications
You must be signed in to change notification settings - Fork 15
/
gesture_detection_example.tscn
145 lines (120 loc) · 3.89 KB
/
gesture_detection_example.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[gd_scene load_steps=9 format=2]
[ext_resource path="res://examples/example.tscn" type="PackedScene" id=1]
[ext_resource path="res://examples/gesture-detection/gesture_detection_example.gd" type="Script" id=2]
[ext_resource path="res://examples/resources/theme.tres" type="Theme" id=3]
[ext_resource path="res://addons/swipe-detector/swipe_detector.gd" type="Script" id=4]
[ext_resource path="res://addons/swipe-detector/icon.png" type="Texture" id=5]
[ext_resource path="res://examples/gesture-detection/trail_ghost.tscn" type="PackedScene" id=6]
[ext_resource path="res://examples/resources/spot_red.png" type="Texture" id=7]
[ext_resource path="res://examples/resources/Trail.tscn" type="PackedScene" id=8]
[node name="GestureDetectionExample" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[node name="RecordedGesture" type="Node2D" parent="."]
[node name="MatchGesture" type="Node2D" parent="."]
[node name="RecordingLabel" type="Label" parent="."]
visible = false
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 414.0
margin_top = 292.0
margin_right = 518.0
margin_bottom = 316.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 2
size_flags_vertical = 0
theme = ExtResource( 3 )
text = "Recording..."
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "Theme" ]
[node name="SwipeDetector" type="Node" parent="."]
script = ExtResource( 4 )
__meta__ = {
"_editor_icon": ExtResource( 5 )
}
detect_gesture = true
process_method = null
distance_threshold = 80.0
duration_threshold = 0.05
limit_duration = false
maximum_duration = -1.0
minimum_points = 3
limit_points = false
maximum_points = -1
pattern_detection_score_threshold = 80
debug_mode = false
[node name="RecordButton" type="Button" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 707.0
margin_top = 550.0
margin_right = 926.0
margin_bottom = 612.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
size_flags_horizontal = 2
size_flags_vertical = 2
theme = ExtResource( 3 )
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Record Gesture"
flat = false
_sections_unfolded = [ "Theme" ]
[node name="RecordingState" parent="." instance=ExtResource( 6 )]
modulate = Color( 1, 1, 1, 0.3 )
position = Vector2( 655.016, 578.089 )
scale = Vector2( 0.5, 0.5 )
texture = ExtResource( 7 )
_sections_unfolded = [ "Transform", "Visibility" ]
[node name="Match" type="VBoxContainer" parent="."]
visible = false
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 18.0
margin_top = 529.0
margin_right = 112.0
margin_bottom = 567.0
rect_scale = Vector2( 2, 2 )
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 1
size_flags_horizontal = 2
size_flags_vertical = 2
custom_constants/separation = 10
alignment = 0
[node name="ResultLabel" type="Label" parent="Match"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = -2.0
margin_top = 28.0
margin_right = 104.0
margin_bottom = 42.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 2
size_flags_vertical = 0
text = "Match Detected!"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="Trail" parent="." instance=ExtResource( 8 )]
[connection signal="pattern_detected" from="SwipeDetector" to="." method="_on_SwipeDetector_pattern_detected"]
[connection signal="swipe_ended" from="SwipeDetector" to="." method="_on_SwipeDetector_swipe_ended"]
[connection signal="swipe_started" from="SwipeDetector" to="." method="_on_SwipeDetector_swipe_started"]
[connection signal="swipe_updated" from="SwipeDetector" to="." method="_on_SwipeDetector_swipe_updated"]
[connection signal="pressed" from="RecordButton" to="." method="_on_RecordButton_pressed"]