main.tscn 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. [gd_scene load_steps=11 format=2]
  2. [ext_resource path="res://assets/space_env.tres" type="Environment" id=1]
  3. [ext_resource path="res://camera.gd" type="Script" id=2]
  4. [ext_resource path="res://planet.gd" type="Script" id=3]
  5. [ext_resource path="res://resources/planets/planet/planet.tres" type="Material" id=4]
  6. [ext_resource path="res://assets/sun.png" type="Texture" id=5]
  7. [ext_resource path="res://resources/planets/planet/newplanet.obj" type="ArrayMesh" id=6]
  8. [ext_resource path="res://resources/planets/planet_2/planet.tres" type="Material" id=7]
  9. [ext_resource path="res://planet_switcher.gd" type="Script" id=8]
  10. [sub_resource type="SpatialMaterial" id=2]
  11. flags_unshaded = true
  12. flags_use_point_size = true
  13. distance_fade_mode = 1
  14. distance_fade_min_distance = 0.0
  15. distance_fade_max_distance = 4096.0
  16. [sub_resource type="SpatialMaterial" id=1]
  17. flags_unshaded = true
  18. flags_use_point_size = true
  19. distance_fade_mode = 1
  20. distance_fade_min_distance = 0.0
  21. distance_fade_max_distance = 4096.0
  22. [node name="Spatial" type="Spatial"]
  23. script = ExtResource( 8 )
  24. [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
  25. environment = ExtResource( 1 )
  26. [node name="Sun" type="Sprite3D" parent="."]
  27. transform = Transform( 1400, 0, 0, 0, 1400, 0, 0, 0, 1400, 0, 0, 0 )
  28. billboard = 1
  29. texture = ExtResource( 5 )
  30. region_rect = Rect2( 64, 64, 128, 128 )
  31. [node name="OmniLight" type="OmniLight" parent="Sun"]
  32. light_energy = 3.0
  33. omni_range = 500000.0
  34. omni_attenuation = 4.28709
  35. [node name="ItemList" type="ItemList" parent="."]
  36. margin_right = 70.0
  37. margin_bottom = 95.0
  38. items = [ "Sun", null, false, "Planet", null, false, "Planet 2", null, false ]
  39. __meta__ = {
  40. "_edit_use_anchors_": false
  41. }
  42. [node name="planet1" type="Spatial" parent="."]
  43. script = ExtResource( 3 )
  44. semimajor_axis = 50000
  45. semiminor_axis = 20000
  46. angle_of_apoapsis = 78
  47. xtilt = 15
  48. ytilt = 5
  49. color = Color( 1, 0, 1, 1 )
  50. [node name="planet" type="MeshInstance" parent="planet1"]
  51. mesh = ExtResource( 6 )
  52. material/0 = ExtResource( 7 )
  53. [node name="ImmediateGeometry" type="ImmediateGeometry" parent="planet1"]
  54. material_override = SubResource( 2 )
  55. [node name="planet2" type="Spatial" parent="."]
  56. script = ExtResource( 3 )
  57. semiminor_axis = 80000
  58. color = Color( 0, 1, 1, 1 )
  59. [node name="planet" type="MeshInstance" parent="planet2"]
  60. mesh = ExtResource( 6 )
  61. material/0 = ExtResource( 4 )
  62. [node name="ImmediateGeometry" type="ImmediateGeometry" parent="planet2"]
  63. material_override = SubResource( 1 )
  64. [node name="camera" type="Spatial" parent="."]
  65. script = ExtResource( 2 )
  66. [node name="helper" type="Spatial" parent="camera"]
  67. [node name="InterpolatedCamera" type="InterpolatedCamera" parent="camera/helper"]
  68. far = 500000.0
  69. target = NodePath("../target")
  70. speed = 3.0
  71. enabled = true
  72. [node name="target" type="Spatial" parent="camera/helper"]
  73. [connection signal="item_selected" from="ItemList" to="." method="_on_ItemList_item_selected"]