[gd_scene load_steps=41 format=3 uid="uid://eaw46gqf17aw"]

[ext_resource type="Script" uid="uid://dq4fq3sdlrtt2" path="res://scripts/trap_fx.gd" id="1_77qbl"]
[ext_resource type="Material" uid="uid://d0igimpfbmiye" path="res://visuals/materials/explosion_cloud.tres" id="2_l2v4y"]
[ext_resource type="AudioStream" uid="uid://dqup45qbcs0a0" path="res://audio/sounds/explosion_small_01.wav" id="3_8g7xx"]
[ext_resource type="AudioStream" uid="uid://dg1on6er2ielh" path="res://audio/sounds/explosion_small_02.wav" id="4_d5gho"]
[ext_resource type="AudioStream" uid="uid://b6nc3881sxtm8" path="res://audio/sounds/explosion_small_03.wav" id="5_gf6ds"]
[ext_resource type="AudioStream" uid="uid://dvlnht0r462yk" path="res://audio/sounds/explosion_small_04.wav" id="6_p88g7"]
[ext_resource type="Shader" uid="uid://dkfrhh35nf022" path="res://visuals/shaders/explosive_streaks.gdshader" id="7_l2v4y"]
[ext_resource type="Texture2D" uid="uid://bgud1c43hsss0" path="res://visuals/textures/explosive_streaks.png" id="8_8g7xx"]
[ext_resource type="Texture2D" uid="uid://c4r0yuw28xqrc" path="res://visuals/textures/explosive_noise.tres" id="8_d5gho"]

[sub_resource type="Curve" id="Curve_bu3n0"]
_data = [Vector2(0, 1), 0.0, 0.10453241, 0, 0, Vector2(0.57246375, 0.8988764), -0.65023583, -0.65023583, 0, 0, Vector2(1, 0), -5.1685348, 0.0, 0, 0]
point_count = 3

[sub_resource type="CurveTexture" id="CurveTexture_spfcl"]
texture_mode = 1
curve = SubResource("Curve_bu3n0")

[sub_resource type="Gradient" id="Gradient_l0oiq"]
offsets = PackedFloat32Array(0, 0.44642857)

[sub_resource type="GradientTexture1D" id="GradientTexture1D_apxyt"]
gradient = SubResource("Gradient_l0oiq")

[sub_resource type="Curve" id="Curve_uul3r"]
_data = [Vector2(0.021739125, 1), 0.0, 0.0, 0, 0, Vector2(0.4710145, 0.32584274), 0.0, 0.0, 0, 0]
point_count = 2

[sub_resource type="CurveTexture" id="CurveTexture_h4jc3"]
curve = SubResource("Curve_uul3r")

[sub_resource type="Curve" id="Curve_2tsig"]
_data = [Vector2(0, 0.29213488), 0.0, 3.0099149, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
point_count = 2

[sub_resource type="CurveTexture" id="CurveTexture_78p8h"]
curve = SubResource("Curve_2tsig")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_6ym0g"]
emission_shape = 6
emission_ring_axis = Vector3(0, -1, 0)
emission_ring_height = 2.0
emission_ring_radius = 2.0
emission_ring_inner_radius = 0.0
emission_ring_cone_angle = 56.79
radial_velocity_min = 6.4999776
radial_velocity_max = 7.4999776
radial_velocity_curve = SubResource("CurveTexture_h4jc3")
gravity = Vector3(0, 5, 0)
scale_min = 1.6999999
scale_max = 3.0
scale_curve = SubResource("CurveTexture_78p8h")
color_ramp = SubResource("GradientTexture1D_apxyt")
alpha_curve = SubResource("CurveTexture_spfcl")

[sub_resource type="SphereMesh" id="SphereMesh_4y8np"]

[sub_resource type="Curve" id="Curve_0a065"]
_data = [Vector2(0, 1), 0.0, 0.10453241, 0, 0, Vector2(0.57246375, 0.8988764), -0.65023583, -0.65023583, 0, 0, Vector2(1, 0), -5.1685348, 0.0, 0, 0]
point_count = 3

[sub_resource type="CurveTexture" id="CurveTexture_ska33"]
texture_mode = 1
curve = SubResource("Curve_0a065")

[sub_resource type="Gradient" id="Gradient_7pxcp"]
offsets = PackedFloat32Array(0, 0.10714286, 0.45535713)
colors = PackedColorArray(0, 0, 0, 1, 0.19607843, 0.19607843, 0.19607843, 1, 1, 1, 1, 1)

[sub_resource type="GradientTexture1D" id="GradientTexture1D_h1pp0"]
gradient = SubResource("Gradient_7pxcp")

[sub_resource type="Curve" id="Curve_2sdsb"]
_data = [Vector2(0.021739125, 1), 0.0, 0.0, 0, 0, Vector2(0.4710145, 0.32584274), 0.0, 0.0, 0, 0]
point_count = 2

[sub_resource type="CurveTexture" id="CurveTexture_h4c7m"]
curve = SubResource("Curve_2sdsb")

[sub_resource type="Curve" id="Curve_mojh2"]
_data = [Vector2(0, 0.29213488), 0.0, 3.0099149, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
point_count = 2

[sub_resource type="CurveTexture" id="CurveTexture_4dm4u"]
curve = SubResource("Curve_mojh2")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_gp5gk"]
emission_shape_scale = Vector3(0.5, 0.5, 0.5)
emission_shape = 6
emission_ring_axis = Vector3(0, -1, 0)
emission_ring_height = 2.0
emission_ring_radius = 2.0
emission_ring_inner_radius = 0.0
emission_ring_cone_angle = 56.79
angle_min = -720.0
angle_max = 720.0
radial_velocity_min = 3.2499776
radial_velocity_max = 3.7499776
radial_velocity_curve = SubResource("CurveTexture_h4c7m")
gravity = Vector3(0, 5, 0)
scale_min = 0.84999996
scale_max = 1.5
scale_curve = SubResource("CurveTexture_4dm4u")
color_ramp = SubResource("GradientTexture1D_h1pp0")
alpha_curve = SubResource("CurveTexture_ska33")
turbulence_noise_strength = 20.0
turbulence_noise_scale = 0.0

[sub_resource type="SphereMesh" id="SphereMesh_s37iy"]

[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_urvwl"]
streams_count = 4
stream_0/stream = ExtResource("3_8g7xx")
stream_1/stream = ExtResource("4_d5gho")
stream_2/stream = ExtResource("5_gf6ds")
stream_3/stream = ExtResource("6_p88g7")

[sub_resource type="ShaderMaterial" id="ShaderMaterial_8g7xx"]
render_priority = 0
shader = ExtResource("7_l2v4y")
shader_parameter/streaks_texture = ExtResource("8_8g7xx")
shader_parameter/explosion_texture = ExtResource("8_d5gho")
shader_parameter/streak_color = Color(3.2944162, 1.1558828, 0, 1)

[sub_resource type="Curve" id="Curve_gf6ds"]
_data = [Vector2(0.13768117, 0.022471905), 0.0, 2.907304, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
point_count = 2

[sub_resource type="CurveTexture" id="CurveTexture_p88g7"]
curve = SubResource("Curve_gf6ds")

[sub_resource type="Curve" id="Curve_d5gho"]
_data = [Vector2(0, 0.34831464), 0.0, 1.9734426, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
point_count = 2

[sub_resource type="CurveTexture" id="CurveTexture_gf6ds"]
curve = SubResource("Curve_d5gho")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_p88g7"]
particle_flag_align_y = true
direction = Vector3(0, 1, 0)
spread = 90.0
initial_velocity_min = 0.5
initial_velocity_max = 1.0
gravity = Vector3(0, 0, 0)
scale_min = 2.0
scale_max = 6.0
scale_curve = SubResource("CurveTexture_gf6ds")
alpha_curve = SubResource("CurveTexture_p88g7")
hue_variation_min = -2.2351742e-08
hue_variation_max = 0.99999994

[sub_resource type="QuadMesh" id="QuadMesh_bu3n0"]
size = Vector2(0.25, 1)
center_offset = Vector3(0, 0.4, 0)

[sub_resource type="Animation" id="Animation_d5gho"]
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ParticleFX:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("StreakFX:emitting")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.033333335),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("OmniLight3D:light_energy")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.06666667),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [20.0, 0.0]
}

[sub_resource type="Animation" id="Animation_gf6ds"]
resource_name = "default"
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ParticleFX:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("StreakFX:emitting")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.05),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("OmniLight3D:light_energy")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [20.0, 0.0]
}
tracks/3/type = "method"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [3.0],
"method": &"proximal_shake"
}]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_p88g7"]
_data = {
&"RESET": SubResource("Animation_d5gho"),
&"default": SubResource("Animation_gf6ds")
}

[node name="Explosion" type="Node3D"]
script = ExtResource("1_77qbl")

[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
material_override = ExtResource("2_l2v4y")
emitting = false
amount = 10
lifetime = 0.6
one_shot = true
explosiveness = 0.8
fixed_fps = 60
process_material = SubResource("ParticleProcessMaterial_6ym0g")
draw_pass_1 = SubResource("SphereMesh_4y8np")

[node name="ParticleFX" type="GPUParticles3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0, 0.5)
material_override = ExtResource("2_l2v4y")
amount = 10
lifetime = 0.6
one_shot = true
explosiveness = 0.8
fixed_fps = 60
process_material = SubResource("ParticleProcessMaterial_gp5gk")
draw_pass_1 = SubResource("SphereMesh_s37iy")

[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
stream = SubResource("AudioStreamRandomizer_urvwl")
autoplay = true

[node name="Timer" type="Timer" parent="."]
wait_time = 3.0
one_shot = true
autostart = true

[node name="StreakFX" type="GPUParticles3D" parent="."]
material_override = SubResource("ShaderMaterial_8g7xx")
emitting = false
lifetime = 0.4
one_shot = true
explosiveness = 0.9
randomness = 1.0
fixed_fps = 60
process_material = SubResource("ParticleProcessMaterial_p88g7")
draw_pass_1 = SubResource("QuadMesh_bu3n0")

[node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
light_color = Color(1, 0.5917481, 0, 1)
light_energy = 20.0
omni_range = 10.0

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_p88g7")
}

[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
