[gd_scene load_steps=11 format=2]

[ext_resource path="res://assets/space_env.tres" type="Environment" id=1]
[ext_resource path="res://camera.gd" type="Script" id=2]
[ext_resource path="res://planet.gd" type="Script" id=3]
[ext_resource path="res://resources/planets/planet/planet.tres" type="Material" id=4]
[ext_resource path="res://assets/sun.png" type="Texture" id=5]
[ext_resource path="res://resources/planets/planet/newplanet.obj" type="ArrayMesh" id=6]
[ext_resource path="res://resources/planets/planet_2/planet.tres" type="Material" id=7]
[ext_resource path="res://planet_switcher.gd" type="Script" id=8]

[sub_resource type="SpatialMaterial" id=2]
flags_unshaded = true
flags_use_point_size = true
distance_fade_mode = 1
distance_fade_min_distance = 0.0
distance_fade_max_distance = 4096.0

[sub_resource type="SpatialMaterial" id=1]
flags_unshaded = true
flags_use_point_size = true
distance_fade_mode = 1
distance_fade_min_distance = 0.0
distance_fade_max_distance = 4096.0

[node name="Spatial" type="Spatial"]
script = ExtResource( 8 )

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = ExtResource( 1 )

[node name="Sun" type="Sprite3D" parent="."]
transform = Transform( 1400, 0, 0, 0, 1400, 0, 0, 0, 1400, 0, 0, 0 )
billboard = 1
texture = ExtResource( 5 )
region_rect = Rect2( 64, 64, 128, 128 )

[node name="OmniLight" type="OmniLight" parent="Sun"]
light_energy = 3.0
omni_range = 500000.0
omni_attenuation = 4.28709

[node name="ItemList" type="ItemList" parent="."]
margin_right = 70.0
margin_bottom = 95.0
items = [ "Sun", null, false, "Planet", null, false, "Planet 2", null, false ]
__meta__ = {
"_edit_use_anchors_": false
}

[node name="planet1" type="Spatial" parent="."]
script = ExtResource( 3 )
semimajor_axis = 50000
semiminor_axis = 20000
angle_of_apoapsis = 78
xtilt = 15
ytilt = 5
color = Color( 1, 0, 1, 1 )

[node name="planet" type="MeshInstance" parent="planet1"]
mesh = ExtResource( 6 )
material/0 = ExtResource( 7 )

[node name="ImmediateGeometry" type="ImmediateGeometry" parent="planet1"]
material_override = SubResource( 2 )

[node name="planet2" type="Spatial" parent="."]
script = ExtResource( 3 )
semiminor_axis = 80000
color = Color( 0, 1, 1, 1 )

[node name="planet" type="MeshInstance" parent="planet2"]
mesh = ExtResource( 6 )
material/0 = ExtResource( 4 )

[node name="ImmediateGeometry" type="ImmediateGeometry" parent="planet2"]
material_override = SubResource( 1 )

[node name="camera" type="Spatial" parent="."]
script = ExtResource( 2 )

[node name="helper" type="Spatial" parent="camera"]

[node name="InterpolatedCamera" type="InterpolatedCamera" parent="camera/helper"]
far = 500000.0
target = NodePath("../target")
speed = 3.0
enabled = true

[node name="target" type="Spatial" parent="camera/helper"]
[connection signal="item_selected" from="ItemList" to="." method="_on_ItemList_item_selected"]
