[gd_scene load_steps=30 format=3 uid="uid://comd88yp45mnb"]

[ext_resource type="PackedScene" uid="uid://djfbit4v0qncc" path="res://assets/models/items/octahedron.gltf" id="1_a0q17"]
[ext_resource type="Script" path="res://src/items/item/item.gd" id="1_kesm6"]
[ext_resource type="Material" uid="uid://c5hidbq5gbmr" path="res://assets/materials/crystal.tres" id="2_dtimm"]
[ext_resource type="Shader" path="res://src/shaders/spatial_shine.gdshader" id="5_hvjqo"]
[ext_resource type="Texture2D" uid="uid://du3vk5nnksohs" path="res://assets/sprites/particles/sparkle.png" id="5_k1sdu"]
[ext_resource type="AudioStream" uid="uid://8uynlpios7u1" path="res://assets/sound/sfx/ui/ecofuture2.wav" id="6_f5kbg"]

[sub_resource type="Animation" id="Animation_7sxyq"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:position:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/2/type = "bezier"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:position:z")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".:rotation")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, -0.0523599)]
}

[sub_resource type="Animation" id="Animation_j8bih"]
resource_name = "pivot"
length = 1.6
loop_mode = 1
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 0, 0),
"points": PackedFloat32Array(0, -0.25, 0, 0.4, 0.1, 0, -0.4, -0.1, 0.4, 0.1, 0, -0.4, -0.1, 0.25, 0),
"times": PackedFloat32Array(0, 0.8, 1.6)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:position:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0, 0, 0),
"points": PackedFloat32Array(0.05, -0.25, 0, 0.4, 0, -0.05, -0.25, 0, 0.25, 0, 0.05, -0.4, 0, 0.25, 0),
"times": PackedFloat32Array(0, 0.8, 1.6)
}
tracks/2/type = "bezier"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:position:z")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.4, 0.1),
"times": PackedFloat32Array(0)
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".:rotation")
tracks/3/interp = 2
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.4, 0.8, 1.2, 1.6),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0.0523599), Vector3(0, 0, -0.0523599), Vector3(0, 0, 0.0523599), Vector3(0, 0, -0.0523599), Vector3(0, 0, 0.0523599)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_3k4mu"]
_data = {
"RESET": SubResource("Animation_7sxyq"),
"pivot": SubResource("Animation_j8bih")
}

[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")
}

[sub_resource type="Curve" id="Curve_1syyy"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.751579, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 3

[sub_resource type="CurveTexture" id="CurveTexture_3g61g"]
curve = SubResource("Curve_1syyy")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_jocqm"]
lifetime_randomness = 0.63
particle_flag_align_y = true
emission_shape = 2
emission_sphere_radius = 0.5
direction = Vector3(0, 0, 0)
radial_velocity_min = 4.99998
radial_velocity_max = 4.99998
gravity = Vector3(0, -4, 0)
scale_curve = SubResource("CurveTexture_3g61g")

[sub_resource type="PrismMesh" id="PrismMesh_32wcu"]
material = ExtResource("2_dtimm")
size = Vector3(0.3, -0.2, 0.3)

[sub_resource type="Gradient" id="Gradient_f63as"]
offsets = PackedFloat32Array(0.211663, 1)
colors = PackedColorArray(1, 1, 0.51, 1, 1, 1, 1, 1)

[sub_resource type="GradientTexture1D" id="GradientTexture1D_r7x43"]
gradient = SubResource("Gradient_f63as")

[sub_resource type="ShaderMaterial" id="ShaderMaterial_wolv7"]
render_priority = 0
shader = ExtResource("5_hvjqo")
shader_parameter/spread = 0.5
shader_parameter/cutoff = 0.5
shader_parameter/size = 1.0
shader_parameter/speed = 1.0
shader_parameter/ray1_density = 8.0
shader_parameter/ray2_density = 30.0
shader_parameter/ray2_intensity = 0.3
shader_parameter/core_intensity = 0.5
shader_parameter/hdr = true
shader_parameter/seed = 5.0
shader_parameter/grow = -0.0999992
shader_parameter/uv1_scale = Vector3(1, 1, 1)
shader_parameter/uv1_offset = Vector3(0, 0, 0)
shader_parameter/uv2_scale = Vector3(1, 1, 1)
shader_parameter/uv2_offset = Vector3(0, 0, 0)
shader_parameter/gradient = SubResource("GradientTexture1D_r7x43")

[sub_resource type="QuadMesh" id="QuadMesh_iuh4w"]
material = SubResource("ShaderMaterial_wolv7")
size = Vector2(3, 3)

[sub_resource type="SphereShape3D" id="SphereShape3D_munrb"]
radius = 2.0

[sub_resource type="Curve" id="Curve_4pwcs"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.248421, 1), 0.0, 0.0, 0, 0, Vector2(0.549474, 0.555075), 5.83005, 5.83005, 0, 0, Vector2(0.80421, 0.232888), 7.10071, 7.10071, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 5

[sub_resource type="CurveTexture" id="CurveTexture_xmh5j"]
curve = SubResource("Curve_4pwcs")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_xdagn"]
direction = Vector3(0, 0, 0)
spread = 180.0
initial_velocity_min = 0.5
initial_velocity_max = 0.5
gravity = Vector3(0, 0, 0)
damping_min = 0.1
damping_max = 0.1
scale_curve = SubResource("CurveTexture_xmh5j")

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ttptx"]
transparency = 1
shading_mode = 0
vertex_color_use_as_albedo = true
albedo_texture = ExtResource("5_k1sdu")
texture_filter = 4
billboard_mode = 3
billboard_keep_scale = true
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false

[sub_resource type="QuadMesh" id="QuadMesh_es7cm"]
material = SubResource("StandardMaterial3D_ttptx")
size = Vector2(0.05, 0.05)

[sub_resource type="Animation" id="Animation_50jqd"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Pivot/Octahedron/ExplosionParticles:emitting")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Pivot/Octahedron/Octahedron:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Pivot/SparkleParticles:emitting")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/3/type = "bezier"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Pivot/Octahedron/ItemMeshContainer:scale:x")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/4/type = "bezier"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Pivot/Octahedron/ItemMeshContainer:scale:y")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/5/type = "bezier"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Pivot/Octahedron/ItemMeshContainer:scale:z")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("CollectionChime:playing")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}

[sub_resource type="Animation" id="Animation_niure"]
resource_name = "explode"
length = 5.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Pivot/Octahedron/ExplosionParticles: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("Pivot/Octahedron/Octahedron:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Pivot/SparkleParticles:emitting")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
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(5),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
tracks/4/type = "bezier"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Pivot/Octahedron/ItemMeshContainer:scale:x")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(1, -0.25, 0, 0.2, 0.8, 0.001, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0.0333333, 0.333333)
}
tracks/5/type = "bezier"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Pivot/Octahedron/ItemMeshContainer:scale:y")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(1, -0.25, 0, 0.2, 0.8, 0.001, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0, 0.3)
}
tracks/6/type = "bezier"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Pivot/Octahedron/ItemMeshContainer:scale:z")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(1, -0.25, 0, 0.2, 0.8, 0.001, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0.0666667, 0.366667)
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("CollectionChime:playing")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_lqra6"]
_data = {
"RESET": SubResource("Animation_50jqd"),
"explode": SubResource("Animation_niure")
}

[node name="Item" type="Node3D"]
script = ExtResource("1_kesm6")

[node name="Pivot" type="Node3D" parent="."]

[node name="Octahedron" parent="Pivot" instance=ExtResource("1_a0q17")]

[node name="Octahedron" parent="Pivot/Octahedron" index="0"]
surface_material_override/0 = ExtResource("2_dtimm")

[node name="ItemMeshContainer" type="Node3D" parent="Pivot/Octahedron"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.2, 0)

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

[node name="PivotAnimation" type="AnimationPlayer" parent="Pivot/Octahedron/ItemMeshContainer/Pivot"]
libraries = {
"": SubResource("AnimationLibrary_3k4mu")
}
autoplay = "pivot"
speed_scale = 0.5

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

[node name="ExplosionParticles" type="GPUParticles3D" parent="Pivot/Octahedron"]
emitting = false
amount = 64
one_shot = true
explosiveness = 1.0
fixed_fps = 60
interpolate = false
process_material = SubResource("ParticleProcessMaterial_jocqm")
draw_pass_1 = SubResource("PrismMesh_32wcu")

[node name="Shine" type="MeshInstance3D" parent="Pivot"]
visible = false
mesh = SubResource("QuadMesh_iuh4w")

[node name="CollectionArea" type="Area3D" parent="Pivot"]

[node name="CollisionShape3D" type="CollisionShape3D" parent="Pivot/CollectionArea"]
shape = SubResource("SphereShape3D_munrb")

[node name="SparkleParticles" type="GPUParticles3D" parent="Pivot"]
amount = 64
lifetime = 5.0
preprocess = 5.0
process_material = SubResource("ParticleProcessMaterial_xdagn")
draw_pass_1 = SubResource("QuadMesh_es7cm")

[node name="ExplosionPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
"": SubResource("AnimationLibrary_lqra6")
}

[node name="CollectionChime" type="AudioStreamPlayer" parent="."]
stream = ExtResource("6_f5kbg")
bus = &"SFX"

[connection signal="body_entered" from="Pivot/CollectionArea" to="." method="_on_collection_area_body_entered"]

[editable path="Pivot/Octahedron"]
