use glass ui style
This commit is contained in:
parent
407a509669
commit
e1a8424cdd
|
@ -1,19 +1,22 @@
|
||||||
shader_type spatial;
|
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 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 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) {
|
float rectangle(vec2 position) {
|
||||||
|
@ -40,32 +43,39 @@ void fragment() {
|
||||||
float d = rectangle((UV - 0.5) * size * border_scale);
|
float d = rectangle((UV - 0.5) * size * border_scale);
|
||||||
float border_width = (border_size + border_fade_in + border_fade_out) * 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) {
|
if (d >= corner_radius - border_width && d <= corner_radius) {
|
||||||
|
// Border
|
||||||
float rel_d = (d - corner_radius + border_width) / border_width;
|
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));
|
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) {
|
if (d < corner_radius - (border_size + border_fade_out) * border_scale) {
|
||||||
|
// Inner Fade
|
||||||
ALBEDO = mix(color, border_color, alpha).xyz;
|
ALBEDO = mix(color, border_color, alpha).xyz;
|
||||||
ALPHA = mix(color.w, border_color.w, alpha);
|
ALPHA = mix(color.w, border_color.w, alpha);
|
||||||
|
inside = true;
|
||||||
} else {
|
} else {
|
||||||
|
// Outer Fade
|
||||||
ALBEDO = border_color.xyz;
|
ALBEDO = border_color.xyz;
|
||||||
ALPHA = mix(0.0, border_color.w, alpha);
|
ALPHA = mix(0.0, border_color.w, alpha);
|
||||||
}
|
}
|
||||||
} else if (d < corner_radius - border_width ) {
|
} else if (d < corner_radius - border_width ) {
|
||||||
|
// Inside
|
||||||
ALBEDO = color.xyz;
|
ALBEDO = color.xyz;
|
||||||
ALPHA = color.w;
|
ALPHA = color.w;
|
||||||
|
inside = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
float a = mix(0.001, 1.0, ALPHA);
|
if (inside) {
|
||||||
ALPHA = mix(fresnel * edge_color.a, 1.0, a);
|
float a = mix(0.001, 1.0, ALPHA);
|
||||||
ALBEDO = mix(edge_color.rgb * edge_color.a, ALBEDO.rgb, a);
|
ALPHA = mix(fresnel * edge_color.a, 1.0, a);
|
||||||
|
ALBEDO = mix(edge_color.rgb * edge_color.a, ALBEDO.rgb, a);
|
||||||
|
|
||||||
ROUGHNESS = roughness;
|
ROUGHNESS = roughness;
|
||||||
SPECULAR = 0.5 * inversesqrt(ALPHA);
|
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;
|
|
||||||
|
|
||||||
|
float noise = (fract(sin(dot(UV, vec2(12.9898, 78.233))) * 43758.5453) - 0.5) * 2.0;
|
||||||
|
|
||||||
|
ALBEDO += noise * grain_amount;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -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="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"]
|
[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://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://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://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"]
|
[sub_resource type="Sky" id="Sky_vhymk"]
|
||||||
sky_material = ExtResource("5_wgwf8")
|
sky_material = ExtResource("5_wgwf8")
|
||||||
|
@ -44,7 +43,7 @@ script = ExtResource("1_uvrd4")
|
||||||
environment = SubResource("Environment_7ghp0")
|
environment = SubResource("Environment_7ghp0")
|
||||||
|
|
||||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
[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
|
shadow_enabled = true
|
||||||
|
|
||||||
[node name="XROrigin3D" type="XROrigin3D" parent="."]
|
[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")]
|
[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)
|
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"]
|
[editable path="XROrigin3D/XRControllerLeft"]
|
||||||
|
|
|
@ -4,9 +4,11 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://bbuq4wn7e5o2q" path="res://content/system/house/mini/temp_gradient.tres" id="2_3lwi8"]
|
[ext_resource type="Texture2D" uid="uid://bbuq4wn7e5o2q" path="res://content/system/house/mini/temp_gradient.tres" id="2_3lwi8"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
render_priority = 0
|
render_priority = -2
|
||||||
shader = ExtResource("1_sbr3e")
|
shader = ExtResource("1_sbr3e")
|
||||||
shader_parameter/data = PackedFloat32Array()
|
shader_parameter/data = PackedFloat32Array()
|
||||||
shader_parameter/data_size = 0
|
shader_parameter/data_size = 0
|
||||||
shader_parameter/alpha = 0.3
|
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")
|
shader_parameter/color_gradient = ExtResource("2_3lwi8")
|
||||||
|
|
|
@ -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="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="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/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="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"]
|
[ext_resource type="Script" path="res://content/functions/occludable.gd" id="6_y4sdl"]
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_k5ib7"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_k5ib7"]
|
||||||
size = Vector3(0.79, 0.01, 0.26)
|
size = Vector3(0.79, 0.01, 0.26)
|
||||||
|
|
||||||
[sub_resource type="BoxMesh" id="BoxMesh_7rntc"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_x72nd"]
|
||||||
size = Vector3(0.79, 0.01, 0.26)
|
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"]]
|
[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)
|
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
||||||
collision_layer = 2
|
collision_layer = 6
|
||||||
collision_mask = 2
|
collision_mask = 0
|
||||||
script = ExtResource("1_maojw")
|
script = ExtResource("1_maojw")
|
||||||
|
|
||||||
[node name="Backspace" parent="." instance=ExtResource("1_xdpwr")]
|
[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
|
focusable = false
|
||||||
label = "backspace"
|
label = "backspace"
|
||||||
icon = true
|
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")
|
shape = SubResource("BoxShape3D_k5ib7")
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0093171, -0.009645, 0.00284005)
|
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -0.0093171, -0.009645, 0.00284005)
|
||||||
material_override = ExtResource("5_8c8rc")
|
material_override = SubResource("ShaderMaterial_x72nd")
|
||||||
mesh = SubResource("BoxMesh_7rntc")
|
mesh = SubResource("QuadMesh_88pdc")
|
||||||
|
|
||||||
[node name="Occludable" type="Node" parent="."]
|
[node name="Occludable" type="Node" parent="."]
|
||||||
script = ExtResource("6_y4sdl")
|
script = ExtResource("6_y4sdl")
|
||||||
|
|
|
@ -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="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="Shader" path="res://assets/materials/glass.gdshader" id="4_2xlpt"]
|
||||||
[ext_resource type="Material" uid="uid://bujy3egn1oqac" path="res://assets/materials/pri-500.material" id="2_wx7av"]
|
|
||||||
|
[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"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_xwopm"]
|
||||||
size = Vector3(0.05, 0.02, 0.05)
|
size = Vector3(0.05, 0.02, 0.05)
|
||||||
|
@ -23,9 +39,9 @@ collision_layer = 2
|
||||||
collision_mask = 0
|
collision_mask = 0
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Body"]
|
[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)
|
transform = Transform3D(0.5, 0, 0, 0, -2.18557e-08, 0.5, 0, -0.5, -2.18557e-08, 0, 0.009, 0)
|
||||||
material_override = ExtResource("2_wx7av")
|
material_override = SubResource("ShaderMaterial_oqan0")
|
||||||
mesh = ExtResource("2_cve3l")
|
mesh = SubResource("QuadMesh_bt05p")
|
||||||
skeleton = NodePath("../..")
|
skeleton = NodePath("../..")
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body"]
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
[gd_scene load_steps=19 format=3 uid="uid://c3kdssrmv84kv"]
|
[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="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="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="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://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"]
|
[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"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_6xn1i"]
|
||||||
size = Vector3(0.3, 0.0264844, 0.3)
|
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"]
|
[sub_resource type="QuadMesh" id="QuadMesh_4bh1v"]
|
||||||
material = SubResource("StandardMaterial3D_01s1g")
|
size = Vector2(0.3, 0.3)
|
||||||
size = Vector3(0.3, 0.01, 0.3)
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_61md4"]
|
[sub_resource type="Animation" id="Animation_61md4"]
|
||||||
length = 0.001
|
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")
|
shape = SubResource("BoxShape3D_6xn1i")
|
||||||
|
|
||||||
[node name="Background" type="MeshInstance3D" parent="AnimationContainer"]
|
[node name="Background" type="MeshInstance3D" parent="AnimationContainer"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.21, 0, 0.15)
|
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.21, 0.01, 0.15)
|
||||||
material_override = ExtResource("2_0x5at")
|
material_override = SubResource("ShaderMaterial_mhqg4")
|
||||||
mesh = SubResource("BoxMesh_08du6")
|
mesh = SubResource("QuadMesh_4bh1v")
|
||||||
skeleton = NodePath("../..")
|
skeleton = NodePath("../..")
|
||||||
|
|
||||||
[node name="Tabs" type="Node3D" parent="AnimationContainer" node_paths=PackedStringArray("initial_selected")]
|
[node name="Tabs" type="Node3D" parent="AnimationContainer" node_paths=PackedStringArray("initial_selected")]
|
||||||
|
|
|
@ -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="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"]
|
[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"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_nfwtf"]
|
||||||
size = Vector3(0.5, 0.3, 0.01)
|
size = Vector3(0.5, 0.3, 0.01)
|
||||||
|
|
||||||
[sub_resource type="BoxMesh" id="BoxMesh_yknqs"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_d2ck8"]
|
||||||
size = Vector3(0.5, 0.3, 0.01)
|
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"]
|
[node name="Onboarding" type="StaticBody3D"]
|
||||||
collision_layer = 6
|
collision_layer = 6
|
||||||
collision_mask = 6
|
collision_mask = 0
|
||||||
script = ExtResource("1_k4yvw")
|
script = ExtResource("1_k4yvw")
|
||||||
|
|
||||||
[node name="Label3D2" type="Label3D" parent="."]
|
[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
|
pixel_size = 0.001
|
||||||
text = "Getting Started"
|
text = "Getting Started"
|
||||||
font_size = 18
|
font_size = 18
|
||||||
|
@ -30,11 +44,11 @@ width = 470.0
|
||||||
shape = SubResource("BoxShape3D_nfwtf")
|
shape = SubResource("BoxShape3D_nfwtf")
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||||
material_override = ExtResource("2_aleti")
|
material_override = SubResource("ShaderMaterial_d2ck8")
|
||||||
mesh = SubResource("BoxMesh_yknqs")
|
mesh = SubResource("QuadMesh_ij2lj")
|
||||||
|
|
||||||
[node name="GettingStartedLabel" type="Label3D" parent="."]
|
[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
|
pixel_size = 0.001
|
||||||
text = "Hey!
|
text = "Hey!
|
||||||
|
|
||||||
|
@ -49,17 +63,17 @@ autowrap_mode = 3
|
||||||
width = 470.0
|
width = 470.0
|
||||||
|
|
||||||
[node name="GettingStartedButton" parent="." instance=ExtResource("3_hlpow")]
|
[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"
|
label = "open_in_new"
|
||||||
icon = true
|
icon = true
|
||||||
|
|
||||||
[node name="CloseButton" parent="." instance=ExtResource("3_hlpow")]
|
[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"
|
label = "done"
|
||||||
icon = true
|
icon = true
|
||||||
|
|
||||||
[node name="CloseLabel" type="Label3D" parent="."]
|
[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
|
pixel_size = 0.001
|
||||||
text = "Understood"
|
text = "Understood"
|
||||||
font_size = 18
|
font_size = 18
|
||||||
|
|
|
@ -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)
|
|
||||||
)
|
|
|
@ -1,3 +0,0 @@
|
||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:6041f48bfc2a4bc4c88096265fb3baf46881eec9a244104378c98a6c5e0dbb9a
|
|
||||||
size 442
|
|
BIN
app/content/ui/test.material.depren
Normal file
BIN
app/content/ui/test.material.depren
Normal file
Binary file not shown.
|
@ -1,89 +0,0 @@
|
||||||
[gd_scene load_steps=10 format=3 uid="uid://dclceqjqfxekx"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://content/ui/test.gd" id="1_jevji"]
|
|
||||||
[ext_resource type="Material" uid="uid://dy5bbwaceset8" path="res://content/ui/test.material" id="2_fswvt"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://pk5k1q8bx0rj" path="res://content/ui/components/slider/slider.tscn" id="3_f40pk"]
|
|
||||||
[ext_resource type="Script" path="res://content/functions/movable.gd" id="4_qjv7o"]
|
|
||||||
[ext_resource type="Shader" path="res://content/ui/glass2.gdshader" id="5_yedor"]
|
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_ptbst"]
|
|
||||||
size = Vector3(2, 1, 0.1)
|
|
||||||
|
|
||||||
[sub_resource type="QuadMesh" id="QuadMesh_4253w"]
|
|
||||||
size = Vector2(0.8, 0.5)
|
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_tiql8"]
|
|
||||||
render_priority = 0
|
|
||||||
shader = ExtResource("5_yedor")
|
|
||||||
shader_parameter/albedo = Color(1, 1, 1, 0.388235)
|
|
||||||
shader_parameter/roughness = 0.15
|
|
||||||
shader_parameter/normal_strength = 1.0
|
|
||||||
shader_parameter/edge_color = Color(0, 0, 0, 1)
|
|
||||||
|
|
||||||
[sub_resource type="QuadMesh" id="QuadMesh_g82c4"]
|
|
||||||
size = Vector2(1, 0.5)
|
|
||||||
|
|
||||||
[node name="Test" type="Node3D"]
|
|
||||||
script = ExtResource("1_jevji")
|
|
||||||
|
|
||||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
|
||||||
transform = Transform3D(-0.866023, -0.433016, 0.250001, 0.470665, -0.53724, 0.699892, -0.168754, 0.723789, 0.669068, 0.677175, 0.464924, 0.836006)
|
|
||||||
shadow_enabled = true
|
|
||||||
|
|
||||||
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.07)
|
|
||||||
visible = false
|
|
||||||
shape = SubResource("BoxShape3D_ptbst")
|
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D"]
|
|
||||||
material_override = ExtResource("2_fswvt")
|
|
||||||
mesh = SubResource("QuadMesh_4253w")
|
|
||||||
skeleton = NodePath("../..")
|
|
||||||
|
|
||||||
[node name="Slider" parent="StaticBody3D" instance=ExtResource("3_f40pk")]
|
|
||||||
transform = Transform3D(-4.37114e-08, 4.37114e-08, 1, 1, 1.91069e-15, 4.37114e-08, 0, 1, -4.37114e-08, 0, 0, 0)
|
|
||||||
min = 0.1
|
|
||||||
max = 2.0
|
|
||||||
value = 1.0
|
|
||||||
show_label = true
|
|
||||||
label_unit = "w"
|
|
||||||
|
|
||||||
[node name="Slider2" parent="StaticBody3D" instance=ExtResource("3_f40pk")]
|
|
||||||
transform = Transform3D(-4.37114e-08, 4.37114e-08, 1, 1, 1.91069e-15, 4.37114e-08, 0, 1, -4.37114e-08, 0.0884458, 0, 0)
|
|
||||||
min = 0.1
|
|
||||||
max = 2.0
|
|
||||||
value = 1.0
|
|
||||||
show_label = true
|
|
||||||
label_unit = "h"
|
|
||||||
|
|
||||||
[node name="Slider3" parent="StaticBody3D" instance=ExtResource("3_f40pk")]
|
|
||||||
transform = Transform3D(-4.37114e-08, 4.37114e-08, 1, 1, 1.91069e-15, 4.37114e-08, 0, 1, -4.37114e-08, 0.179572, 0, 0)
|
|
||||||
max = 0.5
|
|
||||||
show_label = true
|
|
||||||
label_unit = "s"
|
|
||||||
|
|
||||||
[node name="Slider4" parent="StaticBody3D" instance=ExtResource("3_f40pk")]
|
|
||||||
transform = Transform3D(-4.37114e-08, 4.37114e-08, 1, 1, 1.91069e-15, 4.37114e-08, 0, 1, -4.37114e-08, 0.277398, 0, 0)
|
|
||||||
show_label = true
|
|
||||||
label_unit = "c"
|
|
||||||
|
|
||||||
[node name="Slider5" parent="StaticBody3D" instance=ExtResource("3_f40pk")]
|
|
||||||
transform = Transform3D(-4.37114e-08, 4.37114e-08, 1, 1, 1.91069e-15, 4.37114e-08, 0, 1, -4.37114e-08, 0.368523, 0, 0)
|
|
||||||
max = 0.5
|
|
||||||
|
|
||||||
[node name="Slider6" parent="StaticBody3D" instance=ExtResource("3_f40pk")]
|
|
||||||
transform = Transform3D(-4.37114e-08, 4.37114e-08, 1, 1, 1.91069e-15, 4.37114e-08, 0, 1, -4.37114e-08, 0.458309, 0, 0)
|
|
||||||
max = 0.5
|
|
||||||
value = 0.0
|
|
||||||
|
|
||||||
[node name="Movable" type="Node" parent="StaticBody3D"]
|
|
||||||
script = ExtResource("4_qjv7o")
|
|
||||||
|
|
||||||
[node name="MeshInstance3D3" type="MeshInstance3D" parent="StaticBody3D"]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.0121959)
|
|
||||||
visible = false
|
|
||||||
material_override = SubResource("ShaderMaterial_tiql8")
|
|
||||||
mesh = SubResource("QuadMesh_g82c4")
|
|
||||||
skeleton = NodePath("../..")
|
|
Loading…
Reference in New Issue
Block a user