noise_viewer.tscn 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. [gd_scene load_steps=5 format=3 uid="uid://835hb2c3ckoi"]
  2. [ext_resource type="Script" path="res://noise_viewer.gd" id="1_a6h72"]
  3. [ext_resource type="Material" path="res://noise_viewer_material.tres" id="2_lywnk"]
  4. [sub_resource type="FastNoiseLite" id="1"]
  5. [sub_resource type="NoiseTexture2D" id="2"]
  6. noise = SubResource("1")
  7. [node name="NoiseViewer" type="Control"]
  8. layout_mode = 3
  9. anchors_preset = 15
  10. anchor_right = 1.0
  11. anchor_bottom = 1.0
  12. offset_left = 24.0
  13. offset_top = 24.0
  14. offset_right = -24.0
  15. offset_bottom = -24.0
  16. grow_horizontal = 2
  17. grow_vertical = 2
  18. script = ExtResource("1_a6h72")
  19. [node name="SeamlessNoiseTexture" type="TextureRect" parent="."]
  20. material = ExtResource("2_lywnk")
  21. layout_mode = 1
  22. anchors_preset = 8
  23. anchor_left = 0.5
  24. anchor_top = 0.5
  25. anchor_right = 0.5
  26. anchor_bottom = 0.5
  27. offset_left = -196.0
  28. offset_top = -256.0
  29. offset_right = 316.0
  30. offset_bottom = 256.0
  31. grow_horizontal = 2
  32. grow_vertical = 2
  33. texture = SubResource("2")
  34. [node name="ButtonsContainer" type="VBoxContainer" parent="."]
  35. layout_mode = 1
  36. anchors_preset = 1
  37. anchor_left = 1.0
  38. anchor_right = 1.0
  39. offset_left = -137.0
  40. offset_bottom = 44.0
  41. grow_horizontal = 0
  42. [node name="DocumentationButton" type="Button" parent="ButtonsContainer"]
  43. layout_mode = 2
  44. offset_right = 159.0
  45. offset_bottom = 31.0
  46. grow_horizontal = 0
  47. text = "API Documentation"
  48. [node name="RandomSeedButton" type="Button" parent="ButtonsContainer"]
  49. layout_mode = 2
  50. offset_top = 35.0
  51. offset_right = 159.0
  52. offset_bottom = 66.0
  53. grow_horizontal = 0
  54. text = "Random Seed"
  55. [node name="ParameterContainer" type="VBoxContainer" parent="."]
  56. layout_mode = 0
  57. offset_right = 280.0
  58. offset_bottom = 136.0
  59. [node name="SeedSpinBox" type="SpinBox" parent="ParameterContainer"]
  60. layout_mode = 2
  61. offset_right = 280.0
  62. offset_bottom = 31.0
  63. min_value = -2.14748e+09
  64. max_value = 2.14748e+09
  65. allow_greater = true
  66. allow_lesser = true
  67. prefix = "Seed:"
  68. [node name="FrequencySpinBox" type="SpinBox" parent="ParameterContainer"]
  69. layout_mode = 2
  70. offset_top = 35.0
  71. offset_right = 280.0
  72. offset_bottom = 66.0
  73. min_value = -100000.0
  74. max_value = 100000.0
  75. step = 0.005
  76. value = 0.01
  77. allow_greater = true
  78. prefix = "Frequency:"
  79. [node name="FractalOctavesSpinBox" type="SpinBox" parent="ParameterContainer"]
  80. layout_mode = 2
  81. offset_top = 70.0
  82. offset_right = 280.0
  83. offset_bottom = 101.0
  84. min_value = 1.0
  85. max_value = 9.0
  86. value = 1.0
  87. prefix = "Fractal Octaves:"
  88. [node name="FractalGainSpinBox" type="SpinBox" parent="ParameterContainer"]
  89. layout_mode = 2
  90. offset_top = 105.0
  91. offset_right = 280.0
  92. offset_bottom = 136.0
  93. max_value = 1000.0
  94. step = 0.05
  95. allow_greater = true
  96. prefix = "Fractal Gain:"
  97. [node name="FractalLacunaritySpinBox" type="SpinBox" parent="ParameterContainer"]
  98. layout_mode = 2
  99. offset_top = 140.0
  100. offset_right = 280.0
  101. offset_bottom = 171.0
  102. step = 0.05
  103. allow_greater = true
  104. prefix = "Fractal Lacunarity:"
  105. [node name="ClipContainer" type="VBoxContainer" parent="."]
  106. layout_mode = 1
  107. anchors_preset = 2
  108. anchor_top = 1.0
  109. anchor_bottom = 1.0
  110. offset_top = -52.0
  111. offset_right = 280.0
  112. grow_vertical = 0
  113. [node name="MinClipSpinBox" type="SpinBox" parent="ClipContainer"]
  114. layout_mode = 2
  115. offset_right = 280.0
  116. offset_bottom = 31.0
  117. min_value = -1.0
  118. max_value = 1.0
  119. step = 0.01
  120. value = -1.0
  121. prefix = "Clip Min:"
  122. [node name="MaxClipSpinBox" type="SpinBox" parent="ClipContainer"]
  123. layout_mode = 2
  124. offset_top = 35.0
  125. offset_right = 280.0
  126. offset_bottom = 66.0
  127. min_value = -1.0
  128. max_value = 1.0
  129. step = 0.01
  130. value = 1.0
  131. prefix = "Clip Max:"
  132. [connection signal="pressed" from="ButtonsContainer/DocumentationButton" to="." method="_on_documentation_button_pressed"]
  133. [connection signal="pressed" from="ButtonsContainer/RandomSeedButton" to="." method="_on_random_seed_button_pressed"]
  134. [connection signal="value_changed" from="ParameterContainer/SeedSpinBox" to="." method="_on_seed_spin_box_value_changed"]
  135. [connection signal="value_changed" from="ParameterContainer/FrequencySpinBox" to="." method="_on_frequency_spin_box_value_changed"]
  136. [connection signal="value_changed" from="ParameterContainer/FractalOctavesSpinBox" to="." method="_on_fractal_octaves_spin_box_value_changed"]
  137. [connection signal="value_changed" from="ParameterContainer/FractalGainSpinBox" to="." method="_on_fractal_gain_spin_box_value_changed"]
  138. [connection signal="value_changed" from="ParameterContainer/FractalLacunaritySpinBox" to="." method="_on_fractal_lacunarity_spin_box_value_changed"]
  139. [connection signal="value_changed" from="ClipContainer/MinClipSpinBox" to="." method="_on_min_clip_spin_box_value_changed"]
  140. [connection signal="value_changed" from="ClipContainer/MaxClipSpinBox" to="." method="_on_max_clip_spin_box_value_changed"]