chore: updated UI

This commit is contained in:
Sara Gerretsen 2025-12-07 14:56:28 +01:00
parent 308572e21e
commit 2380819e43
5 changed files with 92 additions and 22 deletions

View file

@ -1,4 +1,4 @@
[gd_resource type="ShaderMaterial" load_steps=8 format=3 uid="uid://8j7uyk0vnllg"]
[gd_resource type="ShaderMaterial" format=3 uid="uid://8j7uyk0vnllg"]
[ext_resource type="Shader" uid="uid://dsbxpdveoilep" path="res://assets/shaders/terrain.gdshader" id="1_ho7uc"]
@ -9,8 +9,8 @@ colors = PackedColorArray(0.31725, 0.45, 0.1845, 1, 0.236594, 0.332715, 0.176904
[sub_resource type="FastNoiseLite" id="FastNoiseLite_mqhx5"]
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_waqik"]
color_ramp = SubResource("Gradient_ho7uc")
noise = SubResource("FastNoiseLite_mqhx5")
color_ramp = SubResource("Gradient_ho7uc")
[sub_resource type="Gradient" id="Gradient_mqhx5"]
offsets = PackedFloat32Array(0, 0.988749)
@ -20,8 +20,8 @@ colors = PackedColorArray(0.206053, 0.206053, 0.206053, 1, 0.293371, 0.293371, 0
noise_type = 3
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_oj3sr"]
color_ramp = SubResource("Gradient_mqhx5")
noise = SubResource("FastNoiseLite_waqik")
color_ramp = SubResource("Gradient_mqhx5")
[resource]
render_priority = 0

16
project/editor_theme.tres Normal file
View file

@ -0,0 +1,16 @@
[gd_resource type="Theme" format=3 uid="uid://dh5hqcu3vyhrh"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lt8jt"]
content_margin_left = 0.0
content_margin_top = 0.0
content_margin_right = 0.0
content_margin_bottom = 0.0
bg_color = Color(0.12, 0.12, 0.12, 1)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5
[resource]
Panel/styles/panel = SubResource("StyleBoxFlat_lt8jt")

View file

@ -21,7 +21,7 @@ script_export_mode=2
[preset.0.options]
custom_template/debug=""
custom_template/release="templatepath"
custom_template/release="/home/sara/Documents/gd-projects/terrain-editor/engine/bin/godot.windows.template_release.x86_64.llvm"
debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/s3tc_bptc=true
@ -63,7 +63,7 @@ script_export_mode=2
[preset.1.options]
custom_template/debug=""
custom_template/release="templatepath"
custom_template/release="/home/sara/Documents/gd-projects/terrain-editor/engine/bin/godot.windows.template_release.x86_64.llvm"
debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/s3tc_bptc=true

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://cnux2fqne284i"]
[gd_scene format=3 uid="uid://cnux2fqne284i"]
[ext_resource type="PackedScene" uid="uid://bwrqsnetcn8yr" path="res://assets/models/point_handle.blend" id="1_njtj3"]
[ext_resource type="Material" uid="uid://b4ip0oq8o76mc" path="res://assets/materials/peak_handle_depth_tested.tres" id="2_mx0s0"]
@ -98,34 +98,34 @@ top_radius = 0.4
bottom_radius = 0.4
height = 10000.0
[node name="PointPrimitiveNode" type="PointPrimitiveNode"]
[node name="PointPrimitiveNode" type="PointPrimitiveNode" unique_id=1472259146]
[node name="point_handle" parent="." instance=ExtResource("1_njtj3")]
[node name="point_handle" parent="." unique_id=1807952123 instance=ExtResource("1_njtj3")]
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0)
[node name="HeightHandle" type="Area3D" parent="."]
[node name="HeightHandle" type="Area3D" parent="." unique_id=1397115657]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 27.8381, 0)
script = SubResource("GDScript_njtj3")
[node name="CollisionShape3D" type="CollisionShape3D" parent="HeightHandle"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="HeightHandle" unique_id=1987632068]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.80421, 0)
shape = SubResource("CylinderShape3D_mx0s0")
[node name="SlopeAngle" type="Area3D" parent="."]
[node name="SlopeAngle" type="Area3D" parent="." unique_id=31998186]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -34.0245, 0)
script = SubResource("GDScript_s814u")
[node name="CollisionShape3D" type="CollisionShape3D" parent="SlopeAngle"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="SlopeAngle" unique_id=1791452650]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.80421, 0)
shape = SubResource("CylinderShape3D_mx0s0")
[node name="PositionHandle" type="Area3D" parent="."]
[node name="PositionHandle" type="Area3D" parent="." unique_id=755854685]
script = SubResource("GDScript_mx0s0")
[node name="CollisionShape3D" type="CollisionShape3D" parent="PositionHandle"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="PositionHandle" unique_id=25777228]
shape = SubResource("SphereShape3D_njtj3")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=678201491]
material_override = ExtResource("2_mx0s0")
cast_shadow = 0
mesh = SubResource("CylinderMesh_njtj3")

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=18 format=3 uid="uid://xm383pc5pcnn"]
[gd_scene format=3 uid="uid://xm383pc5pcnn"]
[ext_resource type="PackedScene" uid="uid://cnux2fqne284i" path="res://objects/primitive_nodes/point_primitive_node.tscn" id="1_b1cmn"]
[ext_resource type="PackedScene" uid="uid://wkqhvjnxs2mx" path="res://objects/terrain_chunk.tscn" id="1_pxqd5"]
[ext_resource type="Theme" uid="uid://dh5hqcu3vyhrh" path="res://editor_theme.tres" id="3_ba0ut"]
[sub_resource type="PointPrimitive" id="PointPrimitive_pxqd5"]
slope = -0.7
@ -121,9 +122,14 @@ func _unhandled_input(event: InputEvent) -> void:
[sub_resource type="CylinderMesh" id="CylinderMesh_pxqd5"]
[node name="Node3D" type="Node3D"]
[sub_resource type="Gradient" id="Gradient_pxqd5"]
[node name="TerrainMeshEditor" type="TerrainMeshEditor" parent="."]
[sub_resource type="GradientTexture2D" id="GradientTexture2D_ba0ut"]
gradient = SubResource("Gradient_pxqd5")
[node name="Editor" type="Node3D" unique_id=1027707839]
[node name="TerrainMeshEditor" type="TerrainMeshEditor" parent="." unique_id=1382595562]
primitives = [SubResource("PointPrimitive_pxqd5"), SubResource("PointPrimitive_ba0ut"), SubResource("NoisePrimitive_ba0ut"), SubResource("NoisePrimitive_pxqd5"), SubResource("NoisePrimitive_q68jb"), SubResource("PlanePrimitive_pxqd5")]
vertex_color_gradient = SubResource("Gradient_b1cmn")
color_gradient_end_height = 100.0
@ -131,24 +137,72 @@ chunk_count = 15
chunk_scene = ExtResource("1_pxqd5")
point_primitive_object = ExtResource("1_b1cmn")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1468550752]
environment = SubResource("Environment_pxqd5")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=978399107]
transform = Transform3D(-0.750999, -0.305988, 0.585126, -1.29815e-08, 0.886147, 0.463404, -0.660305, 0.348015, -0.665494, 0, 0, 0)
light_color = Color(0.89, 0.82948, 0.7387, 1)
shadow_enabled = true
shadow_reverse_cull_face = true
directional_shadow_max_distance = 300.0
[node name="Camera3D" type="Camera3D" parent="."]
[node name="Camera3D" type="Camera3D" parent="." unique_id=376347830]
transform = Transform3D(0.707107, -0.377082, 0.598171, 0, 0.845942, 0.533275, -0.707107, -0.377082, 0.598171, 504.544, 443.732, 504.544)
fov = 57.3
far = 2000.0
script = SubResource("GDScript_b1cmn")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=613969950]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0)
mesh = SubResource("CylinderMesh_pxqd5")
[node name="LeftPanel" type="Panel" parent="." unique_id=1768834661]
anchors_preset = 9
anchor_bottom = 1.0
offset_right = 193.0
grow_vertical = 2
theme = ExtResource("3_ba0ut")
[node name="TabContainer" type="TabContainer" parent="LeftPanel" unique_id=2095156888]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
current_tab = 0
[node name="ScrollContainer" type="ScrollContainer" parent="LeftPanel/TabContainer" unique_id=1323188283]
layout_mode = 2
metadata/_tab_index = 0
[node name="MarginContainer" type="MarginContainer" parent="LeftPanel/TabContainer/ScrollContainer" unique_id=1533578826]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="VBoxContainer" type="VBoxContainer" parent="LeftPanel/TabContainer/ScrollContainer/MarginContainer" unique_id=326791130]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="HBoxContainer" type="HBoxContainer" parent="LeftPanel/TabContainer/ScrollContainer/MarginContainer/VBoxContainer" unique_id=247007395]
layout_mode = 2
size_flags_vertical = 2
[node name="TextureRect" type="TextureRect" parent="LeftPanel/TabContainer/ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer" unique_id=313030843]
layout_mode = 2
size_flags_horizontal = 0
texture = SubResource("GradientTexture2D_ba0ut")
expand_mode = 2
stretch_mode = 4
[node name="RichTextLabel" type="RichTextLabel" parent="LeftPanel/TabContainer/ScrollContainer/MarginContainer/VBoxContainer/HBoxContainer" unique_id=1765888481]
layout_mode = 2
size_flags_horizontal = 3
bbcode_enabled = true
text = "Layer 1"
fit_content = true
[connection signal="primitives_changed" from="TerrainMeshEditor" to="TerrainMeshEditor" method="_on_primitives_changed"]