2d_in_3d.tscn 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. [gd_scene load_steps=22 format=3 uid="uid://c587vtbfwth3k"]
  2. [ext_resource type="Script" path="res://2d_in_3d.gd" id="1_b8rgl"]
  3. [ext_resource type="Script" path="res://pong.gd" id="2"]
  4. [ext_resource type="Texture2D" uid="uid://dbuw5tlmsx6ss" path="res://ball.png" id="3"]
  5. [ext_resource type="Texture2D" uid="uid://gtbg1ogxcsl7" path="res://left_pallete.png" id="4"]
  6. [ext_resource type="Texture2D" uid="uid://bc2vi0nh1j1hs" path="res://right_pallete.png" id="5"]
  7. [ext_resource type="Texture2D" uid="uid://wiyhsl0rfkrs" path="res://separator.png" id="6"]
  8. [sub_resource type="StandardMaterial3D" id="6"]
  9. metallic_specular = 0.0
  10. [sub_resource type="PlaneMesh" id="1"]
  11. [sub_resource type="StandardMaterial3D" id="2"]
  12. roughness = 0.7
  13. [sub_resource type="BoxMesh" id="3"]
  14. size = Vector3(2, 2, 2)
  15. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_trcb6"]
  16. albedo_color = Color(0.501961, 0.752941, 0.752941, 1)
  17. roughness = 0.0
  18. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_bqwig"]
  19. albedo_color = Color(0.501961, 0.752941, 0.752941, 1)
  20. roughness = 0.0
  21. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_elot5"]
  22. albedo_color = Color(0.501961, 0.752941, 0.752941, 1)
  23. roughness = 0.0
  24. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_phrtn"]
  25. albedo_color = Color(0.752941, 0.501961, 0.752941, 1)
  26. roughness = 0.0
  27. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_omrd7"]
  28. albedo_color = Color(0.752941, 0.501961, 0.752941, 1)
  29. roughness = 0.0
  30. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_dvcyb"]
  31. albedo_color = Color(0.752941, 0.501961, 0.752941, 1)
  32. roughness = 0.0
  33. [sub_resource type="BoxMesh" id="5"]
  34. size = Vector3(1.1, 0.8, 0.1)
  35. [sub_resource type="StandardMaterial3D" id="4"]
  36. albedo_color = Color(0.4, 0.4, 0.4, 1)
  37. roughness = 0.0
  38. [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_cvh5i"]
  39. sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
  40. ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
  41. [sub_resource type="Sky" id="Sky_7gemw"]
  42. sky_material = SubResource("ProceduralSkyMaterial_cvh5i")
  43. [sub_resource type="Environment" id="Environment_fvsgw"]
  44. background_mode = 2
  45. sky = SubResource("Sky_7gemw")
  46. tonemap_mode = 2
  47. glow_enabled = true
  48. [node name="2Din3D" type="Node3D"]
  49. script = ExtResource("1_b8rgl")
  50. [node name="Camera3D" type="Camera3D" parent="."]
  51. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.35, 0.6)
  52. fov = 62.0
  53. near = 0.1
  54. [node name="ViewportQuad" type="MeshInstance3D" parent="."]
  55. transform = Transform3D(2, 0, 0, 0, 0, -1.333, 0, 1, 0, 0, 1.2, -4.25)
  56. material_override = SubResource("6")
  57. mesh = SubResource("1")
  58. [node name="SubViewport" type="SubViewport" parent="."]
  59. size = Vector2i(600, 400)
  60. render_target_update_mode = 4
  61. [node name="Pong" type="Node2D" parent="SubViewport"]
  62. script = ExtResource("2")
  63. [node name="Background" type="Panel" parent="SubViewport/Pong"]
  64. offset_right = 600.0
  65. offset_bottom = 400.0
  66. [node name="Ball" type="Sprite2D" parent="SubViewport/Pong"]
  67. position = Vector2(300, 200)
  68. texture = ExtResource("3")
  69. [node name="LeftPaddle" type="Sprite2D" parent="SubViewport/Pong"]
  70. position = Vector2(20, 200)
  71. texture = ExtResource("4")
  72. [node name="RightPaddle" type="Sprite2D" parent="SubViewport/Pong"]
  73. position = Vector2(580, 200)
  74. texture = ExtResource("5")
  75. [node name="Separator" type="Sprite2D" parent="SubViewport/Pong"]
  76. position = Vector2(298, 200)
  77. texture = ExtResource("6")
  78. [node name="Environment" type="Node3D" parent="."]
  79. [node name="Floor" type="MeshInstance3D" parent="Environment"]
  80. transform = Transform3D(4, 0, 0, 0, 4, 0, 0, 0, 4, 0, -1, -2)
  81. mesh = SubResource("1")
  82. skeleton = NodePath("../..")
  83. surface_material_override/0 = SubResource("2")
  84. [node name="Pillar1" type="Node3D" parent="Environment"]
  85. transform = Transform3D(0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, -3, -0.2, -4)
  86. [node name="PillarBottom" type="MeshInstance3D" parent="Environment/Pillar1"]
  87. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)
  88. mesh = SubResource("3")
  89. surface_material_override/0 = SubResource("StandardMaterial3D_trcb6")
  90. [node name="PillarTop" type="MeshInstance3D" parent="Environment/Pillar1"]
  91. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.5, 0)
  92. mesh = SubResource("3")
  93. surface_material_override/0 = SubResource("StandardMaterial3D_bqwig")
  94. [node name="PillarMiddle" type="MeshInstance3D" parent="Environment/Pillar1"]
  95. transform = Transform3D(0.7, 0, 0, 0, 2, 0, 0, 0, 0.7, 0, 2.5, 0)
  96. mesh = SubResource("3")
  97. surface_material_override/0 = SubResource("StandardMaterial3D_elot5")
  98. [node name="Pillar2" type="Node3D" parent="Environment"]
  99. transform = Transform3D(0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, 3, -0.2, -4)
  100. [node name="PillarBottom" type="MeshInstance3D" parent="Environment/Pillar2"]
  101. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)
  102. mesh = SubResource("3")
  103. surface_material_override/0 = SubResource("StandardMaterial3D_phrtn")
  104. [node name="PillarTop" type="MeshInstance3D" parent="Environment/Pillar2"]
  105. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.5, 0)
  106. mesh = SubResource("3")
  107. surface_material_override/0 = SubResource("StandardMaterial3D_omrd7")
  108. [node name="PillarMiddle" type="MeshInstance3D" parent="Environment/Pillar2"]
  109. transform = Transform3D(0.7, 0, 0, 0, 2, 0, 0, 0, 0.7, 0, 2.5, 0)
  110. mesh = SubResource("3")
  111. surface_material_override/0 = SubResource("StandardMaterial3D_dvcyb")
  112. [node name="PillarBack" type="MeshInstance3D" parent="Environment"]
  113. transform = Transform3D(4, 0, 0, 0, 4, 0, 0, 0, 4, 0, 1.2, -4.5)
  114. mesh = SubResource("5")
  115. skeleton = NodePath("../..")
  116. surface_material_override/0 = SubResource("4")
  117. [node name="WorldEnvironment" type="WorldEnvironment" parent="Environment"]
  118. environment = SubResource("Environment_fvsgw")
  119. [node name="DirectionalLight3D" type="DirectionalLight3D" parent="Environment"]
  120. transform = Transform3D(0.623013, -0.733525, 0.271653, 0.321394, 0.55667, 0.766045, -0.713134, -0.389948, 0.582563, 0, 10, 0)
  121. shadow_enabled = true
  122. shadow_bias = 0.03
  123. shadow_blur = 1.5
  124. directional_shadow_mode = 0
  125. directional_shadow_blend_splits = true
  126. directional_shadow_fade_start = 1.0
  127. directional_shadow_max_distance = 10.0