Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/android/.build_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.beta
4.3.rc3
3 changes: 1 addition & 2 deletions app/assets/environment.tres
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ sky_material = SubResource("ProceduralSkyMaterial_i4xao")
[resource]
background_mode = 1
background_color = Color(1, 1, 1, 1)
background_energy_multiplier = 0.8
sky = SubResource("Sky_vhymk")
ambient_light_source = 2
ambient_light_color = Color(1, 1, 1, 1)
ssao_radius = 6.52
ssao_intensity = 5.68
adjustment_contrast = 2.23
3 changes: 3 additions & 0 deletions app/assets/light.blend
Git LFS file not shown
55 changes: 55 additions & 0 deletions app/assets/light.blend.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dgrfnjvkf4vra"
path="res://.godot/imported/light.blend-a8d09ffaaed84fc638afde063bc32057.scn"

[deps]

source_file="res://assets/light.blend"
dest_files=["res://.godot/imported/light.blend-a8d09ffaaed84fc638afde063bc32057.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
animation/import_rest_as_RESET=false
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 added app/assets/light.blend1
Binary file not shown.
2 changes: 2 additions & 0 deletions app/assets/models/hands/Hand_low_L.gltf.import
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ 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
Expand All @@ -28,6 +29,7 @@ animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
gltf/naming_version=1
Expand Down
2 changes: 2 additions & 0 deletions app/assets/models/hands/Hand_low_R.gltf.import
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ 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
Expand All @@ -28,6 +29,7 @@ animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
gltf/naming_version=1
Expand Down
3 changes: 3 additions & 0 deletions app/assets/models/light/light.glb
Git LFS file not shown
39 changes: 39 additions & 0 deletions app/assets/models/light/light.glb.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://d0wr17viu6o1d"
path="res://.godot/imported/light.glb-6e86d2536024075819ae2da177da28e3.scn"

[deps]

source_file="res://assets/models/light/light.glb"
dest_files=["res://.godot/imported/light.glb-6e86d2536024075819ae2da177da28e3.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
animation/import_rest_as_RESET=false
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
39 changes: 39 additions & 0 deletions app/content/entities/binary_sensor/binary_sensor.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
extends Entity

const Entity = preload ("../entity.gd")

@onready var label: Label3D = $Label
@onready var state: Label3D = $State
@onready var collision_shape = $CollisionShape3D

# Called when the node enters the scene tree for the first time.
func _ready():
super()

icon.value = "sensors"

var stateInfo = await HomeApi.get_state(entity_id)
set_text(stateInfo)

await HomeApi.watch_state(entity_id, func(new_state):
set_text(new_state)
)

func set_text(stateInfo):
if stateInfo == null:
return

state.text = "check_box" if stateInfo["state"] == "True" else "check_box_outline_blank"

if stateInfo["attributes"]["friendly_name"] != null:
label.text = stateInfo["attributes"]["friendly_name"]

var state_font = state.get_font()
var state_size = state_font.get_string_size(state.text, HORIZONTAL_ALIGNMENT_LEFT, -1, state.font_size) * state.pixel_size
var label_font = label.get_font()
var label_size = label_font.get_string_size(label.text, HORIZONTAL_ALIGNMENT_RIGHT, -1, label.font_size) * label.pixel_size

var size = Vector2(max(state_size.x, label_size.x) * 0.5, (state_size.y + label_size.y) * 0.25)

collision_shape.shape.size.x = size.x
collision_shape.shape.size.y = size.y
37 changes: 37 additions & 0 deletions app/content/entities/binary_sensor/binary_sensor.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[gd_scene load_steps=6 format=3 uid="uid://bdnxxqng3s6l"]

[ext_resource type="Script" path="res://content/entities/binary_sensor/binary_sensor.gd" id="1_ac2fh"]
[ext_resource type="FontFile" uid="uid://cs508knjj1lnw" path="res://assets/fonts/Raleway-Medium.ttf" id="2_dqk35"]
[ext_resource type="Script" path="res://content/functions/movable.gd" id="3_mxubb"]
[ext_resource type="FontVariation" uid="uid://sshfnckriqxn" path="res://assets/icons/icons.tres" id="3_pen57"]

[sub_resource type="BoxShape3D" id="BoxShape3D_mjnxo"]
resource_local_to_scene = true
size = Vector3(0.18, 0.03, 0.02)

[node name="BinarySensor" type="StaticBody3D"]
script = ExtResource("1_ac2fh")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_mjnxo")

[node name="Label" type="Label3D" parent="."]
transform = Transform3D(0.4, 0, 0, 0, 0.4, 0, 0, 0, 0.4, 0, 0.02, 0)
pixel_size = 0.001
text = "some text
"
font = ExtResource("2_dqk35")
font_size = 80
outline_size = 0

[node name="State" type="Label3D" parent="."]
transform = Transform3D(0.4, 0, 0, 0, 0.4, 0, 0, 0, 0.4, 0, -0.02, 0)
pixel_size = 0.001
text = "check_box"
font = ExtResource("3_pen57")
font_size = 80
outline_size = 0

[node name="Movable" type="Node" parent="."]
script = ExtResource("3_mxubb")
resizable = true
8 changes: 4 additions & 4 deletions app/content/entities/button/button.gd
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ func _ready():

var stateInfo = await HomeApi.get_state(entity_id)

if stateInfo == null:
return

set_state(stateInfo)

await HomeApi.watch_state(entity_id, func(new_state):
Expand All @@ -25,6 +22,9 @@ func _ready():
)

func set_state(state):
if state == null:
return

if state.attributes.has("friendly_name"):
var name = state.attributes["friendly_name"]

Expand All @@ -36,4 +36,4 @@ func set_state(state):
button.label = name

func quick_action():
HomeApi.set_state(entity_id, "pressed")
HomeApi.set_state(entity_id, "pressed")
7 changes: 3 additions & 4 deletions app/content/entities/camera/camera.gd
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ func set_state(stateInfo):

func load_image(url: String):
if http_request.get_http_client_status() != HTTPClient.STATUS_DISCONNECTED:
print("HTTP client is busy, skipping")
return

http_request.request("http://192.168.33.33:8123" + url)
var pre_url = Store.settings.state.url.replace("ws://", "http://").replace("wss://", "https://")

http_request.request(pre_url + url)

var result = await http_request.request_completed

Expand Down Expand Up @@ -120,8 +121,6 @@ func load_image(url: String):
view.pixel_size = pixel_size
mesh.visible = false

print("Loaded image: ", url)

func get_options():
return {
"cam_active": cam_active.value,
Expand Down
14 changes: 7 additions & 7 deletions app/content/entities/camera/settings.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[ext_resource type="PackedScene" uid="uid://pk5k1q8bx0rj" path="res://content/ui/components/slider/slider.tscn" id="4_t8xp5"]
[ext_resource type="PackedScene" uid="uid://bsjqdvkt0u87c" path="res://content/ui/components/button/button.tscn" id="5_opf0y"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_ikxbe"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_g5kcg"]
resource_local_to_scene = true
render_priority = 10
shader = ExtResource("2_wwobq")
Expand All @@ -22,7 +22,7 @@ shader_parameter/corner_radius = 0.2
shader_parameter/roughness = 0.3
shader_parameter/grain_amount = 0.02

[sub_resource type="QuadMesh" id="QuadMesh_qfg01"]
[sub_resource type="QuadMesh" id="QuadMesh_5ds4q"]
size = Vector2(0.3, 0.2)

[sub_resource type="BoxShape3D" id="BoxShape3D_ctomk"]
Expand All @@ -34,8 +34,8 @@ collision_mask = 0
script = ExtResource("1_1ixy6")

[node name="Panel" parent="." instance=ExtResource("1_myvk1")]
material_override = SubResource("ShaderMaterial_ikxbe")
mesh = SubResource("QuadMesh_qfg01")
material_override = SubResource("ShaderMaterial_g5kcg")
mesh = SubResource("QuadMesh_5ds4q")
skeleton = NodePath("../..")
size = Vector2(0.3, 0.2)

Expand Down Expand Up @@ -95,13 +95,13 @@ outline_size = 0
horizontal_alignment = 0

[node name="FPSSlider" parent="." instance=ExtResource("4_t8xp5")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.04, -0.05, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.03, -0.08, 0)
min = 1.0
max = 30.0
value = 1.0
value = 10.0
step = 1.0
label_unit = "FPS"
size = Vector3(0.11, 0.02, 0.01)
size = Vector3(0.2, 0.02, 0.01)

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.01)
Expand Down
6 changes: 6 additions & 0 deletions app/content/entities/light/glass_bulb.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://0ojuvv6njowp"]

[resource]
transparency = 1
albedo_color = Color(1, 0.85, 0, 0.52549)
emission_energy_multiplier = 7.43
Loading