[gd_scene load_steps=16 format=4 uid="uid://d2feet02a603e"]

[ext_resource type="Script" uid="uid://gg4c132d2xwj" path="res://src/props/overhead_light/overhead_light.gd" id="1_210ch"]
[ext_resource type="Texture2D" uid="uid://bne1d0r5a8nn6" path="res://assets/props/overhead_light/overhead_light_C.png" id="1_whqf3"]
[ext_resource type="Texture2D" uid="uid://jag1fu2515j8" path="res://assets/props/overhead_light/overhead_light_E.png" id="2_g27yp"]
[ext_resource type="Texture2D" uid="uid://bh2jmk7jfjmyr" path="res://assets/props/overhead_light/overhead_light_M.png" id="3_ngq1d"]
[ext_resource type="Texture2D" uid="uid://no4s7dsg8tih" path="res://assets/props/overhead_light/overhead_light_N.png" id="4_3gl0p"]
[ext_resource type="Texture2D" uid="uid://cr5e4hk33wmwf" path="res://assets/props/overhead_light/overhead_light_R.png" id="5_210ch"]
[ext_resource type="PackedScene" uid="uid://c2omlx4ptrc01" path="res://src/world/gunk_body/gunk_body.tscn" id="6_3gl0p"]
[ext_resource type="Material" uid="uid://dutkfm4ek0ysh" path="res://assets/materials/gunk_bright.material" id="8_3gl0p"]

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ljcul"]
albedo_texture = ExtResource("1_whqf3")
metallic = 1.0
metallic_texture = ExtResource("3_ngq1d")
roughness_texture = ExtResource("5_210ch")
emission_enabled = true
emission_energy_multiplier = 12.0
emission_texture = ExtResource("2_g27yp")
normal_enabled = true
normal_texture = ExtResource("4_3gl0p")
texture_filter = 2

[sub_resource type="ArrayMesh" id="ArrayMesh_3gl0p"]
_surfaces = [{
"aabb": AABB(-0.4, -0.2, -0.75, 0.8, 0.2, 1.5),
"format": 34896613377,
"index_count": 60,
"index_data": PackedByteArray("BgAEAAMAAwAHAAYABwAEAAYACAAEAAcABwAFAAgACAAFAAQAAQAHAAMAAQAFAAcAAgABAAMAAwAEAAIAAAABAAIAAAAFAAEAAgAEAAkAAgAJAAAABAAFAAoACQAEAAoACgAFAAkACQAFAAsACwAFAAAAAAAJAAsA"),
"lods": [0.130754, PackedByteArray("AwAEAAIABAAFAAIAAQAEAAMAAQAFAAQAAgABAAMAAAAFAAEAAgAFAAAAAAABAAIA"), 0.228058, PackedByteArray("AAABAAIAAgABAAMAAAADAAEAAwAAAAIA")],
"name": "Cube",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 12,
"vertex_data": PackedByteArray("AAD//wAAAAD/////AAAAAAAA/////wAA////////AAD/3wAA//8AAP8fAAAAAAAA////f///AAD///9/AAAAAP/fAAAAAAAAAAD/f///AAD/HwAA//8AAAAA/38AAAAA")
}]
blend_shape_mode = 0

[sub_resource type="ArrayMesh" id="ArrayMesh_jdrpd"]
_surfaces = [{
"aabb": AABB(-0.4, -0.2, -0.75, 0.8, 0.2, 1.5),
"attribute_data": PackedByteArray("//////+X//////8z/5f/M/+X/zMAAP//AAD/M/+X////f/8T/3P/M/8X/xP/l/8z/6P/E////zP/I////3P/M/9//yP/F/8j/yP/M/+H////h/8z/5f/I////yP/8/8T/w//M/8P////I/8z/w//M/8P////c////4f///+H/zP/c////yP///9z/zP/I/8z"),
"format": 34896613399,
"index_count": 60,
"index_data": PackedByteArray("EAAJAAgACAAJAAoACgAJABEAEQAJABIABwATAAQABAATABQAFQAMAAsACwAMAA0ADQAMABYAFgAMABcABgAYAAUABQAYABkAAAABAAIAAgABAAMAGgAOABsAGwAOABwAHQAPAB4AHgAPAB8AIAAhACIAIgAhACMA"),
"lods": [0.130754, PackedByteArray("CAAJAAoACwAMAA0AAAABAAIAAgABAAMABgAOAAUADwAOAAYABwAOAA8ABwAPAAQA"), 0.228058, PackedByteArray("AAABAAIAAgABAAMABAAFAAYABQAEAAcA")],
"material": SubResource("StandardMaterial3D_ljcul"),
"name": "Cube",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 36,
"vertex_data": PackedByteArray("AAD//wAA////////AAD//wAA//////////////////////////9U1QAA//8AAFTVAAD/////VNX/////AABU1f///////wCA/98AAP//AIAAAP////8AgAAA//8AAP///x8AAAAA////////AAD///8fAAAAAPzF/98AAP///MX///9///8AgAAA/3///wCA/x8AAP//AID///9/AABU1f///3///1TVAAD/fwAA//////9/AAD////fAAAAAP//AAD/f///VNUAAP9/AABU1f8fAAD///zFAAD/f////MUAAP9/AAD8xf/fAAAAAPzF////fwAA/MX///9////8xf/fAAAAAP+//x8AAAAA/7//3wAA////v/8fAAD///+//3//v/9//7//f/+//3//v6oqqipUVaqqVFWqqqoqqir/f////3////9///////9/////f////3/+Of6c/xwBRv9/////f////3///6oqqiqqKqoq////f////3////9/VFWqqlRVqqr+Of6c/jn+nP45/pz/HAFG/xwBRv8cAUYAAP9/AAD/fwAA/38AAP9/")
}]
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_3gl0p")

[sub_resource type="Animation" id="Animation_g27yp"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:mesh:surface_0/material:emission_energy_multiplier")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [12.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("../SpotLight3D:light_energy")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [2.0]
}

[sub_resource type="Animation" id="Animation_whqf3"]
resource_name = "flicker"
length = 0.01
loop_mode = 1
step = 0.005
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:mesh:surface_0/material:emission_energy_multiplier")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.005),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [12.0, 11.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("../SpotLight3D:light_energy")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.005),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [3.0, 2.7]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_ngq1d"]
_data = {
&"RESET": SubResource("Animation_g27yp"),
&"flicker": SubResource("Animation_whqf3")
}

[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_jdrpd"]
data = PackedVector3Array(0.4, -0.1, 0.75, 0.3, -0.2, 0.75, 0.4, 0, 0.75, 0.4, 0, 0.75, 0.3, -0.2, 0.75, -0.4, 0, 0.75, -0.4, 0, 0.75, 0.3, -0.2, 0.75, -0.4, -0.1, 0.75, -0.4, -0.1, 0.75, 0.3, -0.2, 0.75, -0.3, -0.2, 0.75, 0.4, 0, -0.75, 0.4, -0.1, -0.75, 0.4, 0, 0.75, 0.4, 0, 0.75, 0.4, -0.1, -0.75, 0.4, -0.1, 0.75, -0.4, -0.1, -0.75, -0.3, -0.2, -0.75, -0.4, 0, -0.75, -0.4, 0, -0.75, -0.3, -0.2, -0.75, 0.4, 0, -0.75, 0.4, 0, -0.75, -0.3, -0.2, -0.75, 0.4, -0.1, -0.75, 0.4, -0.1, -0.75, -0.3, -0.2, -0.75, 0.3, -0.2, -0.75, -0.4, 0, 0.75, -0.4, -0.1, 0.75, -0.4, 0, -0.75, -0.4, 0, -0.75, -0.4, -0.1, 0.75, -0.4, -0.1, -0.75, -0.4, 0, -0.75, 0.4, 0, -0.75, -0.4, 0, 0.75, -0.4, 0, 0.75, 0.4, 0, -0.75, 0.4, 0, 0.75, -0.3, -0.2, 0.75, -0.3, -0.2, -0.75, -0.4, -0.1, 0.75, -0.4, -0.1, 0.75, -0.3, -0.2, -0.75, -0.4, -0.1, -0.75, 0.3, -0.2, -0.75, 0.3, -0.2, 0.75, 0.4, -0.1, -0.75, 0.4, -0.1, -0.75, 0.3, -0.2, 0.75, 0.4, -0.1, 0.75, 0.3, -0.2, -0.75, -0.3, -0.2, -0.75, 0.3, -0.2, 0.75, 0.3, -0.2, 0.75, -0.3, -0.2, -0.75, -0.3, -0.2, 0.75)

[node name="OverheadLight" type="Node3D"]
script = ExtResource("1_210ch")

[node name="SpotLight3D" type="SpotLight3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, -0.3, 0)
visible = false
light_color = Color(1, 0.9825, 0.95, 1)
light_energy = 2.0
light_specular = 1.0
spot_range = 16.0
spot_attenuation = 0.5
spot_angle = 80.0
spot_angle_attenuation = 1.55871

[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("ArrayMesh_jdrpd")

[node name="FluorescentFlicker" type="AnimationPlayer" parent="MeshInstance3D"]
libraries = {
&"": SubResource("AnimationLibrary_ngq1d")
}
autoplay = "flicker"

[node name="GunkBody" parent="MeshInstance3D" instance=ExtResource("6_3gl0p")]
mask_dim = 32
source_gunk_material = ExtResource("8_3gl0p")

[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D/GunkBody"]
shape = SubResource("ConcavePolygonShape3D_jdrpd")

[connection signal="clear_total_updated" from="MeshInstance3D/GunkBody" to="." method="_on_clear_total_updated"]
