[gd_scene load_steps=19 format=3 uid="uid://d3ag4d4r8qcw7"]

[ext_resource type="Script" uid="uid://bj2bhtdul8xct" path="res://components/collision/areas/dynamic_area_loader.gd" id="1_q4yy4"]
[ext_resource type="PackedScene" uid="uid://clhy3kiceqf2o" path="res://components/characters/player/player_character.tscn" id="2_g60qb"]
[ext_resource type="Script" uid="uid://3hlvt5k34xva" path="res://components/general/player_spawn_point.gd" id="3_yaqeo"]
[ext_resource type="PackedScene" uid="uid://c0jearfhlqcvr" path="res://components/hazards/saw/saw.tscn" id="4_4rgsp"]

[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_g60qb"]
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)

[sub_resource type="Sky" id="Sky_yaqeo"]
sky_material = SubResource("ProceduralSkyMaterial_g60qb")

[sub_resource type="Environment" id="Environment_4rgsp"]
background_mode = 2
sky = SubResource("Sky_yaqeo")
tonemap_mode = 2
glow_enabled = true

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_g60qb"]
albedo_color = Color(1, 0.426083, 0.0827108, 1)

[sub_resource type="BoxShape3D" id="BoxShape3D_g60qb"]
size = Vector3(9, 4, 9)

[sub_resource type="BoxShape3D" id="BoxShape3D_yaqeo"]
size = Vector3(9, 4, 9)

[sub_resource type="BoxShape3D" id="BoxShape3D_4rgsp"]
size = Vector3(12, 4, 7)

[sub_resource type="BoxShape3D" id="BoxShape3D_m4fap"]
size = Vector3(4, 4, 11)

[sub_resource type="BoxShape3D" id="BoxShape3D_k1ge7"]
size = Vector3(25, 4, 21.3)

[sub_resource type="BoxShape3D" id="BoxShape3D_ka7nb"]
size = Vector3(25, 4, 6)

[sub_resource type="BoxShape3D" id="BoxShape3D_kaxur"]
size = Vector3(22, 4, 7)

[sub_resource type="BoxShape3D" id="BoxShape3D_0qpgw"]
size = Vector3(9, 4, 25)

[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_g60qb"]

[sub_resource type="CylinderMesh" id="CylinderMesh_g60qb"]

[node name="DynamicLoadTestMap" type="Node"]

[node name="PlayerCharacter" parent="." instance=ExtResource("2_g60qb")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10)

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
shadow_enabled = true

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_4rgsp")

[node name="Areas" type="Node" parent="."]

[node name="AlwaysLoaded" type="CSGCombiner3D" parent="Areas"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 9)
use_collision = true

[node name="CSGBox3D" type="CSGBox3D" parent="Areas/AlwaysLoaded"]
size = Vector3(8, 1, 7)
material = SubResource("StandardMaterial3D_g60qb")

[node name="PerformanceTestPlatform1" type="Area3D" parent="Areas" node_paths=PackedStringArray("placeholder_node")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, 0)
script = ExtResource("1_q4yy4")
placeholder_node = NodePath("Area1")
loaded_if_spawnpoint = Array[int]([0])
metadata/_custom_type_script = "uid://bj2bhtdul8xct"

[node name="Area1" parent="Areas/PerformanceTestPlatform1" instance_placeholder="res://maps/_dynamic_load_test/area_1.tscn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, -2, 2)

[node name="CollisionShape3D" type="CollisionShape3D" parent="Areas/PerformanceTestPlatform1"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0.5, 2)
shape = SubResource("BoxShape3D_g60qb")
debug_color = Color(0.678973, 0.504376, 0, 0.42)

[node name="PerformanceTestPlatform2" type="Area3D" parent="Areas" node_paths=PackedStringArray("placeholder_node")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, -7)
script = ExtResource("1_q4yy4")
placeholder_node = NodePath("Area2")
loaded_if_spawnpoint = Array[int]([1])
metadata/_custom_type_script = "uid://bj2bhtdul8xct"

[node name="Area2" parent="Areas/PerformanceTestPlatform2" instance_placeholder="res://maps/_dynamic_load_test/area_2.tscn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, -2, 2)

[node name="CollisionShape3D" type="CollisionShape3D" parent="Areas/PerformanceTestPlatform2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0.5, 2)
shape = SubResource("BoxShape3D_yaqeo")
debug_color = Color(0.678973, 0.504376, 0, 0.42)

[node name="CollisionShape3D2" type="CollisionShape3D" parent="Areas/PerformanceTestPlatform2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.5, 0.5, 3.67773)
shape = SubResource("BoxShape3D_4rgsp")
debug_color = Color(0.678973, 0.504376, 0, 0.42)

[node name="CollisionShape3D3" type="CollisionShape3D" parent="Areas/PerformanceTestPlatform2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -16.5, 0.5, 5.67773)
shape = SubResource("BoxShape3D_m4fap")
debug_color = Color(0.678973, 0.504376, 0, 0.42)

[node name="Hallway1Loader" type="Area3D" parent="Areas" node_paths=PackedStringArray("placeholder_node")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, -7)
script = ExtResource("1_q4yy4")
placeholder_node = NodePath("Hallway1")
metadata/_custom_type_script = "uid://bj2bhtdul8xct"

[node name="Hallway1" parent="Areas/Hallway1Loader" instance_placeholder="res://maps/_dynamic_load_test/hallway_1.tscn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, -2, 16)

[node name="CollisionShape3D" type="CollisionShape3D" parent="Areas/Hallway1Loader"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0.5, 17.85)
shape = SubResource("BoxShape3D_k1ge7")
debug_color = Color(0.678973, 0.504376, 0, 0.42)

[node name="Hallway2Loader" type="Area3D" parent="Areas" node_paths=PackedStringArray("placeholder_node")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 2, -7)
script = ExtResource("1_q4yy4")
placeholder_node = NodePath("Hallway2")
metadata/_custom_type_script = "uid://bj2bhtdul8xct"

[node name="Hallway2" parent="Areas/Hallway2Loader" instance_placeholder="res://maps/_dynamic_load_test/hallway_2.tscn"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, -2, 16)

[node name="CollisionShape3D" type="CollisionShape3D" parent="Areas/Hallway2Loader"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0.5, 25.5)
shape = SubResource("BoxShape3D_ka7nb")
debug_color = Color(0.678973, 0.504376, 0, 0.42)

[node name="CollisionShape3D2" type="CollisionShape3D" parent="Areas/Hallway2Loader"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.5, 0.5, 3.67773)
shape = SubResource("BoxShape3D_kaxur")
debug_color = Color(0.678973, 0.504376, 0, 0.42)

[node name="CollisionShape3D3" type="CollisionShape3D" parent="Areas/Hallway2Loader"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14, 0.5, 12.6777)
shape = SubResource("BoxShape3D_0qpgw")
debug_color = Color(0.678973, 0.504376, 0, 0.42)

[node name="WorldFloor" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
metadata/_edit_lock_ = true
metadata/_edit_group_ = true

[node name="CollisionShape3D" type="CollisionShape3D" parent="WorldFloor"]
shape = SubResource("WorldBoundaryShape3D_g60qb")

[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(5.58473, 6.33307, 0, -6.33307, 5.58473, 0, 0, 0, 8.44375, -13.6652, 0, -15.4998)
mesh = SubResource("CylinderMesh_g60qb")

[node name="PlayerSpawnPoint" type="Marker3D" parent="."]
transform = Transform3D(0.330597, 0, 0.943772, 0, 1, 0, -0.943772, 0, 0.330597, 2.60837, 0.5, 3.3168)
script = ExtResource("3_yaqeo")
metadata/_custom_type_script = "uid://3hlvt5k34xva"

[node name="PlayerSpawnPoint2" type="Marker3D" parent="."]
transform = Transform3D(0.330597, 0, 0.943772, 0, 1, 0, -0.943772, 0, 0.330597, 2.60837, 0.5, -2.6832)
script = ExtResource("3_yaqeo")
spawn_index = 1
metadata/_custom_type_script = "uid://3hlvt5k34xva"

[node name="PlayerSpawnPoint3" type="Marker3D" parent="."]
transform = Transform3D(0.43358, 0, -0.901115, 0, 1, 0, 0.901115, 0, 0.43358, -14.3916, 0.5, -2.6832)
script = ExtResource("3_yaqeo")
spawn_index = 2
metadata/_custom_type_script = "uid://3hlvt5k34xva"

[node name="Saw" parent="." instance=ExtResource("4_4rgsp")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.31477, 1.59362, 6.44809)
