3d_in_2d.tscn 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. [gd_scene load_steps=11 format=3 uid="uid://xwkspajfdmd7"]
  2. [ext_resource type="Script" path="res://3d_in_2d.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://q5bonn8iowbc" path="res://robot_demo.png" id="2"]
  4. [ext_resource type="PackedScene" uid="uid://8nlipuu0ceal" path="res://robot_3d.tscn" id="3"]
  5. [sub_resource type="ViewportTexture" id="ViewportTexture_2squv"]
  6. viewport_path = NodePath("SubViewport")
  7. [sub_resource type="AtlasTexture" id="2"]
  8. atlas = ExtResource("2")
  9. region = Rect2(0, 0, 64, 64)
  10. [sub_resource type="AtlasTexture" id="3"]
  11. atlas = ExtResource("2")
  12. region = Rect2(64, 0, 64, 64)
  13. [sub_resource type="AtlasTexture" id="4"]
  14. atlas = ExtResource("2")
  15. region = Rect2(128, 0, 64, 64)
  16. [sub_resource type="AtlasTexture" id="5"]
  17. atlas = ExtResource("2")
  18. region = Rect2(192, 0, 64, 64)
  19. [sub_resource type="AtlasTexture" id="6"]
  20. atlas = ExtResource("2")
  21. region = Rect2(256, 0, 64, 64)
  22. [sub_resource type="SpriteFrames" id="7"]
  23. animations = [{
  24. "frames": [{
  25. "duration": 1.0,
  26. "texture": SubResource("2")
  27. }, {
  28. "duration": 1.0,
  29. "texture": SubResource("3")
  30. }, {
  31. "duration": 1.0,
  32. "texture": SubResource("4")
  33. }, {
  34. "duration": 1.0,
  35. "texture": SubResource("5")
  36. }, {
  37. "duration": 1.0,
  38. "texture": SubResource("6")
  39. }],
  40. "loop": true,
  41. "name": &"default",
  42. "speed": 5.0
  43. }]
  44. [node name="3Din2D" type="Node2D"]
  45. script = ExtResource("1")
  46. [node name="SubViewport" type="SubViewport" parent="."]
  47. transparent_bg = true
  48. msaa_3d = 2
  49. size = Vector2i(300, 300)
  50. render_target_update_mode = 4
  51. [node name="Robot3D" parent="SubViewport" instance=ExtResource("3")]
  52. [node name="ViewportSprite" type="Sprite2D" parent="."]
  53. position = Vector2(650, 300)
  54. texture = SubResource("ViewportTexture_2squv")
  55. [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
  56. texture_filter = 1
  57. position = Vector2(350, 300)
  58. scale = Vector2(3, 3)
  59. sprite_frames = SubResource("7")
  60. [node name="Camera2D" type="Camera2D" parent="."]
  61. offset = Vector2(512, 300)