[gd_scene load_steps=20 format=3 uid="uid://mcuhy71v6ggu"]

[ext_resource type="PackedScene" uid="uid://comd88yp45mnb" path="res://src/items/item/item.tscn" id="1_f11yp"]
[ext_resource type="Script" path="res://src/items/extra_ball/extra_ball.gd" id="2_tixea"]
[ext_resource type="Shader" path="res://src/shaders/frosted_glass.gdshader" id="3_ljwjj"]
[ext_resource type="Texture2D" uid="uid://c2p2in2p7mjyo" path="res://assets/materials/crystal_noise_normal_map.tres" id="4_da2m2"]
[ext_resource type="Texture2D" uid="uid://cx33n4h5mfcdb" path="res://assets/materials/crystal_noise_map.tres" id="5_mfadb"]
[ext_resource type="Material" uid="uid://f3qufrkoiv66" path="res://assets/materials/plasma_ball.tres" id="6_o5jva"]
[ext_resource type="Texture2D" uid="uid://c47bkx508biqr" path="res://assets/sprites/particles/plasma.png" id="8_tjeqq"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_4un1r"]
render_priority = 0
shader = ExtResource("3_ljwjj")
shader_parameter/albedo = Color(0.5146, 0.62, 0.62, 0.0392157)
shader_parameter/roughness = 0.3
shader_parameter/roughness_texture = ExtResource("5_mfadb")
shader_parameter/refraction = 0.0100008
shader_parameter/refraction_texture_channel = Vector4(1, 0, 0, 0)
shader_parameter/texture_refraction = ExtResource("5_mfadb")
shader_parameter/normal_strength = 0.400001
shader_parameter/normal_map = ExtResource("4_da2m2")
shader_parameter/subsurface_scattering_strength = 1.0
shader_parameter/texture_subsurface_scattering = ExtResource("5_mfadb")
shader_parameter/edge_color = Color(0, 1, 1.2, 1)
shader_parameter/surface_contribution = 0.2
shader_parameter/specular_contribution = 0.5
shader_parameter/refraction_contribution = 10.0
shader_parameter/alpha = 0.9
shader_parameter/uv1_scale = Vector3(1, 1, 1)
shader_parameter/uv1_offset = Vector3(0, 0, 0)

[sub_resource type="SphereMesh" id="SphereMesh_2r4nb"]
material = ExtResource("6_o5jva")
radius = 0.05
height = 0.1
radial_segments = 6
rings = 6

[sub_resource type="Curve" id="Curve_jkdik"]
max_value = 2.0
_data = [Vector2(0, 2), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2

[sub_resource type="CurveTexture" id="CurveTexture_oxhrr"]
curve = SubResource("Curve_jkdik")

[sub_resource type="Curve" id="Curve_wa74n"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.249135, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.598878), -0.922125, -0.922125, 0, 0]
point_count = 3

[sub_resource type="CurveTexture" id="CurveTexture_vfusk"]
curve = SubResource("Curve_wa74n")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_wmn3a"]
angle_min = -720.0
angle_max = 720.0
direction = Vector3(0, 1, 0)
spread = 10.0
initial_velocity_max = 0.1
gravity = Vector3(0, 1.2, 0)
scale_curve = SubResource("CurveTexture_vfusk")
emission_curve = SubResource("CurveTexture_oxhrr")

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7ptri"]
transparency = 1
cull_mode = 2
vertex_color_use_as_albedo = true
albedo_color = Color(0.48, 1, 1, 0.384314)
albedo_texture = ExtResource("8_tjeqq")
emission_enabled = true
emission = Color(0.42, 1, 1, 1)
billboard_mode = 3
billboard_keep_scale = true
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false
grow_amount = -0.6

[sub_resource type="QuadMesh" id="QuadMesh_lsswf"]
material = SubResource("StandardMaterial3D_7ptri")
size = Vector2(0.8, 0.8)

[sub_resource type="Animation" id="Animation_jhb3c"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ItemMeshContainer:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, -0.2, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Octahedron:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("ItemMeshContainer:rotation")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}

[sub_resource type="Animation" id="Animation_283tf"]
resource_name = "hover"
length = 24.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ItemMeshContainer:position")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 6, 12, 18),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Vector3(0, -0.05, 0), Vector3(0, 0.05, 0), Vector3(0, -0.05, 0), Vector3(0, 0.05, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Octahedron:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = false
tracks/1/keys = {
"times": PackedFloat32Array(0, 24),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 6.28319, -6.28319)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("ItemMeshContainer:rotation")
tracks/2/interp = 1
tracks/2/loop_wrap = false
tracks/2/keys = {
"times": PackedFloat32Array(0, 24),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, -6.28319, 0)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_jwejx"]
_data = {
"RESET": SubResource("Animation_jhb3c"),
"idle": SubResource("Animation_283tf")
}

[node name="PlasmaBallItem" instance=ExtResource("1_f11yp")]
script = ExtResource("2_tixea")
ball_type = 2
amount = 3

[node name="Octahedron" parent="Pivot/Octahedron" index="0"]
surface_material_override/0 = SubResource("ShaderMaterial_4un1r")

[node name="Pivot" parent="Pivot/Octahedron/ItemMeshContainer" index="0"]
transform = Transform3D(0.99863, 0.052336, 0, -0.052336, 0.99863, 0, 0, 0, 1, 0, 0, 0)

[node name="BallMesh" type="MeshInstance3D" parent="Pivot/Octahedron/ItemMeshContainer/Pivot" index="1"]
transform = Transform3D(4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0)
mesh = SubResource("SphereMesh_2r4nb")

[node name="PlasmaFireEffect" type="GPUParticles3D" parent="Pivot/Octahedron/ItemMeshContainer/Pivot/BallMesh" index="0"]
sorting_offset = -1.0
amount = 20
lifetime = 0.6
speed_scale = 0.2
process_material = SubResource("ParticleProcessMaterial_wmn3a")
draw_pass_1 = SubResource("QuadMesh_lsswf")

[node name="@AnimationPlayer@183828" type="AnimationPlayer" parent="Pivot/Octahedron" index="2"]
libraries = {
"": SubResource("AnimationLibrary_jwejx")
}
autoplay = "idle"

[editable path="Pivot/Octahedron"]
