From 9a0f6e884b9d8a270d4a5c426353a7a2b3929f4f Mon Sep 17 00:00:00 2001 From: Lukas Luger Date: Sun, 26 Nov 2023 21:11:05 +0100 Subject: [PATCH] #3 made glossy and round buttons --- assets/immersive_home/button.mtl | 3 +++ assets/immersive_home/button.obj | 3 +++ assets/immersive_home/button.obj.import | 21 +++++++++++++++++++++ content/ui/components/button/button.tscn | 14 ++++++++------ 4 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 assets/immersive_home/button.mtl create mode 100644 assets/immersive_home/button.obj create mode 100644 assets/immersive_home/button.obj.import diff --git a/assets/immersive_home/button.mtl b/assets/immersive_home/button.mtl new file mode 100644 index 0000000..7fe5d29 --- /dev/null +++ b/assets/immersive_home/button.mtl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86eced068bcbed2d727b107358398aff996d92dddedaeff7277430262507bcb1 +size 233 diff --git a/assets/immersive_home/button.obj b/assets/immersive_home/button.obj new file mode 100644 index 0000000..d34e459 --- /dev/null +++ b/assets/immersive_home/button.obj @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26fbc4673b78bf69b4955cd131e2484f705d833528cb3040223434c8bec9fe18 +size 92814 diff --git a/assets/immersive_home/button.obj.import b/assets/immersive_home/button.obj.import new file mode 100644 index 0000000..b073cd4 --- /dev/null +++ b/assets/immersive_home/button.obj.import @@ -0,0 +1,21 @@ +[remap] + +importer="wavefront_obj" +importer_version=1 +type="Mesh" +uid="uid://iv4lk77axlk4" +path="res://.godot/imported/button.obj-e6c969b54c5afbe601f3ea5c30bde0ec.mesh" + +[deps] + +files=["res://.godot/imported/button.obj-e6c969b54c5afbe601f3ea5c30bde0ec.mesh"] + +source_file="res://assets/immersive_home/button.obj" +dest_files=["res://.godot/imported/button.obj-e6c969b54c5afbe601f3ea5c30bde0ec.mesh", "res://.godot/imported/button.obj-e6c969b54c5afbe601f3ea5c30bde0ec.mesh"] + +[params] + +generate_tangents=true +scale_mesh=Vector3(1, 1, 1) +offset_mesh=Vector3(0, 0, 0) +optimize_mesh=true diff --git a/content/ui/components/button/button.tscn b/content/ui/components/button/button.tscn index ecd1ebd..905f434 100644 --- a/content/ui/components/button/button.tscn +++ b/content/ui/components/button/button.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=8 format=3 uid="uid://bsjqdvkt0u87c"] [ext_resource type="Script" path="res://content/ui/components/button/button.gd" id="1_74x7g"] -[ext_resource type="Material" uid="uid://bujy3egn1oqac" path="res://assets/materials/ui_element.material" id="2_h7ln4"] +[ext_resource type="ArrayMesh" uid="uid://iv4lk77axlk4" path="res://assets/immersive_home/button.obj" id="2_cve3l"] -[sub_resource type="BoxMesh" id="BoxMesh_jwpm5"] -resource_local_to_scene = true -material = ExtResource("2_h7ln4") -size = Vector3(0.05, 0.02, 0.05) +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8s8ln"] +transparency = 1 +cull_mode = 2 +albedo_color = Color(0, 0.501961, 0.886275, 1) [sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_o4j7g"] points = PackedVector3Array(-0.025, -0.01, -0.025, -0.025, 0.01, -0.025, 0.025, -0.01, -0.025, -0.025, -0.01, 0.025, -0.025, 0.01, 0.025, 0.025, 0.01, -0.025, 0.025, -0.01, 0.025, 0.025, 0.01, 0.025) @@ -84,7 +84,9 @@ script = ExtResource("1_74x7g") label = "Example Text" [node name="MeshInstance3D" type="MeshInstance3D" parent="."] -mesh = SubResource("BoxMesh_jwpm5") +transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0) +mesh = ExtResource("2_cve3l") +surface_material_override/0 = SubResource("StandardMaterial3D_8s8ln") [node name="CollisionShape3D" type="CollisionShape3D" parent="."] shape = SubResource("ConvexPolygonShape3D_o4j7g")