diff --git a/src/overlays/biofeedback_push_frequency/biofeedback_push_frequency.gd b/src/overlays/biofeedback_push_frequency/biofeedback_push_frequency.gd index dda5502..bc1eb39 100644 --- a/src/overlays/biofeedback_push_frequency/biofeedback_push_frequency.gd +++ b/src/overlays/biofeedback_push_frequency/biofeedback_push_frequency.gd @@ -27,20 +27,22 @@ extends Control @export var node_green_zone: Node # Push frequency value from python script biofeedback -var value = 0.0 #!TODO Change name for current_value +var current_value = 0.0 # Connection flags and request arguments var connected = false -var arg #!TODO Change name for something more specific +var biofeedback_args func _process(_delta) -> void: # Once start the analysis by sending a request to the python bridge - if Globals.main.has_node("python_bridge"): - if Globals.main.get_node("python_bridge")._udp_receiver_connected and not connected: + if Globals.main.has_node("PythonBridge"): + if Globals.main.get_node("PythonBridge")._udp_receiver_connected and not connected: connected = true _update_arg() - Globals.main.get_node("python_bridge").send("biofeedback_update", arg, "start") + Globals.main.get_node("PythonBridge").send( + "biofeedback_update", biofeedback_args, "start" + ) # Reset the connected flag if the python bridge is disconnected else: if connected: @@ -48,23 +50,23 @@ func _process(_delta) -> void: # Update the slider if the process is connected if connected: - if Globals.main.has_node("python_bridge"): - var data = Globals.main.get_node("python_bridge").receive("biofeedback_push_frequency") + if Globals.main.has_node("PythonBridge"): + var data = Globals.main.get_node("PythonBridge").receive("biofeedback_push_frequency") _update_slider(data) # Should we quit if not Config.get_value("overlays.biofeedback_push_frequency.enabled"): # Stop the biofeedback from python bridge if this overlays is shut down if ( - Globals.main.has_node("python_bridge") + Globals.main.has_node("PythonBridge") and connected - and not Config.get_value("overlays.biofeedback_optitrack.enabled") + and not Config.get_value("overlays.biofeedback_push_pattern.enabled") ): # Tell the python bridge to stop the repeating update process - Globals.main.get_node("python_bridge").send("biofeedback_update", {}, "stop") + Globals.main.get_node("PythonBridge").send("biofeedback_update", {}, "stop") # Send a final request to reset the biofeedback script data _update_arg() - Globals.main.get_node("python_bridge").send("biofeedback_stop", arg, "once") + Globals.main.get_node("PythonBridge").send("biofeedback_stop", biofeedback_args, "once") # Remove the overlay node from the scene tree queue_free() @@ -75,15 +77,15 @@ func _update_slider(data): if data["command"] == "biofeedback_update": var side = data["data"].keys()[0] if data["data"][side].has("mean_push_frequency"): - value = data["data"][side]["mean_push_frequency"] + current_value = data["data"][side]["mean_push_frequency"] node_min_value.text = str(min_value) node_max_value.text = str(max_value) - node_value.text = str(snappedf(value, 0.1)) + node_value.text = str(snappedf(current_value, 0.1)) node_slider.position.y = ( node_slider_zone.size.y - - (value - min_value) * node_slider_zone.size.y / (max_value - min_value) + - (current_value - min_value) * node_slider_zone.size.y / (max_value - min_value) ) node_slider.size.x = node_slider_zone.size.x @@ -103,7 +105,7 @@ func _update_slider(data): # Update the arguments to send the requests to the python bridge func _update_arg(): - arg = { + biofeedback_args = { "coordinates_left_wheel_center": Config.get_value("coordinates.left_wheel_center"), "coordinates_right_wheel_center": Config.get_value("coordinates.right_wheel_center"), "coordinates_left_hand": Config.get_value("coordinates.left_hand"), diff --git a/src/overlays/biofeedback_push_frequency/biofeedback_push_frequency.tscn b/src/overlays/biofeedback_push_frequency/biofeedback_push_frequency.tscn index db0f036..ffae989 100644 --- a/src/overlays/biofeedback_push_frequency/biofeedback_push_frequency.tscn +++ b/src/overlays/biofeedback_push_frequency/biofeedback_push_frequency.tscn @@ -25,51 +25,51 @@ font_size = 10 [sub_resource type="LabelSettings" id="LabelSettings_7yiij"] font_size = 10 -[node name="biofeedback_push_frequency" type="Control" unique_id=1961947020 node_paths=PackedStringArray("node_min_value", "node_max_value", "node_min_target_value", "node_max_target_value", "node_value", "node_slider_zone", "node_slider", "node_target_zone", "node_green_zone")] +[node name="BiofeedbackPushFrequency" type="Control" unique_id=1961947020 node_paths=PackedStringArray("node_min_value", "node_max_value", "node_min_target_value", "node_max_target_value", "node_value", "node_slider_zone", "node_slider", "node_target_zone", "node_green_zone")] layout_mode = 3 anchors_preset = 0 script = ExtResource("1_1j4x4") -node_min_value = NodePath("overlay_panel/overlay_vbox_container/min_value") -node_max_value = NodePath("overlay_panel/overlay_vbox_container/max_value") -node_min_target_value = NodePath("overlay_panel/overlay_vbox_container/slider_zone/target_zone/green_zone/min_target_value") -node_max_target_value = NodePath("overlay_panel/overlay_vbox_container/slider_zone/target_zone/green_zone/max_target_value") -node_value = NodePath("overlay_panel/overlay_vbox_container/slider_zone/slider/h_box_container/value") -node_slider_zone = NodePath("overlay_panel/overlay_vbox_container/slider_zone") -node_slider = NodePath("overlay_panel/overlay_vbox_container/slider_zone/slider") -node_target_zone = NodePath("overlay_panel/overlay_vbox_container/slider_zone/target_zone") -node_green_zone = NodePath("overlay_panel/overlay_vbox_container/slider_zone/target_zone/green_zone") - -[node name="overlay_panel" type="PanelContainer" parent="." unique_id=1378768941] +node_min_value = NodePath("OverlayPanel/OverlayVboxContainer/MinValue") +node_max_value = NodePath("OverlayPanel/OverlayVboxContainer/MaxValue") +node_min_target_value = NodePath("OverlayPanel/OverlayVboxContainer/SliderZone/TargetZone/GreenZone/MinTargetValue") +node_max_target_value = NodePath("OverlayPanel/OverlayVboxContainer/SliderZone/TargetZone/GreenZone/MaxTargetValue") +node_value = NodePath("OverlayPanel/OverlayVboxContainer/SliderZone/Slider/HboxContainer/CurrentValue") +node_slider_zone = NodePath("OverlayPanel/OverlayVboxContainer/SliderZone") +node_slider = NodePath("OverlayPanel/OverlayVboxContainer/SliderZone/Slider") +node_target_zone = NodePath("OverlayPanel/OverlayVboxContainer/SliderZone/TargetZone") +node_green_zone = NodePath("OverlayPanel/OverlayVboxContainer/SliderZone/TargetZone/GreenZone") + +[node name="OverlayPanel" type="PanelContainer" parent="." unique_id=1378768941] layout_mode = 0 offset_left = 950.0 -offset_top = 520.0 +offset_top = 480.0 offset_right = 1050.0 -offset_bottom = 699.99915 +offset_bottom = 676.0 theme = SubResource("Theme_lgowx") theme_override_styles/panel = SubResource("StyleBoxFlat_1j4x4") -[node name="overlay_vbox_container" type="VBoxContainer" parent="overlay_panel" unique_id=679876289] +[node name="OverlayVboxContainer" type="VBoxContainer" parent="OverlayPanel" unique_id=679876289] layout_mode = 2 -[node name="title" type="Label" parent="overlay_panel/overlay_vbox_container" unique_id=1278107807] +[node name="Title" type="Label" parent="OverlayPanel/OverlayVboxContainer" unique_id=1278107807] layout_mode = 2 text = "PUSH FREQUENCY" label_settings = SubResource("LabelSettings_pa624") horizontal_alignment = 1 -[node name="max_value" type="Label" parent="overlay_panel/overlay_vbox_container" unique_id=1471418302] +[node name="MaxValue" type="Label" parent="OverlayPanel/OverlayVboxContainer" unique_id=1471418302] layout_mode = 2 text = "max" label_settings = SubResource("LabelSettings_1j4x4") horizontal_alignment = 1 -[node name="slider_zone" type="ColorRect" parent="overlay_panel/overlay_vbox_container" unique_id=1147785939] +[node name="SliderZone" type="ColorRect" parent="OverlayPanel/OverlayVboxContainer" unique_id=1147785939] custom_minimum_size = Vector2(20, 100) layout_mode = 2 size_flags_horizontal = 4 -[node name="target_zone" type="Control" parent="overlay_panel/overlay_vbox_container/slider_zone" unique_id=1857701781] +[node name="TargetZone" type="Control" parent="OverlayPanel/OverlayVboxContainer/SliderZone" unique_id=1857701781] custom_minimum_size = Vector2(20, 10) layout_mode = 1 anchors_preset = 2 @@ -78,7 +78,7 @@ anchor_bottom = 1.0 offset_top = -10.0 grow_vertical = 0 -[node name="green_zone" type="ColorRect" parent="overlay_panel/overlay_vbox_container/slider_zone/target_zone" unique_id=791038250] +[node name="GreenZone" type="ColorRect" parent="OverlayPanel/OverlayVboxContainer/SliderZone/TargetZone" unique_id=791038250] layout_mode = 1 anchors_preset = 2 anchor_top = 1.0 @@ -89,7 +89,7 @@ grow_vertical = 0 scale = Vector2(1, -1) color = Color(0, 0.7607843, 0.39215687, 1) -[node name="min_target_value" type="Label" parent="overlay_panel/overlay_vbox_container/slider_zone/target_zone/green_zone" unique_id=413093685] +[node name="MinTargetValue" type="Label" parent="OverlayPanel/OverlayVboxContainer/SliderZone/TargetZone/GreenZone" unique_id=413093685] layout_mode = 1 offset_left = -25.0 offset_right = -6.0 @@ -101,7 +101,7 @@ label_settings = SubResource("LabelSettings_pa624") horizontal_alignment = 2 autowrap_mode = 2 -[node name="max_target_value" type="Label" parent="overlay_panel/overlay_vbox_container/slider_zone/target_zone/green_zone" unique_id=186569926] +[node name="MaxTargetValue" type="Label" parent="OverlayPanel/OverlayVboxContainer/SliderZone/TargetZone/GreenZone" unique_id=186569926] layout_mode = 0 offset_left = -25.0 offset_right = -6.0 @@ -113,10 +113,10 @@ label_settings = SubResource("LabelSettings_pa624") horizontal_alignment = 2 autowrap_mode = 2 -[node name="slider" type="Control" parent="overlay_panel/overlay_vbox_container/slider_zone" unique_id=676311746] +[node name="Slider" type="Control" parent="OverlayPanel/OverlayVboxContainer/SliderZone" unique_id=676311746] anchors_preset = 0 -[node name="h_box_container" type="HBoxContainer" parent="overlay_panel/overlay_vbox_container/slider_zone/slider" unique_id=1281199947] +[node name="HboxContainer" type="HBoxContainer" parent="OverlayPanel/OverlayVboxContainer/SliderZone/Slider" unique_id=1281199947] layout_mode = 1 anchors_preset = 4 anchor_top = 0.5 @@ -126,19 +126,19 @@ offset_right = 56.0 offset_bottom = 7.0 grow_vertical = 2 -[node name="red_line_slider" type="ColorRect" parent="overlay_panel/overlay_vbox_container/slider_zone/slider/h_box_container" unique_id=1613428399] +[node name="RedLineSlider" type="ColorRect" parent="OverlayPanel/OverlayVboxContainer/SliderZone/Slider/HboxContainer" unique_id=1613428399] custom_minimum_size = Vector2(20, 6) layout_mode = 2 size_flags_vertical = 4 color = Color(0.76, 0, 0, 1) -[node name="value" type="Label" parent="overlay_panel/overlay_vbox_container/slider_zone/slider/h_box_container" unique_id=903269268] +[node name="CurrentValue" type="Label" parent="OverlayPanel/OverlayVboxContainer/SliderZone/Slider/HboxContainer" unique_id=903269268] layout_mode = 2 -text = "value" +text = "current value" label_settings = SubResource("LabelSettings_7yiij") vertical_alignment = 1 -[node name="min_value" type="Label" parent="overlay_panel/overlay_vbox_container" unique_id=1533846735] +[node name="MinValue" type="Label" parent="OverlayPanel/OverlayVboxContainer" unique_id=1533846735] layout_mode = 2 text = "min" label_settings = SubResource("LabelSettings_pa624") diff --git a/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern.gd b/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern.gd index 0abbd63..88044b4 100644 --- a/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern.gd +++ b/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern.gd @@ -7,6 +7,8 @@ extends Node2D # - controls visibility of wheels, handrims, contact angles, and trails # - provides an always-on-top GUI window for aiming calibration # - spawns OptiTrack scene when running standalone (outside Globals.main scene) +# - updates the push pattern label based on propulsive cycle detection from the +# Python biofeedback script # ---------------------------------------------------------------------- # # Nodes @@ -23,6 +25,7 @@ extends Node2D @export var view_left_2: Node @export var view_right_1: Node @export var view_right_2: Node +@export var node_push_pattern_label: Node # Scenes @export var gui_scene: PackedScene @@ -44,6 +47,9 @@ var position_wheel_l var position_wheel_r var radius_wheel +# Tweens +var push_pattern_tween: Tween + # Distances between left and right wheel centers var anteroposterior_length var vertical_distance_wheel @@ -55,7 +61,7 @@ var window func _ready() -> void: # Create an isolated World3D so this SubViewport scene is not rendered in the Globals.main viewport var world = World3D.new() - current_scene_3d = $current_scene_3D + current_scene_3d = $CurrentScene3D current_scene_3d.world_3d = world # Share the same World3D across all SubViewports so it is only rendered through UI overlays @@ -74,6 +80,7 @@ func _ready() -> void: func _process(_delta): update_wheelchair() + update_push_pattern_label() if not Config.get_value("overlays.biofeedback_push_pattern.enabled"): queue_free() @@ -145,6 +152,29 @@ func window_user(): add_child(window) +# Update the push pattern label when the Python biofeedback script detects a propulsive cycle +func update_push_pattern_label(): + if Globals.main.has_node("PythonBridge"): + var data = Globals.main.get_node("PythonBridge").receive("push_pattern_label") + + if data is Dictionary and data.has("data") and data["data"].size() > 0: + if data["command"] == "biofeedback_update": + var side = data["data"].keys()[0] + if data["data"][side].has("label_push_pattern") and side == "right": + node_push_pattern_label.text = data["data"][side]["label_push_pattern"] + + if push_pattern_tween: + push_pattern_tween.kill() + node_push_pattern_label.scale = Vector2.ZERO + + push_pattern_tween = create_tween() + push_pattern_tween.tween_property( + node_push_pattern_label, "scale", Vector2.ONE, 0.1 + ) + else: + node_push_pattern_label.text = "" + + # Close the window gui when the node exits the scene tree func _exit_tree(): window.queue_free() diff --git a/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern.tscn b/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern.tscn index 24b6bed..b05773a 100644 --- a/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern.tscn +++ b/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern.tscn @@ -27,284 +27,352 @@ corner_radius_top_right = 10 corner_radius_bottom_right = 10 corner_radius_bottom_left = 10 +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_d5do3"] +bg_color = Color(0, 0, 0, 0.392157) +border_width_left = 4 +border_width_top = 4 +border_width_right = 4 +border_width_bottom = 4 +border_color = Color(1, 1, 1, 0.392157) +corner_radius_top_left = 30 +corner_radius_top_right = 30 +corner_radius_bottom_right = 30 +corner_radius_bottom_left = 30 + [sub_resource type="ViewportTexture" id="ViewportTexture_ohdpe"] -viewport_path = NodePath("view_left_1") +viewport_path = NodePath("ViewLeft1") [sub_resource type="ViewportTexture" id="ViewportTexture_itwwm"] -viewport_path = NodePath("view_left_2") +viewport_path = NodePath("ViewLeft2") [sub_resource type="ViewportTexture" id="ViewportTexture_euvgy"] -viewport_path = NodePath("view_right_1") +viewport_path = NodePath("ViewRight1") [sub_resource type="ViewportTexture" id="ViewportTexture_ilqvj"] -viewport_path = NodePath("view_right_2") +viewport_path = NodePath("ViewRight2") -[node name="biofeedback_push_pattern" type="Node2D" unique_id=2135710720 node_paths=PackedStringArray("node_wheel_left", "node_wheel_right", "node_angle_start_contact_left", "node_angle_start_contact_right", "node_angle_end_contact_left", "node_angle_end_contact_right", "node_handrim_left", "node_handrim_right", "view_left_1", "view_left_2", "view_right_1", "view_right_2")] +[node name="BiofeedbackPushPattern" type="Node2D" unique_id=2135710720 node_paths=PackedStringArray("node_wheel_left", "node_wheel_right", "node_angle_start_contact_left", "node_angle_start_contact_right", "node_angle_end_contact_left", "node_angle_end_contact_right", "node_handrim_left", "node_handrim_right", "current_scene_3d", "view_left_1", "view_left_2", "view_right_1", "view_right_2", "node_push_pattern_label")] script = ExtResource("1_j7inm") -node_wheel_left = NodePath("current_scene_3D/wheel_left") -node_wheel_right = NodePath("current_scene_3D/wheel_right") -node_angle_start_contact_left = NodePath("current_scene_3D/wheel_left/contact_angle_start_left") -node_angle_start_contact_right = NodePath("current_scene_3D/wheel_right/contact_angle_start_right") -node_angle_end_contact_left = NodePath("current_scene_3D/wheel_left/contact_angle_end_left") -node_angle_end_contact_right = NodePath("current_scene_3D/wheel_right/contact_angle_end_right") -node_handrim_left = NodePath("current_scene_3D/wheel_left/handrim_left") -node_handrim_right = NodePath("current_scene_3D/wheel_right/handrim_right") -view_left_1 = NodePath("view_left_1") -view_left_2 = NodePath("view_left_2") -view_right_1 = NodePath("view_right_1") -view_right_2 = NodePath("view_right_2") +node_wheel_left = NodePath("CurrentScene3D/WheelLeft") +node_wheel_right = NodePath("CurrentScene3D/WheelRight") +node_angle_start_contact_left = NodePath("CurrentScene3D/WheelLeft/ContactAngleStartLeft") +node_angle_start_contact_right = NodePath("CurrentScene3D/WheelRight/ContactAngleStartRight") +node_angle_end_contact_left = NodePath("CurrentScene3D/WheelLeft/ContactAngleEndLeft") +node_angle_end_contact_right = NodePath("CurrentScene3D/WheelRight/ContactAngleEndRight") +node_handrim_left = NodePath("CurrentScene3D/WheelLeft/HandrimLeft") +node_handrim_right = NodePath("CurrentScene3D/WheelRight/HandrimRight") +current_scene_3d = NodePath("CurrentScene3D") +view_left_1 = NodePath("ViewLeft1") +view_left_2 = NodePath("ViewLeft2") +view_right_1 = NodePath("ViewRight1") +view_right_2 = NodePath("ViewRight2") +node_push_pattern_label = NodePath("LabelPushPattern") gui_scene = ExtResource("2_jxkd3") -[node name="overlay_frame" type="PanelContainer" parent="." unique_id=1522539722] -offset_left = 320.0 +[node name="LabelPushPattern" type="Label" parent="." unique_id=1078882913] +offset_left = 348.0 +offset_top = 487.0 +offset_right = 817.0 +offset_bottom = 515.0 +pivot_offset_ratio = Vector2(0.5, 0.5) +theme_override_colors/font_outline_color = Color(0, 0, 0, 1) +theme_override_constants/outline_size = 4 +theme_override_font_sizes/font_size = 20 +text = "Push Pattern" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OverlayFrame" type="PanelContainer" parent="." unique_id=1522539722] +visible = false +offset_left = 390.0 offset_top = 524.0 -offset_right = 820.0 +offset_right = 750.0 offset_bottom = 704.0 theme = SubResource("Theme_2n6hd") theme_override_styles/panel = SubResource("StyleBoxFlat_hiv0f") -[node name="_view_left_1" type="Sprite2D" parent="." unique_id=1306518705] -position = Vector2(231, 180) +[node name="OverlayFrame3" type="PanelContainer" parent="." unique_id=1407314898] +offset_left = 291.0 +offset_top = 525.0 +offset_right = 451.0 +offset_bottom = 688.0 +theme = SubResource("Theme_2n6hd") +theme_override_styles/panel = SubResource("StyleBoxFlat_d5do3") + +[node name="OverlayFrame4" type="PanelContainer" parent="." unique_id=1114911213] +offset_left = 690.0 +offset_top = 525.0 +offset_right = 850.0 +offset_bottom = 688.0 +theme = SubResource("Theme_2n6hd") +theme_override_styles/panel = SubResource("StyleBoxFlat_d5do3") + +[node name="OverlayFrame5" type="PanelContainer" parent="." unique_id=266491190] +offset_left = 452.0 +offset_top = 525.0 +offset_right = 687.0 +offset_bottom = 687.0 +theme = SubResource("Theme_2n6hd") +theme_override_styles/panel = SubResource("StyleBoxFlat_d5do3") + +[node name="OverlayViewLeft1" type="Sprite2D" parent="." unique_id=1306518705] +position = Vector2(210, 180) texture = SubResource("ViewportTexture_ohdpe") centered = false -[node name="_view_left_2" type="Sprite2D" parent="." unique_id=1177554049] -position = Vector2(210, 347) +[node name="OverlayViewLeft2" type="Sprite2D" parent="." unique_id=1177554049] +position = Vector2(145, 347) texture = SubResource("ViewportTexture_itwwm") centered = false -[node name="_view_right_1" type="Sprite2D" parent="." unique_id=957343018] -position = Vector2(270, 180) +[node name="OverlayViewRight1" type="Sprite2D" parent="." unique_id=957343018] +position = Vector2(290, 180) texture = SubResource("ViewportTexture_euvgy") centered = false -[node name="_view_right_2" type="Sprite2D" parent="." unique_id=306445949] -position = Vector2(532, 347) +[node name="OverlayViewRight2" type="Sprite2D" parent="." unique_id=306445949] +position = Vector2(595, 347) texture = SubResource("ViewportTexture_ilqvj") centered = false -[node name="current_scene_3D" type="SubViewport" parent="." unique_id=777605552] +[node name="CurrentScene3D" type="SubViewport" parent="." unique_id=777605552] transparent_bg = true render_target_update_mode = 4 -[node name="directional_light_3d" type="DirectionalLight3D" parent="current_scene_3D" unique_id=1898494878] +[node name="Light1" type="DirectionalLight3D" parent="CurrentScene3D" unique_id=1898494878] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6015623, 1.8565149) layers = 1023 -[node name="directional_light_3d2" type="DirectionalLight3D" parent="current_scene_3D" unique_id=1428347980] +[node name="Light2" type="DirectionalLight3D" parent="CurrentScene3D" unique_id=1428347980] transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 1.6015623, -1.7734811) layers = 1023 -[node name="forearm_cluster_right" type="Node3D" parent="current_scene_3D" unique_id=1938507217 node_paths=PackedStringArray("node_main_overlay")] +[node name="ForearmClusterRight" type="Node3D" parent="CurrentScene3D" unique_id=1938507217 node_paths=PackedStringArray("node_main_overlay")] script = ExtResource("2_l04ny") side = "right" node_main_overlay = NodePath("../..") -[node name="ForearmClusterRight" parent="current_scene_3D/forearm_cluster_right" unique_id=28362197 instance=ExtResource("1_2n6hd")] +[node name="ForearmClusterRight" parent="CurrentScene3D/ForearmClusterRight" unique_id=28362197 instance=ExtResource("1_2n6hd")] -[node name="forearm_cluster_left" type="Node3D" parent="current_scene_3D" unique_id=1987146825 node_paths=PackedStringArray("node_main_overlay")] +[node name="ForearmClusterLeft" type="Node3D" parent="CurrentScene3D" unique_id=1987146825 node_paths=PackedStringArray("node_main_overlay")] script = ExtResource("2_l04ny") side = "left" node_main_overlay = NodePath("../..") -[node name="ForearmClusterLeft" parent="current_scene_3D/forearm_cluster_left" unique_id=1806508294 instance=ExtResource("2_hiv0f")] +[node name="ForearmClusterLeft" parent="CurrentScene3D/ForearmClusterLeft" unique_id=1806508294 instance=ExtResource("2_hiv0f")] -[node name="wheel_right" type="Node3D" parent="current_scene_3D" unique_id=466742740] +[node name="WheelRight" type="Node3D" parent="CurrentScene3D" unique_id=466742740] transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 0, 0.3) -[node name="rear_wheel_right" parent="current_scene_3D/wheel_right" unique_id=1979307876 instance=ExtResource("1_hiv0f")] +[node name="RearWheelRight" parent="CurrentScene3D/WheelRight" unique_id=1979307876 instance=ExtResource("1_hiv0f")] transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0) script = ExtResource("5_nqdaa") side = "right" -[node name="BézierCircle_004" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="0" unique_id=492824724] +[node name="BézierCircle_004" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="0" unique_id=363854926] layers = 4 -[node name="BézierCircle_005" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="1" unique_id=1967190373] +[node name="BézierCircle_005" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="1" unique_id=1397379913] layers = 4 -[node name="BézierCircle_006" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="2" unique_id=1293971367] +[node name="BézierCircle_006" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="2" unique_id=1928306487] layers = 4 -[node name="Cylinder_013" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="3" unique_id=1915422161] +[node name="Cylinder_013" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="3" unique_id=2129805941] layers = 4 -[node name="Cylinder_014" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="4" unique_id=871273199] +[node name="Cylinder_014" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="4" unique_id=19447650] layers = 4 -[node name="Cylinder_015" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="5" unique_id=1866239796] +[node name="Cylinder_015" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="5" unique_id=1473366646] layers = 4 -[node name="Cylinder_016" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="6" unique_id=582229067] +[node name="Cylinder_016" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="6" unique_id=1826976270] layers = 4 -[node name="Cylinder_017" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="7" unique_id=132602823] +[node name="Cylinder_017" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="7" unique_id=356637044] layers = 4 -[node name="Cylinder_018" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="8" unique_id=553216785] +[node name="Cylinder_018" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="8" unique_id=32034191] layers = 4 -[node name="Cylinder_019" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="9" unique_id=1782011555] +[node name="Cylinder_019" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="9" unique_id=2063277236] layers = 4 -[node name="Cylinder_020" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="10" unique_id=397632586] +[node name="Cylinder_020" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="10" unique_id=1378418252] layers = 4 -[node name="Cylinder_021" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="11" unique_id=1264964103] +[node name="Cylinder_021" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="11" unique_id=773933742] layers = 4 -[node name="Cylinder_022" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="12" unique_id=1785887012] +[node name="Cylinder_022" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="12" unique_id=613544328] layers = 4 -[node name="Cylinder_023" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="13" unique_id=903056405] +[node name="Cylinder_023" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="13" unique_id=33910092] layers = 4 -[node name="Cylinder_024" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="14" unique_id=1417923883] +[node name="Cylinder_024" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="14" unique_id=804831044] layers = 4 -[node name="Cylinder_025" parent="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="15" unique_id=1128864618] +[node name="Cylinder_025" parent="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel" parent_id_path=PackedInt32Array(1979307876, 1701913547) index="15" unique_id=308237162] layers = 4 -[node name="contact_angle_end_right" parent="current_scene_3D/wheel_right" unique_id=434550697 instance=ExtResource("3_ss2qs")] +[node name="ContactAngleEndRight" parent="CurrentScene3D/WheelRight" unique_id=434550697 instance=ExtResource("3_ss2qs")] script = ExtResource("8_tdhcr") phase = "end" -[node name="Circle" parent="current_scene_3D/wheel_right/contact_angle_end_right/angle_contact" index="0" unique_id=1646293624] +[node name="Circle" parent="CurrentScene3D/WheelRight/ContactAngleEndRight/angle_contact" index="0" unique_id=2039290200] layers = 4 -[node name="contact_angle_start_right" parent="current_scene_3D/wheel_right" unique_id=1398161811 instance=ExtResource("3_ss2qs")] +[node name="ContactAngleStartRight" parent="CurrentScene3D/WheelRight" unique_id=1398161811 instance=ExtResource("3_ss2qs")] script = ExtResource("8_tdhcr") phase = "start" -[node name="Circle" parent="current_scene_3D/wheel_right/contact_angle_start_right/angle_contact" index="0" unique_id=1646293624] +[node name="Circle" parent="CurrentScene3D/WheelRight/ContactAngleStartRight/angle_contact" index="0" unique_id=2039290200] layers = 4 -[node name="handrim_right" parent="current_scene_3D/wheel_right" unique_id=8043099 instance=ExtResource("4_8bgme")] +[node name="HandrimRight" parent="CurrentScene3D/WheelRight" unique_id=8043099 instance=ExtResource("4_8bgme")] -[node name="BézierCircle_003" parent="current_scene_3D/wheel_right/handrim_right/handrim" parent_id_path=PackedInt32Array(8043099, 196758062) index="0" unique_id=1785037892] +[node name="BézierCircle_003" parent="CurrentScene3D/WheelRight/HandrimRight/handrim" parent_id_path=PackedInt32Array(8043099, 196758062) index="0" unique_id=1225760875] layers = 5 -[node name="wheel_left" type="Node3D" parent="current_scene_3D" unique_id=915408687] +[node name="WheelLeft" type="Node3D" parent="CurrentScene3D" unique_id=915408687] transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0, 0, -0.3) -[node name="rear_wheel_left" parent="current_scene_3D/wheel_left" unique_id=9668413 instance=ExtResource("1_hiv0f")] +[node name="RearWheelLeft" parent="CurrentScene3D/WheelLeft" unique_id=9668413 instance=ExtResource("1_hiv0f")] script = ExtResource("5_nqdaa") side = "left" -[node name="BézierCircle_004" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="0" unique_id=492824724] +[node name="BézierCircle_004" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="0" unique_id=363854926] layers = 2 -[node name="BézierCircle_005" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="1" unique_id=1967190373] +[node name="BézierCircle_005" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="1" unique_id=1397379913] layers = 2 -[node name="BézierCircle_006" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="2" unique_id=1293971367] +[node name="BézierCircle_006" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="2" unique_id=1928306487] layers = 2 -[node name="Cylinder_013" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="3" unique_id=1915422161] +[node name="Cylinder_013" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="3" unique_id=2129805941] layers = 2 -[node name="Cylinder_014" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="4" unique_id=871273199] +[node name="Cylinder_014" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="4" unique_id=19447650] layers = 2 -[node name="Cylinder_015" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="5" unique_id=1866239796] +[node name="Cylinder_015" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="5" unique_id=1473366646] layers = 2 -[node name="Cylinder_016" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="6" unique_id=582229067] +[node name="Cylinder_016" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="6" unique_id=1826976270] layers = 2 -[node name="Cylinder_017" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="7" unique_id=132602823] +[node name="Cylinder_017" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="7" unique_id=356637044] layers = 2 -[node name="Cylinder_018" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="8" unique_id=553216785] +[node name="Cylinder_018" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="8" unique_id=32034191] layers = 2 -[node name="Cylinder_019" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="9" unique_id=1782011555] +[node name="Cylinder_019" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="9" unique_id=2063277236] layers = 2 -[node name="Cylinder_020" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="10" unique_id=397632586] +[node name="Cylinder_020" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="10" unique_id=1378418252] layers = 2 -[node name="Cylinder_021" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="11" unique_id=1264964103] +[node name="Cylinder_021" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="11" unique_id=773933742] layers = 2 -[node name="Cylinder_022" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="12" unique_id=1785887012] +[node name="Cylinder_022" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="12" unique_id=613544328] layers = 2 -[node name="Cylinder_023" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="13" unique_id=903056405] +[node name="Cylinder_023" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="13" unique_id=33910092] layers = 2 -[node name="Cylinder_024" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="14" unique_id=1417923883] +[node name="Cylinder_024" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="14" unique_id=804831044] layers = 2 -[node name="Cylinder_025" parent="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="15" unique_id=1128864618] +[node name="Cylinder_025" parent="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel" parent_id_path=PackedInt32Array(9668413, 1701913547) index="15" unique_id=308237162] layers = 2 -[node name="contact_angle_end_left" parent="current_scene_3D/wheel_left" unique_id=178996732 instance=ExtResource("3_ss2qs")] +[node name="ContactAngleEndLeft" parent="CurrentScene3D/WheelLeft" unique_id=178996732 instance=ExtResource("3_ss2qs")] script = ExtResource("8_tdhcr") phase = "end" -[node name="Circle" parent="current_scene_3D/wheel_left/contact_angle_end_left/angle_contact" index="0" unique_id=1646293624] +[node name="Circle" parent="CurrentScene3D/WheelLeft/ContactAngleEndLeft/angle_contact" index="0" unique_id=2039290200] layers = 2 -[node name="contact_angle_start_left" parent="current_scene_3D/wheel_left" unique_id=1651147978 instance=ExtResource("3_ss2qs")] +[node name="ContactAngleStartLeft" parent="CurrentScene3D/WheelLeft" unique_id=1651147978 instance=ExtResource("3_ss2qs")] script = ExtResource("8_tdhcr") phase = "start" -[node name="Circle" parent="current_scene_3D/wheel_left/contact_angle_start_left/angle_contact" index="0" unique_id=1646293624] +[node name="Circle" parent="CurrentScene3D/WheelLeft/ContactAngleStartLeft/angle_contact" index="0" unique_id=2039290200] layers = 2 -[node name="handrim_left" parent="current_scene_3D/wheel_left" unique_id=1417836334 instance=ExtResource("4_8bgme")] +[node name="HandrimLeft" parent="CurrentScene3D/WheelLeft" unique_id=1417836334 instance=ExtResource("4_8bgme")] -[node name="BézierCircle_003" parent="current_scene_3D/wheel_left/handrim_left/handrim" parent_id_path=PackedInt32Array(1417836334, 196758062) index="0" unique_id=1785037892] +[node name="BézierCircle_003" parent="CurrentScene3D/WheelLeft/HandrimLeft/handrim" parent_id_path=PackedInt32Array(1417836334, 196758062) index="0" unique_id=1225760875] layers = 2 -[node name="trail_hand_left" type="MultiMeshInstance3D" parent="current_scene_3D" unique_id=748685228] +[node name="TrailHandLeft" type="MultiMeshInstance3D" parent="CurrentScene3D" unique_id=748685228 node_paths=PackedStringArray("node_forearm_cluster_left", "node_forearm_cluster_right")] script = ExtResource("10_tdhcr") side = "left" +node_forearm_cluster_left = NodePath("../ForearmClusterLeft") +node_forearm_cluster_right = NodePath("../ForearmClusterRight") -[node name="trail_hand_right" type="MultiMeshInstance3D" parent="current_scene_3D" unique_id=337426890] +[node name="TrailHandRight" type="MultiMeshInstance3D" parent="CurrentScene3D" unique_id=337426890 node_paths=PackedStringArray("node_forearm_cluster_left", "node_forearm_cluster_right")] script = ExtResource("10_tdhcr") side = "right" +node_forearm_cluster_left = NodePath("../ForearmClusterLeft") +node_forearm_cluster_right = NodePath("../ForearmClusterRight") -[node name="last_push_pattern_left_1" type="MultiMeshInstance3D" parent="current_scene_3D" unique_id=1001615912] +[node name="LastPushPatternLeft1" type="MultiMeshInstance3D" parent="CurrentScene3D" unique_id=1001615912 node_paths=PackedStringArray("node_virtual_wheel_left", "node_virtual_wheel_right")] script = ExtResource("11_itwwm") side = "left" last_push_pattern = "last_push_pattern_1" +node_virtual_wheel_left = NodePath("../WheelLeft") +node_virtual_wheel_right = NodePath("../WheelRight") -[node name="last_push_pattern_left_2" type="MultiMeshInstance3D" parent="current_scene_3D" unique_id=854628053] +[node name="LastPushPatternLeft2" type="MultiMeshInstance3D" parent="CurrentScene3D" unique_id=854628053 node_paths=PackedStringArray("node_virtual_wheel_left", "node_virtual_wheel_right")] script = ExtResource("11_itwwm") side = "left" last_push_pattern = "last_push_pattern_2" +node_virtual_wheel_left = NodePath("../WheelLeft") +node_virtual_wheel_right = NodePath("../WheelRight") -[node name="last_push_pattern_left_3" type="MultiMeshInstance3D" parent="current_scene_3D" unique_id=744508637] +[node name="LastPushPatternLeft3" type="MultiMeshInstance3D" parent="CurrentScene3D" unique_id=744508637 node_paths=PackedStringArray("node_virtual_wheel_left", "node_virtual_wheel_right")] script = ExtResource("11_itwwm") side = "left" last_push_pattern = "last_push_pattern_3" +node_virtual_wheel_left = NodePath("../WheelLeft") +node_virtual_wheel_right = NodePath("../WheelRight") -[node name="last_push_pattern_right_1" type="MultiMeshInstance3D" parent="current_scene_3D" unique_id=1536233375] +[node name="LastPushPatternRight1" type="MultiMeshInstance3D" parent="CurrentScene3D" unique_id=1536233375 node_paths=PackedStringArray("node_virtual_wheel_left", "node_virtual_wheel_right")] script = ExtResource("11_itwwm") side = "right" last_push_pattern = "last_push_pattern_1" +node_virtual_wheel_left = NodePath("../WheelLeft") +node_virtual_wheel_right = NodePath("../WheelRight") -[node name="last_push_pattern_right_2" type="MultiMeshInstance3D" parent="current_scene_3D" unique_id=1694399730] +[node name="LastPushPatternRight2" type="MultiMeshInstance3D" parent="CurrentScene3D" unique_id=1694399730 node_paths=PackedStringArray("node_virtual_wheel_left", "node_virtual_wheel_right")] script = ExtResource("11_itwwm") side = "right" last_push_pattern = "last_push_pattern_2" +node_virtual_wheel_left = NodePath("../WheelLeft") +node_virtual_wheel_right = NodePath("../WheelRight") -[node name="last_push_pattern_right_3" type="MultiMeshInstance3D" parent="current_scene_3D" unique_id=1492457121] +[node name="LastPushPatternRight3" type="MultiMeshInstance3D" parent="CurrentScene3D" unique_id=1492457121 node_paths=PackedStringArray("node_virtual_wheel_left", "node_virtual_wheel_right")] script = ExtResource("11_itwwm") side = "right" last_push_pattern = "last_push_pattern_3" +node_virtual_wheel_left = NodePath("../WheelLeft") +node_virtual_wheel_right = NodePath("../WheelRight") -[node name="view_left_1" type="SubViewport" parent="." unique_id=1954468251] +[node name="ViewLeft1" type="SubViewport" parent="." unique_id=1954468251] transparent_bg = true size = Vector2i(600, 600) render_target_update_mode = 4 -[node name="Node3D" type="Node3D" parent="view_left_1" unique_id=1216762865] +[node name="Node3D" type="Node3D" parent="ViewLeft1" unique_id=1216762865] transform = Transform3D(0.5, 0, -0.866025, 0, 1, 0, 0.866025, 0, 0.5, -0.4, 0, 0) -[node name="Camera_Left" type="Camera3D" parent="view_left_1/Node3D" unique_id=1462001903] +[node name="CameraLeft" type="Camera3D" parent="ViewLeft1/Node3D" unique_id=1462001903] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.7, 1) cull_mask = 1047586 projection = 1 @@ -312,13 +380,13 @@ current = true fov = 45.0 size = 3.0 -[node name="view_left_2" type="SubViewport" parent="." unique_id=844359500] +[node name="ViewLeft2" type="SubViewport" parent="." unique_id=844359500] transparent_bg = true handle_input_locally = false size = Vector2i(400, 400) render_target_update_mode = 4 -[node name="Camera_Left" type="Camera3D" parent="view_left_2" unique_id=748457372] +[node name="CameraLeft" type="Camera3D" parent="ViewLeft2" unique_id=748457372] transform = Transform3D(1, 0, -8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0.7, -1) cull_mask = 1047714 projection = 1 @@ -326,16 +394,16 @@ current = true fov = 45.0 size = 3.0 -[node name="view_right_1" type="SubViewport" parent="." unique_id=371031523] +[node name="ViewRight1" type="SubViewport" parent="." unique_id=371031523] transparent_bg = true handle_input_locally = false size = Vector2i(600, 600) render_target_update_mode = 4 -[node name="Node3D" type="Node3D" parent="view_right_1" unique_id=2113952315] +[node name="Node3D" type="Node3D" parent="ViewRight1" unique_id=2113952315] transform = Transform3D(-0.5, 0, -0.866025, 0, 1, 0, 0.866025, 0, -0.5, 0, 0, 0) -[node name="Camera_Right" type="Camera3D" parent="view_right_1/Node3D" unique_id=259936708] +[node name="CameraRight" type="Camera3D" parent="ViewRight1/Node3D" unique_id=259936708] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.7, 1) cull_mask = 1047620 projection = 1 @@ -343,13 +411,13 @@ current = true fov = 45.0 size = 3.0 -[node name="view_right_2" type="SubViewport" parent="." unique_id=119499427] +[node name="ViewRight2" type="SubViewport" parent="." unique_id=119499427] transparent_bg = true handle_input_locally = false size = Vector2i(400, 400) render_target_update_mode = 4 -[node name="Camera_Right" type="Camera3D" parent="view_right_2" unique_id=640076583] +[node name="CameraRight" type="Camera3D" parent="ViewRight2" unique_id=640076583] transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.7, 1) cull_mask = 1047876 projection = 1 @@ -357,19 +425,19 @@ current = true fov = 45.0 size = 3.0 -[editable path="current_scene_3D/wheel_right/rear_wheel_right"] -[editable path="current_scene_3D/wheel_right/rear_wheel_right/rear_wheel"] -[editable path="current_scene_3D/wheel_right/contact_angle_end_right"] -[editable path="current_scene_3D/wheel_right/contact_angle_end_right/angle_contact"] -[editable path="current_scene_3D/wheel_right/contact_angle_start_right"] -[editable path="current_scene_3D/wheel_right/contact_angle_start_right/angle_contact"] -[editable path="current_scene_3D/wheel_right/handrim_right"] -[editable path="current_scene_3D/wheel_right/handrim_right/handrim"] -[editable path="current_scene_3D/wheel_left/rear_wheel_left"] -[editable path="current_scene_3D/wheel_left/rear_wheel_left/rear_wheel"] -[editable path="current_scene_3D/wheel_left/contact_angle_end_left"] -[editable path="current_scene_3D/wheel_left/contact_angle_end_left/angle_contact"] -[editable path="current_scene_3D/wheel_left/contact_angle_start_left"] -[editable path="current_scene_3D/wheel_left/contact_angle_start_left/angle_contact"] -[editable path="current_scene_3D/wheel_left/handrim_left"] -[editable path="current_scene_3D/wheel_left/handrim_left/handrim"] +[editable path="CurrentScene3D/WheelRight/RearWheelRight"] +[editable path="CurrentScene3D/WheelRight/RearWheelRight/rear_wheel"] +[editable path="CurrentScene3D/WheelRight/ContactAngleEndRight"] +[editable path="CurrentScene3D/WheelRight/ContactAngleEndRight/angle_contact"] +[editable path="CurrentScene3D/WheelRight/ContactAngleStartRight"] +[editable path="CurrentScene3D/WheelRight/ContactAngleStartRight/angle_contact"] +[editable path="CurrentScene3D/WheelRight/HandrimRight"] +[editable path="CurrentScene3D/WheelRight/HandrimRight/handrim"] +[editable path="CurrentScene3D/WheelLeft/RearWheelLeft"] +[editable path="CurrentScene3D/WheelLeft/RearWheelLeft/rear_wheel"] +[editable path="CurrentScene3D/WheelLeft/ContactAngleEndLeft"] +[editable path="CurrentScene3D/WheelLeft/ContactAngleEndLeft/angle_contact"] +[editable path="CurrentScene3D/WheelLeft/ContactAngleStartLeft"] +[editable path="CurrentScene3D/WheelLeft/ContactAngleStartLeft/angle_contact"] +[editable path="CurrentScene3D/WheelLeft/HandrimLeft"] +[editable path="CurrentScene3D/WheelLeft/HandrimLeft/handrim"] diff --git a/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern_gui.gd b/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern_gui.gd index 2f76a0e..e32872c 100644 --- a/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern_gui.gd +++ b/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern_gui.gd @@ -133,9 +133,9 @@ func _on_button_pressed(): reference_frame_id = 202 if Globals.main: - node_optitrack = Globals.main.get_node("optitrack") + node_optitrack = Globals.main.get_node("Optitrack") else: # If overlay scene runs standalone (outside Globals.main) - node_optitrack = get_tree().current_scene.get_node("optitrack") + node_optitrack = get_tree().current_scene.get_node("Optitrack") if node_optitrack.get_node(str(probe_id)) and node_optitrack.get_node(str(reference_frame_id)): var node_probe = node_optitrack.get_node(str(probe_id)) diff --git a/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern_gui.tscn b/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern_gui.tscn index 07c5244..0b2a6cd 100644 --- a/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern_gui.tscn +++ b/src/overlays/biofeedback_push_pattern/biofeedback_push_pattern_gui.tscn @@ -35,7 +35,7 @@ corner_radius_bottom_left = 10 [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_t73oe"] -[node name="Control" type="Control" unique_id=299987078 node_paths=PackedStringArray("node_aimings_list", "node_aiming_button")] +[node name="BiofeedbackPushPatternGUI" type="Control" unique_id=299987078 node_paths=PackedStringArray("node_aimings_list", "node_aiming_button")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -43,10 +43,10 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_tlu87") -node_aimings_list = NodePath("main_panel/margin_container/main_vbox_container/aimings_panel/ScrollContainer/aimings_list") -node_aiming_button = NodePath("main_panel/margin_container/main_vbox_container/aiming_button") +node_aimings_list = NodePath("MainPanel/MarginContainer/MainVboxContainer/AaimingsPanel/ScrollContainer/AimingsList") +node_aiming_button = NodePath("MainPanel/MarginContainer/MainVboxContainer/AimingButton") -[node name="main_panel" type="ColorRect" parent="." unique_id=1714153704] +[node name="MainPanel" type="ColorRect" parent="." unique_id=1714153704] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -59,7 +59,7 @@ grow_horizontal = 2 grow_vertical = 2 color = Color(0.592157, 0.592157, 0.592157, 1) -[node name="margin_container" type="MarginContainer" parent="main_panel" unique_id=1722728904] +[node name="MarginContainer" type="MarginContainer" parent="MainPanel" unique_id=1722728904] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -72,35 +72,35 @@ theme_override_constants/margin_top = 10 theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 -[node name="main_vbox_container" type="VBoxContainer" parent="main_panel/margin_container" unique_id=1206753184] +[node name="MainVboxContainer" type="VBoxContainer" parent="MainPanel/MarginContainer" unique_id=1206753184] layout_mode = 2 -[node name="aimings_panel" type="VBoxContainer" parent="main_panel/margin_container/main_vbox_container" unique_id=1527992556] +[node name="AaimingsPanel" type="VBoxContainer" parent="MainPanel/MarginContainer/MainVboxContainer" unique_id=1527992556] layout_mode = 2 -[node name="aimings_title" type="Label" parent="main_panel/margin_container/main_vbox_container/aimings_panel" unique_id=192357864] +[node name="AimingsTitle" type="Label" parent="MainPanel/MarginContainer/MainVboxContainer/AaimingsPanel" unique_id=192357864] layout_mode = 2 theme_override_styles/normal = SubResource("StyleBoxFlat_rspjr") text = "Settings" horizontal_alignment = 1 -[node name="ScrollContainer" type="ScrollContainer" parent="main_panel/margin_container/main_vbox_container/aimings_panel" unique_id=1479382086] +[node name="ScrollContainer" type="ScrollContainer" parent="MainPanel/MarginContainer/MainVboxContainer/AaimingsPanel" unique_id=1479382086] custom_minimum_size = Vector2(250, 500) layout_mode = 2 size_flags_vertical = 3 theme_override_styles/panel = SubResource("StyleBoxFlat_2evn0") -[node name="aimings_list" type="VBoxContainer" parent="main_panel/margin_container/main_vbox_container/aimings_panel/ScrollContainer" unique_id=1288809257] +[node name="AimingsList" type="VBoxContainer" parent="MainPanel/MarginContainer/MainVboxContainer/AaimingsPanel/ScrollContainer" unique_id=1288809257] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="ColorRect" type="ColorRect" parent="main_panel/margin_container/main_vbox_container" unique_id=457011860] +[node name="ColorRect" type="ColorRect" parent="MainPanel/MarginContainer/MainVboxContainer" unique_id=457011860] custom_minimum_size = Vector2(0, 5) layout_mode = 2 color = Color(0, 0, 0, 1) -[node name="aiming_button" type="Button" parent="main_panel/margin_container/main_vbox_container" unique_id=509315680] +[node name="AimingButton" type="Button" parent="MainPanel/MarginContainer/MainVboxContainer" unique_id=509315680] layout_mode = 2 size_flags_vertical = 10 theme_override_font_sizes/font_size = 40 diff --git a/src/overlays/biofeedback_push_pattern/last_push_pattern.gd b/src/overlays/biofeedback_push_pattern/last_push_pattern.gd index 6b9d403..a129eb6 100644 --- a/src/overlays/biofeedback_push_pattern/last_push_pattern.gd +++ b/src/overlays/biofeedback_push_pattern/last_push_pattern.gd @@ -15,6 +15,10 @@ extends MultiMeshInstance3D @export_enum("last_push_pattern_1", "last_push_pattern_2", "last_push_pattern_3") var last_push_pattern: String +# Nodes +@export var node_virtual_wheel_left: Node +@export var node_virtual_wheel_right: Node + # Variables var positions := [] var trail_size := 0.11 @@ -39,11 +43,11 @@ func _ready() -> void: func _process(_delta: float) -> void: # Once start the analysis by sending a request to the python bridge if Globals.main: - if Globals.main.has_node("python_bridge"): - if Globals.main.get_node("python_bridge")._udp_receiver_connected and not connected: + if Globals.main.has_node("PythonBridge"): + if Globals.main.get_node("PythonBridge")._udp_receiver_connected and not connected: connected = true _update_arg() - Globals.main.get_node("python_bridge").send("biofeedback_update", arg, "start") + Globals.main.get_node("PythonBridge").send("biofeedback_update", arg, "start") # Reset the connected flag if the python bridge is disconnected else: if connected: @@ -52,10 +56,8 @@ func _process(_delta: float) -> void: # Update loop process if the process is connected if connected: visible = true - if Globals.main.has_node("python_bridge"): - var data = Globals.main.get_node("python_bridge").receive( - last_push_pattern + "_" + side - ) + if Globals.main.has_node("PythonBridge"): + var data = Globals.main.get_node("PythonBridge").receive(last_push_pattern + "_" + side) if data is Dictionary and data.has("data") and data["data"].size() > 0: if data["command"] == "biofeedback_update": @@ -67,18 +69,18 @@ func _process(_delta: float) -> void: visible = false # Should we quit - if not Config.get_value("overlays.biofeedback_optitrack.enabled"): + if not Config.get_value("overlays.biofeedback_push_pattern.enabled"): # Stop the biofeedback from python bridge if this overlays is shut down if ( - Globals.main.has_node("python_bridge") + Globals.main.has_node("PythonBridge") and connected and not Config.get_value("overlays.biofeedback_push_frequency.enabled") ): # Tell the python bridge to stop the repeating update process - Globals.main.get_node("python_bridge").send("biofeedback_update", {}, "stop") + Globals.main.get_node("PythonBridge").send("biofeedback_update", {}, "stop") # Send a final request to reset the biofeedback script data _update_arg() - Globals.main.get_node("python_bridge").send("biofeedback_stop", arg, "once") + Globals.main.get_node("PythonBridge").send("biofeedback_stop", arg, "once") # Remove the overlay node from the scene tree queue_free() @@ -100,12 +102,12 @@ func _apply_side(): layer = 1 << 7 coordinates_wheel_center = "coordinates.left_wheel_center" offset_trail = 0.1 - virtual_wheel = "../wheel_left" + virtual_wheel = node_virtual_wheel_left elif side == "right": layer = 1 << 8 coordinates_wheel_center = "coordinates.right_wheel_center" offset_trail = -0.1 - virtual_wheel = "../wheel_right" + virtual_wheel = node_virtual_wheel_right # Initialize a MultiMesh instance used to render the push pattern trail @@ -147,13 +149,13 @@ func parse_trail_points(data): var pos_center_wheel = Vector3( Config.get_value(coordinates_wheel_center)[0], Config.get_value(coordinates_wheel_center)[1], - get_node(virtual_wheel).position[2] + offset_trail + virtual_wheel.position[2] + offset_trail ) var result: Array = [] for p in data: p[2] = 0 # 2D projection - result.append(Vector3(p[0], p[1], p[2]) - pos_center_wheel) + result.append(Vector3(p[0], p[1], p[2])) return result diff --git a/src/overlays/biofeedback_push_pattern/trail_hand.gd b/src/overlays/biofeedback_push_pattern/trail_hand.gd index 7942d6f..63b6221 100644 --- a/src/overlays/biofeedback_push_pattern/trail_hand.gd +++ b/src/overlays/biofeedback_push_pattern/trail_hand.gd @@ -10,6 +10,10 @@ extends MultiMeshInstance3D # Selected side of the wheelchair (left or right) @export_enum("left", "right") var side: String +# Nodes +@export var node_forearm_cluster_left: Node +@export var node_forearm_cluster_right: Node + # Trail rendering parameters var frame_limit = 100 var trail_size = 0.15 @@ -49,7 +53,7 @@ func _process(_delta): ) # Transform hand position to world space and apply trail offset - var hand_node = $"..".get_node(node_hand_key) + var hand_node = node_hand_key var pos_hand = ( hand_node.position + hand_node.global_transform.basis * local_pos_hand + offset_trail ) @@ -76,12 +80,12 @@ func _apply_side(): offset_trail = Vector3(0, 0, -0.05) layer = 1 << 5 coordinates_hand = "coordinates.left_hand" - node_hand_key = "forearm_cluster_left" + node_hand_key = node_forearm_cluster_left elif side == "right": offset_trail = Vector3(0, 0, 0.05) layer = 1 << 6 coordinates_hand = "coordinates.right_hand" - node_hand_key = "forearm_cluster_right" + node_hand_key = node_forearm_cluster_right # Initialize a MultiMesh instance used to render the trail