From 358c9e28e1db68c1625d1742b93b903df59dcc8c Mon Sep 17 00:00:00 2001 From: Persephone Bubblegum-Holiday Date: Mon, 14 Apr 2025 16:33:56 -0700 Subject: [PATCH] 0.4.1 changes --- Scenes/Node Types/Add.tscn | 17 +++++++++++ Scenes/Node Types/Advanced Spotlight.tscn | 20 ++++++++++++ Scenes/Node Types/Animatronic.tscn | 20 ++++++++++++ Scenes/Node Types/Direct Output.tscn | 2 +- Scenes/Node Types/Keystrokes.tscn | 17 +++++++++++ Scenes/Node Types/Multiply.tscn | 17 +++++++++++ Scenes/Node Types/Subtract.tscn | 17 +++++++++++ Scenes/Node Types/Switch Audio.tscn | 17 +++++++++++ Scripts/GL_Add.gd | 15 +++++++++ Scripts/GL_Add.gd.uid | 1 + Scripts/GL_Keystrokes.gd | 37 ----------------------- Scripts/GL_Keystrokes.gd.uid | 1 - Scripts/GL_Multiply.gd | 15 +++++++++ Scripts/GL_Multiply.gd.uid | 1 + Scripts/GL_Record.gd | 10 +++--- Scripts/GL_Subtract.gd | 15 +++++++++ Scripts/GL_Subtract.gd.uid | 1 + Scripts/GL_Switch_Audio.gd | 18 +++++++++++ Scripts/GL_Switch_Audio.gd.uid | 1 + 19 files changed, 197 insertions(+), 45 deletions(-) create mode 100644 Scenes/Node Types/Add.tscn create mode 100644 Scenes/Node Types/Advanced Spotlight.tscn create mode 100644 Scenes/Node Types/Animatronic.tscn create mode 100644 Scenes/Node Types/Keystrokes.tscn create mode 100644 Scenes/Node Types/Multiply.tscn create mode 100644 Scenes/Node Types/Subtract.tscn create mode 100644 Scenes/Node Types/Switch Audio.tscn create mode 100644 Scripts/GL_Add.gd create mode 100644 Scripts/GL_Add.gd.uid delete mode 100644 Scripts/GL_Keystrokes.gd delete mode 100644 Scripts/GL_Keystrokes.gd.uid create mode 100644 Scripts/GL_Multiply.gd create mode 100644 Scripts/GL_Multiply.gd.uid create mode 100644 Scripts/GL_Subtract.gd create mode 100644 Scripts/GL_Subtract.gd.uid create mode 100644 Scripts/GL_Switch_Audio.gd create mode 100644 Scripts/GL_Switch_Audio.gd.uid diff --git a/Scenes/Node Types/Add.tscn b/Scenes/Node Types/Add.tscn new file mode 100644 index 0000000..073f1b5 --- /dev/null +++ b/Scenes/Node Types/Add.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=3 uid="uid://c3ygi6en4vak6"] + +[ext_resource type="PackedScene" uid="uid://b0arjg8r75f8y" path="res://Scenes/Nodes/Node.tscn" id="1_88lwk"] +[ext_resource type="Script" uid="uid://fui0f05i5l6c" path="res://Scripts/GL_Add.gd" id="2_88lwk"] + +[node name="Node" type="Control"] +layout_mode = 3 +anchors_preset = 0 +mouse_filter = 1 + +[node name="Node" parent="." groups=["GL Node"] instance=ExtResource("1_88lwk")] +layout_mode = 0 +tooltip_text = "Adds two floats together." +script = ExtResource("2_88lwk") + +[connection signal="mouse_entered" from="Node" to="Node" method="mouse_enter"] +[connection signal="mouse_exited" from="Node" to="Node" method="mouse_exit"] diff --git a/Scenes/Node Types/Advanced Spotlight.tscn b/Scenes/Node Types/Advanced Spotlight.tscn new file mode 100644 index 0000000..abdc742 --- /dev/null +++ b/Scenes/Node Types/Advanced Spotlight.tscn @@ -0,0 +1,20 @@ +[gd_scene load_steps=3 format=3 uid="uid://dxay21t1j6ha1"] + +[ext_resource type="PackedScene" uid="uid://b0arjg8r75f8y" path="res://Scenes/Nodes/Node.tscn" id="1_vck43"] +[ext_resource type="Script" uid="uid://t8bsiegtsiwo" path="res://Scripts/GL_Output.gd" id="2_1p1hk"] + +[node name="Node" type="Control"] +layout_mode = 3 +anchors_preset = 0 +mouse_filter = 1 + +[node name="Node" parent="." groups=["GL Node"] instance=ExtResource("1_vck43")] +layout_mode = 0 +tooltip_text = "Controls a spotlight." +script = ExtResource("2_1p1hk") +identification = "L_SPOT_CHICA" +names = PackedStringArray("intensity", "color", "size") +types = PackedStringArray("float", "color", "float") + +[connection signal="mouse_entered" from="Node" to="Node" method="mouse_enter"] +[connection signal="mouse_exited" from="Node" to="Node" method="mouse_exit"] diff --git a/Scenes/Node Types/Animatronic.tscn b/Scenes/Node Types/Animatronic.tscn new file mode 100644 index 0000000..b85d350 --- /dev/null +++ b/Scenes/Node Types/Animatronic.tscn @@ -0,0 +1,20 @@ +[gd_scene load_steps=3 format=3 uid="uid://d4gx38pme7hnp"] + +[ext_resource type="PackedScene" uid="uid://b0arjg8r75f8y" path="res://Scenes/Nodes/Node.tscn" id="1_6fnvm"] +[ext_resource type="Script" uid="uid://t8bsiegtsiwo" path="res://Scripts/GL_Output.gd" id="2_6fnvm"] + +[node name="Node" type="Control"] +layout_mode = 3 +anchors_preset = 0 +mouse_filter = 1 + +[node name="Node" parent="." groups=["GL Node"] instance=ExtResource("1_6fnvm")] +layout_mode = 0 +tooltip_text = "Controls Chica's movements. All eyelid movements can be set to a particular position using values of 0.0 to 1.0." +script = ExtResource("2_6fnvm") +identification = "AA_CHICA" +names = PackedStringArray("Armature_001|Eyebrow L Down", "Armature_001|Eyebrow L Up", "Armature_001|Eyebrow R Down", "Armature_001|Eyebrow R Up", "Armature_001|Eyelid L", "Armature_001|Eyelid R", "Armature_001|Eyes Down", "Armature_001|Eyes Left", "Armature_001|Eyes Right", "Armature_001|Eyes Up", "Armature_001|Head Down", "Armature_001|Head L", "Armature_001|Head R", "Armature_001|Head Tilt L", "Armature_001|Head Tilt R", "Armature_001|Head Up", "Armature_001|Jaw", "Armature_001|Underlid L", "Armature_001|Underlid R") +types = PackedStringArray("float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float", "float") + +[connection signal="mouse_entered" from="Node" to="Node" method="mouse_enter"] +[connection signal="mouse_exited" from="Node" to="Node" method="mouse_exit"] diff --git a/Scenes/Node Types/Direct Output.tscn b/Scenes/Node Types/Direct Output.tscn index 629abdc..f10a673 100644 --- a/Scenes/Node Types/Direct Output.tscn +++ b/Scenes/Node Types/Direct Output.tscn @@ -10,7 +10,7 @@ mouse_filter = 1 [node name="Node" parent="." groups=["GL Node"] instance=ExtResource("1_uifvy")] layout_mode = 0 -tooltip_text = "Controls Chica's movements. All eyelid movements can be set to a particular position using values of 0.0 to 1.0." +tooltip_text = "Outputs audio directly to your device speakers." script = ExtResource("2_nkf8v") identification = "DIRECT_OUTPUT" names = PackedStringArray("Audio", "Volume", "Current Time") diff --git a/Scenes/Node Types/Keystrokes.tscn b/Scenes/Node Types/Keystrokes.tscn new file mode 100644 index 0000000..f8471af --- /dev/null +++ b/Scenes/Node Types/Keystrokes.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=3 uid="uid://jmwqwspljwjc"] + +[ext_resource type="PackedScene" uid="uid://b0arjg8r75f8y" path="res://Scenes/Nodes/Node.tscn" id="1_ua37n"] +[ext_resource type="Script" uid="uid://e6v6exlrhtaq" path="res://Scripts/GL_Keystrokes.gd" id="2_ua37n"] + +[node name="Node" type="Control"] +layout_mode = 3 +anchors_preset = 0 +mouse_filter = 1 + +[node name="Node" parent="." groups=["GL Node"] instance=ExtResource("1_ua37n")] +layout_mode = 0 +tooltip_text = "Sets a bool for any of the number keys that are pressed." +script = ExtResource("2_ua37n") + +[connection signal="mouse_entered" from="Node" to="Node" method="mouse_enter"] +[connection signal="mouse_exited" from="Node" to="Node" method="mouse_exit"] diff --git a/Scenes/Node Types/Multiply.tscn b/Scenes/Node Types/Multiply.tscn new file mode 100644 index 0000000..33e5620 --- /dev/null +++ b/Scenes/Node Types/Multiply.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=3 uid="uid://bwcuye45ift61"] + +[ext_resource type="PackedScene" uid="uid://b0arjg8r75f8y" path="res://Scenes/Nodes/Node.tscn" id="1_5vmnd"] +[ext_resource type="Script" uid="uid://bmnxkp7ge8wu1" path="res://Scripts/GL_Multiply.gd" id="2_5vmnd"] + +[node name="Node" type="Control"] +layout_mode = 3 +anchors_preset = 0 +mouse_filter = 1 + +[node name="Node" parent="." groups=["GL Node"] instance=ExtResource("1_5vmnd")] +layout_mode = 0 +tooltip_text = "Multiplies two floats together." +script = ExtResource("2_5vmnd") + +[connection signal="mouse_entered" from="Node" to="Node" method="mouse_enter"] +[connection signal="mouse_exited" from="Node" to="Node" method="mouse_exit"] diff --git a/Scenes/Node Types/Subtract.tscn b/Scenes/Node Types/Subtract.tscn new file mode 100644 index 0000000..ba40a13 --- /dev/null +++ b/Scenes/Node Types/Subtract.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=3 uid="uid://dk4kpw62fma4m"] + +[ext_resource type="PackedScene" uid="uid://b0arjg8r75f8y" path="res://Scenes/Nodes/Node.tscn" id="1_vak63"] +[ext_resource type="Script" uid="uid://bxaml7g17kutm" path="res://Scripts/GL_Subtract.gd" id="2_vak63"] + +[node name="Node" type="Control"] +layout_mode = 3 +anchors_preset = 0 +mouse_filter = 1 + +[node name="Node" parent="." groups=["GL Node"] instance=ExtResource("1_vak63")] +layout_mode = 0 +tooltip_text = "Subtracts Float B from Float A." +script = ExtResource("2_vak63") + +[connection signal="mouse_entered" from="Node" to="Node" method="mouse_enter"] +[connection signal="mouse_exited" from="Node" to="Node" method="mouse_exit"] diff --git a/Scenes/Node Types/Switch Audio.tscn b/Scenes/Node Types/Switch Audio.tscn new file mode 100644 index 0000000..ac36097 --- /dev/null +++ b/Scenes/Node Types/Switch Audio.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=3 uid="uid://eoidlfg4tkux"] + +[ext_resource type="PackedScene" uid="uid://b0arjg8r75f8y" path="res://Scenes/Nodes/Node.tscn" id="1_mx713"] +[ext_resource type="Script" uid="uid://dvk3lfcqg4nwr" path="res://Scripts/GL_Switch_Audio.gd" id="2_mx713"] + +[node name="Node" type="Control"] +layout_mode = 3 +anchors_preset = 0 +mouse_filter = 1 + +[node name="Node" parent="." groups=["GL Node"] instance=ExtResource("1_mx713")] +layout_mode = 0 +tooltip_text = "Toggles between two audio sources using the 'Toggle' input." +script = ExtResource("2_mx713") + +[connection signal="mouse_entered" from="Node" to="Node" method="mouse_enter"] +[connection signal="mouse_exited" from="Node" to="Node" method="mouse_exit"] diff --git a/Scripts/GL_Add.gd b/Scripts/GL_Add.gd new file mode 100644 index 0000000..9183cb7 --- /dev/null +++ b/Scripts/GL_Add.gd @@ -0,0 +1,15 @@ +extends GL_Node + +func _ready(): + super._ready() + _set_title("Add") + _create_row("Float A",0.0,0.0,true,0.0,1.0) + _create_row("Float B",0.0,null,true,0.0,1.0) + _update_visuals() + +func _process(delta): + super._process(delta) + apply_pick_values() + + rows["Float A"]["output"] = float(rows["Float A"]["input"]) + float(rows["Float B"]["input"]) + _send_input("Float A") diff --git a/Scripts/GL_Add.gd.uid b/Scripts/GL_Add.gd.uid new file mode 100644 index 0000000..899d965 --- /dev/null +++ b/Scripts/GL_Add.gd.uid @@ -0,0 +1 @@ +uid://fui0f05i5l6c diff --git a/Scripts/GL_Keystrokes.gd b/Scripts/GL_Keystrokes.gd deleted file mode 100644 index 2b916ce..0000000 --- a/Scripts/GL_Keystrokes.gd +++ /dev/null @@ -1,37 +0,0 @@ -extends GL_Node - -func _ready(): - super._ready() - _set_title("Keystrokes") - _create_row("KEY #1",null,false,false,0.0,1) - _create_row("KEY #2",null,false,false,0.0,1) - _create_row("KEY #3",null,false,false,0.0,1) - _create_row("KEY #4",null,false,false,0.0,1) - _create_row("KEY #5",null,false,false,0.0,1) - _create_row("KEY #6",null,false,false,0.0,1) - _create_row("KEY #7",null,false,false,0.0,1) - _create_row("KEY #8",null,false,false,0.0,1) - _create_row("KEY #9",null,false,false,0.0,1) - _create_row("KEY #0",null,false,false,0.0,1) - _update_visuals() - -func _process(delta): - super._process(delta) - - var key_map = { - "KEY #1": KEY_1, - "KEY #2": KEY_2, - "KEY #3": KEY_3, - "KEY #4": KEY_4, - "KEY #5": KEY_5, - "KEY #6": KEY_6, - "KEY #7": KEY_7, - "KEY #8": KEY_8, - "KEY #9": KEY_9, - "KEY #0": KEY_0, - } - - for key_name in key_map.keys(): - var is_pressed = Input.is_key_pressed(key_map[key_name]) or Input.is_key_pressed(key_map[key_name] + (KEY_KP_0 - KEY_0)) - rows[key_name]["output"] = is_pressed - _send_input(key_name) diff --git a/Scripts/GL_Keystrokes.gd.uid b/Scripts/GL_Keystrokes.gd.uid deleted file mode 100644 index adb7631..0000000 --- a/Scripts/GL_Keystrokes.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://e6v6exlrhtaq diff --git a/Scripts/GL_Multiply.gd b/Scripts/GL_Multiply.gd new file mode 100644 index 0000000..5f2f6c6 --- /dev/null +++ b/Scripts/GL_Multiply.gd @@ -0,0 +1,15 @@ +extends GL_Node + +func _ready(): + super._ready() + _set_title("Multiply") + _create_row("Float A",0.0,0.0,true,0.0,1.0) + _create_row("Float B",0.0,null,true,0.0,1.0) + _update_visuals() + +func _process(delta): + super._process(delta) + apply_pick_values() + + rows["Float A"]["output"] = float(rows["Float A"]["input"]) * float(rows["Float B"]["input"]) + _send_input("Float A") diff --git a/Scripts/GL_Multiply.gd.uid b/Scripts/GL_Multiply.gd.uid new file mode 100644 index 0000000..49a6077 --- /dev/null +++ b/Scripts/GL_Multiply.gd.uid @@ -0,0 +1 @@ +uid://bmnxkp7ge8wu1 diff --git a/Scripts/GL_Record.gd b/Scripts/GL_Record.gd index 71c40c4..ba918e3 100644 --- a/Scripts/GL_Record.gd +++ b/Scripts/GL_Record.gd @@ -60,20 +60,18 @@ func _traverse(): recording[key]["lastUsed"] = current recording[key]["current"] = newCurrent if recording[key]["lastUsed"] != null && recording[key]["current"] != recording[key]["end"]: - if(rows[key]["output"] is float): + if(typeof(rows[key]["output"]) == TYPE_BOOL || rows[key]["output"] is GL_AudioType): + rows[key]["output"] = recording[key]["list"][recording[key]["current"]]["value"] + elif(typeof(rows[key]["output"]) == TYPE_FLOAT): rows[key]["output"] = lerp(float(recording[key]["list"][recording[key]["lastUsed"]]["value"]),float(recording[key]["list"][recording[key]["current"]]["value"]),remap_time(time,recording[key]["list"][recording[key]["lastUsed"]]["time"],recording[key]["list"][recording[key]["current"]]["time"])) - elif(rows[key]["output"] is bool || rows[key]["output"] is GL_AudioType): - rows[key]["output"] = recording[key]["current"] - elif(rows[key]["output"] is Color): + elif(typeof(rows[key]["output"]) == TYPE_COLOR): rows[key]["output"] = lerp(recording[key]["list"][recording[key]["lastUsed"]]["value"],recording[key]["list"][recording[key]["current"]]["value"],remap_time(time,recording[key]["list"][recording[key]["lastUsed"]]["time"],recording[key]["list"][recording[key]["current"]]["time"])) - func remap_time(value: float, start: float, end: float) -> float: if start == end: return 0.0 return (value - start) / (end - start) - func recursive_traverse_forward(key:String,current:String) -> String: var dict = recording[key]["list"][current] if dict["time"] > time: diff --git a/Scripts/GL_Subtract.gd b/Scripts/GL_Subtract.gd new file mode 100644 index 0000000..dfcb6e2 --- /dev/null +++ b/Scripts/GL_Subtract.gd @@ -0,0 +1,15 @@ +extends GL_Node + +func _ready(): + super._ready() + _set_title("Subtract") + _create_row("Float A",0.0,0.0,true,0.0,1.0) + _create_row("Float B",0.0,null,true,0.0,1.0) + _update_visuals() + +func _process(delta): + super._process(delta) + apply_pick_values() + + rows["Float A"]["output"] = float(rows["Float A"]["input"]) - float(rows["Float B"]["input"]) + _send_input("Float A") diff --git a/Scripts/GL_Subtract.gd.uid b/Scripts/GL_Subtract.gd.uid new file mode 100644 index 0000000..7f1ad75 --- /dev/null +++ b/Scripts/GL_Subtract.gd.uid @@ -0,0 +1 @@ +uid://bxaml7g17kutm diff --git a/Scripts/GL_Switch_Audio.gd b/Scripts/GL_Switch_Audio.gd new file mode 100644 index 0000000..7e1ec83 --- /dev/null +++ b/Scripts/GL_Switch_Audio.gd @@ -0,0 +1,18 @@ +extends GL_Node + +func _ready(): + super._ready() + _set_title("Switch Audio") + _create_row("Toggle",false,GL_AudioType.new(),true,false,0) + _create_row("Audio A",GL_AudioType.new(),null,true,GL_AudioType.new(),0) + _create_row("Audio B",GL_AudioType.new(),null,true,GL_AudioType.new(),0) + _update_visuals() + +func _process(delta): + super._process(delta) + apply_pick_values() + if(rows["Toggle"]["input"] == false): + rows["Toggle"]["output"] = rows["Audio A"]["input"] + else: + rows["Toggle"]["output"] = rows["Audio B"]["input"] + _send_input("Toggle") diff --git a/Scripts/GL_Switch_Audio.gd.uid b/Scripts/GL_Switch_Audio.gd.uid new file mode 100644 index 0000000..32da0c6 --- /dev/null +++ b/Scripts/GL_Switch_Audio.gd.uid @@ -0,0 +1 @@ +uid://dvk3lfcqg4nwr