[gd_scene load_steps=10 format=3 uid="uid://bnj8nokkrrd7d"]

[ext_resource type="Script" path="res://src/effects/rifle_beam/rifle_beam.gd" id="1_gqjmp"]
[ext_resource type="Shader" path="res://src/shaders/plasma_morph.gdshader" id="2_01uhq"]

[sub_resource type="FastNoiseLite" id="FastNoiseLite_6o211"]
frequency = 0.0867
fractal_type = 3

[sub_resource type="NoiseTexture3D" id="NoiseTexture3D_bk82q"]
height = 256
seamless = true
noise = SubResource("FastNoiseLite_6o211")

[sub_resource type="ShaderMaterial" id="ShaderMaterial_igb6u"]
resource_local_to_scene = true
render_priority = 0
shader = ExtResource("2_01uhq")
shader_parameter/color_low = Color(0, 0, 0, 0)
shader_parameter/color_hi = Color(1, 1, 1, 1)
shader_parameter/threshold = 0.0
shader_parameter/speed = 0.05
shader_parameter/y_scale = 1.0
shader_parameter/noise = SubResource("NoiseTexture3D_bk82q")

[sub_resource type="CylinderMesh" id="CylinderMesh_ioxey"]
resource_local_to_scene = true
material = SubResource("ShaderMaterial_igb6u")
top_radius = 0.1
bottom_radius = 0.1
height = 1.0
cap_top = false
cap_bottom = false

[sub_resource type="Animation" id="Animation_lurf0"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Mesh:mesh:material:shader_parameter/threshold")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}

[sub_resource type="Animation" id="Animation_yucts"]
resource_name = "fade_out"
length = 3.0
tracks/0/type = "method"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(3),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Mesh:mesh:material:shader_parameter/threshold")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 1.0]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_xct5s"]
_data = {
"RESET": SubResource("Animation_lurf0"),
"fade_out": SubResource("Animation_yucts")
}

[node name="RifleBeam" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.5)
script = ExtResource("1_gqjmp")

[node name="Mesh" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
mesh = SubResource("CylinderMesh_ioxey")

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_xct5s")
}
autoplay = "fade_out"
