From e1a8424cddcad61c6a834ed4c5f656f2d10ce85f Mon Sep 17 00:00:00 2001 From: Nitwel Date: Tue, 23 Apr 2024 14:26:20 +0200 Subject: [PATCH] use glass ui style --- .../ui => assets/materials}/glass.gdshader | 54 ++++++----- app/content/main.tscn | 8 +- app/content/system/house/mini/mini_wall.tres | 4 +- app/content/system/keyboard/keyboard.tscn | 34 +++++-- app/content/ui/components/button/button.tscn | 28 ++++-- app/content/ui/glass2.gdshader | 46 --------- app/content/ui/menu/menu.tscn | 27 ++++-- app/content/ui/onboarding/onboarding.tscn | 38 +++++--- app/content/ui/test.gd | 39 -------- app/content/ui/test.material | 3 - app/content/ui/test.material.depren | Bin 0 -> 471 bytes app/content/ui/test.tscn | 89 ------------------ 12 files changed, 128 insertions(+), 242 deletions(-) rename app/{content/ui => assets/materials}/glass.gdshader (63%) delete mode 100644 app/content/ui/glass2.gdshader delete mode 100644 app/content/ui/test.gd delete mode 100644 app/content/ui/test.material create mode 100644 app/content/ui/test.material.depren delete mode 100644 app/content/ui/test.tscn diff --git a/app/content/ui/glass.gdshader b/app/assets/materials/glass.gdshader similarity index 63% rename from app/content/ui/glass.gdshader rename to app/assets/materials/glass.gdshader index 455ebb5..45ce262 100644 --- a/app/content/ui/glass.gdshader +++ b/app/assets/materials/glass.gdshader @@ -1,19 +1,22 @@ shader_type spatial; -render_mode diffuse_burley, specular_schlick_ggx, blend_mix, cull_disabled, shadows_disabled; +render_mode diffuse_burley, specular_schlick_ggx, blend_mix, cull_disabled, shadows_disabled, depth_prepass_alpha; -uniform vec4 color : source_color = vec4(1.0, 1.0, 1.0, 1.0); +group_uniforms Color; +uniform vec4 color : source_color = vec4(1.0, 1.0, 1.0, 0.3); uniform vec4 border_color : source_color = vec4(1.0, 1.0, 1.0, 1.0); -uniform vec2 size = vec2(1.0, 1.0); -uniform float border_size: hint_range(0.0, 0.5) = 0.1; -uniform float border_fade_in: hint_range(0.0, 10.0) = 0.0; -uniform float border_fade_out: hint_range(0.0, 10.0) = 0.0; -uniform float corner_radius = 0.0; - -uniform float roughness : hint_range(0.0, 1.0) = 0.15; uniform vec4 edge_color : source_color = vec4(0.0, 0.0, 0.0, 1.0); -uniform float grain_amount : hint_range(0.0, 1.0) = 0.05; +group_uniforms Size; +uniform vec2 size = vec2(1.0, 1.0); +uniform float border_size: hint_range(0.0, 0.5) = 0.001; +uniform float border_fade_in: hint_range(0.0, 0.5) = 0.005; +uniform float border_fade_out: hint_range(0.0, 0.5) = 0.0; +uniform float corner_radius: hint_range(0.0, 0.5) = 0.04; + +group_uniforms Roughness; +uniform float roughness : hint_range(0.0, 1.0) = 0.3; +uniform float grain_amount : hint_range(0.0, 1.0) = 0.02; float rectangle(vec2 position) { @@ -40,32 +43,39 @@ void fragment() { float d = rectangle((UV - 0.5) * size * border_scale); float border_width = (border_size + border_fade_in + border_fade_out) * border_scale; + bool inside = false; + if (d >= corner_radius - border_width && d <= corner_radius) { + // Border float rel_d = (d - corner_radius + border_width) / border_width; float alpha = min((rel_d / (border_fade_in * border_scale / border_width)), (1.0 - (rel_d)) / (border_fade_out * border_scale / border_width)); if (d < corner_radius - (border_size + border_fade_out) * border_scale) { + // Inner Fade ALBEDO = mix(color, border_color, alpha).xyz; ALPHA = mix(color.w, border_color.w, alpha); + inside = true; } else { + // Outer Fade ALBEDO = border_color.xyz; ALPHA = mix(0.0, border_color.w, alpha); } } else if (d < corner_radius - border_width ) { + // Inside ALBEDO = color.xyz; ALPHA = color.w; + inside = true; } - float a = mix(0.001, 1.0, ALPHA); - ALPHA = mix(fresnel * edge_color.a, 1.0, a); - ALBEDO = mix(edge_color.rgb * edge_color.a, ALBEDO.rgb, a); - - ROUGHNESS = roughness; - SPECULAR = 0.5 * inversesqrt(ALPHA); - - float noise = (fract(sin(dot(UV, vec2(12.9898, 78.233))) * 43758.5453) - 0.5) * 2.0; + if (inside) { + float a = mix(0.001, 1.0, ALPHA); + ALPHA = mix(fresnel * edge_color.a, 1.0, a); + ALBEDO = mix(edge_color.rgb * edge_color.a, ALBEDO.rgb, a); + + ROUGHNESS = roughness; + SPECULAR = 0.5 * inversesqrt(ALPHA); + + float noise = (fract(sin(dot(UV, vec2(12.9898, 78.233))) * 43758.5453) - 0.5) * 2.0; - // Add noise to the original color - ALBEDO += noise * grain_amount; - - + ALBEDO += noise * grain_amount; + } } \ No newline at end of file diff --git a/app/content/main.tscn b/app/content/main.tscn index 4a43fd7..f1d7644 100644 --- a/app/content/main.tscn +++ b/app/content/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=18 format=3 uid="uid://eecv28y6jxk4"] +[gd_scene load_steps=17 format=3 uid="uid://eecv28y6jxk4"] [ext_resource type="PackedScene" uid="uid://clc5dre31iskm" path="res://addons/godot-xr-tools/xr/start_xr.tscn" id="1_i4c04"] [ext_resource type="Script" path="res://content/main.gd" id="1_uvrd4"] @@ -12,7 +12,6 @@ [ext_resource type="PackedScene" uid="uid://lrehk38exd5n" path="res://content/system/keyboard/keyboard.tscn" id="9_e5n3p"] [ext_resource type="PackedScene" uid="uid://cbemihbxkd4ll" path="res://content/system/house/house.tscn" id="9_np6mw"] [ext_resource type="PackedScene" uid="uid://bhyddd1f0ry1x" path="res://content/ui/onboarding/onboarding.tscn" id="12_uq2nj"] -[ext_resource type="PackedScene" uid="uid://dclceqjqfxekx" path="res://content/ui/test.tscn" id="13_eg13b"] [sub_resource type="Sky" id="Sky_vhymk"] sky_material = ExtResource("5_wgwf8") @@ -44,7 +43,7 @@ script = ExtResource("1_uvrd4") environment = SubResource("Environment_7ghp0") [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] -transform = Transform3D(0.834925, -0.386727, -0.39159, 0.550364, 0.586681, 0.594058, 2.91038e-11, -0.711511, 0.702675, -2.91038e-10, 7.21041, 2.06458) +transform = Transform3D(1, -2.51787e-05, 0.000567105, -0.000567105, 4.3985e-08, 1, -2.51784e-05, -1, 2.97105e-08, -4.65661e-10, 7.21041, 2.06458) shadow_enabled = true [node name="XROrigin3D" type="XROrigin3D" parent="."] @@ -89,7 +88,4 @@ transform = Transform3D(0.499999, -0.000139169, -6.50204e-05, 5.24307e-05, 0.353 [node name="Onboarding" parent="." instance=ExtResource("12_uq2nj")] transform = Transform3D(0.999999, -1.39632e-11, 0, 9.48097e-12, 0.999999, 0, 0, 0, 0.999999, -0.529594, 0.820154, -0.600147) -[node name="Test" parent="." instance=ExtResource("13_eg13b")] -transform = Transform3D(-0.0709227, 0.000321724, 0.997481, 0.000312568, 1, -0.000300313, -0.997482, 0.000290482, -0.0709229, -0.0248237, 0.934686, -0.49358) - [editable path="XROrigin3D/XRControllerLeft"] diff --git a/app/content/system/house/mini/mini_wall.tres b/app/content/system/house/mini/mini_wall.tres index d8f483f..20f7c8e 100644 --- a/app/content/system/house/mini/mini_wall.tres +++ b/app/content/system/house/mini/mini_wall.tres @@ -4,9 +4,11 @@ [ext_resource type="Texture2D" uid="uid://bbuq4wn7e5o2q" path="res://content/system/house/mini/temp_gradient.tres" id="2_3lwi8"] [resource] -render_priority = 0 +render_priority = -2 shader = ExtResource("1_sbr3e") shader_parameter/data = PackedFloat32Array() shader_parameter/data_size = 0 shader_parameter/alpha = 0.3 +shader_parameter/roughness = 0.15 +shader_parameter/edge_color = Color(0, 0, 0, 1) shader_parameter/color_gradient = ExtResource("2_3lwi8") diff --git a/app/content/system/keyboard/keyboard.tscn b/app/content/system/keyboard/keyboard.tscn index 8c9cfda..6801a03 100644 --- a/app/content/system/keyboard/keyboard.tscn +++ b/app/content/system/keyboard/keyboard.tscn @@ -1,26 +1,40 @@ -[gd_scene load_steps=9 format=3 uid="uid://lrehk38exd5n"] +[gd_scene load_steps=10 format=3 uid="uid://lrehk38exd5n"] [ext_resource type="Script" path="res://content/system/keyboard/keyboard.gd" id="1_maojw"] [ext_resource type="PackedScene" uid="uid://bsjqdvkt0u87c" path="res://content/ui/components/button/button.tscn" id="1_xdpwr"] [ext_resource type="Script" path="res://content/ui/components/grid_container/grid_container.gd" id="3_mx544"] [ext_resource type="Script" path="res://content/functions/movable.gd" id="4_86fct"] -[ext_resource type="Material" uid="uid://bnwimm214q67g" path="res://assets/materials/sec-500.material" id="5_8c8rc"] +[ext_resource type="Shader" path="res://assets/materials/glass.gdshader" id="5_0dbg6"] [ext_resource type="Script" path="res://content/functions/occludable.gd" id="6_y4sdl"] [sub_resource type="BoxShape3D" id="BoxShape3D_k5ib7"] size = Vector3(0.79, 0.01, 0.26) -[sub_resource type="BoxMesh" id="BoxMesh_7rntc"] -size = Vector3(0.79, 0.01, 0.26) +[sub_resource type="ShaderMaterial" id="ShaderMaterial_x72nd"] +render_priority = 0 +shader = ExtResource("5_0dbg6") +shader_parameter/color = Color(1, 1, 1, 0.3) +shader_parameter/border_color = Color(1, 1, 1, 1) +shader_parameter/edge_color = Color(0, 0, 0, 1) +shader_parameter/size = Vector2(0.79, 0.26) +shader_parameter/border_size = 0.001 +shader_parameter/border_fade_in = 0.005 +shader_parameter/border_fade_out = 0.0 +shader_parameter/corner_radius = 0.02 +shader_parameter/roughness = 0.3 +shader_parameter/grain_amount = 0.02 + +[sub_resource type="QuadMesh" id="QuadMesh_88pdc"] +size = Vector2(0.79, 0.26) [node name="Keyboard" type="StaticBody3D" groups=["ui_focus_stop"]] transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0) -collision_layer = 2 -collision_mask = 2 +collision_layer = 6 +collision_mask = 0 script = ExtResource("1_maojw") [node name="Backspace" parent="." instance=ExtResource("1_xdpwr")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.349964, 0, -0.0700361) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.35, 0, -0.07) focusable = false label = "backspace" icon = true @@ -55,9 +69,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0093171, -0.009645, 0.0028 shape = SubResource("BoxShape3D_k5ib7") [node name="MeshInstance3D" type="MeshInstance3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0093171, -0.009645, 0.00284005) -material_override = ExtResource("5_8c8rc") -mesh = SubResource("BoxMesh_7rntc") +transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -0.0093171, -0.009645, 0.00284005) +material_override = SubResource("ShaderMaterial_x72nd") +mesh = SubResource("QuadMesh_88pdc") [node name="Occludable" type="Node" parent="."] script = ExtResource("6_y4sdl") diff --git a/app/content/ui/components/button/button.tscn b/app/content/ui/components/button/button.tscn index 065d65e..bed70d8 100644 --- a/app/content/ui/components/button/button.tscn +++ b/app/content/ui/components/button/button.tscn @@ -1,8 +1,24 @@ -[gd_scene load_steps=7 format=3 uid="uid://bsjqdvkt0u87c"] +[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="ArrayMesh" uid="uid://iv4lk77axlk4" path="res://assets/immersive_home/button.obj" id="2_cve3l"] -[ext_resource type="Material" uid="uid://bujy3egn1oqac" path="res://assets/materials/pri-500.material" id="2_wx7av"] +[ext_resource type="Shader" path="res://assets/materials/glass.gdshader" id="4_2xlpt"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_oqan0"] +render_priority = 0 +shader = ExtResource("4_2xlpt") +shader_parameter/color = Color(1, 1, 1, 0.3) +shader_parameter/border_color = Color(1, 1, 1, 1) +shader_parameter/edge_color = Color(0, 0, 0, 1) +shader_parameter/size = Vector2(0.1, 0.1) +shader_parameter/border_size = 0.001 +shader_parameter/border_fade_in = 0.005 +shader_parameter/border_fade_out = 0.0 +shader_parameter/corner_radius = 0.02 +shader_parameter/roughness = 0.3 +shader_parameter/grain_amount = 0.02 + +[sub_resource type="QuadMesh" id="QuadMesh_bt05p"] +size = Vector2(0.1, 0.1) [sub_resource type="BoxShape3D" id="BoxShape3D_xwopm"] size = Vector3(0.05, 0.02, 0.05) @@ -23,9 +39,9 @@ collision_layer = 2 collision_mask = 0 [node name="MeshInstance3D" type="MeshInstance3D" parent="Body"] -transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -0.005, 0) -material_override = ExtResource("2_wx7av") -mesh = ExtResource("2_cve3l") +transform = Transform3D(0.5, 0, 0, 0, -2.18557e-08, 0.5, 0, -0.5, -2.18557e-08, 0, 0.009, 0) +material_override = SubResource("ShaderMaterial_oqan0") +mesh = SubResource("QuadMesh_bt05p") skeleton = NodePath("../..") [node name="CollisionShape3D" type="CollisionShape3D" parent="Body"] diff --git a/app/content/ui/glass2.gdshader b/app/content/ui/glass2.gdshader deleted file mode 100644 index b12dd58..0000000 --- a/app/content/ui/glass2.gdshader +++ /dev/null @@ -1,46 +0,0 @@ -shader_type spatial; -render_mode diffuse_burley, specular_schlick_ggx, blend_mix; - -group_uniforms albedo; -uniform vec4 albedo : source_color = vec4(1.0, 1.0, 1.0, 0.0); -uniform sampler2D albedo_texture : source_color, hint_default_white; - -group_uniforms roughness; -uniform float roughness : hint_range(0.0, 1.0) = 0.15; -uniform sampler2D roughness_texture : hint_roughness_r; - -group_uniforms normal; -uniform float normal_strength : hint_range(-16.0, 16.0) = 1.0; -uniform sampler2D normal_map : hint_normal; - -group_uniforms misc; -uniform vec4 edge_color : source_color = vec4(0.0, 0.0, 0.0, 1.0); - -float SchlickFresnel(float u) { - float m = 1.0 - u; - float m2 = m * m; - return m2 * m2 * m; -} - -void fragment() { - // calculate fresnel values - float VdotN = dot(VIEW, NORMAL); - float fresnel = clamp(SchlickFresnel(VdotN), 0.0, 1.0); - - // sample and mix textures - vec4 _albedo = texture(albedo_texture, UV) * albedo; - float _roughness = texture(roughness_texture, UV).r * roughness; - - // apply glass look - float a = mix(0.001, 1.0, _albedo.a); - ALPHA = mix(fresnel * edge_color.a, 1.0, a); - ALBEDO = mix(edge_color.rgb * edge_color.a, _albedo.rgb, a); - - ROUGHNESS = _roughness; - NORMAL_MAP = texture(normal_map, UV).xyz; - NORMAL_MAP_DEPTH = normal_strength; - - // function to compensate specular for alpha blend - // 0.5 * ALPHA^-0.5 - SPECULAR = 0.5 * inversesqrt(ALPHA); -} \ No newline at end of file diff --git a/app/content/ui/menu/menu.tscn b/app/content/ui/menu/menu.tscn index 3de734c..b6eece1 100644 --- a/app/content/ui/menu/menu.tscn +++ b/app/content/ui/menu/menu.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=19 format=3 uid="uid://c3kdssrmv84kv"] [ext_resource type="Script" path="res://content/ui/menu/menu.gd" id="1_ng4u3"] -[ext_resource type="Material" uid="uid://bnwimm214q67g" path="res://assets/materials/sec-500.material" id="2_0x5at"] [ext_resource type="Script" path="res://content/functions/movable.gd" id="2_8coxu"] +[ext_resource type="Shader" path="res://assets/materials/glass.gdshader" id="3_htaoi"] [ext_resource type="Script" path="res://content/ui/components/tabs/tabs.gd" id="4_eavfx"] [ext_resource type="PackedScene" uid="uid://crrb0l3ekuotj" path="res://content/ui/menu/edit/edit_menu.tscn" id="4_r2raj"] [ext_resource type="PackedScene" uid="uid://bsjqdvkt0u87c" path="res://content/ui/components/button/button.tscn" id="5_w4i01"] @@ -18,11 +18,22 @@ size = Vector3(0.38, 0.0128076, 0.32) [sub_resource type="BoxShape3D" id="BoxShape3D_6xn1i"] size = Vector3(0.3, 0.0264844, 0.3) -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_01s1g"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mhqg4"] +render_priority = 0 +shader = ExtResource("3_htaoi") +shader_parameter/color = Color(1, 1, 1, 0.3) +shader_parameter/border_color = Color(1, 1, 1, 1) +shader_parameter/edge_color = Color(0, 0, 0, 1) +shader_parameter/size = Vector2(0.3, 0.3) +shader_parameter/border_size = 0.001 +shader_parameter/border_fade_in = 0.005 +shader_parameter/border_fade_out = 0.0 +shader_parameter/corner_radius = 0.02 +shader_parameter/roughness = 0.3 +shader_parameter/grain_amount = 0.02 -[sub_resource type="BoxMesh" id="BoxMesh_08du6"] -material = SubResource("StandardMaterial3D_01s1g") -size = Vector3(0.3, 0.01, 0.3) +[sub_resource type="QuadMesh" id="QuadMesh_4bh1v"] +size = Vector2(0.3, 0.3) [sub_resource type="Animation" id="Animation_61md4"] length = 0.001 @@ -183,9 +194,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.21, -0.00824219, 0.15) shape = SubResource("BoxShape3D_6xn1i") [node name="Background" type="MeshInstance3D" parent="AnimationContainer"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.21, 0, 0.15) -material_override = ExtResource("2_0x5at") -mesh = SubResource("BoxMesh_08du6") +transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.21, 0.01, 0.15) +material_override = SubResource("ShaderMaterial_mhqg4") +mesh = SubResource("QuadMesh_4bh1v") skeleton = NodePath("../..") [node name="Tabs" type="Node3D" parent="AnimationContainer" node_paths=PackedStringArray("initial_selected")] diff --git a/app/content/ui/onboarding/onboarding.tscn b/app/content/ui/onboarding/onboarding.tscn index 2f8db91..9e2864b 100644 --- a/app/content/ui/onboarding/onboarding.tscn +++ b/app/content/ui/onboarding/onboarding.tscn @@ -1,22 +1,36 @@ -[gd_scene load_steps=6 format=3 uid="uid://bhyddd1f0ry1x"] +[gd_scene load_steps=7 format=3 uid="uid://bhyddd1f0ry1x"] [ext_resource type="Script" path="res://content/ui/onboarding/onboarding.gd" id="1_k4yvw"] -[ext_resource type="Material" uid="uid://bujy3egn1oqac" path="res://assets/materials/pri-500.material" id="2_aleti"] +[ext_resource type="Shader" path="res://assets/materials/glass.gdshader" id="2_87aan"] [ext_resource type="PackedScene" uid="uid://bsjqdvkt0u87c" path="res://content/ui/components/button/button.tscn" id="3_hlpow"] [sub_resource type="BoxShape3D" id="BoxShape3D_nfwtf"] size = Vector3(0.5, 0.3, 0.01) -[sub_resource type="BoxMesh" id="BoxMesh_yknqs"] -size = Vector3(0.5, 0.3, 0.01) +[sub_resource type="ShaderMaterial" id="ShaderMaterial_d2ck8"] +render_priority = -1 +shader = ExtResource("2_87aan") +shader_parameter/color = Color(1, 1, 1, 0.3) +shader_parameter/border_color = Color(1, 1, 1, 1) +shader_parameter/edge_color = Color(0, 0, 0, 1) +shader_parameter/size = Vector2(1, 1) +shader_parameter/border_size = 0.001 +shader_parameter/border_fade_in = 0.005 +shader_parameter/border_fade_out = 0.0 +shader_parameter/corner_radius = 0.04 +shader_parameter/roughness = 0.3 +shader_parameter/grain_amount = 0.02 + +[sub_resource type="QuadMesh" id="QuadMesh_ij2lj"] +size = Vector2(0.5, 0.3) [node name="Onboarding" type="StaticBody3D"] collision_layer = 6 -collision_mask = 6 +collision_mask = 0 script = ExtResource("1_k4yvw") [node name="Label3D2" type="Label3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.23, -0.1, 0.006) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.23, -0.1, 0.001) pixel_size = 0.001 text = "Getting Started" font_size = 18 @@ -30,11 +44,11 @@ width = 470.0 shape = SubResource("BoxShape3D_nfwtf") [node name="MeshInstance3D" type="MeshInstance3D" parent="."] -material_override = ExtResource("2_aleti") -mesh = SubResource("BoxMesh_yknqs") +material_override = SubResource("ShaderMaterial_d2ck8") +mesh = SubResource("QuadMesh_ij2lj") [node name="GettingStartedLabel" type="Label3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.23, 0.14, 0.006) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.23, 0.13, 0.001) pixel_size = 0.001 text = "Hey! @@ -49,17 +63,17 @@ autowrap_mode = 3 width = 470.0 [node name="GettingStartedButton" parent="." instance=ExtResource("3_hlpow")] -transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, -0.05, -0.11, 0) +transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, -0.05, -0.11, 0.001) label = "open_in_new" icon = true [node name="CloseButton" parent="." instance=ExtResource("3_hlpow")] -transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0.21, -0.11, 0) +transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0.21, -0.11, 0.001) label = "done" icon = true [node name="CloseLabel" type="Label3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.06, -0.1, 0.006) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.06, -0.1, 0.001) pixel_size = 0.001 text = "Understood" font_size = 18 diff --git a/app/content/ui/test.gd b/app/content/ui/test.gd deleted file mode 100644 index c5fc0a8..0000000 --- a/app/content/ui/test.gd +++ /dev/null @@ -1,39 +0,0 @@ -extends Node3D - -@onready var coll = $StaticBody3D/CollisionShape3D -@onready var mesh = $StaticBody3D/MeshInstance3D - -@onready var slider = $StaticBody3D/Slider -@onready var slider2 = $StaticBody3D/Slider2 -@onready var slider3 = $StaticBody3D/Slider3 -@onready var slider4 = $StaticBody3D/Slider4 -@onready var slider5 = $StaticBody3D/Slider5 -@onready var slider6 = $StaticBody3D/Slider6 - -func _ready(): - slider.on_value_changed.connect(func(value): - mesh.mesh.size.x=value - coll.shape.size.x=value - mesh.material_override.set_shader_parameter("size", Vector2(mesh.mesh.size.x, mesh.mesh.size.y)) - ) - slider2.on_value_changed.connect(func(value): - mesh.mesh.size.y=value - coll.shape.size.y=value - mesh.material_override.set_shader_parameter("size", Vector2(mesh.mesh.size.x, mesh.mesh.size.y)) - ) - - slider3.on_value_changed.connect(func(value): - mesh.material_override.set_shader_parameter("border_size", value) - ) - - slider4.on_value_changed.connect(func(value): - mesh.material_override.set_shader_parameter("corner_radius", value) - ) - - slider5.on_value_changed.connect(func(value): - mesh.material_override.set_shader_parameter("border_fade_in", value) - ) - - slider6.on_value_changed.connect(func(value): - mesh.material_override.set_shader_parameter("border_fade_out", value) - ) diff --git a/app/content/ui/test.material b/app/content/ui/test.material deleted file mode 100644 index 53681ab..0000000 --- a/app/content/ui/test.material +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6041f48bfc2a4bc4c88096265fb3baf46881eec9a244104378c98a6c5e0dbb9a -size 442 diff --git a/app/content/ui/test.material.depren b/app/content/ui/test.material.depren new file mode 100644 index 0000000000000000000000000000000000000000..ccca6a25c2acd663c34d0d17921789cb9f6d2056 GIT binary patch literal 471 zcmV;|0Vw`bQ$s@n000005C8y$0{{TO0RR9fwJ-f(g#xV&0A>|SJV0-f#=~&qL(1?x z2K8CE)UpPx^>8T9@jy1I$lks836ey-v+Z1F=>5F^F>3g(Z#DyUXevoiYfT~DQZxWJ z05|}eQ+t{7<+BV%Cbb7jEFZ1lrv4nif=ig7R4^eUrNtlM%TjZiv4LnpZ6xGR@C*0> z{FV>!={QzU!q2gUnurJwP7=2aGJ?{9LJ7IZ{ra_$oLx_FU6wH{VE9 zL2d9>4rA)3FkQlMxof7nVF2F#rRGgfwxC4s=1{Mku8X(31tq>w0 zGq#ZOQ}_w2e|d26;s>k^=Axmb#AIz2aAZydIUsO?89UMrXbJu`!j!