feat: derive resource visuals from state

This commit is contained in:
Rijad Zuzo
2026-07-17 18:39:14 +02:00
parent 04c5371b6b
commit 2719b0398b
21 changed files with 686 additions and 18 deletions
@@ -0,0 +1,42 @@
[gd_scene load_steps=7 format=3]
[ext_resource type="Script" path="res://world/jajce/HarvestableTreePresentation.gd" id="1_script"]
[ext_resource type="PackedScene" path="res://world/jajce/StylizedTree.tscn" id="2_tree"]
[sub_resource type="StandardMaterial3D" id="Material_stump_bark"]
albedo_color = Color(0.29, 0.17, 0.09, 1)
roughness = 0.96
[sub_resource type="CylinderMesh" id="Mesh_stump"]
material = SubResource("Material_stump_bark")
top_radius = 0.38
bottom_radius = 0.48
height = 0.82
radial_segments = 10
[sub_resource type="StandardMaterial3D" id="Material_stump_cut"]
albedo_color = Color(0.69, 0.49, 0.27, 1)
roughness = 0.9
[sub_resource type="CylinderMesh" id="Mesh_stump_cut"]
material = SubResource("Material_stump_cut")
top_radius = 0.36
bottom_radius = 0.37
height = 0.055
radial_segments = 10
[node name="HarvestableTreePresentation" type="Node3D"]
script = ExtResource("1_script")
[node name="StandingTree" parent="." instance=ExtResource("2_tree")]
[node name="Stump" type="Node3D" parent="."]
visible = false
[node name="Bark" type="MeshInstance3D" parent="Stump"]
position = Vector3(0, 0.41, 0)
mesh = SubResource("Mesh_stump")
[node name="CutFace" type="MeshInstance3D" parent="Stump"]
position = Vector3(0, 0.835, 0)
mesh = SubResource("Mesh_stump_cut")