fix setter and getter
This commit is contained in:
parent
6648ac171b
commit
13939185d4
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c5fa5f006a42d87f43a8b411e4e4bf64a8b4fbbaedd0d02579134a8fa59161eb
|
||||
size 894176
|
||||
oid sha256:bef6a6cb32c912112413d2effbbea13a6d51540108785e3d0b09f449aeead88d
|
||||
size 883216
|
||||
|
|
54
app/assets/chat_bubble.blend.import
Normal file
54
app/assets/chat_bubble.blend.import
Normal file
|
@ -0,0 +1,54 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://di82bqu33sr6k"
|
||||
path="res://.godot/imported/chat_bubble.blend-de1406e8004abcd1a11c6d9c08beeab9.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/chat_bubble.blend"
|
||||
dest_files=["res://.godot/imported/chat_bubble.blend-de1406e8004abcd1a11c6d9c08beeab9.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
Binary file not shown.
3
app/assets/models/chat_bubble/chat_bubble-flipped.glb
Normal file
3
app/assets/models/chat_bubble/chat_bubble-flipped.glb
Normal file
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d789ce1d38ac6bd59774219ec30bb3b40e1fbcb46326c8c2a88a9e7c662c57cc
|
||||
size 17844
|
34
app/assets/models/chat_bubble/chat_bubble-flipped.glb.import
Normal file
34
app/assets/models/chat_bubble/chat_bubble-flipped.glb.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://bbximrhpqx18o"
|
||||
path="res://.godot/imported/chat_bubble-flipped.glb-789aae22dafe6fa03b0567b80233a8e3.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/models/chat_bubble/chat_bubble-flipped.glb"
|
||||
dest_files=["res://.godot/imported/chat_bubble-flipped.glb-789aae22dafe6fa03b0567b80233a8e3.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
54
app/assets/ray.blend.import
Normal file
54
app/assets/ray.blend.import
Normal file
|
@ -0,0 +1,54 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://po4gd6amobh2"
|
||||
path="res://.godot/imported/ray.blend-eba6795b628724ab6db66b86eccc4315.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ray.blend"
|
||||
dest_files=["res://.godot/imported/ray.blend-eba6795b628724ab6db66b86eccc4315.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
54
app/assets/trash_bin.blend.import
Normal file
54
app/assets/trash_bin.blend.import
Normal file
|
@ -0,0 +1,54 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dsv5rpkom2yqk"
|
||||
path="res://.godot/imported/trash_bin.blend-922964bd1a889a6b6013a91cbf134fac.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/trash_bin.blend"
|
||||
dest_files=["res://.godot/imported/trash_bin.blend-922964bd1a889a6b6013a91cbf134fac.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
|
@ -3,7 +3,7 @@
|
|||
[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="PackedScene" uid="uid://b30w6tywfj4fp" path="res://content/system/controller_left/controller_left.tscn" id="2_2lraw"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3f8glx1xgm5w" path="res://content/system/raycast/raycast.tscn" id="3_67lii"]
|
||||
[ext_resource type="PackedScene" uid="uid://dscp8x0ari57n" path="res://content/system/raycast/raycast.tscn" id="3_67lii"]
|
||||
[ext_resource type="PackedScene" uid="uid://b2kjh1fpjptdr" path="res://content/system/camera/camera.tscn" id="3_rj4ac"]
|
||||
[ext_resource type="PackedScene" uid="uid://bsx12q23v8apy" path="res://content/system/hands/hands.tscn" id="4_v8xu6"]
|
||||
[ext_resource type="PackedScene" uid="uid://ctltchlf2j2r4" path="res://addons/xr-simulator/XRSimulator.tscn" id="5_3qc8g"]
|
||||
|
|
|
@ -36,6 +36,8 @@ func _ready():
|
|||
|
||||
finish()
|
||||
|
||||
chat_assistant.flip = true
|
||||
|
||||
audio_timer.timeout.connect(func():
|
||||
voice_assistant.send_data(PackedByteArray())
|
||||
)
|
||||
|
|
|
@ -26,10 +26,10 @@ one_shot = true
|
|||
|
||||
[node name="ChatUser" parent="." instance=ExtResource("2_laew1")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.109997, 0.025, 0)
|
||||
flip = false
|
||||
|
||||
[node name="ChatAssistant" parent="." instance=ExtResource("2_laew1")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0499932, -0.025, 0)
|
||||
text = "Hello, World!"
|
||||
flip = true
|
||||
|
||||
[node name="Loader" parent="." instance=ExtResource("3_25iy1")]
|
||||
|
|
|
@ -5,22 +5,25 @@ const FontTools = preload ("res://lib/utils/font_tools.gd")
|
|||
|
||||
@onready var label: Label3D = $Label3D
|
||||
@onready var chat: Skeleton3D = $chat_bubble/Armature/Skeleton3D
|
||||
@onready var model: MeshInstance3D = $chat_bubble/Armature/Skeleton3D/Cube
|
||||
@onready var chat_flipped: Skeleton3D = $"chat_bubble-flipped/Armature/Skeleton3D"
|
||||
@onready var model: Node3D = $chat_bubble
|
||||
@onready var model_flipped: Node3D = $"chat_bubble-flipped"
|
||||
|
||||
@export var text := "Hello, World!":
|
||||
set(value):
|
||||
text = value
|
||||
if !is_node_ready(): await ready
|
||||
|
||||
text = value
|
||||
label.text = value
|
||||
update()
|
||||
|
||||
@export var flip: bool = false:
|
||||
set(value):
|
||||
flip = value
|
||||
if !is_node_ready(): await ready
|
||||
|
||||
flip = value
|
||||
model.rotation_degrees.x = -90 if value else 90
|
||||
model.visible = !value
|
||||
model_flipped.visible = value
|
||||
|
||||
const base_width = 0.8 * 0.2
|
||||
|
||||
|
@ -30,8 +33,6 @@ func update():
|
|||
var offset = (text_width - base_width) / 0.2
|
||||
|
||||
offset = max(0.0, offset)
|
||||
|
||||
if flip:
|
||||
offset = -offset
|
||||
|
||||
chat.set_bone_pose_position(1 if flip else 0, Vector3(0, offset, 0))
|
||||
chat.set_bone_pose_position(0, Vector3(0, offset, 0))
|
||||
chat_flipped.set_bone_pose_position(1, Vector3(0, -offset, 0))
|
|
@ -1,24 +1,24 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://cy6jklyde3pgo"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cy6jklyde3pgo"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b12raorbby1xd" path="res://assets/models/chat_bubble/chat_bubble.glb" id="1_lsdcs"]
|
||||
[ext_resource type="Script" path="res://content/system/assist/chat.gd" id="1_rbrak"]
|
||||
[ext_resource type="Material" uid="uid://bujy3egn1oqac" path="res://assets/materials/pri-500.material" id="2_ps3pl"]
|
||||
[ext_resource type="FontVariation" uid="uid://d2ofyimg5s65q" path="res://assets/fonts/ui_font_500.tres" id="4_gxfp3"]
|
||||
[ext_resource type="PackedScene" uid="uid://bbximrhpqx18o" path="res://assets/models/chat_bubble/chat_bubble-flipped.glb" id="5_q44mc"]
|
||||
|
||||
[node name="Chat" type="Node3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.41237e-06, 0, 0)
|
||||
script = ExtResource("1_rbrak")
|
||||
text = "Hello World"
|
||||
flip = true
|
||||
|
||||
[node name="chat_bubble" parent="." instance=ExtResource("1_lsdcs")]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, -0.0154175, 0, 0.0710473)
|
||||
|
||||
[node name="Armature" parent="chat_bubble" index="0"]
|
||||
transform = Transform3D(1, 0, 0, 0, 0, 1, 0, -1, 0, 0.5, 0, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0.5, 0, 0)
|
||||
|
||||
[node name="Cube" parent="chat_bubble/Armature/Skeleton3D" index="0"]
|
||||
transform = Transform3D(-4.37114e-08, -1, -4.37114e-08, 0, -4.37114e-08, 1, -1, 4.37114e-08, 1.91069e-15, 0, 0.35, 0)
|
||||
transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, 0, 0.35, 0)
|
||||
material_override = ExtResource("2_ps3pl")
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="."]
|
||||
|
@ -30,4 +30,16 @@ font_size = 20
|
|||
outline_size = 0
|
||||
horizontal_alignment = 0
|
||||
|
||||
[node name="chat_bubble-flipped" parent="." instance=ExtResource("5_q44mc")]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0.0843144, 0, 0.000967294)
|
||||
visible = false
|
||||
|
||||
[node name="Armature" parent="chat_bubble-flipped" index="0"]
|
||||
transform = Transform3D(-1, 0, 0, 0, 4.37114e-08, 1, 0, -1, 4.37114e-08, 0, 0, 0)
|
||||
|
||||
[node name="Cube" parent="chat_bubble-flipped/Armature/Skeleton3D" index="0"]
|
||||
transform = Transform3D(-4.37114e-08, 1, -4.37114e-08, 0, -4.37114e-08, -1, -1, -4.37114e-08, 1.91069e-15, 0, 0, 0)
|
||||
material_override = ExtResource("2_ps3pl")
|
||||
|
||||
[editable path="chat_bubble"]
|
||||
[editable path="chat_bubble-flipped"]
|
||||
|
|
|
@ -26,8 +26,14 @@ func update_house():
|
|||
|
||||
align_reference.update_align_reference()
|
||||
|
||||
for index in range(Store.house.rooms.size()):
|
||||
for index in range(Store.house.rooms.size() - 1, -1, -1):
|
||||
var new_room = Store.house.rooms[index]
|
||||
|
||||
if new_room.corners.size() == 0:
|
||||
Store.house.rooms.remove_at(index)
|
||||
Store.house.save_local()
|
||||
continue
|
||||
|
||||
create_room(new_room.name, 0)
|
||||
|
||||
for entity_index in range(Store.house.entities.size()):
|
||||
|
|
|
@ -13,6 +13,7 @@ extends Node3D
|
|||
|
||||
var editable: bool = false:
|
||||
set(value):
|
||||
editable = value
|
||||
if !is_node_ready(): await ready
|
||||
|
||||
if value:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://d3f8glx1xgm5w"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dscp8x0ari57n"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bl33klueufwja" path="res://assets/materials/pointer.png" id="1_2f2iv"]
|
||||
[ext_resource type="Script" path="res://content/system/raycast/raycast.gd" id="1_gp8nv"]
|
||||
|
|
|
@ -53,9 +53,9 @@ const ECHO_WAIT_REPEAT = 0.1
|
|||
@export var initial_active: bool = false
|
||||
var external_value: Proxy = null:
|
||||
set(value):
|
||||
external_value = value
|
||||
if !is_node_ready(): await ready
|
||||
|
||||
external_value = value
|
||||
if value != null:
|
||||
value.on_set.connect(func(_value):
|
||||
update_animation()
|
||||
|
|
|
@ -11,9 +11,8 @@ var text_handler = preload ("res://content/ui/components/input/text_handler.gd")
|
|||
@onready var label: Label3D = $Label
|
||||
|
||||
@export_range(0.1, 2, 0.01, "suffix:m") var width: float = 0.15:
|
||||
get:
|
||||
return text_handler.width
|
||||
set(value):
|
||||
width = value
|
||||
text_handler.width = value
|
||||
|
||||
if !is_node_ready(): await ready
|
||||
|
@ -23,11 +22,9 @@ var text_handler = preload ("res://content/ui/components/input/text_handler.gd")
|
|||
label.position.x = -value / 2 + 0.002
|
||||
|
||||
@export var text: String:
|
||||
get:
|
||||
return text_handler.text
|
||||
set(value):
|
||||
text = value
|
||||
var focused = Engine.is_editor_hint() == false&&EventSystem.is_focused(self) == false
|
||||
|
||||
if !is_node_ready(): await ready
|
||||
|
||||
text_handler.set_text(value, focused)
|
||||
|
@ -35,9 +32,9 @@ var text_handler = preload ("res://content/ui/components/input/text_handler.gd")
|
|||
|
||||
@export var disabled: bool = false:
|
||||
set(value):
|
||||
disabled = value
|
||||
if !is_node_ready(): await ready
|
||||
|
||||
disabled = value
|
||||
if disabled:
|
||||
label.modulate = Color(0.7, 0.7, 0.7)
|
||||
add_to_group("ui_focus_skip")
|
||||
|
|
|
@ -56,7 +56,6 @@ _data = {
|
|||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
script = ExtResource("1_uml3t")
|
||||
width = 0.2
|
||||
text = "Example"
|
||||
|
||||
[node name="Box" type="MeshInstance3D" parent="."]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
extends Node3D
|
||||
|
||||
const ButtonScene = preload("res://content/ui/components/button/button.tscn")
|
||||
const ButtonScene = preload ("res://content/ui/components/button/button.tscn")
|
||||
|
||||
@onready var devices_node: GridContainer3D = $Devices
|
||||
@onready var next_page_button = $Buttons/NextPageButton
|
||||
|
@ -24,13 +24,10 @@ func _ready():
|
|||
)
|
||||
|
||||
func _enter_tree():
|
||||
if HomeApi.has_connected():
|
||||
if !HomeApi.has_connected(): await HomeApi.on_connect
|
||||
|
||||
if is_node_ready():
|
||||
load_devices()
|
||||
else:
|
||||
HomeApi.on_connect.connect(func():
|
||||
if is_node_ready():
|
||||
load_devices()
|
||||
)
|
||||
|
||||
func load_devices():
|
||||
if devices.size() == 0:
|
||||
|
@ -38,7 +35,7 @@ func load_devices():
|
|||
render()
|
||||
|
||||
HomeApi.on_disconnect.connect(func():
|
||||
devices = []
|
||||
devices=[]
|
||||
if is_node_ready():
|
||||
render()
|
||||
)
|
||||
|
|
|
@ -49,12 +49,11 @@ var edit_room = false:
|
|||
selected_room = input.text
|
||||
|
||||
func _ready():
|
||||
if Store.house.is_loaded():
|
||||
_generate_room_map()
|
||||
else:
|
||||
Store.house.on_loaded.connect(func():
|
||||
_generate_room_map()
|
||||
)
|
||||
if !Store.house.is_loaded(): await Store.house.on_loaded
|
||||
|
||||
_generate_room_map()
|
||||
|
||||
input.text = "Room %s" % (rooms_map.get_child_count() + 1)
|
||||
|
||||
room_button.on_button_down.connect(func():
|
||||
if selected_room == null:
|
||||
|
@ -114,6 +113,9 @@ func _generate_room_map():
|
|||
if rooms.size() == 0:
|
||||
return
|
||||
|
||||
if rooms[0].corners.size() == 0:
|
||||
return
|
||||
|
||||
var current_min = Vector2(rooms[0].corners[0].x, rooms[0].corners[0].y)
|
||||
var current_max = current_min
|
||||
|
||||
|
|
|
@ -17,5 +17,6 @@ icon = true
|
|||
|
||||
[node name="Input" parent="." instance=ExtResource("2_hstw7")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.12, 0.005, 0.27)
|
||||
width = 0.15
|
||||
text = "Room 1"
|
||||
disabled = true
|
||||
|
|
Loading…
Reference in New Issue
Block a user