more fixes

This commit is contained in:
Nitwel 2024-04-25 16:05:52 +02:00
parent 8bbeeb49a9
commit 570dda3791
9 changed files with 45 additions and 22 deletions

View File

@ -26,6 +26,10 @@ func _ready():
var index = AudioServer.get_bus_index("Record")
effect = AudioServer.get_bus_effect(index, 0)
chat_assistant.visible = false
chat_user.visible = false
loader.visible = false
if !HomeApi.has_connected():
await HomeApi.on_connect
@ -91,6 +95,9 @@ func finish():
loader.visible = false
func _process(_delta):
if voice_assistant == null:
return
var sterioData: PackedVector2Array = effect.get_buffer(effect.get_frames_available())
if sterioData.size() == 0:

View File

@ -13,6 +13,7 @@ script = ExtResource("1_b53yn")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body"]
shape = SubResource("BoxShape3D_bckw3")
disabled = true
[node name="Movable" type="Node" parent="Body"]
script = ExtResource("2_x7oed")

View File

@ -23,7 +23,6 @@ const FontTools = preload ("res://lib/utils/font_tools.gd")
_update_text()
func _ready():
print("label %s enter tree" % text)
_update_text()
func _update_text():
@ -31,4 +30,3 @@ func _update_text():
label.text = text
var text_size = FontTools.get_font_size(label)
size = Vector3(text_size.x, text_size.y, 0.1)
print("label %s size %s" % [text, size])

View File

@ -1,15 +1,29 @@
[gd_scene load_steps=10 format=3 uid="uid://bqj7qwj5mgd30"]
[gd_scene load_steps=11 format=3 uid="uid://bqj7qwj5mgd30"]
[ext_resource type="Script" path="res://content/ui/components/notification/notification.gd" id="1_yw3yb"]
[ext_resource type="Material" uid="uid://bujy3egn1oqac" path="res://assets/materials/pri-500.material" id="2_5b8oo"]
[ext_resource type="Shader" path="res://assets/materials/glass.gdshader" id="2_b68od"]
[ext_resource type="FontVariation" uid="uid://sshfnckriqxn" path="res://assets/icons/icons.tres" id="3_1ljpc"]
[ext_resource type="PackedScene" uid="uid://bsjqdvkt0u87c" path="res://content/ui/components/button/button.tscn" id="4_ocg5j"]
[sub_resource type="BoxMesh" id="BoxMesh_s37oj"]
size = Vector3(0.25, 0.01, 0.05)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_0ktvn"]
render_priority = 10
shader = ExtResource("2_b68od")
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.25, 0.05)
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.025
shader_parameter/roughness = 0.3
shader_parameter/grain_amount = 0.02
[sub_resource type="QuadMesh" id="QuadMesh_dx2yp"]
size = Vector2(0.25, 0.05)
[sub_resource type="BoxShape3D" id="BoxShape3D_m4d21"]
size = Vector3(0.25, 0.01, 0.05)
size = Vector3(0.25, 0.05, 0.01)
[sub_resource type="Animation" id="Animation_bkual"]
length = 0.001
@ -164,25 +178,31 @@ script = ExtResource("1_yw3yb")
collision_layer = 6
collision_mask = 0
[node name="MeshInstance3D" type="MeshInstance3D" parent="AnimationNode"]
material_override = ExtResource("2_5b8oo")
mesh = SubResource("BoxMesh_s37oj")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="AnimationNode"]
material_override = SubResource("ShaderMaterial_0ktvn")
mesh = SubResource("QuadMesh_dx2yp")
[node name="CollisionShape3D" type="CollisionShape3D" parent="AnimationNode"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.005)
shape = SubResource("BoxShape3D_m4d21")
[node name="Text" type="Label3D" parent="AnimationNode"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -0.08, 0.006, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.08, 0, 0.001)
pixel_size = 0.001
render_priority = 15
outline_render_priority = 14
text = "Example"
font_size = 10
outline_size = 0
horizontal_alignment = 0
autowrap_mode = 3
width = 190.0
width = 170.0
[node name="Icon" type="Label3D" parent="AnimationNode"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -0.1, 0.006, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.1, 0, 0.001)
pixel_size = 0.001
render_priority = 15
outline_render_priority = 14
text = "info"
font = ExtResource("3_1ljpc")
font_size = 24
@ -194,10 +214,9 @@ libraries = {
}
[node name="Button" parent="AnimationNode" instance=ExtResource("4_ocg5j")]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0.12, -0.003, -0.02)
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0.1, 0, 0)
label = "close"
icon = true
size = Vector3(1, 1, 1)
[node name="Timer" type="Timer" parent="AnimationNode"]
wait_time = 3.0

View File

@ -46,7 +46,6 @@ func _ready():
)
func _update():
print("update %s %s %s %s" % [page, pages, visible_pages, get_parent()])
if !is_node_ready(): return
for child in get_children():
@ -70,8 +69,6 @@ func _update():
prev_button.size = Vector3(size.y, size.y, size.z)
next_button.size = Vector3(size.y, size.y, size.z)
print("A %s %s %s %s" % [display_pages, center_pos, start_dots, end_dots])
for i in range(display_pages):
if (start_dots&&i == 1)||(end_dots&&i == display_pages - 2):
var container = Container3D.new()

View File

@ -15,8 +15,6 @@ func _ready():
var pages = R.computed(func(_arg):
var devices=Store.devices.state.devices
print("recalc pages ", ceil(devices.size() / page_size))
return ceil(devices.size() / page_size)
)

View File

@ -35,7 +35,7 @@ func _ready():
notification_node.type=event.type
for child in notify_place.get_children():
child.position += Vector3(0, 0, -0.06)
child.position += Vector3(0, 0.06, 0)
notify_place.add_child(notification_node)
)

View File

@ -40,6 +40,7 @@ disabled = true
[node name="Background" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 1.06581e-14, 0, -1.06581e-14, 1, 0.21, -0.16, 0)
visible = false
material_override = SubResource("ShaderMaterial_dah0r")
mesh = SubResource("QuadMesh_fq44b")
skeleton = NodePath("../..")

View File

@ -90,10 +90,12 @@ icon = true
[node name="Credits" type="StaticBody3D" parent="Content"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.37, -0.300229, 0)
visible = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="Content/Credits"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.005, 0, 0)
shape = SubResource("BoxShape3D_3qdps")
disabled = true
[node name="Label" type="Label3D" parent="Content/Credits"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.98023e-08, 0, 0)